From d30812a109da1fc99c649b190829854c81288217 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 3 Oct 2026 01:17:49 +0000 Subject: [PATCH] test(W7c): match retro clock rule case-insensitively, drop proximity regex W7c conversion (t02 #11, #12). Removed assertion groups (invariant -> remaining protection): - /NEVER from `date`/ (caps): today comes from the session reminder, not the system clock -> kept free: /session reminder/ and /never from `date`/i. - /(?:disclosure[\s\S]{0,200}narrative|narrative[\s\S]{0,200}disclosure)/ (200-char word-proximity window): offline/local-only runs disclose that the window is not freshness-verified -> kept free: the exact disclosure string 'offline run, window not freshness-verified' (it reaches the retro output), RETRO_REF disclosure and the GUARD_* script checks; gate judge 'retro/SKILL.md instructions'. Mutation pass (scratch worktree, retro/SKILL.md.tmpl): 4/4 as expected; allowing `date` or deleting the disclosure string goes red; lowering NEVER and rewording the narrative clause stays green. Log: .context/mutation-regression-1624-retro-stale-base.md. --- test/regression-1624-retro-stale-base.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/regression-1624-retro-stale-base.test.ts b/test/regression-1624-retro-stale-base.test.ts index 67d84b0f2..d8e5c9682 100644 --- a/test/regression-1624-retro-stale-base.test.ts +++ b/test/regression-1624-retro-stale-base.test.ts @@ -124,17 +124,15 @@ describe("#1624 retro guard — branch D: stale-base BLOCK", () => { test("today comes from the session reminder, never the system clock", () => { const body = readTmpl(); expect(body).toMatch(/session reminder/); - expect(body).toMatch(/NEVER from `date`/); + expect(body).toMatch(/never from `date`/i); }); }); describe("#1624 retro guard — disclosure must reach the narrative", () => { test("skip paths carry a disclosure line into the retro output", () => { const body = readTmpl(); - // The prose ties disclosure + narrative together so the retro output is - // never silently confidently-wrong on offline/local-only runs. + // The retro output is never silently confidently-wrong on offline/local-only runs. expect(body).toMatch(/offline run, window not freshness-verified/); - expect(body).toMatch(/(?:disclosure[\s\S]{0,200}narrative|narrative[\s\S]{0,200}disclosure)/); }); test("non-default analyzed ref is disclosed (RETRO_REF)", () => {