Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(graph): pin edge_contradictions phase and edge-proposals CLI in counts and goldens; help without a brain; exit verdicts (GBRA-49 P1)

garrytane22c96909f82
diff --git a/docs/architecture/canonical-writers.tsv b/docs/architecture/canonical-writers.tsv
index 764f72e6d3..7316fa4153 100644
--- a/docs/architecture/canonical-writers.tsv
+++ b/docs/architecture/canonical-writers.tsv
@@ -84,7 +84,7 @@ src/core/last-retrieved.ts 1 projection Derived indexing, retrieval telemetry, o
src/core/minions/handlers/ingest-capture.ts 3 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/core/onboard/checks.ts 2 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/ops/extraction.ts 2 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
-src/core/ops/links.ts 3 coordinator Unmanaged add_link/remove_link keep the engine calls; a managed brain takes coordinatedManualLinkWrite, which checks durable write authority for the from page and commits the database-only edge inside a source-scoped withCoordinatedWrite transaction holding both endpoint page keys.
+src/core/ops/links.ts 4 coordinator Unmanaged add_link/remove_link keep the engine calls; a managed brain takes coordinatedManualLinkWrite, which checks durable write authority for the from page and commits the database-only edge inside a source-scoped withCoordinatedWrite transaction holding both endpoint page keys. Unmanaged add_link with valid_from/valid_until adds the edge and its dated manual transitions in one maintenanceTransaction (temporal typed edges); a managed brain writes both inside the same coordinated transaction.
src/core/ops/pages.ts 0 coordinator Page mutations delegate to persistence modules; purge_deleted_pages runs purgeDeletedPagesCoordinated.
src/core/output/writer.ts 6 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/page-state/materialize.ts 1 coordinator Publication is transaction-scoped under admitted authority, source/page guards and revision checks.
diff --git a/scripts/module-size-limits.tsv b/scripts/module-size-limits.tsv
index c74153e432..7e50e47419 100644
--- a/scripts/module-size-limits.tsv
+++ b/scripts/module-size-limits.tsv
@@ -3,7 +3,7 @@
# Raising a ceiling is a conscious, reviewer-visible act. Lower ceilings in
# the same commit as any peel (the guard fails on >50 lines of stale slack).
# Columns: path max_lines policy note
-src/cli.ts 3199 ratchet +3 agent operator gate fixes: repair-failed connect wrapper (logic in cli/cli-error.ts exitOnRepairFailed), transcripts recent through a live serve (logic in commands/transcripts.ts), pre-connect status reason (logic in commands/serve-status.ts); +23 merged from the collector (Lanes B/E/F: thin-client token reason, status-only serve hand-off, jobs/sync readiness wiring); +9 agent operator wave D3/D4: curated --help short-circuit (renderer in cli/help/render.ts), curated flag-value validation call (cli/help/validate.ts), table-dispatched SELF_HELP_WITHOUT_ENGINE entries for the selfHelp flips; +5 agent operator wave C10 (merged from the collector): serve --fail-fast in the connect-failure path; +31 #5950 (D6): connectEngine thin-client backstop, engine-free MCP-twin dispatch, recall/advisor/export refusal hints, refusal fix subcommand (lowered to 3131 by D1's renderCliError seam first); +2 agent operator wave A4: observational startup (probe-only connect for startup:observational commands; completeEngineStartup split out of connectEngine, exposed as ctx.completeStartup); +2 fix wave 5 (#5401): projections drain help line and thin-client hint; +2 (#5137) key-shadow warning seam, logic in ai/key-warnings.ts; +2 System One v1: decide help line + thin-client refusal hint; refactor wave 1 split target (W4 cli); ceiling rationale: docs/architecture/key-files/entrypoints-and-docs.md entry for src/cli.ts; evidence delivery: thin-client return_unit version-skew warning (+3; logic in search/evidence-delivery.ts); put stdin recovery (#5700): stdin hint in the --content requires-a-value error and stdin usage/required text in printOpHelp (+7); logic in persistence/deactivation.ts); +36 #5827: link-command help examples, local --source vs --source-id/--all-sources conflict check, ambient-binding return from applyThinClientSourceScope (logic in cli/source-scope.ts); +4 #5232: write-wait import, reporter-owned verdict in the op catch, thin-client writeWaitMs, ctx.writeWaitMs (logic in persistence/write-wait.ts); +1 #4768: serve --access help line; +4 #5433: list_pages TSV cell escaping in formatResult; +2 #lane-h pricing: help line + thin-client refusal hint for `gbrain pricing`; +2 fix wave 5 (#5401): projections drain help line and thin-client hint; +2 (#5137) key-shadow warning seam, logic in ai/key-warnings.ts; +2 System One v1: decide help line + thin-client refusal hint; refactor wave 1 split target (W4 cli); ceiling rationale: docs/architecture/key-files/entrypoints-and-docs.md entry for src/cli.ts; evidence delivery: thin-client return_unit version-skew warning (+3; logic in search/evidence-delivery.ts); put stdin recovery (#5700): stdin hint in the --content requires-a-value error and stdin usage/required text in printOpHelp (+7); logic in persistence/deactivation.ts); +36 #5827: link-command help examples, local --source vs --source-id/--all-sources conflict check, ambient-binding return from applyThinClientSourceScope (logic in cli/source-scope.ts); +4 #5433: list_pages TSV cell escaping in formatResult; +1 #5984: a strict run deadline when no progress window is set; v0.60.48.0 merge: #5984 growth re-summed over v0.60.47.0 (3199 measured)
+src/cli.ts 3200 ratchet +3 agent operator gate fixes: repair-failed connect wrapper (logic in cli/cli-error.ts exitOnRepairFailed), transcripts recent through a live serve (logic in commands/transcripts.ts), pre-connect status reason (logic in commands/serve-status.ts); +23 merged from the collector (Lanes B/E/F: thin-client token reason, status-only serve hand-off, jobs/sync readiness wiring); +9 agent operator wave D3/D4: curated --help short-circuit (renderer in cli/help/render.ts), curated flag-value validation call (cli/help/validate.ts), table-dispatched SELF_HELP_WITHOUT_ENGINE entries for the selfHelp flips; +5 agent operator wave C10 (merged from the collector): serve --fail-fast in the connect-failure path; +31 #5950 (D6): connectEngine thin-client backstop, engine-free MCP-twin dispatch, recall/advisor/export refusal hints, refusal fix subcommand (lowered to 3131 by D1's renderCliError seam first); +2 agent operator wave A4: observational startup (probe-only connect for startup:observational commands; completeEngineStartup split out of connectEngine, exposed as ctx.completeStartup); +2 fix wave 5 (#5401): projections drain help line and thin-client hint; +2 (#5137) key-shadow warning seam, logic in ai/key-warnings.ts; +2 System One v1: decide help line + thin-client refusal hint; refactor wave 1 split target (W4 cli); ceiling rationale: docs/architecture/key-files/entrypoints-and-docs.md entry for src/cli.ts; evidence delivery: thin-client return_unit version-skew warning (+3; logic in search/evidence-delivery.ts); put stdin recovery (#5700): stdin hint in the --content requires-a-value error and stdin usage/required text in printOpHelp (+7); logic in persistence/deactivation.ts); +36 #5827: link-command help examples, local --source vs --source-id/--all-sources conflict check, ambient-binding return from applyThinClientSourceScope (logic in cli/source-scope.ts); +4 #5232: write-wait import, reporter-owned verdict in the op catch, thin-client writeWaitMs, ctx.writeWaitMs (logic in persistence/write-wait.ts); +1 #4768: serve --access help line; +4 #5433: list_pages TSV cell escaping in formatResult; +2 #lane-h pricing: help line + thin-client refusal hint for `gbrain pricing`; +2 fix wave 5 (#5401): projections drain help line and thin-client hint; +2 (#5137) key-shadow warning seam, logic in ai/key-warnings.ts; +2 System One v1: decide help line + thin-client refusal hint; refactor wave 1 split target (W4 cli); ceiling rationale: docs/architecture/key-files/entrypoints-and-docs.md entry for src/cli.ts; evidence delivery: thin-client return_unit version-skew warning (+3; logic in search/evidence-delivery.ts); put stdin recovery (#5700): stdin hint in the --content requires-a-value error and stdin usage/required text in printOpHelp (+7); logic in persistence/deactivation.ts); +36 #5827: link-command help examples, local --source vs --source-id/--all-sources conflict check, ambient-binding return from applyThinClientSourceScope (logic in cli/source-scope.ts); +4 #5433: list_pages TSV cell escaping in formatResult; +1 #5984: a strict run deadline when no progress window is set; v0.60.48.0 merge: #5984 growth re-summed over v0.60.47.0 (3199 measured); +1 GBRA-49: edge-proposals answers --help without a brain (SELF_HELP_WITHOUT_ENGINE row)
src/commands/autopilot.ts 1642 ratchet refactor wave 1 split target (W4 autopilot, cut line); ceiling rationale: docs/architecture/key-files/commands-1.md entry for src/commands/autopilot.ts; +2 fix wave 5: nosemgrep justifications on the per-brain job launchctl/systemctl calls (#5195); +2 #5813: boot reconcile names attempted and running versions in log + audit; +2 #5855: Bun floor gate before the swap and the swap-refusal hold (logic in core/bun-floor.ts); +3 agent operator wave E9: --dry-run and the persistent_install consent gate before anything is written (logic in autopilot/install-consent.ts)
src/commands/doctor.ts 667 ratchet +1 agent operator gate fixes: --probe consent gate (logic in doctor/probe-consent.ts); refactor wave 1 split target (W4 doctor); ceiling rationale: docs/architecture/key-files/commands-2.md entry for src/commands/doctor.ts
src/commands/embed.ts 2219 ratchet +2 agent operator wave D2: --json failure envelope via writeCliError; lowered v0.46.26.0: embedBatchWithBackoff + retry cluster peeled to core/embed-retry.ts (core/commands layering fix); grown wave-g (#4530): per-model input-limit wiring; wave-k #3622 reimpl: --stale zero-progress failure quarantine; +29 #4668 (#4530): oversize-heal call sites in both --stale drains — kept low by peeling the healed-row remap to core/embed-oversize-heal.ts (shared with embed-stale.ts); +35 #4647 (refs #4599): per-tick timeout+abort on the single-flight lock heartbeat refresh (interval deliberately NOT unref'd); +122 refs #4599: stall-watchdog race around the drain + shared idempotent flushAndRelease + CLI stall exit mapping (watchdog machinery itself lives in core/embed-stall.ts); +12: adversarial-review hardening (healed_splits progress key + heal-tick comment); #5105: guarded derived projection preparation and read seals; #5105: conditional embedding installer wiring; archived eligibility: active-only dispatch with honest stranded-work reporting; explicit archived admission: live-source snapshots and honest refused-installation failures; +2 fw3: embed --stale --images dispatch (sweep lives in core/embed-stale-images.ts); +5 #5289: dry run reports restamp-only chunks apart from chunks to embed (count lives in core/embedding-invalidation.ts); +6 #4616: keep a partially refused batch in embedPageTexts and name the recovery command in failure samples (guard lives in core/ai/embedding-guard.ts); +5 #5226: embed summary counts distinct pages; +3 #5804: null projection snapshot counted as a failure with one batch summary in embed --stale; +18 wave 8 lane D1: #5527 mixed-space warning subtracts current-model chunks (+4), #5885 takes option/result fields and the stale-drain takes call (pass lives in core/embed-takes.ts); +9 Foundations 1 F4d: time-budget stop result fields, stdout verdict and stop recording in embed --stale (logic in core/embed-budget-stop.ts)
diff --git a/src/cli.ts b/src/cli.ts
index ad39bb129f..928cfb41ab 100755
--- a/src/cli.ts
+++ b/src/cli.ts
@@ -138,6 +138,7 @@ const SELF_HELP_WITHOUT_ENGINE: Record<string, true | (() => Promise<(engine: ne
(await import('./commands/compile-context.ts')).runCompileContext as never,
// runLoops / runWaiting answer --help before touching the engine.
loops: async () => (await import('./commands/loops.ts')).runLoops as never,
+ 'edge-proposals': async () => (await import('./commands/edge-proposals.ts')).runEdgeProposals as never,
waiting: async () => (await import('./commands/loops.ts')).runWaiting as never,
// runSources's `--help`/`-h`/undefined-subcommand branch calls printHelp()
// without ever touching `engine` — safe to dispatch with no brain
diff --git a/src/commands/edge-proposals.ts b/src/commands/edge-proposals.ts
index 21decd3001..76fd59dd30 100644
--- a/src/commands/edge-proposals.ts
+++ b/src/commands/edge-proposals.ts
@@ -16,6 +16,7 @@
import type { BrainEngine } from '../core/engine.ts';
import { applyEdgeProposal, rejectEdgeProposal, undoEdgeProposal, DREAM_TIMELINE_SOURCE } from '../core/cycle/edge-contradictions.ts';
import { isCalendarDate, dateKey } from '../core/link-validity.ts';
+import { setCliExitVerdict } from '../core/cli-force-exit.ts';
const STATUSES = ['proposed', 'applied', 'rejected', 'undone', 'stale', 'reverted_by_user', 'undated_unresolved', 'ambiguous_same_date', 'compatible', 'error'];
@@ -65,16 +66,16 @@ export async function runEdgeProposals(engine: BrainEngine, args: string[]): Pro
if (!sub || sub === '--help' || sub === 'help') { console.log(usage()); return; }
if (sub === 'list') {
const status = flag('--status');
- if (status && status !== 'all' && !STATUSES.includes(status)) { console.error(`Unknown status ${status}. One of: ${STATUSES.join(', ')}, all`); process.exitCode = 2; return; }
+ if (status && status !== 'all' && !STATUSES.includes(status)) { console.error(`Unknown status ${status}. One of: ${STATUSES.join(', ')}, all`); setCliExitVerdict(2); return; }
const list = status === 'all' ? await rows(engine, 'TRUE', [], Number(flag('--limit') ?? 50))
: await rows(engine, 'p.status = ANY($1::text[])', [status ? [status] : ['proposed', 'undated_unresolved']], Number(flag('--limit') ?? 50));
out(list, list.length ? list.map(describe).join('\n') + '\n\nNext: gbrain edge-proposals accept <id> | reject <id>' : 'No open relationship proposals.');
return;
}
- if (!Number.isSafeInteger(id) || id <= 0) { console.error(`${usage()}\n\nA proposal id is required (gbrain edge-proposals list shows them).`); process.exitCode = 2; return; }
+ if (!Number.isSafeInteger(id) || id <= 0) { console.error(`${usage()}\n\nA proposal id is required (gbrain edge-proposals list shows them).`); setCliExitVerdict(2); return; }
if (sub === 'show') {
const [r] = await rows(engine, 'p.id = $1', [id]);
- if (!r) { console.error(`No proposal #${id}.`); process.exitCode = 1; return; }
+ if (!r) { console.error(`No proposal #${id}.`); setCliExitVerdict(1); return; }
out(r, `${describe(r)}\nmodel: ${r.model ?? '-'} confidence: ${r.confidence ?? '-'}\n${r.generated_line ? `line: - **${dateKey(r.close_date)}** | ${DREAM_TIMELINE_SOURCE} — ${r.generated_line}` : ''}`);
return;
}
@@ -88,14 +89,14 @@ export async function runEdgeProposals(engine: BrainEngine, args: string[]): Pro
}
const result = sub === 'accept' ? await applyEdgeProposal(engine, id) : sub === 'reject' ? await rejectEdgeProposal(engine, id) : await undoEdgeProposal(engine, id);
out({ id, ...result }, `#${id}: ${result.status}${result.reason ? ` — ${result.reason}` : ''}`);
- if (!['applied', 'rejected', 'undone'].includes(result.status)) process.exitCode = 1;
+ if (!['applied', 'rejected', 'undone'].includes(result.status)) setCliExitVerdict(1);
return;
}
if (sub === 'date') {
const date = rest.find(a => /^\d{4}-\d{2}-\d{2}$/.test(a));
- if (!isCalendarDate(date)) { console.error('date needs a calendar date YYYY-MM-DD: when the newer relationship started.'); process.exitCode = 2; return; }
+ if (!isCalendarDate(date)) { console.error('date needs a calendar date YYYY-MM-DD: when the newer relationship started.'); setCliExitVerdict(2); return; }
const [r] = await rows(engine, `p.id = $1 AND p.status = 'undated_unresolved'`, [id]);
- if (!r) { console.error(`No undated proposal #${id}.`); process.exitCode = 1; return; }
+ if (!r) { console.error(`No undated proposal #${id}.`); setCliExitVerdict(1); return; }
const target = rest.find(a => a.includes('/')) ?? r.b_target;
const { operations } = await import('../core/operations.ts');
const op = operations.find(o => o.name === 'add_timeline_entry')!;
@@ -109,5 +110,5 @@ export async function runEdgeProposals(engine: BrainEngine, args: string[]): Pro
return;
}
console.error(usage());
- process.exitCode = 2;
+ setCliExitVerdict(2);
}
diff --git a/test/canonical-writer-inventory.test.ts b/test/canonical-writer-inventory.test.ts
index 0b4b6bd965..09bfe2591d 100644
--- a/test/canonical-writer-inventory.test.ts
+++ b/test/canonical-writer-inventory.test.ts
@@ -47,7 +47,7 @@ test('a planted bypass in a converted writer or a new file fails the census', ()
['src/core/cycle/synthesize-concepts.ts', `${concepts}\nawait importFromContent(engine, slug, md, { sourceId });`],
['src/core/cycle/new-writer.ts', 'await engine.putPage(slug, page);'],
], inventory)).toEqual([
- 'src/core/ops/links.ts: 4 write references; reviewed ceiling 3',
+ 'src/core/ops/links.ts: 5 write references; reviewed ceiling 4',
'src/core/cycle/synthesize-concepts.ts: 3 write references; reviewed ceiling 2',
'src/core/cycle/new-writer.ts: 1 write references; reviewed ceiling 0',
]);
diff --git a/test/cli-dispatch-phase.test.ts b/test/cli-dispatch-phase.test.ts
index 2a6e5666b5..8c130b07ff 100644
--- a/test/cli-dispatch-phase.test.ts
+++ b/test/cli-dispatch-phase.test.ts
@@ -89,7 +89,7 @@ describe('CLI dispatch shape (master AST)', () => {
const shape = await expectNormalizerStable(extractCliDispatch, astNormalizer);
expect(shape.sets.CLI_ONLY).toEqual([...CLI_ONLY].sort());
expect(shape.sets.THIN_CLIENT_REFUSED_COMMANDS).toEqual([...THIN_CLIENT_REFUSED_COMMANDS].sort());
- expect(shape.switchCases.length).toBe(63);
+ expect(shape.switchCases.length).toBe(64);
expect(Object.keys(shape.commands).length).toBeGreaterThanOrEqual(shape.sets.CLI_ONLY.length);
});
diff --git a/test/cli-thin-client-refusal-matrix.test.ts b/test/cli-thin-client-refusal-matrix.test.ts
index f641dc3d40..db835460e8 100644
--- a/test/cli-thin-client-refusal-matrix.test.ts
+++ b/test/cli-thin-client-refusal-matrix.test.ts
@@ -12,7 +12,7 @@
* against a remote brain), routes a host-bound subcommand, changes a hint or
* exit code, or moves a check across the connectEngine terminator.
* Why new: test/cli-dispatch-thin-client.test.ts asserts refusal for a
- * hand-picked subset by substring; nothing pins all 63 cases or the full
+ * hand-picked subset by substring; nothing pins all 64 cases or the full
* text. Seam: none.
*
* Nothing leaves the machine: issuer and MCP URLs point at 127.0.0.1:1
@@ -104,8 +104,8 @@ describe('A16b thin-client refusal matrix', () => {
routing = await run(ROUTING_ROWS);
}, 300_000);
- test('the matrix covers all 63 handleCliOnly cases', () => {
- expect(CASES.length).toBe(63);
+ test('the matrix covers all 64 handleCliOnly cases', () => {
+ expect(CASES.length).toBe(64);
});
test('every handleCliOnly case, run bare on a thin client, matches the golden', () => {
diff --git a/test/core/cycle.serial.test.ts b/test/core/cycle.serial.test.ts
index 63830babf1..3f093b3855 100644
--- a/test/core/cycle.serial.test.ts
+++ b/test/core/cycle.serial.test.ts
@@ -463,7 +463,8 @@ describe('runCycle — yieldBetweenPhases hook', () => {
// between conversation_facts_backfill and embed — both landed in this merge).
// #2653: 23 phases (added `drift` between calibration_profile and
// conversation_facts_backfill). #5876: 24 (added `chronicle` after drift).
- expect(hookCalls).toBe(24);
+ // Temporal typed edges: 25 (added `edge_contradictions` after calibration_profile).
+ expect(hookCalls).toBe(25);
});
test('hook exceptions do not abort the cycle', async () => {
@@ -478,8 +479,8 @@ describe('runCycle — yieldBetweenPhases hook', () => {
// v0.39.0.0: 17 phases (T12 schema-suggest phase between orphans and purge).
// v0.41.11.0: 20 phases (+extract_atoms, +synthesize_concepts, +conversation_facts_backfill).
// v0.41.39 (#1700) + v0.42.0.0: 22 phases (+enrich_thin, +skillopt).
- // #2653: 23 phases (+drift). #5876: 24 (+chronicle).
- expect(report.phases.length).toBe(24);
+ // #2653: 23 phases (+drift). #5876: 24 (+chronicle). Temporal typed edges: 25 (+edge_contradictions).
+ expect(report.phases.length).toBe(25);
});
});
diff --git a/test/e2e/dream-cycle-phase-order-pglite.test.ts b/test/e2e/dream-cycle-phase-order-pglite.test.ts
index 31fdc9197f..0f96f8b6f0 100644
--- a/test/e2e/dream-cycle-phase-order-pglite.test.ts
+++ b/test/e2e/dream-cycle-phase-order-pglite.test.ts
@@ -142,6 +142,7 @@ const EXPECTED_PHASES: CyclePhase[] = [
'propose_takes', // v0.36.1.0 — hindsight calibration wave
'grade_takes', // v0.36.1.0
'calibration_profile', // v0.36.1.0
+ 'edge_contradictions', // temporal typed edges (proposals by default)
'drift', // #2653 — drift detection (default OFF, report-only)
'chronicle', // #5876 — Life Chronicle events (default ON)
'conversation_facts_backfill', // v0.41.11.0 — opt-in conversation backfill
diff --git a/test/fixtures/goldens/cli/dispatch-phase.json b/test/fixtures/goldens/cli/dispatch-phase.json
index 384db9576e..35cc8734c0 100644
--- a/test/fixtures/goldens/cli/dispatch-phase.json
+++ b/test/fixtures/goldens/cli/dispatch-phase.json
@@ -551,6 +551,13 @@
"thinClient": "refuse",
"thinClientRoutedSubcommands": []
},
+ "edge-proposals": {
+ "hasSwitchCase": true,
+ "phase": "post-connect",
+ "preConnectRules": [],
+ "thinClient": "refuse",
+ "thinClientRoutedSubcommands": []
+ },
"edges-backfill": {
"hasSwitchCase": true,
"phase": "post-connect",
diff --git a/test/fixtures/goldens/cli/literal-imports.json b/test/fixtures/goldens/cli/literal-imports.json
index 12ad2b1202..65495a5ea8 100644
--- a/test/fixtures/goldens/cli/literal-imports.json
+++ b/test/fixtures/goldens/cli/literal-imports.json
@@ -46,6 +46,9 @@
"conversation-parser": [
"./commands/conversation-parser.ts"
],
+ "edge-proposals": [
+ "./commands/edge-proposals.ts"
+ ],
"edges-backfill": [
"./commands/edges-backfill.ts"
],
diff --git a/test/fixtures/goldens/cli/membership-sets.json b/test/fixtures/goldens/cli/membership-sets.json
index ac1c17b308..345a1403ec 100644
--- a/test/fixtures/goldens/cli/membership-sets.json
+++ b/test/fixtures/goldens/cli/membership-sets.json
@@ -68,6 +68,7 @@
],
"refusedNotInCliOnly": [],
"refusedWithoutHint": [
+ "edge-proposals",
"watch"
],
"selfHelpNotInCliOnly": [],
@@ -118,6 +119,7 @@
"decide",
"doctor",
"dream",
+ "edge-proposals",
"edges-backfill",
"embed",
"embeddings",
@@ -226,6 +228,7 @@
"db-repair",
"decide",
"dream",
+ "edge-proposals",
"edges-backfill",
"embed",
"embeddings",
@@ -300,6 +303,7 @@
"compile-context",
"connectors",
"dream",
+ "edge-proposals",
"edges-backfill",
"embed",
"export",
@@ -346,6 +350,7 @@
"config",
"decide",
"dream",
+ "edge-proposals",
"embed",
"embeddings",
"enrich",
diff --git a/test/fixtures/goldens/cli/thin-client-cases.json b/test/fixtures/goldens/cli/thin-client-cases.json
index babd5f0455..f4dc787522 100644
--- a/test/fixtures/goldens/cli/thin-client-cases.json
+++ b/test/fixtures/goldens/cli/thin-client-cases.json
@@ -656,6 +656,16 @@
],
"stdout": []
},
+ {
+ "argv": "edge-proposals",
+ "exitCode": 1,
+ "stderr": [
+ "Error [requires_local_engine]: `gbrain edge-proposals` requires a local engine. This install is a thin client of http://127.0.0.1:1/mcp.",
+ "Fix: gbrain edge-proposals",
+ "Docs: https://github.com/garrytan/gbrain/blob/master/docs/guides/error-codes.md#requires_local_engine"
+ ],
+ "stdout": []
+ },
{
"argv": "connectors",
"exitCode": 1,
diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.json
index 9ebd3e303b..c6575643e3 100644
--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json
+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json
@@ -497,19 +497,19 @@
},
{
"category": "ops",
- "message": "RLS enabled on 103/103 public tables",
+ "message": "RLS enabled on 106/106 public tables",
"name": "rls",
"status": "ok"
},
{
"category": "meta",
- "message": "Version 200 (latest: 200)",
+ "message": "Version 201 (latest: 201)",
"name": "schema_version",
"status": "ok"
},
{
"category": "meta",
- "message": "859 column(s) verified against live schema",
+ "message": "907 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
@@ -1368,6 +1368,24 @@
"name": "unlinked_facts",
"status": "ok"
},
+ {
+ "category": "brain",
+ "details": {
+ "contradiction_mode": "propose (default)",
+ "lagging": 0,
+ "proposals": {
+ "applied": 0,
+ "proposed": 0,
+ "undated": 0
+ },
+ "read_policy": "on",
+ "relationships": {},
+ "stale_assertions": []
+ },
+ "message": "relationships: none yet; read policy on; contradiction mode propose (default)",
+ "name": "edge_validity",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {
@@ -1721,7 +1739,7 @@
"category": "meta",
"details": {
"counts": {
- "global": 10,
+ "global": 11,
"mixed": 2,
"source": 12
},
@@ -1732,6 +1750,7 @@
"consolidate": "source",
"conversation_facts_backfill": "source",
"drift": "global",
+ "edge_contradictions": "global",
"embed": "global",
"enrich_thin": "source",
"extract": "source",
@@ -1752,7 +1771,7 @@
"synthesize_concepts": "global"
}
},
- "message": "Phase taxonomy: 12 source-scoped, 10 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, drift, chronicle, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",
+ "message": "Phase taxonomy: 12 source-scoped, 11 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, chronicle, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",
"name": "cycle_phase_scope",
"status": "ok"
},
diff --git a/test/phase-scope-coverage.test.ts b/test/phase-scope-coverage.test.ts
index 791502d6f1..3eda359d50 100644
--- a/test/phase-scope-coverage.test.ts
+++ b/test/phase-scope-coverage.test.ts
@@ -41,7 +41,7 @@ describe('PHASE_SCOPE coverage', () => {
expect(invalid).toEqual([]);
});
- test('all 24 phases covered (regression on accidental omission)', () => {
+ test('all 25 phases covered (regression on accidental omission)', () => {
// Pin the count so a future PR that adds a phase to ALL_PHASES
// without updating PHASE_SCOPE notices here too. The v0.39.1.0
// master merge brought in the 17th phase (`schema-suggest`); v0.41
@@ -49,8 +49,8 @@ describe('PHASE_SCOPE coverage', () => {
// 'conversation_facts_backfill' (v0.41.11.0) for 20; v0.41.39 (#1700)
// adds 'enrich_thin' and v0.42.0.0 adds 'skillopt' for a total of 22;
// #2653 adds 'drift' for 23; #5876 adds 'chronicle' for 24.
- expect(ALL_PHASES.length).toBe(24);
- expect(Object.keys(PHASE_SCOPE).length).toBe(24);
+ expect(ALL_PHASES.length).toBe(25);
+ expect(Object.keys(PHASE_SCOPE).length).toBe(25);
});
test('embed remains global (the headline brain-wide phase)', () => {
diff --git a/test/select-e2e.test.ts b/test/select-e2e.test.ts
index 20b4bcf7c0..3cd492a4b9 100644
--- a/test/select-e2e.test.ts
+++ b/test/select-e2e.test.ts
@@ -134,6 +134,7 @@ describe("selectTests", () => {
})).toEqual([
"test/e2e/attendance-repair-postgres.test.ts",
"test/e2e/attendance-retrieval-postgres.test.ts",
+ "test/e2e/link-relationships-postgres.test.ts",
]);
});