From fbcc5be2d302c21c3a8400675ba406f277f9a71a Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 9 May 2026 22:00:37 -0700 Subject: [PATCH] test(doctor): pin canonical `gbrain extract all` hint, ban stale verbs IRON-RULE regression guard for PR #376 + #536's graph_coverage hint fix (locked in v0.31.7 eng-review). The removed verbs `gbrain link-extract` and `gbrain timeline-extract` were consolidated into `gbrain extract ` in v0.16 but the hint kept suggesting them for ~30 releases. Pin the user-facing copy at the source-string level so a future edit can't silently re-regress. Structural assertion in the existing `doctor command` describe block, matching the file's existing `frontmatter_integrity` / `rls_event_trigger` pattern. No DB-fixture infrastructure needed. --- test/doctor.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/doctor.test.ts b/test/doctor.test.ts index 206f409a3..4b7054906 100644 --- a/test/doctor.test.ts +++ b/test/doctor.test.ts @@ -174,4 +174,21 @@ describe('doctor command', () => { // Recovery command names the migration version explicitly. expect(block).toContain('--force-retry 35'); }); + + // v0.31.7 IRON-RULE regression test for #376 + #536. + // The graph_coverage WARN message used to suggest stale verbs (`gbrain + // link-extract` / `gbrain timeline-extract`) that were removed in v0.16 + // when extraction was consolidated into `gbrain extract `. + // PR #376 (FUSED-ID) flagged the stale hint; PR #536 (mayazbay) replaced it + // with the canonical `gbrain extract all`. Pin the user-facing copy so a + // future edit can't silently re-regress to a stale verb. + test('graph_coverage hint uses canonical `gbrain extract all`, not removed verbs', async () => { + const fs = await import('fs'); + const src = fs.readFileSync('src/commands/doctor.ts', 'utf8'); + // Canonical form (post-v0.16 single-verb consolidation). + expect(src).toContain('Run: gbrain extract all'); + // Stale verb names removed in v0.16 must not return. + expect(src).not.toContain('gbrain link-extract'); + expect(src).not.toContain('gbrain timeline-extract'); + }); });