Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Q2 landing: extractor version 2026-10-08T00:00Z (module-size ceiling; a stamp floor within the hour masks extract-stale's D4 race probe), regenerate contract goldens

garrytan380265c7167b
diff --git a/src/core/link-extraction.ts b/src/core/link-extraction.ts
index 339f6e2b6b..eb2863fdb5 100644
--- a/src/core/link-extraction.ts
+++ b/src/core/link-extraction.ts
@@ -100,10 +100,8 @@ export { parseInlineCitationTimelineEntries, type InlineCitationTimelineCandidat
// 2026-10-02: hyphen-run basenames resolve (#5623); 2026-10-05: temporal edges derive dated evidence on extraction.
// 2026-10-05T03: typed relation lines (core/line-grammar.ts) state their link's type; a per-edge verb that
// belongs to another link in the window no longer types this one; "joined [X] as <role>" reads as works_at.
-// Re-extract so existing pages pick these up.
-// 2026-10-08: adviser wording and local negation (U1), board/observer/investor wording never types works_at (U3)
-// and advisory/board/investor roles are not employment starts (U4), each confirmed on held-out data (Q2).
-export const LINK_EXTRACTOR_VERSION_TS = '2026-10-08T20:00:00Z';
+// 2026-10-08: held-out-confirmed Q2 units U1, U3, U4 (core/link-typing-units.ts). Re-extract so pages pick these up.
+export const LINK_EXTRACTOR_VERSION_TS = '2026-10-08T00:00:00Z';
// ─── Entity references ──────────────────────────────────────────
diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.json
index fbfb826329..c61f3a73f2 100644
--- a/test/fixtures/goldens/cli/tools-json.json
+++ b/test/fixtures/goldens/cli/tools-json.json
@@ -2,8 +2,8 @@
"golden": {
"exitCode": 0,
"stderr": "",
- "stdoutBytes": 209744,
- "stdoutSha256": "c6e089c565d3dfd6051c02f362790822322a3328669521135a2a4d4a79acaf29",
+ "stdoutBytes": 209938,
+ "stdoutSha256": "a8804aad5e3f0691c8a937f411df17e2592662c8eed52ea9c116f90ad05b433d",
"toolNames": [
"remember",
"entity",
@@ -370,6 +370,7 @@
"parameters": {
"content_only": "boolean?",
"fuzzy": "boolean?",
+ "grammar_diagnostics": "boolean?",
"include_content": "boolean?",
"include_deleted": "boolean?",
"include_quarantined": "boolean?",
@@ -388,6 +389,10 @@
"description": "Fuzzy slug match.",
"type": "boolean"
},
+ "grammar_diagnostics": {
+ "description": "Also return every line-grammar finding for the page.",
+ "type": "boolean"
+ },
"include_content": {
"description": "Full markdown + revision, for editing.",
"type": "boolean"
diff --git a/test/fixtures/goldens/exports/runtime.json b/test/fixtures/goldens/exports/runtime.json
index 803fc97ecb..f342f8e8be 100644
--- a/test/fixtures/goldens/exports/runtime.json
+++ b/test/fixtures/goldens/exports/runtime.json
@@ -646,6 +646,7 @@
"attendanceEvidenceRanges",
"buildBasenameIndex",
"deriveTimelineAnchor",
+ "explainLinkType",
"extractCodeRefs",
"extractEntityRefs",
"extractFrontmatterLinks",
@@ -667,6 +668,7 @@
"queryBasenameIndex",
"resolvedLinkCandidate",
"stripCodeBlocks",
+ "traceLinkType",
"unwrapWikilink"
],
"./markdown": [
diff --git a/test/fixtures/goldens/exports/types.json b/test/fixtures/goldens/exports/types.json
index b5bf0a3fe7..f61034e994 100644
--- a/test/fixtures/goldens/exports/types.json
+++ b/test/fixtures/goldens/exports/types.json
@@ -4733,6 +4733,7 @@
{
"kind": "interface",
"members": [
+ "explain?: ((e: LinkTypeExplanation) => void) | undefined",
"globalBasename?: boolean | undefined",
"lineGrammar?: { enabled?: boolean; allowUndeclaredTypes?: boolean; } | undefined",
"onResolvedFrontmatterTarget?: ((slug: string) => void) | undefined",
@@ -4782,7 +4783,7 @@
"kind": "variable",
"name": "LINK_EXTRACTOR_VERSION_TS",
"signature": [
- "\"2026-10-05T03:00:00Z\""
+ "\"2026-10-08T00:00:00Z\""
]
},
{
@@ -4801,6 +4802,18 @@
],
"name": "LinkCandidate"
},
+ {
+ "kind": "interface",
+ "members": [
+ "occurrences: LinkTypeExplanation[]",
+ "stints: Record<string, Stint[]>",
+ "target: string",
+ "tense: Record<string, AssertionTense>",
+ "transitions: (DerivedTransition & { rule: string; })[]",
+ "types: string[]"
+ ],
+ "name": "LinkExplanation"
+ },
{
"kind": "type",
"name": "LinkExtractionPack",
@@ -4815,6 +4828,35 @@
"\"qualified\" | \"unqualified\""
]
},
+ {
+ "kind": "interface",
+ "members": [
+ "attachment: \"none\" | \"attached\" | \"window\" | \"other-links\"",
+ "context: string",
+ "index?: number | undefined",
+ "linkType: string",
+ "packRule: string | null",
+ "prior: string | null",
+ "rule: string | null",
+ "stated: string | null",
+ "suppressed: string[]",
+ "target: string",
+ "unit: \"U1\" | \"U3\" | \"U4\" | null"
+ ],
+ "name": "LinkTypeExplanation"
+ },
+ {
+ "kind": "interface",
+ "members": [
+ "attachment: \"none\" | \"attached\" | \"window\" | \"other-links\"",
+ "prior: string | null",
+ "rule: string | null",
+ "suppressed: string[]",
+ "type: string",
+ "unit: \"U1\" | \"U3\" | \"U4\" | null"
+ ],
+ "name": "LinkTypeTrace"
+ },
{
"kind": "interface",
"members": [
@@ -4898,6 +4940,13 @@
"(input: TimelineAnchorInput) => TimelineCandidate | null"
]
},
+ {
+ "kind": "function",
+ "name": "explainLinkType",
+ "signature": [
+ "(input: { slug: string; content: string; pageType: PageType; target: string; frontmatter?: Record<string, unknown>; lineGrammar?: ExtractPageLinksOptions[\"lineGrammar\"]; pack?: LinkExtractionPack | null; }) => Promise<LinkExplanation>"
+ ]
+ },
{
"kind": "function",
"name": "extractCodeRefs",
@@ -5045,6 +5094,13 @@
"(content: string, opts?: { onHtmlComment?: (start: number, end: number) => void; }) => string"
]
},
+ {
+ "kind": "function",
+ "name": "traceLinkType",
+ "signature": [
+ "(pageType: PageType, context: string, globalContext?: string, targetSlug?: string, targetType?: string | null, anchor?: number, pageText?: string, explain?: boolean) => LinkTypeTrace"
+ ]
+ },
{
"kind": "function",
"name": "unwrapWikilink",
@@ -6596,7 +6652,7 @@
"caller?: { remote?: boolean; sourceId?: string; sourceIds?: string[]; excludePrivate?: boolean; } | undefined",
"detail?: \"low\" | \"medium\" | \"high\" | undefined",
"hits: FrozenHit[]",
- "return_unit: \"auto\" | \"chunk\" | \"window\" | \"section\" | \"page\"",
+ "return_unit: \"auto\" | \"window\" | \"chunk\" | \"section\" | \"page\"",
"return_window?: number | undefined"
],
"name": "AssembleEvidenceInput"
@@ -6672,13 +6728,13 @@
"kind": "type",
"name": "DeliveredUnit",
"signature": [
- "\"chunk\" | \"window\" | \"section\" | \"page\""
+ "\"window\" | \"chunk\" | \"section\" | \"page\""
]
},
{
"kind": "interface",
"members": [
- "applied_unit: \"auto\" | \"chunk\" | \"window\" | \"section\" | \"page\"",
+ "applied_unit: \"auto\" | \"window\" | \"chunk\" | \"section\" | \"page\"",
"blocks: number",
"budget_clamped?: { requested: number; max: number; } | undefined",
"budget_tokens: number",
@@ -6687,7 +6743,7 @@
"dropped: number",
"dropped_reasons: Record<string, number>",
"fallbacks: string[]",
- "requested_unit: \"auto\" | \"chunk\" | \"window\" | \"section\" | \"page\"",
+ "requested_unit: \"auto\" | \"window\" | \"chunk\" | \"section\" | \"page\"",
"return_window: number",
"tokenizer: \"cl100k\" | \"heuristic\"",
"tokens_delivered: number"
@@ -6739,7 +6795,7 @@
"budgetClamped?: { requested: number; max: number; } | undefined",
"budgetTokens: number",
"explicitUnit: boolean",
- "requestedUnit: \"auto\" | \"chunk\" | \"window\" | \"section\" | \"page\"",
+ "requestedUnit: \"auto\" | \"window\" | \"chunk\" | \"section\" | \"page\"",
"unit: \"auto\" | \"window\" | \"section\" | \"page\"",
"window: number"
],
@@ -6832,7 +6888,7 @@
"kind": "type",
"name": "ReturnUnit",
"signature": [
- "\"auto\" | \"chunk\" | \"window\" | \"section\" | \"page\""
+ "\"auto\" | \"window\" | \"chunk\" | \"section\" | \"page\""
]
},
{