refactor(#1291): T6 — migrate test files off the core spine ahead of deletion (#1293)

The convergence lint only scanned src/ + gsd-core/bin, so ~35 test files
still imported core.cjs. Repoint all 33 behaviour importers to the leaf
modules directly (same symbol->leaf map as the src migration; leaves are the
objects core re-exported by reference), delete the now-meaningless
shim-identity describe blocks in the 8 leaf tests, and delete tests/core.test.cjs
(forwarded-behaviour coverage now lives at the leaves; resolveWorktreeRoot
test relocated to worktree-safety in T0) and tests/lint-core-spine-imports.test.cjs
(the lint is removed in T-final). Dropped the stale core.test.cjs entries from
the allow-test-rule-refs allowlist; eslint-rules RuleTester fixture path
pointed at io.cjs.

After T6: ZERO test imports core.cjs. core.cts still builds (now fully unused);
T-final deletes it. No behaviour change.

Closes #1291

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-06-15 18:11:20 -04:00
committed by GitHub
parent 76765bc24d
commit c76827afbc
36 changed files with 51 additions and 2650 deletions

View File

@@ -231,7 +231,7 @@ describe('roadmap get-phase fallback to full ROADMAP.md (#1634)', () => {
// Regression: phase heading like "### Phase 12: v1.0 Tech-Debt Closure"
// was incorrectly treated as a milestone boundary because the greedy
// `.*v\d+\.\d+` subpattern in nextMilestonePattern matched it.
const core = require('../gsd-core/bin/lib/core.cjs');
const core = require('../gsd-core/bin/lib/roadmap-parser.cjs');
writeState(tmpDir, 'v1.1');
const roadmap = `# Roadmap
@@ -262,7 +262,7 @@ describe('roadmap get-phase fallback to full ROADMAP.md (#1634)', () => {
test('extractCurrentMilestone handles PHASE/phase (case-insensitive) containing vX.Y (#2619 follow-up)', () => {
// CodeRabbit follow-up: the negative lookahead `(?!Phase\s+\S)` must be
// case-insensitive so PHASE/phase variants are also excluded.
const core = require('../gsd-core/bin/lib/core.cjs');
const core = require('../gsd-core/bin/lib/roadmap-parser.cjs');
writeState(tmpDir, 'v1.1');
const roadmap = `# Roadmap
@@ -333,7 +333,7 @@ This phase covers:
describe('extractCurrentMilestone — closed-sibling heading selection (#145)', () => {
let tmpDir;
const core = require('../gsd-core/bin/lib/core.cjs');
const core = require('../gsd-core/bin/lib/roadmap-parser.cjs');
beforeEach(() => {
tmpDir = createTempProject();
@@ -656,7 +656,7 @@ This is the only milestone.
describe('extractCurrentMilestone — boundary / active-override hardening (#145 follow-up)', () => {
let tmpDir;
const core = require('../gsd-core/bin/lib/core.cjs');
const core = require('../gsd-core/bin/lib/roadmap-parser.cjs');
beforeEach(() => {
tmpDir = createTempProject();