Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

feat(graph): validity ranges on typed relation lines are on by default (held-out H7 passed)

garrytan623cac52dd84
diff --git a/docs/eval/decisions/p5-delta-2026-10-05/verdicts.md b/docs/eval/decisions/p5-delta-2026-10-05/verdicts.md
new file mode 100644
index 0000000000..29d9f27b11
--- /dev/null
+++ b/docs/eval/decisions/p5-delta-2026-10-05/verdicts.md
@@ -0,0 +1,12 @@
+# P5 delta: held-out verdicts
+
+Delta build `970c3088b`, run by the custodian (P0). Each verdict sets the default the preregistration names.
+
+| Hypothesis | Verdict | Result | Default |
+|---|---|---|---|
+| H7, validity ranges on typed relation lines | PASS | as-of accuracy on range pages 0.228 → 1.000, 95% CI of the difference [+0.695, +0.846]; prose pages unchanged | `line_grammar.effective_ranges` on |
+| H9, link typing changes | PASS on both corpora (relation-line-variants world, temporal-edges held-out set) | noninferior to the frozen extractor | typing changes kept |
+| N4 resolver guardrail | PASS | no new wrong merge; resolver outcomes noninferior | — |
+
+Pending: H8 (blocked on the first run by `writer_coordinator_required` from the sweep's raw timeline insert on a
+managed brain; fixed in `9d6b789f5`, rerun by the custodian), and the set G runs of H10 and H11 (second custodian).
diff --git a/docs/guides/line-grammar.md b/docs/guides/line-grammar.md
index 6bfb750fa2..f32a468836 100644
--- a/docs/guides/line-grammar.md
+++ b/docs/guides/line-grammar.md
@@ -38,14 +38,14 @@ They stay searchable page text; recall's facts come from `remember` and the
`@effective[start,end)` (alias `@valid`) states when a relation or fact holds,
with `YYYY`, `YYYY-MM` or `YYYY-MM-DD` dates in UTC. Square brackets are
inclusive, parentheses exclusive, and an empty side is open. Ranges are parsed
-and validated on write. With `line_grammar.effective_ranges true` (off by
-default), a range on a relation line is stored on that relationship as dated
+and validated on write. A range on a relation line is stored on that relationship as dated
start and end evidence, the same evidence a dated timeline line gives
([temporal edges](temporal-edges.md)): `- works_at @effective[2021-03,2024-06) [[companies/acme-example]]`
makes the works_at edge live from 2021-03-01 and ended on 2024-06-01, so
default graph reads hide it and `as_of` reads find it. A range on a type that
is not a dated relationship, or on a link the page does not store with that
-type, is reported and stores nothing.
+type, is reported and stores nothing. `gbrain config set line_grammar.effective_ranges false` turns
+range storage off; the next extraction of each page drops its stored ranges.
## What `put_page` reports
diff --git a/plugin-variants/gbrain-coding/skills/conventions/line-grammar.md b/plugin-variants/gbrain-coding/skills/conventions/line-grammar.md
index 5574514afe..11443a2532 100644
--- a/plugin-variants/gbrain-coding/skills/conventions/line-grammar.md
+++ b/plugin-variants/gbrain-coding/skills/conventions/line-grammar.md
@@ -50,8 +50,8 @@ category is known; write prose for everything else.
it holds. Dates are `YYYY`, `YYYY-MM` or `YYYY-MM-DD` (UTC). `[`/`]` are
inclusive, `(`/`)` exclusive, an empty side is open: `@effective[2022,)` means
"since 2022". Natural-language and relative dates (`last spring`) are not read.
-When `line_grammar.effective_ranges` is on, the range on a relation line dates
-that relationship: an ended range hides the edge from default graph reads
+The range on a relation line dates that relationship (`line_grammar.effective_ranges`,
+on by default): an ended range hides the edge from default graph reads
(`get_links` with `status: all` or `as_of` still shows it). To record that a
job ended, edit the line's range rather than deleting the line.
diff --git a/plugin-variants/gbrain-daily/skills/conventions/line-grammar.md b/plugin-variants/gbrain-daily/skills/conventions/line-grammar.md
index 5574514afe..11443a2532 100644
--- a/plugin-variants/gbrain-daily/skills/conventions/line-grammar.md
+++ b/plugin-variants/gbrain-daily/skills/conventions/line-grammar.md
@@ -50,8 +50,8 @@ category is known; write prose for everything else.
it holds. Dates are `YYYY`, `YYYY-MM` or `YYYY-MM-DD` (UTC). `[`/`]` are
inclusive, `(`/`)` exclusive, an empty side is open: `@effective[2022,)` means
"since 2022". Natural-language and relative dates (`last spring`) are not read.
-When `line_grammar.effective_ranges` is on, the range on a relation line dates
-that relationship: an ended range hides the edge from default graph reads
+The range on a relation line dates that relationship (`line_grammar.effective_ranges`,
+on by default): an ended range hides the edge from default graph reads
(`get_links` with `status: all` or `as_of` still shows it). To record that a
job ended, edit the line's range rather than deleting the line.
diff --git a/plugin/skills/conventions/line-grammar.md b/plugin/skills/conventions/line-grammar.md
index 5574514afe..11443a2532 100644
--- a/plugin/skills/conventions/line-grammar.md
+++ b/plugin/skills/conventions/line-grammar.md
@@ -50,8 +50,8 @@ category is known; write prose for everything else.
it holds. Dates are `YYYY`, `YYYY-MM` or `YYYY-MM-DD` (UTC). `[`/`]` are
inclusive, `(`/`)` exclusive, an empty side is open: `@effective[2022,)` means
"since 2022". Natural-language and relative dates (`last spring`) are not read.
-When `line_grammar.effective_ranges` is on, the range on a relation line dates
-that relationship: an ended range hides the edge from default graph reads
+The range on a relation line dates that relationship (`line_grammar.effective_ranges`,
+on by default): an ended range hides the edge from default graph reads
(`get_links` with `status: all` or `as_of` still shows it). To record that a
job ended, edit the line's range rather than deleting the line.
diff --git a/skills/conventions/line-grammar.md b/skills/conventions/line-grammar.md
index 5574514afe..11443a2532 100644
--- a/skills/conventions/line-grammar.md
+++ b/skills/conventions/line-grammar.md
@@ -50,8 +50,8 @@ category is known; write prose for everything else.
it holds. Dates are `YYYY`, `YYYY-MM` or `YYYY-MM-DD` (UTC). `[`/`]` are
inclusive, `(`/`)` exclusive, an empty side is open: `@effective[2022,)` means
"since 2022". Natural-language and relative dates (`last spring`) are not read.
-When `line_grammar.effective_ranges` is on, the range on a relation line dates
-that relationship: an ended range hides the edge from default graph reads
+The range on a relation line dates that relationship (`line_grammar.effective_ranges`,
+on by default): an ended range hides the edge from default graph reads
(`get_links` with `status: all` or `as_of` still shows it). To record that a
job ended, edit the line's range rather than deleting the line.
diff --git a/skills/skills.lock.json b/skills/skills.lock.json
index 943521017d..0ef71cdca4 100644
--- a/skills/skills.lock.json
+++ b/skills/skills.lock.json
@@ -50,7 +50,7 @@
"conventions/cron-via-minions.md": "badb1cd6cd825d6f1ac0b6b28cc47e5d80facc783a3e59a14146ae901ee0f933",
"conventions/cross-modal.yaml": "c012c3d72614a87b1ee698173dce2a0fb0d057a54df7aab87993c4b07fff6280",
"conventions/exec-output.md": "2bf371ac3ec4987eff7cc13cd3ea8cc97c46bd43f588eec024ff27f3171bc58f",
- "conventions/line-grammar.md": "2edc5279bc8c7daa0f69a78652e720cad3301ec7317ac9f95ac87acc0e7fc9fd",
+ "conventions/line-grammar.md": "6f7e18594feafaf46d9ab9168f4e6df259c1c47e61a4ce43b9202ff9c12fdef9",
"conventions/model-routing.md": "c0d5031e4372c108d7e94346dc2958c21389f3b67544524578bbc9ea32d53c34",
"conventions/path-discipline.md": "8af5415721bd115e6979c96688bcf542a32675809ada9aaedbb6706a40926954",
"conventions/quality.md": "8aa681001114689d34268ccadaf0e2ff07b8f68aa5987c093a8c4a7a744f12a6",
diff --git a/src/core/config.ts b/src/core/config.ts
index 093b02bd21..d472b0f063 100644
--- a/src/core/config.ts
+++ b/src/core/config.ts
@@ -1596,7 +1596,7 @@ export const KNOWN_CONFIG_KEYS: readonly string[] = [
'line_grammar.enabled',
'line_grammar.allow_undeclared_types',
// Validity ranges on typed relation lines stored as dated edge transitions
- // (core/link-effective.ts). Off until its held-out verdict.
+ // (core/link-effective.ts). On by default (held-out verdict H7).
'line_grammar.effective_ranges',
// put_page "did you mean an existing page?" advisory on creates (core/similar-pages.ts).
'put_page.similar_pages',
diff --git a/src/core/line-grammar.ts b/src/core/line-grammar.ts
index d9c11102a4..18f4b5fdde 100644
--- a/src/core/line-grammar.ts
+++ b/src/core/line-grammar.ts
@@ -332,10 +332,12 @@ export async function lineGrammarOptions(engine: { getConfig(key: string): Promi
allowUndeclaredTypes: allow != null && ['true', '1', 'yes', 'on'].includes(allow.trim().toLowerCase()) };
}
-/** `line_grammar.effective_ranges` (default off; needs the grammar on): store relation-line ranges on edges (core/link-effective.ts). */
+/** `line_grammar.effective_ranges` (default on; needs the grammar on): store relation-line ranges on edges (core/link-effective.ts). */
export async function effectiveRangesEnabled(engine: { getConfig(key: string): Promise<string | null> }): Promise<boolean> {
- const ranges = await engine.getConfig('line_grammar.effective_ranges').catch(() => null);
- return ranges != null && ['true', '1', 'yes', 'on'].includes(ranges.trim().toLowerCase()) && (await lineGrammarOptions(engine)).enabled;
+ const read = (key: string) => engine.getConfig(key).catch(() => null);
+ const [ranges, enabled] = await Promise.all([read('line_grammar.effective_ranges'), read('line_grammar.enabled')]);
+ const on = (value: string | null) => value == null || !FALSY.has(value.trim().toLowerCase());
+ return on(ranges) && on(enabled);
}
/**
diff --git a/test/fixtures/goldens/sql-text/_driver.json b/test/fixtures/goldens/sql-text/_driver.json
index fbb48bfe52..4a139aefe7 100644
--- a/test/fixtures/goldens/sql-text/_driver.json
+++ b/test/fixtures/goldens/sql-text/_driver.json
@@ -2104,6 +2104,10 @@
"paramCount": 1,
"via": "tagged"
},
+ {
+ "paramCount": 1,
+ "via": "tagged"
+ },
{
"paramCount": 2,
"unsafeOptions": {
diff --git a/test/fixtures/goldens/sql-text/links.json b/test/fixtures/goldens/sql-text/links.json
index 68e9609372..56f4575c6b 100644
--- a/test/fixtures/goldens/sql-text/links.json
+++ b/test/fixtures/goldens/sql-text/links.json
@@ -406,6 +406,14 @@
"sql": "SELECT value FROM config WHERE key = $1",
"textSha256": "32d050605cb95dccb4dcc33a20003cfd10f1fd8e194c317d54e08869acb32e9c"
},
+ {
+ "lane": "tx",
+ "params": [
+ "string"
+ ],
+ "sql": "SELECT value FROM config WHERE key = $1",
+ "textSha256": "32d050605cb95dccb4dcc33a20003cfd10f1fd8e194c317d54e08869acb32e9c"
+ },
{
"lane": "tx",
"params": [
diff --git a/test/link-effective.test.ts b/test/link-effective.test.ts
index 6d6d31823b..6d2b3ed4ac 100644
--- a/test/link-effective.test.ts
+++ b/test/link-effective.test.ts
@@ -1,7 +1,7 @@
/**
* Validity ranges on typed relation lines (`- works_at @effective[a,b) [[x]]`)
* stored as dated edge transitions (producer 'inline', core/link-effective.ts)
- * when `line_grammar.effective_ranges` is on.
+ * (`line_grammar.effective_ranges`, on by default).
*
* Protects: an ended range hides the edge from default graph reads and shows
* it to as_of reads; an open range keeps it live; editing the range replaces
@@ -42,15 +42,16 @@ beforeAll(async () => {
afterAll(async () => { await engine.disconnect(); resetGateway(); });
describe('line_grammar.effective_ranges', () => {
- test('off by default: a range is parsed but nothing is stored', async () => {
+ test('turned off: a range is parsed but nothing is stored', async () => {
+ await engine.setConfig('line_grammar.effective_ranges', 'false');
await put('people/alice-example', 'type: person\ntitle: Alice',
'- works_at @effective[2021-03,2024-06) [[companies/acme-example]]\n- works_at @effective[2024-06,) [[companies/widget-co]]');
expect(await inline()).toEqual([]);
expect(await worksAt()).toEqual(['companies/acme-example', 'companies/widget-co']);
});
- test('on: an ended range hides the edge from default reads; as_of finds it', async () => {
- await engine.setConfig('line_grammar.effective_ranges', 'true');
+ test('on by default: an ended range hides the edge from default reads; as_of finds it', async () => {
+ await engine.executeRaw("DELETE FROM config WHERE key = 'line_grammar.effective_ranges'");
await put('people/alice-example', 'type: person\ntitle: Alice',
'Alice.\n\n- works_at @effective[2021-03,2024-06) [[companies/acme-example]]\n- works_at @effective[2024-06,) [[companies/widget-co]]');
expect(await inline()).toEqual([