Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

typing unit U3: board, observer and investor wording never types works_at

garrytandd05898d99e7
diff --git a/scripts/module-size-limits.tsv b/scripts/module-size-limits.tsv
index e7300b6eb7..f586547a2e 100644
--- a/scripts/module-size-limits.tsv
+++ b/scripts/module-size-limits.tsv
@@ -31,7 +31,7 @@ src/core/minions/handlers/subagent.ts 1925 ratchet merged: master v131 settle re
src/commands/bootstrap.ts 2134 ratchet grandfathered at merge (grew past the 1500 cap on master); raised for #4066 HOME_WORKSPACE_GUARD_EXEMPT (status/uninstall/harness); +5 for the harnessDetect test seam (bulk lives in core/bootstrap/harness.ts); +23 for the contract subcommand dispatcher glue (#4105 absorb — bulk lives in core/bootstrap/contract.ts); +codex hooks-consent gate + mcp+hooks receipt registration + uninstall arm; +42 ambient-writeback WP8: interview-time SURFACE_MULTIUSER audience apply (pre-init ordering) + applyDeclaredAudienceFromInterview; +3 #4897 harness usage clause documenting --source ID semantics; +5 #5878: --refresh-skills dispatch and usage lines (logic in core/bootstrap/harness-skills.ts); +11 #5488: SUBCOMMAND_HELP harness entry (gate on --help / -h / help) — CLI help line, cannot move; +11 #4618 seat: --seat/--no-seat help lines and the runHooks parse (parse + notes live in core/bootstrap/hooks.ts parseSeatFlags)
src/core/minions/worker.ts 1774 ratchet grandfathered at merge (grew past the 1500 cap on master, #4170); grown v0.46.11.0 five-issue wave; security: durable queued authority and confined filesystem dispatch; typed readiness, configuration-blocked lifecycle and bounded release; post-validation readiness publication and confirmed isolated-execution stop evidence; latch typed lock-renewal faults before generic retry; +9 Lane D: JobDeferredError routing (deferJob helper); +1 spend authorization: runWithJobSpend import (both handler seams call it in place of the bare handler)
src/commands/sources.ts 2042 ratchet +5 #5988: sources status/retry-held help rows describe Git holds (help lines cannot move); +2 #5988: sources status <id> filter and Git held files (view in persistence/connector-status.ts); +5 F0: sources refresh dispatch and help rows (command body in sources-refresh.ts, protocol in persistence/worktree-refresh.ts); +6 fix wave 5 #5409: mirror-readonly/mirror-writable dispatch, help rows and the list --json mirror_read_only field (body in sources-mirror.ts); grown v0.46.22.0 phone wave: github source kind (#4104); +129 v0.47 gmail-loops: google source-kind flags + vault preflight + duplicate-account warn + access-mode validation; +8 set-path dispatch + help rows (#4739 — command body peeled to sources-set-path.ts); +29 #4698 adoption: --calendar-id flag + duplicate-account warn scoped to overlapping services; #5105: trusted writer administration route; company handlers and receipt status wiring; parsing stays in dedicated modules; canonical reconciliation: +5 engine-free sibling-command dispatch and help row, implementation remains in source-reconcile.ts; +4 fix wave 3 lane A: sources status connector recovery state and run counts (view lives in persistence/connector-status.ts); +3 fix wave 4 lane B: sources retry-held dispatch and help row (command body in sources-retry-held.ts) and the connector first-sync note on add; bodies in source-delete.ts and sources-set-path.ts); +4 #5984: sources status shows the managed sync backlog (logic in persistence/sync-drain.ts); v0.60.48.0 merge: #5984 growth re-summed over v0.60.47.0 (2031 measured); +11 W-B4: sources shared-skills dispatch, its --help guard and help rows, and the shared_skills field/lines in sources status (body in sources-shared-skills.ts, view in shared-skills/source-opt-out.ts)
-src/core/link-extraction.ts 2345 ratchet grown v0.46.26.0 megawave: link-aware timeline split + delimiter-outside-links (#3957 #4062 #3737); +37 wave-k #3908 reimpl: isCrossSourceLinksEnabled config ladder; +10 wave #4277: parseTimelineEntries skips generated backlink receipts; +17 #4855: latin-fold in normalizeBasename + dir-hint step tries both slug grammars; +17: #4855 Latin stroke-letter fold; +5: #4873 ./-relative markdown links kept as live references; +34 wave review: `../y.md` sibling links resolve on the DB path + folded bare-wikilink grammar (#4873 class); +62 #4977: role-prior suppression in machine-list sections (rolePriorSuppressedRanges, EntityRef.index); +3 composed with #4985 (variation-selector strip) in the same wave; +4 #4995: markdown-link anchor strip + lowercase-candidate rationale comments; +6 pre-landing review: #4977 suppression on code-stripped content + truthful watermark/section-list comments; T2: source-qualified inference and atomic origin-scoped derived links; canonical attendance evidence, source-qualified orientation, strict attendee resolution, and relocated filesystem link scanner (command export preserved); +4: pack-owned fallback and ambiguous attendee guards Display-label attendance exclusion, indexed evidence membership, and bounded strict resolver caching; attendance-boundary review.; complete attendance resolution and fence-safe evidence traversal; frontmatter discovery, canonical basename admission and code-aware attendance comment masking; exclude inline HTML comment spans from admitted attendance ranges; +17 write-path wave: same-name rule for entity fuzzy matches + rename-alias fallback in makeResolver; +1 #5567: materialized marker ends bullet detail; +30 #5749: unique global-basename step before fuzzy and live keyword resolution (ResolveOptions, watermark note); #5765: bold **Attendees:** label accepted + LINK_EXTRACTOR_VERSION_TS bump note; +10 eval-wave N9-2/N9-3/N12-7: pack frontmatter mappings inherit FRONTMATTER_LINK_MAP direction, page-type-bound pack attended follows canonical attendance, LINK_EXTRACTOR_VERSION_TS bump note; +1 #5623: normalizeBasename collapses hyphen runs like slugifySegment (extractor watermark note); +11 #5562: parseTimelineEntries accepts dated ### headings (FS-extractor parity); +3 eval-wave N12-6: Participants accepted as attendance evidence + LINK_EXTRACTOR_VERSION_TS bump note; +22 P5 wanted pages: AuthoredRef on body link candidates; -33 lowered: P5 moved machine-section ranges to core/machine-sections.ts and stated relation types to core/line-grammar.ts; +7 P5: ExtractPageLinksOptions interface + wikilinkAuthoredRef helper (keeps extractPageLinks under the function-size limit); +32 P5: per-edge verb attachment (attachedVerb, VERB_RULES) + joined-as works_at + extractor watermark note; P5 x temporal-edges merge: verb attachment reads the verb at the link's own position in the window (excerptAnchor) and the within-page dedup (now dedupeCandidates) drops a mention of a target the page also links with a typed edge; links joined only by commas/conjunctions share the verb before the first (coordinated); board roles (BOARD_RE, BOARD_AFTER_RE) resolve to invested_in for an investor page and advises otherwise, never works_at; +109 Q2 Track C: stable verb-rule ids, traceLinkType/explainLinkType (reasons for every typing decision), per-occurrence typer hoisted out of extractPageLinks (makeTypeFor); unit logic lives in core/link-typing-units.ts; +25 Q2 Track C: typing-unit verb rules and vetoes in attachedVerb/traceLinkType, validity stints in explainLinkType
+src/core/link-extraction.ts 2349 ratchet grown v0.46.26.0 megawave: link-aware timeline split + delimiter-outside-links (#3957 #4062 #3737); +37 wave-k #3908 reimpl: isCrossSourceLinksEnabled config ladder; +10 wave #4277: parseTimelineEntries skips generated backlink receipts; +17 #4855: latin-fold in normalizeBasename + dir-hint step tries both slug grammars; +17: #4855 Latin stroke-letter fold; +5: #4873 ./-relative markdown links kept as live references; +34 wave review: `../y.md` sibling links resolve on the DB path + folded bare-wikilink grammar (#4873 class); +62 #4977: role-prior suppression in machine-list sections (rolePriorSuppressedRanges, EntityRef.index); +3 composed with #4985 (variation-selector strip) in the same wave; +4 #4995: markdown-link anchor strip + lowercase-candidate rationale comments; +6 pre-landing review: #4977 suppression on code-stripped content + truthful watermark/section-list comments; T2: source-qualified inference and atomic origin-scoped derived links; canonical attendance evidence, source-qualified orientation, strict attendee resolution, and relocated filesystem link scanner (command export preserved); +4: pack-owned fallback and ambiguous attendee guards Display-label attendance exclusion, indexed evidence membership, and bounded strict resolver caching; attendance-boundary review.; complete attendance resolution and fence-safe evidence traversal; frontmatter discovery, canonical basename admission and code-aware attendance comment masking; exclude inline HTML comment spans from admitted attendance ranges; +17 write-path wave: same-name rule for entity fuzzy matches + rename-alias fallback in makeResolver; +1 #5567: materialized marker ends bullet detail; +30 #5749: unique global-basename step before fuzzy and live keyword resolution (ResolveOptions, watermark note); #5765: bold **Attendees:** label accepted + LINK_EXTRACTOR_VERSION_TS bump note; +10 eval-wave N9-2/N9-3/N12-7: pack frontmatter mappings inherit FRONTMATTER_LINK_MAP direction, page-type-bound pack attended follows canonical attendance, LINK_EXTRACTOR_VERSION_TS bump note; +1 #5623: normalizeBasename collapses hyphen runs like slugifySegment (extractor watermark note); +11 #5562: parseTimelineEntries accepts dated ### headings (FS-extractor parity); +3 eval-wave N12-6: Participants accepted as attendance evidence + LINK_EXTRACTOR_VERSION_TS bump note; +22 P5 wanted pages: AuthoredRef on body link candidates; -33 lowered: P5 moved machine-section ranges to core/machine-sections.ts and stated relation types to core/line-grammar.ts; +7 P5: ExtractPageLinksOptions interface + wikilinkAuthoredRef helper (keeps extractPageLinks under the function-size limit); +32 P5: per-edge verb attachment (attachedVerb, VERB_RULES) + joined-as works_at + extractor watermark note; P5 x temporal-edges merge: verb attachment reads the verb at the link's own position in the window (excerptAnchor) and the within-page dedup (now dedupeCandidates) drops a mention of a target the page also links with a typed edge; links joined only by commas/conjunctions share the verb before the first (coordinated); board roles (BOARD_RE, BOARD_AFTER_RE) resolve to invested_in for an investor page and advises otherwise, never works_at; +109 Q2 Track C: stable verb-rule ids, traceLinkType/explainLinkType (reasons for every typing decision), per-occurrence typer hoisted out of extractPageLinks (makeTypeFor); unit logic lives in core/link-typing-units.ts; +25 Q2 Track C: typing-unit verb rules and vetoes in attachedVerb/traceLinkType, validity stints in explainLinkType; +4 U3: board-seat rule split out of INVESTED_RE (same verb and precedence) and investor-prior/link offsets passed to unit vetoes
src/core/embedding-migration.ts 1569 ratchet new row: crossed 1500 in v0.46.25.0 fix waves (#4305 #4306 chunk-model truth helpers); retired provider integration removed; safety wave: canonical projection readiness and fact-aware completion; file configuration publication retains lease-row locks; +8 transactional retained-vector rebuildability checks before destructive migration boundaries; archived eligibility: source-locked reconciliation and live/current smoke revalidation; +2 #5680: authorization_generation field and its carry-forward on same-target re-apply (settle idempotency); +10 #5226: plan carries chunks_to_restamp beside chunks_to_embed; +9 #5088: schema transition defers HNSW builds into the marker (deferred_ann_indexes), carry-forward on re-apply, verify blocks on pending/INVALID ANN indexes (build phase in embedding-ann-build.ts); +10 #5088: dim-pinned tables (query_cache, facts, and any later entry of TEXT_EMBEDDING_DIM_PINNED_TABLES) defer their HNSW through the same worklist (DEFERRED_ANN_TABLES, recordDeferredAnnIndexes); +25 wave 8 lane D1 #5885: takes in the dim-pinned column list, plan (takes_to_embed), status (takes_pending) and completion verify
src/core/github-source.ts 1530 ratchet new row: crossed the 1500 unlisted cap in v0.46.23.0 review fix wave (scope-state gating, client hardening, symlink containment); merged reliability/shared-skills source integration; managed sweep lease wrapper; fix wave 3 lane A: config parser peeled to github-source-config.ts (-47), +account pin wiring and pinned-installation refresh
src/commands/hook.ts 1915 ratchet cathedral-5 heartbeat extraction offsets part of the BrainBench-seam growth; grown v0.46.26.0 megawave hooks-ipc (#4245); +108 monthly backup check: banner + gated session-start note + detached spawn (backup/status-file readers); +28 ship-review egress hardening: per-harness capture dispatch (capture-spec), memorable gate + receipt + relay block, fail-closed unscanned/newest-guess skips; +79 ambient-writeback WP4: hookStop bank step (gate -> bankWritebackTurn -> IPC flush; gate/bank logic live in core/facts + corpus-segments); +41 adversarial fix wave: wide-tail retry when the 128KB window misses the user turn, by-design heartbeat outcome classes, source-in-name banking; +11 #5413 session-end skips claude-cli self-transcripts; +11 #5701: hook lanes pass allowOversize so a long session reaches the bounded tail read; +12 core memory: user-prompt context-pressure notice wiring (logic in core/context/pressure.ts; session-start composition in core/context/session-start-output.ts)
diff --git a/scripts/q2-typing-dev.ts b/scripts/q2-typing-dev.ts
index 8843018767..6d70c1e074 100644
--- a/scripts/q2-typing-dev.ts
+++ b/scripts/q2-typing-dev.ts
@@ -15,7 +15,8 @@
* ENABLED_TYPING_UNITS.
*
* `compare` prints the type-steal and transition tables by identity (subject, target, type, kind, date) against the
- * generator ledger: edges whose type moved away from (or toward) the ledger, new wrong transitions, fixed and missing
+ * generator ledger: edges that lost a ledger type or gained more unsupported types than they shed (steals), edges that
+ * gained a ledger type (gains), new wrong transitions, fixed and missing
* correct transitions, and current employers lost from or added to the live read.
*
* `world-v1` types gbrain-evals' world-v1 corpus (eval/data/world-v1, rendered as the P5 H1 runner renders it) with
@@ -189,8 +190,9 @@ export function compareDumps(base: Dump, arm: Dump) {
const lost = [...tb].filter(t => g.has(t) && !ta.has(t));
const spurious = [...ta].filter(t => !g.has(t) && !tb.has(t));
const won = [...ta].filter(t => g.has(t) && !tb.has(t));
+ const dropped = [...tb].filter(t => !g.has(t) && !ta.has(t));
const row = { seed: b.seed, subject: b.slug, target: to, ledger: role(b.ledger, to), gold: show(g), base: show(tb), arm: show(ta) };
- if (lost.length || spurious.length) steals.push(row);
+ if (lost.length || spurious.length > dropped.length) steals.push(row);
else if (won.length) gains.push(row);
else moves.push(row);
}
diff --git a/src/core/link-extraction.ts b/src/core/link-extraction.ts
index 840eb2f85f..efc983333d 100644
--- a/src/core/link-extraction.ts
+++ b/src/core/link-extraction.ts
@@ -1217,7 +1217,9 @@ const WORKS_AT_RE = /\b(?:joined\b[^.\n]{0,80}?\bas (?:an? |the )?(?:senior |sta
// Series A"), narrative verbs ("invests in", "investing in"), historical
// ("early investor in", "first check"), and portfolio framing ("portfolio
// company", "portfolio includes").
-const INVESTED_RE = /\b(?:invested in|invests in|investing in|invest in|investment in|investments in|backed by|funding from|funded by|raised from|led the (?:seed|Series|round|investment|round)|led .{0,30}(?:Series [A-Z]|seed|round|investment)|participated in (?:the )?(?:seed|Series|round)|wrote (?:a |the )?check|first check|early investor|portfolio (?:company|includes)|board seat (?:at|in|on)|term sheet for)\b/i;
+const INVESTED_RE = /\b(?:invested in|invests in|investing in|invest in|investment in|investments in|backed by|funding from|funded by|raised from|led the (?:seed|Series|round|investment|round)|led .{0,30}(?:Series [A-Z]|seed|round|investment)|participated in (?:the )?(?:seed|Series|round)|wrote (?:a |the )?check|first check|early investor|portfolio (?:company|includes)|term sheet for)\b/i;
+// "board seat at/in/on": its own rule (same verb, same precedence) so U3 can require an investor prior for it.
+const BOARD_SEAT_RE = /\bboard seat (?:at|in|on)\b/i;
// Founded patterns. Includes the noun-form "founder of" / "founders include"
// because that's how real prose identifies founders ("Carol Wilson is the
@@ -1278,6 +1280,7 @@ interface VerbRule { id: string; re: RegExp; verb: string; unit?: TypingUnit }
const CORE_VERB_RULES: ReadonlyArray<VerbRule> = [
{ id: 'verb.founded', re: FOUNDED_RE, verb: 'founded' },
{ id: 'verb.invested_in', re: INVESTED_RE, verb: 'invested_in' },
+ { id: 'verb.invested_in.board_seat', re: BOARD_SEAT_RE, verb: 'invested_in' },
{ id: 'verb.advises', re: ADVISES_RE, verb: 'advises' },
{ id: 'verb.works_at', re: WORKS_AT_RE, verb: 'works_at' },
{ id: 'verb.zh.founded', re: ZH_FOUNDED_RE, verb: 'founded' },
@@ -1308,7 +1311,7 @@ const coordinated = (between: string) => {
};
const GLOBAL_VERB_RULES = VERB_RULES.map(r => ({ ...r, re: new RegExp(r.re.source, `${r.re.flags.replace('g', '')}g`) }));
interface Attachment { rule: VerbRule | null; suppressed: string[]; otherLink: boolean }
-function attachedVerb(context: string, targetSlug?: string, anchor?: number, explain = false): Attachment | undefined {
+function attachedVerb(context: string, targetSlug?: string, anchor?: number, explain = false, investorPrior: () => boolean = () => false): Attachment | undefined {
const fromAnchor = targetSlug && anchor !== undefined ? context.indexOf(targetSlug, anchor) : -1;
const at = fromAnchor >= 0 ? fromAnchor : targetSlug ? context.indexOf(targetSlug) : -1;
if (at < 0) return undefined;
@@ -1329,7 +1332,7 @@ function attachedVerb(context: string, targetSlug?: string, anchor?: number, exp
if (explain) suppressed.push(`${r.id}:other-link`);
continue;
}
- const veto = unitVerbVeto({ rule: r, context, start, end });
+ const veto = unitVerbVeto({ rule: r, context, start, end, investorPrior, linkStart, linkEnd });
if (veto) { suppressed.push(veto); continue; }
if (rule) { suppressed.push(`${r.id}:outranked`); break; }
rule = r;
@@ -1395,14 +1398,15 @@ export function traceLinkType(pageType: PageType, context: string, globalContext
// Per-edge verb rules, precedence founded > invested_in > advises > works_at
// (then the Chinese rules), over the verbs that belong to this link: in
// "works at [A] and also advises [B]", A is works_at and B advises.
- const attached = attachedVerb(context, targetSlug, anchor, explain);
+ const investorPrior = () => pageType === 'person' && PARTNER_ROLE_RE.test(pageText ?? globalContext ?? '');
+ const attached = attachedVerb(context, targetSlug, anchor, explain, investorPrior);
if (attached?.rule) return out(attached.rule.verb, attached.rule.id, 'attached', attached.suppressed);
const suppressed = attached?.suppressed ?? [];
if (attached === undefined) {
for (const r of GLOBAL_VERB_RULES) {
if (!ruleOn(r)) continue;
for (const m of context.matchAll(r.re)) {
- const veto = unitVerbVeto({ rule: r, context, start: m.index ?? 0, end: (m.index ?? 0) + m[0].length });
+ const veto = unitVerbVeto({ rule: r, context, start: m.index ?? 0, end: (m.index ?? 0) + m[0].length, investorPrior });
if (!veto) return out(r.verb, r.id, 'window', suppressed);
suppressed.push(veto);
}
diff --git a/src/core/link-typing-units.ts b/src/core/link-typing-units.ts
index 30e889a571..08fb98ddc5 100644
--- a/src/core/link-typing-units.ts
+++ b/src/core/link-typing-units.ts
@@ -91,8 +91,37 @@ export interface VetoInput {
/** Match offsets in `context`. */
start: number;
end: number;
+ /** Whether the page states the subject is an investor (link-extraction.ts PARTNER_ROLE_RE on the whole page). */
+ investorPrior?: () => boolean;
+ /** The link's markup in `context`, when located. */
+ linkStart?: number;
+ linkEnd?: number;
}
+/** A sentence, clause, line or timeline-entry break. */
+const BREAK = /\.\s|;\s|\n|\s[-*]\s+\*\*\d{4}-\d{2}-\d{2}\*\*|\s#{2,6}\s/;
+/** Is the verb match in the same sentence or timeline entry as the link (always true when the link was not located)? */
+const sameClauseAsLink = (v: VetoInput) => v.linkStart === undefined || v.linkEnd === undefined
+ || !BREAK.test(v.end <= v.linkStart ? v.context.slice(v.end, v.linkStart) : v.context.slice(v.linkEnd, v.start));
+
+/** U3: board, observer and investor wording ("board director at", "independent director of", "joined as an investor"). "On board" is not a board. */
+const U3_BOARD_WORDING = /(?<!\bon[\s-])\bboards?\b|\b(?:observer|investor|investing|angel|non-executive|trustee)\b|\bindependent\s+director\b/i;
+/** Board positions (not investments): what may sit right before a link as the link's own role. */
+const U3_BOARD_POSITION = /(?<!\bon[\s-])\bboards?\b|\b(?:observer|non-executive|trustee)\b|\bindependent\s+director\b/gi;
+/** The words right around a verb match: board wording ending at most 20 word characters before the match end, or starting at most 20 after it (no punctuation in between). */
+const boardNearMatch = (context: string, start: number, end: number) =>
+ new RegExp(`(?:${U3_BOARD_WORDING.source})[\\w\\s-]{0,20}$`, 'i').test(`${clauseBefore(context, start)}${context.slice(start, end)}`)
+ || new RegExp(`^[\\w\\s-]{0,20}?(?:${U3_BOARD_WORDING.source})`, 'i').test(context.slice(end, end + 60));
+/** The link's own role is a board position right before it ("is also a board director at [X]", "joined the board of [X]"). */
+function boardRoleBeforeLink(v: VetoInput): boolean {
+ if (v.linkStart === undefined) return false;
+ const clause = clauseBefore(v.context, v.linkStart);
+ const last = [...clause.matchAll(U3_BOARD_POSITION)].pop();
+ return !!last && /^[\w\s-]{0,30}?\b(?:at|of|for|with|on|to|in)\s+(?:the\s+)?$/i.test(clause.slice((last.index ?? 0) + last[0].length));
+}
+/** "board seat at [X] as an investor": the board phrase's own clause states the investment. */
+const U3_INVESTMENT_STATED = /\b(?:investor|invested|investing|investment|led\s+(?:the|its)\s+(?:seed|round|series)|on\s+behalf\s+of\s+(?:the|its|our|her|his|their)\s+fund)\b/i;
+
/**
* A unit's veto of one verb match, or null. A vetoed match does not decide the type; inference moves on to the next
* match or rule. Returns the stable id of the veto (`unit.u<N>.*`).
@@ -102,6 +131,12 @@ export function unitVerbVeto(v: VetoInput): string | null {
if (U1_NEGATED_BEFORE.test(v.context.slice(Math.max(0, v.start - 40), v.start))) return 'unit.u1.negated';
if (v.rule.id === 'unit.u1.adviser' && thirdPartyBefore(v.context, v.start)) return 'unit.u1.third_party';
}
+ if (typingUnitEnabled('U3')) {
+ if (v.rule.id === 'verb.invested_in.board_seat' && !v.investorPrior?.()
+ && !U3_INVESTMENT_STATED.test(`${clauseBefore(v.context, v.start)}${v.context.slice(v.start, v.end + 100).split(BREAK)[0]}`)) return 'unit.u3.board_seat_without_investment';
+ if (v.rule.verb === 'works_at' && (boardRoleBeforeLink(v)
+ || (sameClauseAsLink(v) && boardNearMatch(v.context, v.start, v.end)))) return 'unit.u3.board_wording';
+ }
return null;
}
diff --git a/test/fixtures/q2-dev-phrasings/board-director.json b/test/fixtures/q2-dev-phrasings/board-director.json
new file mode 100644
index 0000000000..5eef6884e7
--- /dev/null
+++ b/test/fixtures/q2-dev-phrasings/board-director.json
@@ -0,0 +1,19 @@
+{
+ "id": "q2-dev-board-director",
+ "note": "Development-only phrasing for the Q2 typing units (gbrain test/fixtures/q2-dev-phrasings). Not held-out material. Board wording that entails no employment, placed in the advisory, investment and alumni slots; the advisory slot's ledger gold (advises) is not entailed by board wording, so advisor traps fail on every build by construction.",
+ "templates": {
+ "current": "{name} works at {company} as {role}.",
+ "stale_summary": "{name} works at {company} as {role}.",
+ "rejoin_eu": "Previously at {company}, {name} now runs {company}'s EU team.",
+ "former": "Earlier, {name} worked at {company}.",
+ "advises": "{name} is also a board director at {company}.",
+ "tl_move": "linkedin — Left {prev} to join {company} as {role}",
+ "tl_join": "linkedin — Joined {company} as {role}",
+ "tl_leave": "linkedin — Left {company}",
+ "tl_advise": "note — Became a board director at {company}",
+ "tl_invest": "note — Joined as an investor in {company}",
+ "tl_alumni": "meeting — Became an independent director of {company}",
+ "explicit_start": "note — Started works_at [[{slug}]] as {role}",
+ "explicit_end": "note — Ended works_at [[{slug}]]"
+ }
+}
diff --git a/test/helpers/typing-unit-examples.ts b/test/helpers/typing-unit-examples.ts
index c89c784c0c..01df6ecc56 100644
--- a/test/helpers/typing-unit-examples.ts
+++ b/test/helpers/typing-unit-examples.ts
@@ -98,4 +98,53 @@ const U1: TypingExample[] = [
off: { types: ['mentions', 'works_at'], transitions: ['works_at start 2019-01-02'], live: { type: 'works_at', at: { today: true } } } },
];
-export const EXAMPLES: TypingExample[] = [...U1];
+// ─── U3: board, observer and investor wording never types works_at ─────
+const INVESTOR_PAGE = 'Alice is a partner at a venture capital fund and a seed investor.';
+const U3: TypingExample[] = [
+ { id: 'u3-board-director-at', unit: 'U3', target: ACME, content: page(`Alice is a board director at ${L(ACME)}.`),
+ off: { types: ['works_at'], tense: { works_at: 'present' }, live: { type: 'works_at', at: { today: true } } }, on: { types: ['mentions'] } },
+ { id: 'u3-independent-director-of', unit: 'U3', target: ACME, content: page(`Alice is an independent director of ${L(ACME)}.`),
+ off: { types: ['works_at'] }, on: { types: ['mentions'] } },
+ { id: 'u3-joined-as-investor', unit: 'U3', target: ACME, content: page(`Alice joined as an investor in ${L(ACME)}.`),
+ off: { types: ['works_at'] }, on: { types: ['invested_in'] } },
+ { id: 'u3-joined-as-observer', unit: 'U3', target: ACME, content: page(`Alice joined as an observer at ${L(ACME)}.`),
+ off: { types: ['works_at'] }, on: { types: ['mentions'] } },
+ { id: 'u3-board-seat-without-investor-prior', unit: 'U3', target: ACME, content: page(`Alice holds a board seat at ${L(ACME)}.`),
+ off: { types: ['invested_in'] }, on: { types: ['mentions'] } },
+ { id: 'u3-board-seat-with-investor-prior', unit: 'U3', target: ACME, content: page(`${INVESTOR_PAGE} She holds a board seat at ${L(ACME)}.`),
+ off: { types: ['invested_in'] }, on: { types: ['invested_in'] } },
+ { id: 'u3-board-seat-as-investor', unit: 'U3', target: ACME, content: page(`Alice A.`, [`**2021-02-03** | note — Took a board seat at ${L(ACME)} as an investor`]),
+ off: { types: ['invested_in'] }, on: { types: ['invested_in'] } },
+ { id: 'u3-cross-entry-board-wording-not-read', unit: null, target: BETA,
+ content: page(`Alice A.`, [`**2019-06-22** | linkedin — Joined ${L(BETA)} as VP engineering`, `**2020-07-15** | note — Became a board director at ${L(ACME)}`]),
+ off: { types: ['works_at'] } },
+ { id: 'u3-cross-sentence-job-verb-not-borrowed', unit: 'U3', target: ACME,
+ content: page(`Alice works at ${L(BETA)} as head of sales. Alice is also a board director at ${L(ACME)}.`),
+ off: { types: ['works_at'] }, on: { types: ['mentions'] } },
+ { id: 'u3-board-mentioned-after-employer', unit: null, target: ACME,
+ content: page(`Alice works at ${L(ACME)}, whose board she joined in 2020.`), off: { types: ['works_at'] } },
+ { id: 'u3-board-member-who-works-at', unit: null, target: ACME,
+ content: page(`Alice, a board observer elsewhere, works at ${L(ACME)}.`), off: { types: ['works_at'] } },
+ { id: 'u3-observer-stays-mentions', unit: 'U3', target: ACME, content: page(`Alice is the board observer at ${L(ACME)}.`),
+ off: { types: ['mentions'] }, on: { types: ['mentions'] } },
+ { id: 'u3-negated-board-director', unit: 'U3', target: ACME, content: page(`Alice is not a board director at ${L(ACME)}.`),
+ off: { types: ['works_at'] }, on: { types: ['mentions'] } },
+ { id: 'u3-third-party-board-director', unit: 'U3', target: ACME, content: page(`Alice's sister is a board director at ${L(ACME)}.`),
+ off: { types: ['works_at'] }, on: { types: ['mentions'] } },
+ { id: 'u3-on-board-is-not-a-board', unit: null, target: ACME, content: page(`Alice came on board as a senior engineer at ${L(ACME)}.`),
+ off: { types: ['works_at'] } },
+ { id: 'u3-employer-kept', unit: null, target: ACME, content: page(`Alice works at ${L(ACME)} as head of sales.`),
+ off: { types: ['works_at'] } },
+ { id: 'u3-concurrent-employer-and-board', unit: null, target: BETA,
+ content: page(`Alice is VP engineering at ${L(BETA)} and a board director at ${L(ACME)}.`), off: { types: ['works_at'] } },
+ { id: 'u3-concurrent-board-target', unit: 'U3', target: ACME,
+ content: page(`Alice is VP engineering at ${L(BETA)} and a board director at ${L(ACME)}.`), off: { types: ['works_at'] }, on: { types: ['mentions'] } },
+ // The set-F interaction: a board line is the only statement about the company. Master reads a job that starts on
+ // the board date; U4 alone keeps the job but drops its start (live on every date); U3 removes the job.
+ { id: 'u34-board-only-target', unit: 'U3', target: ACME,
+ content: page(`Alice works at ${L(BETA)} as engineer.`, [`**2022-03-04** | note — Became a board director at ${L(ACME)}`]),
+ off: { types: ['works_at'], transitions: ['works_at start 2022-03-04'], live: { type: 'works_at', at: { '2020-01-01': false, today: true } } },
+ on: { types: ['mentions'], transitions: [] } },
+];
+
+export const EXAMPLES: TypingExample[] = [...U1, ...U3];