Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix: CI run 1 follow-ups (fresh/upgrade column order for v208, deliberate golden regens, serial + canonical-writer inventory rows, delta tests age fixtures past the commit lag)
garrytan0de5c6cf874c
diff --git a/docs/architecture/canonical-writers.tsv b/docs/architecture/canonical-writers.tsvindex 7bc3439665..6f8d6b84cd 100644--- a/docs/architecture/canonical-writers.tsv+++ b/docs/architecture/canonical-writers.tsv@@ -165,6 +165,7 @@ src/core/skillpack/audit.ts 0 filesystem_guard Audit-directory overrides and appsrc/core/skillify/generator.ts 0 filesystem_guard Skillify scaffolding preflights the full file and resolver plan before partial outputs, with final managed-root and inode-alias sink checks.src/core/dry-fix.ts 0 filesystem_guard Doctor and check-resolvable repair preflight every manifest skill before applying changes; both replacement and insertion sinks recheck canonical refusal.src/core/skillpack/harness-bridge.ts 0 filesystem_guard Harness install, reference rewrite and ledger-owned removal preflight all destinations before effects; rewrite and deletion sinks recheck canonical refusal.+src/core/shared-skills/source-opt-out.ts 2 projection Trusted local CLI only (refuses remote !== false): toggles the sources.config.shared_skills setting key on a non-archived source; a settings field, not page content, and canonical columns stay guarded by SQL triggers.src/core/shared-skills/setup.ts 1 engine_guard Trusted preactivation empty-source root binding uses an incarnation and null-path CAS; managed topology SQL remains guarded and skill bytes publish only through owner claim and bundle adoption.src/core/shared-skills/optimizer.ts 0 coordinator Shared optimization preserves the exact approved closure and original grants in private staging; only accepted body changes reach put_skill with the original revision and stable request UUID.src/core/persistence/import-prepare.ts 2 coordinator The prepared local import updates source_path only inside canonical publication; owner, input and target hashes, source confinement and knowledge-versus-skill boundary revalidate before apply. Its importFromContent calls carry prepare and run inside the coordinator publication.diff --git a/scripts/serial-files.tsv b/scripts/serial-files.tsvindex 4f6af23bab..540f6f7546 100644--- a/scripts/serial-files.tsv+++ b/scripts/serial-files.tsv@@ -307,6 +307,7 @@ test/serve-sync-runner.serial.test.ts global-state global-state: process-wide tetest/session-seat-capture.serial.test.ts R1 R1: mutates process.env (GBRAIN_HOME, GBRAIN_SEAT)test/shared-skills-export.serial.test.ts global-state global-state: R3: constructs PGLiteEngine outside beforeAll; R4: PGLiteEngine without an afterAll disconnecttest/shared-skills-init.serial.test.ts global-state global-state: R3: constructs PGLiteEngine outside beforeAll; R4: PGLiteEngine without an afterAll disconnect+test/shared-skills-inventory-park.serial.test.ts global-state global-state: R3: constructs PGLiteEngine outside beforeAll (per-test GBRAIN_HOME brains driven through the real CLI); R4: PGLiteEngine without an afterAll disconnecttest/shared-skills-migration-cli.serial.test.ts global-state global-state: R3: constructs PGLiteEngine outside beforeAll; R4: PGLiteEngine without an afterAll disconnecttest/shared-skills-optimizer.serial.test.ts global-state global-state: process-wide test seams __setChatTransportForTests; spyOn fs.readFileSync, fs.lstatSync, fs.realpathSynctest/shared-skills-restore.serial.test.ts global-state global-state: R3: constructs PGLiteEngine outside beforeAlldiff --git a/src/core/pglite-schema.generated.ts b/src/core/pglite-schema.generated.tsindex 2686343078..8ccddd487c 100644--- a/src/core/pglite-schema.generated.ts+++ b/src/core/pglite-schema.generated.ts@@ -483,10 +483,10 @@ CREATE TABLE IF NOT EXISTS session_context_state (surfaced_slugs JSONB NOT NULL DEFAULT '[]'::jsonb,checkpoint_manifest JSONB NOT NULL DEFAULT '[]'::jsonb,last_wake_at TIMESTAMPTZ,+ updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),facts_cursor_at TIMESTAMPTZ,facts_cursor_id BIGINT,degraded_wakes INTEGER NOT NULL DEFAULT 0,- updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),PRIMARY KEY (source_id, client_id, session_id));CREATE INDEX IF NOT EXISTS session_context_state_updated_idxdiff --git a/src/core/schema-embedded.generated.ts b/src/core/schema-embedded.generated.tsindex 3bb3401842..14c5f98a63 100644--- a/src/core/schema-embedded.generated.ts+++ b/src/core/schema-embedded.generated.ts@@ -900,10 +900,10 @@ CREATE TABLE IF NOT EXISTS session_context_state (surfaced_slugs JSONB NOT NULL DEFAULT '[]'::jsonb,checkpoint_manifest JSONB NOT NULL DEFAULT '[]'::jsonb,last_wake_at TIMESTAMPTZ,+ updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),facts_cursor_at TIMESTAMPTZ,facts_cursor_id BIGINT,degraded_wakes INTEGER NOT NULL DEFAULT 0,- updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),PRIMARY KEY (source_id, client_id, session_id));CREATE INDEX IF NOT EXISTS session_context_state_updated_idxdiff --git a/src/schema.sql b/src/schema.sqlindex f69f8d639b..7a0919b3a9 100644--- a/src/schema.sql+++ b/src/schema.sql@@ -896,10 +896,10 @@ CREATE TABLE IF NOT EXISTS session_context_state (surfaced_slugs JSONB NOT NULL DEFAULT '[]'::jsonb,checkpoint_manifest JSONB NOT NULL DEFAULT '[]'::jsonb,last_wake_at TIMESTAMPTZ,+ updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),facts_cursor_at TIMESTAMPTZ,facts_cursor_id BIGINT,degraded_wakes INTEGER NOT NULL DEFAULT 0,- updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),PRIMARY KEY (source_id, client_id, session_id));CREATE INDEX IF NOT EXISTS session_context_state_updated_idxdiff --git a/test/fixtures/goldens/catalog/pglite-engine-init-default.json b/test/fixtures/goldens/catalog/pglite-engine-init-default.jsonindex ba60c64160..7d807b48ac 100644--- a/test/fixtures/goldens/catalog/pglite-engine-init-default.json+++ b/test/fixtures/goldens/catalog/pglite-engine-init-default.json@@ -2659,10 +2659,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json b/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.jsonindex 02d9e75928..cdc1320166 100644--- a/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json+++ b/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json@@ -2659,10 +2659,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json b/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.jsonindex e0b19d48d9..4f88afa57e 100644--- a/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json+++ b/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json@@ -2655,10 +2655,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-schema-blob-default.json b/test/fixtures/goldens/catalog/pglite-schema-blob-default.jsonindex 80719198cb..24b6e2ee56 100644--- a/test/fixtures/goldens/catalog/pglite-schema-blob-default.json+++ b/test/fixtures/goldens/catalog/pglite-schema-blob-default.json@@ -1935,10 +1935,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json b/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.jsonindex df42728943..3d080b787c 100644--- a/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json+++ b/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json@@ -1935,10 +1935,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json b/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.jsonindex d4639a6d79..2ba4bdbf4f 100644--- a/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json+++ b/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json@@ -1934,10 +1934,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-db-initschema.json b/test/fixtures/goldens/catalog/postgres-db-initschema.jsonindex 7cb4aa665f..40163d250c 100644--- a/test/fixtures/goldens/catalog/postgres-db-initschema.json+++ b/test/fixtures/goldens/catalog/postgres-db-initschema.json@@ -2007,10 +2007,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-default.json b/test/fixtures/goldens/catalog/postgres-engine-init-default.jsonindex 886a60d39b..82c79e14db 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-default.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-default.json@@ -2654,10 +2654,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=true force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.jsonindex e640be2fe9..dc86dec44e 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json@@ -2654,10 +2654,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=true force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.jsonindex 814cd86fe8..630b3f847c 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json@@ -2650,10 +2650,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 facts_cursor_at timestamp with time zone/timestamptz NULL",- "9 facts_cursor_id bigint/int8 NULL",- "10 degraded_wakes integer/int4 NOT NULL DEFAULT 0",- "11 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=true force_rls=false"},diff --git a/test/fixtures/goldens/doctor/json-pglite-degraded.json b/test/fixtures/goldens/doctor/json-pglite-degraded.jsonindex 64abe9b339..77f7a656a5 100644--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json@@ -507,13 +507,13 @@},{"category": "meta",- "message": "Version 207 (latest: 207)",+ "message": "Version 208 (latest: 208)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "932 column(s) verified against live schema",+ "message": "935 column(s) verified against live schema","name": "schema_columns","status": "ok"},diff --git a/test/fixtures/goldens/doctor/json-pglite-fresh.json b/test/fixtures/goldens/doctor/json-pglite-fresh.jsonindex 847e082ccc..1d50d4cbb1 100644--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json@@ -510,13 +510,13 @@},{"category": "meta",- "message": "Version 207 (latest: 207)",+ "message": "Version 208 (latest: 208)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "932 column(s) verified against live schema",+ "message": "935 column(s) verified against live schema","name": "schema_columns","status": "ok"},diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.jsonindex 1d6bf9cc78..af301c97d0 100644--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json@@ -503,13 +503,13 @@},{"category": "meta",- "message": "Version 207 (latest: 207)",+ "message": "Version 208 (latest: 208)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "938 column(s) verified against live schema",+ "message": "941 column(s) verified against live schema","name": "schema_columns","status": "ok"},diff --git a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.jsonindex 2f53b41846..8b03ba0f94 100644--- a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json+++ b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json@@ -2659,7 +2659,10 @@"5 surfaced_slugs jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","6 checkpoint_manifest jsonb/jsonb NOT NULL DEFAULT '[]'::jsonb","7 last_wake_at timestamp with time zone/timestamptz NULL",- "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ "8 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "9 facts_cursor_at timestamp with time zone/timestamptz NULL",+ "10 facts_cursor_id bigint/int8 NULL",+ "11 degraded_wakes integer/int4 NOT NULL DEFAULT 0"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/postgres-engine-gauge/acquires-by-case.json b/test/fixtures/goldens/postgres-engine-gauge/acquires-by-case.jsonindex b6053f59cd..e156efd3db 100644--- a/test/fixtures/goldens/postgres-engine-gauge/acquires-by-case.json+++ b/test/fixtures/goldens/postgres-engine-gauge/acquires-by-case.json@@ -194,6 +194,9 @@"listFactsByEntity#default": {},"listFactsBySession#allFilters": {},"listFactsBySession#default": {},+ "listFactsKeyset#default": {},+ "listFactsKeyset#keyset": {},+ "listFactsKeyset#strictTime": {},"listFactsSince#allFilters": {},"listFactsSince#default": {},"listFilesForPage#default": {},diff --git a/test/fixtures/goldens/rls-scope-inventory.json b/test/fixtures/goldens/rls-scope-inventory.jsonindex 44c025d732..b57da1e965 100644--- a/test/fixtures/goldens/rls-scope-inventory.json+++ b/test/fixtures/goldens/rls-scope-inventory.json@@ -1778,6 +1778,39 @@],"flagOnScopes": []},+ "listFactsKeyset#default": {+ "flagOffLanes": [+ "pool"+ ],+ "flagOffOpensTransaction": false,+ "flagOn": "unscoped",+ "flagOnLanes": [+ "pool"+ ],+ "flagOnScopes": []+ },+ "listFactsKeyset#keyset": {+ "flagOffLanes": [+ "pool"+ ],+ "flagOffOpensTransaction": false,+ "flagOn": "unscoped",+ "flagOnLanes": [+ "pool"+ ],+ "flagOnScopes": []+ },+ "listFactsKeyset#strictTime": {+ "flagOffLanes": [+ "pool"+ ],+ "flagOffOpensTransaction": false,+ "flagOn": "unscoped",+ "flagOnLanes": [+ "pool"+ ],+ "flagOnScopes": []+ },"listFactsSince#allFilters": {"flagOffLanes": ["pool"@@ -3403,6 +3436,7 @@"listEvalCaptureFailures": "none","listFactsByEntity": "none","listFactsBySession": "none",+ "listFactsKeyset": "none","listFactsSince": "none","listFilesForPage": "none","listLinkSources": "direct",diff --git a/test/migrations-v126.test.ts b/test/migrations-v126.test.tsindex f6548d954e..8cb2fac1ca 100644--- a/test/migrations-v126.test.ts+++ b/test/migrations-v126.test.ts@@ -99,6 +99,9 @@ describe('migration v126 — session_context_state', () => {expect(Object.keys(byName).sort()).toEqual(['checkpoint_manifest', // cathedral 5 — added by migration v132'client_id',+ 'degraded_wakes', // delta per-arm cursor — added by migration v208+ 'facts_cursor_at', // v208+ 'facts_cursor_id', // v208'last_wake_at','session_id','source_id',@@ -116,7 +119,7 @@ describe('migration v126 — session_context_state', () => {expect(byName.checkpoint_manifest.column_default).toContain('[]');expect(byName.last_wake_at.data_type).toBe('timestamp with time zone');expect(byName.updated_at.data_type).toBe('timestamp with time zone');- // last_wake_at is the only nullable column (no wake yet).+ // last_wake_at and the v208 facts keyset are the only nullable columns (no wake yet).expect(byName.source_id.is_nullable).toBe('NO');expect(byName.client_id.is_nullable).toBe('NO');expect(byName.session_id.is_nullable).toBe('NO');@@ -130,6 +133,12 @@ describe('migration v126 — session_context_state', () => {expect(byName.standing_entities.column_default).toContain('[]');expect(byName.surfaced_slugs.column_default).toContain('[]');expect(byName.updated_at.column_default).toContain('now()');+ expect(byName.facts_cursor_at.data_type).toBe('timestamp with time zone');+ expect(byName.facts_cursor_at.is_nullable).toBe('YES');+ expect(byName.facts_cursor_id.data_type).toBe('bigint');+ expect(byName.degraded_wakes.data_type).toBe('integer');+ expect(byName.degraded_wakes.is_nullable).toBe('NO');+ expect(byName.degraded_wakes.column_default).toContain('0');});test('composite PK is (source_id, client_id, session_id) in that order', async () => {@@ -218,7 +227,7 @@ describe('migration v126 — session_context_state', () => {// must match exactly — a divergence means migrate.ts drifted from// src/schema.sql / pglite-schema.ts.const fresh = await captureShape();- expect(fresh.columns.length).toBe(8); // 7 (v126) + checkpoint_manifest (v132)+ expect(fresh.columns.length).toBe(11); // 7 (v126) + checkpoint_manifest (v132) + facts_cursor_at/_id, degraded_wakes (v208)await engine.executeRaw(`DROP TABLE IF EXISTS session_context_state`);await engine.setConfig('version', '125');diff --git a/test/retrieval-op-redaction.test.ts b/test/retrieval-op-redaction.test.tsindex 3bf5a9027a..2940054740 100644--- a/test/retrieval-op-redaction.test.ts+++ b/test/retrieval-op-redaction.test.ts@@ -342,7 +342,10 @@ describe('budgets and the delta cursor are computed from delivered (redacted) teexpect(body.has_more).toBe(true);expect(body.pages.length).toBeGreaterThan(0);const last = body.pages[body.pages.length - 1];- expect(body.next_cursor).toEqual({ since: last.updated_at, slug: last.slug });+ // At or before the last delivered page: equal once the page is older than+ // delta's 2 s commit-visibility lag, held at the request's since before that.+ expect(body.next_cursor.since <= last.updated_at).toBe(true);+ if (body.next_cursor.since === last.updated_at) expect(body.next_cursor.slug).toBe(last.slug);for (const p of body.pages) expect(body.text).toContain(`\`${p.slug}\``);});diff --git a/test/serve-stdio-roundtrip.test.ts b/test/serve-stdio-roundtrip.test.tsindex c128df58b9..fb26ccae28 100644--- a/test/serve-stdio-roundtrip.test.ts+++ b/test/serve-stdio-roundtrip.test.ts@@ -329,6 +329,9 @@ describe('serve --surface verbs stdio E2E (the 7 frozen memory verbs over a realexpect(['inserted', 'duplicate', 'superseded']).toContain(rem.status);expect(typeof rem.id).toBe('string');+ // delta never advances a cursor past now() - 2 s (commit-visibility lag), so+ // let the seeded pages age past it; otherwise wake 2 re-delivers them once.+ await new Promise((r) => setTimeout(r, 2_100));// Wake 1: explicit epoch cursor + session_id — delivers every seeded page// and establishes the per-session keyset cursor server-side.const first = await client!.callTool({