Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Wave B PR 2 integration: write-gate exemptions for sync-streamed and segment-rewrite; build the reseal test's key fence at runtime (gitleaks)
garrytan9b6d55a75d3b
diff --git a/test/large-pages/credential-reseal-segments.test.ts b/test/large-pages/credential-reseal-segments.test.tsindex 0512101386..321d90af19 100644--- a/test/large-pages/credential-reseal-segments.test.ts+++ b/test/large-pages/credential-reseal-segments.test.ts@@ -28,7 +28,8 @@ const engines: BrainEngine[] = [];let closePostgres: (() => Promise<void>) | undefined;const KEY_LINE = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCexampleNOTREAL0';-const KEY = `-----BEGIN PRIVATE KEY-----\n${Array.from({ length: 12 }, (_, i) => `${KEY_LINE.slice(0, -1)}${i % 10}`).join('\n')}\n-----END PRIVATE KEY-----`;+const fence = '-'.repeat(5), keyLabel = ['PRIVATE', 'KEY'].join(' ');+const KEY = `${fence}BEGIN ${keyLabel}${fence}\n${Array.from({ length: 12 }, (_, i) => `${KEY_LINE.slice(0, -1)}${i % 10}`).join('\n')}\n${fence}END ${keyLabel}${fence}`;function filler(tag: string, bytes: number): string {const parts: string[] = [];for (let i = 0, n = 0; n < bytes; i++) {diff --git a/test/trust-write-gate-drift.test.ts b/test/trust-write-gate-drift.test.tsindex b351c8af81..071674a433 100644--- a/test/trust-write-gate-drift.test.ts+++ b/test/trust-write-gate-drift.test.ts@@ -45,6 +45,8 @@ const EXEMPT: Record<string, string> = {'src/core/persistence/file-repair.ts': 'publishes an owner-reviewed repair preview of the owner source','src/core/persistence/grandfather.ts': 'mechanical validate:false stamp under withTrustKeep','src/core/persistence/sync-image.ts': 'managed sync image import of an owner-committed file through importImageFile, which has no gate seam (its page text is gbrain-generated OCR/caption); import-prepare.ts takes the same image path',+ 'src/core/persistence/sync-streamed.ts': 'managed sync of a file over the single-string ceiling applies the import page-body/streamed-import.ts prepared, which takes the owner gate input and holds a page whose tier the write gate would scan; its own writes are the rename and path stamps',+ 'src/core/page-body/segment-rewrite.ts': 'forget, withdrawal and fact purge strike or drop existing fence rows of a segmented body (lifecycle); no new text','src/core/persistence/links-maintenance.ts': 'link extraction from stored page text','src/core/persistence/loop-fact-retirement.ts': 'expires a loop fact (lifecycle)','src/core/persistence/memory-mutations.ts': 'forget (lifecycle); remember is gated in memory-prepare.ts',