Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(graph): becoming an advisor or board member is not an employment start

garrytan0a967e5d52e5
diff --git a/docs/eval/decisions/p5-delta-2026-10-05/preregistration.md b/docs/eval/decisions/p5-delta-2026-10-05/preregistration.md
index 72be6b3dd2..3e3d038795 100644
--- a/docs/eval/decisions/p5-delta-2026-10-05/preregistration.md
+++ b/docs/eval/decisions/p5-delta-2026-10-05/preregistration.md
@@ -11,7 +11,7 @@ it. Sealed runs are executed by the custodian only; the custodian pins the delta
|---|---|---|---|
| Validity ranges on typed relation lines stored as dated edge transitions (producer `inline`, `src/core/link-effective.ts`) | `line_grammar.effective_ranges` | on | off (ships off) |
| Wanted rows recorded on the remote `put_page` write path (link-effect hook) | added with the hook; ships off | on | off |
-| Temporal-evidence lexicon: an advisory, board or investor role ("Took an advisory role with [X]") is not an employment start (`NOT_EMPLOYMENT_ROLE` guard on `EMPLOYMENT.start` in `src/core/link-temporal-evidence.ts`) | none (evidence derivation) | kept | reverted before landing |
+| Temporal-evidence lexicon: an advisory, board or investor role ("Took an advisory role with [X]", "Became an advisor at [X]") is not an employment start (`NOT_EMPLOYMENT_ROLE` guard on the `took … role` and `became … at/of` alternatives of `EMPLOYMENT.start` in `src/core/link-temporal-evidence.ts`) | none (evidence derivation) | kept | reverted before landing |
| Link typing changes made when the edge-validity schema merged: the verb is read at the link's own position in the window; links joined only by commas or conjunctions share the verb before the first; a `mentions` edge to a target the page also links with a typed edge is dropped | none (extraction behavior) | kept | reverted to the frozen build's typing before landing |
## Hypotheses, metrics and bars
@@ -33,8 +33,8 @@ relationship accuracy. Bars: noninferior at tolerance 0.01 on both.
**H10, temporal-evidence lexicon.** The edge-validity plan's temporal-edges held-out set C (custodian mode), run as a
noninferiority guard on every gate that plan preregistered, plus the retrieval-feedback plan's E5 wrong-closure probe
-(pages with one long employment stint and a later dated "Took an advisory role with [X]" line on a page that also
-asserts works_at to X). Arms: the delta build vs the same build with the guard removed. Bars: 0 wrong closures on the
+(pages with one long employment stint and a later dated "Took an advisory role with [X]" or "Became an advisor at
+[X]" line on a page that also asserts works_at to X). Arms: the delta build vs the same build with the guard removed. Bars: 0 wrong closures on the
E5 probe (exact); every edge-validity gate noninferior at tolerance 0.01. Run by the custodian (P0).
Guardrails: LongMemEval-S `recall_all@5` noninferior (tolerance 0.01); N4 resolver no new wrong merge (exact).
diff --git a/src/core/link-temporal-evidence.ts b/src/core/link-temporal-evidence.ts
index 2c90bd6276..53c7c3af6c 100644
--- a/src/core/link-temporal-evidence.ts
+++ b/src/core/link-temporal-evidence.ts
@@ -65,13 +65,13 @@ const ROLE = String.raw`(?:[\w&./-]+\s+){0,4}?`;
const NOT_PAST_ROLE = String.raw`(?!(?:promoted|hired|named|appointed|made|elected|brought|recently|just|newly|now|still|currently)\b)`;
/** Present perfect ("has worked at", "have spent years at") describes a job that is still going. */
const NOT_PERFECT = String.raw`(?<!\b(?:has|have|'s|’s)\s+(?:\w+\s+)?)`;
-/** Advisory, board and investor roles ("took an advisory role with") are not jobs. */
-const NOT_EMPLOYMENT_ROLE = String.raw`(?!(?:\w+\s+){0,1}?(?:advis\w*|board|investor|investing|investment|angel|observer)\b)`;
+/** Advisory, board and investor roles ("took an advisory role with", "became an advisor at") are not jobs. */
+const NOT_EMPLOYMENT_ROLE = String.raw`(?!(?:\w+\s+){0,2}?(?:advis\w*|board|investor|investing|investment|angel|observer)\b)`;
const OWNED = String.raw`(?:(?:her|his|their|my|the)\s+)?(?:time|stint|tenure|role|job|run)\s+`;
const EMPLOYMENT = {
end: new RegExp(String.raw`\b(?:left|leaving|departed(?:\s+from)?|quit|resigned(?:\s+as\s+${ROLE})?(?:\s+from|\s+at)?|stepped\s+down(?:\s+as\s+${ROLE})?(?:\s+from|\s+at)?|stepped\s+away\s+from|moved\s+on\s+from|(?:moved|switched|transitioned|jumped)\s+(?:over\s+|out\s+)?from|(?:was\s+)?laid\s+off\s+(?:from|by|at)|(?:was\s+)?let\s+go\s+(?:from|by)|(?:was\s+)?fired\s+(?:from|by)|no\s+longer\s+(?:at|with|works\s+at|working\s+at)|exited|parted\s+ways\s+with|retired\s+from|(?:wrapped\s+up|finished|ended|concluded)\s+(?:${OWNED})?(?:at|with)|last\s+day\s+at|departure\s+from)\s*$`, 'i'),
- start: new RegExp(String.raw`\b(?:(?:re-?)?join(?:ed|s|ing)?(?:\s+${ROLE}(?:at|as))?|(?:was\s+)?hired\s+(?:by|at|as\s+${ROLE}at)|started\s+(?:at|with|working\s+(?:at|for)|(?:a\s+)?new\s+(?:role|job|position)\s+at)|became\s+${ROLE}(?:at|of)|promoted\s+to\s+${ROLE}(?:at|of)|signed\s+on\s+(?:at|with)|named\s+${ROLE}(?:at|of)|accepted\s+(?:an?\s+)?(?:offer|role|position|job)\s+(?:at|with|from)|took\s+(?:an?\s+|the\s+)?${NOT_EMPLOYMENT_ROLE}(?:\w+\s+){0,2}?(?:role|job|position)\s+(?:at|with)|came\s+(?:on\s+board|aboard)\s+(?:at|with)|went\s+to\s+work\s+(?:at|for)|returned\s+to)\s*$`, 'i'),
+ start: new RegExp(String.raw`\b(?:(?:re-?)?join(?:ed|s|ing)?(?:\s+${ROLE}(?:at|as))?|(?:was\s+)?hired\s+(?:by|at|as\s+${ROLE}at)|started\s+(?:at|with|working\s+(?:at|for)|(?:a\s+)?new\s+(?:role|job|position)\s+at)|became\s+${NOT_EMPLOYMENT_ROLE}${ROLE}(?:at|of)|promoted\s+to\s+${ROLE}(?:at|of)|signed\s+on\s+(?:at|with)|named\s+${ROLE}(?:at|of)|accepted\s+(?:an?\s+)?(?:offer|role|position|job)\s+(?:at|with|from)|took\s+(?:an?\s+|the\s+)?${NOT_EMPLOYMENT_ROLE}(?:\w+\s+){0,2}?(?:role|job|position)\s+(?:at|with)|came\s+(?:on\s+board|aboard)\s+(?:at|with)|went\s+to\s+work\s+(?:at|for)|returned\s+to)\s*$`, 'i'),
past: new RegExp(String.raw`\b(?:previously(?:\s+worked)?\s+(?:at|with|for)|formerly(?:\s+${ROLE})?\s*(?:at|of|with)|former\s+${ROLE}(?:at|of|with)|ex-[\w-]+\s+(?:at|of)|used\s+to\s+work\s+(?:at|for)|${NOT_PERFECT}worked\s+(?:at|for|with)|${NOT_PERFECT}spent\s+(?:[\w-]+\s+){1,4}?(?:at|with)|(?:his|her|their|my)\s+(?:time|stint|tenure)\s+at|stint\s+at|was\s+${NOT_PAST_ROLE}${ROLE}(?:at|of)|alum(?:nus|na|ni)?\s+of)\s*$`, 'i'),
};
diff --git a/test/link-temporal-evidence.test.ts b/test/link-temporal-evidence.test.ts
index e6e82fd0dd..f433a9bc6f 100644
--- a/test/link-temporal-evidence.test.ts
+++ b/test/link-temporal-evidence.test.ts
@@ -46,6 +46,15 @@ describe('dated timeline cues', () => {
.toEqual(['acme-example:works_at:start:2015-01-05:timeline']);
});
+ test('becoming an advisor or board member is not an employment start; becoming CTO is', () => {
+ const rows = [row('companies/acme-example', 'works_at'), row('companies/acme-example', 'advises')];
+ const works = (timeline: string) => brief(derive('Alice works at [Acme](companies/acme-example).', timeline, rows).transitions).filter(t => t.includes(':works_at:'));
+ expect(works('- **2023-09-01** | linkedin — Became an advisor at [Acme](companies/acme-example)')).toEqual([]);
+ expect(works('- **2023-09-01** | note — became a senior advisor at [Acme](companies/acme-example)')).toEqual([]);
+ expect(works('- **2023-09-01** | note — became a board member of [Acme](companies/acme-example)')).toEqual([]);
+ expect(works('- **2023-09-01** | linkedin — Became CTO at [Acme](companies/acme-example)')).toEqual(['acme-example:works_at:start:2023-09-01:timeline']);
+ });
+
test('taking an ordinary role is still an employment start', () => {
const ev = derive('', '- **2024-06-01** | note — took the CTO role at [Acme](companies/acme-example)', [row('companies/acme-example', 'works_at')]);
expect(brief(ev.transitions)).toEqual(['acme-example:works_at:start:2024-06-01:timeline']);