Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: train-merge interactions (memory/unattributed slug for entity-less claims; remember claim params in the starter budget)

garrytanb1d440baa547
diff --git a/test/mcp-schema-budget.test.ts b/test/mcp-schema-budget.test.ts
index c6412b7949..0620aaaa5f 100644
--- a/test/mcp-schema-budget.test.ts
+++ b/test/mcp-schema-budget.test.ts
@@ -68,9 +68,9 @@ const SERVED_STARTER_MAX_CHARS = 20_270; // GBRA-217: +120 for get_page `as_of`
const SERVED_STARTER_MIN_HEADROOM = 200;
const SERVED_STARTER_MAX_TOKENS = 4_609; // GBRA-215 L3: +309 for ingest and ingest_undo joining starter (the approved starter listing, row ingest_starter_listing), after their descriptions and parameter text were trimmed (ingest 944, ingest_undo 573 JSON characters); measured 4,432 (4,123 without them)
/** The whole tools/list JSON, annotations included (25,735 measured at v0.60.46.0; traverse_graph's `hops` is full-surface-only, 25,941 measured; 26,402 once mute_notice, the dismissal for the coaching notices starter sessions receive, joined starter; 26,671 with #6007's put_page wait_ms param and write guidance, which carry the put_pages hint and the receipt poll rule starter agents need; 26,679 with delta's opaque `cursor` param, paid for by trimming delta's own descriptions, model-visible 24,985; 26,692 with recall's `question` param, paid for by trimming recall's own parameter text, model-visible 24,998; 24,996 after the #6446 merge, recall's grep text trimmed again). */
-const SERVED_STARTER_MAX_JSON_CHARS = 21_818; // GBRA-156: 19,431 measured; GST-927: +100 for get_page's one-window-selector rule; GBRA-217 get_page as_of: +100 (19,905 measured at the lane D merge); GBRA-215 L3: +1,517 for ingest and ingest_undo joining starter (the approved starter listing, row ingest_starter_listing), after their descriptions and parameter text were trimmed (ingest 944, ingest_undo 573 JSON characters); measured 21,307; GBRA-219 (#7795, GBRA-108 decision A): +301 for memory_conversation_mode on starter, trimmed first
+const SERVED_STARTER_MAX_JSON_CHARS = 21_833; // GBRA-156: 19,431 measured; GST-927: +100 for get_page's one-window-selector rule; GBRA-217 get_page as_of: +100 (19,905 measured at the lane D merge); GBRA-215 L3: +1,517 for ingest and ingest_undo joining starter (the approved starter listing, row ingest_starter_listing), after their descriptions and parameter text were trimmed (ingest 944, ingest_undo 573 JSON characters); measured 21,307; GBRA-219 (#7795, GBRA-108 decision A): +301 for memory_conversation_mode on starter, trimmed first; GBRA-216 (#7810, train merge): +15 for remember's typed-claim params (21,833 measured on the train)
/** GBRA-156: the UTF-8 bytes of the served starter tools/list result (`{"tools":[...]}`, annotations included) that harnesses re-fetch every turn. */
-const SERVED_STARTER_MAX_RESULT_BYTES = 21_879; // 26,546 before GBRA-156, 19,489 after; GST-927: +100 for get_page's one-window-selector rule; GBRA-217 get_page as_of: +100 (19,963 measured at the lane D merge); GBRA-215 L3: +1,519 for ingest and ingest_undo joining starter (the approved starter listing, row ingest_starter_listing), after their descriptions and parameter text were trimmed (ingest 944, ingest_undo 573 JSON characters); measured 21,367; GBRA-219 (#7795, GBRA-108 decision A): memory_conversation_mode joins starter (the per-conversation save switch, approved in the GBRA-219 plan), its description and the instructions clause trimmed first: +360
+const SERVED_STARTER_MAX_RESULT_BYTES = 21_894; // 26,546 before GBRA-156, 19,489 after; GST-927: +100 for get_page's one-window-selector rule; GBRA-217 get_page as_of: +100 (19,963 measured at the lane D merge); GBRA-215 L3: +1,519 for ingest and ingest_undo joining starter (the approved starter listing, row ingest_starter_listing), after their descriptions and parameter text were trimmed (ingest 944, ingest_undo 573 JSON characters); measured 21,367; GBRA-219 (#7795, GBRA-108 decision A): memory_conversation_mode joins starter (the per-conversation save switch, approved in the GBRA-219 plan), its description and the instructions clause trimmed first: +360; GBRA-216 (#7810, train merge): +15 for remember's typed-claim params (21,894 measured on the train)
/** 4,042 at the cost wave + 586 for the operator contract's error protocol, notice prefix and memory loop (F1); no schema guidance moved here. */
const INSTRUCTIONS_MAX_CHARS = 5_219; // GBRA-219 (#7795, GBRA-108 decision A): memory_conversation_mode joins starter (the per-conversation save switch, approved in the GBRA-219 plan), its description and the instructions clause trimmed first: +111 for the switch clause at the maximal rendering; #6007: +240 for the issue-required write guidance (put_pages, wait_ms); Cat 40 Hard round 4: +107 for batching lists of names (entity names, keyword OR) and sending independent calls together; d5b: +70 for the brief naming the fields compact `entity names` rows carry (the maximal rendering, record types enrolled; +39 at the default) instead of a `referenced_by` walk batch mode cannot do; F4: +63 for instruction 7's governing rule (the record whose terms are in effect on the date asked about governs; page dates are named as page dates), 74 characters longer than the "prefer the newest governing source" sentence it replaces, 11 paid by cutting "the best-ranked excerpts" to "top excerpts" in the same clause
const DESCRIPTION_HARD_CAP = 1_200;
diff --git a/test/remember-typed-claims.test.ts b/test/remember-typed-claims.test.ts
index a30f708434..3ac5276585 100644
--- a/test/remember-typed-claims.test.ts
+++ b/test/remember-typed-claims.test.ts
@@ -214,7 +214,7 @@ for (const kind of testBackends()) {
test('an entity-less claim is saved with its fields and never pairs', async () => {
const a = await remember({ fact: 'Some MRR was 1', entity: undefined, claim_metric: 'mrr', claim_value: 1, valid_from: '2026-06-01' });
const b = await remember({ fact: 'Some MRR was 2', entity: undefined, claim_metric: 'mrr', claim_value: 2, valid_from: '2026-06-01' });
- expect(await row(a.id)).toMatchObject({ claim_metric: 'mrr', claim_value: 1, source_markdown_slug: null });
+ expect(await row(a.id)).toMatchObject({ claim_metric: 'mrr', claim_value: 1, source_markdown_slug: 'memory/unattributed' });
expect(await row(b.id)).toMatchObject({ claim_metric: 'mrr', claim_value: 2 });
expect(await runClaimConflicts(engine, { sourceIds: [src], dryRun: true })).toMatchObject({ pairs_found: 0 });
});