mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-30 11:22:34 +00:00
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 <links|timeline|all>` 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.
This commit is contained in:
@@ -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 <links|timeline|all>`.
|
||||
// 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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user