refactor: hard-fork GSD -> MSD (Make Software Done)
Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Tests for the phase-ENUMERATION single-owner contract (#3185, epic #3180
|
||||
* Phase 3, ADR-3180 Decision 1 row "Phase enumeration").
|
||||
* Matrix: .gsd/phase/refactor-3185-phase-enumeration-single-owner/50-test-matrix.md
|
||||
* Matrix: .msd/phase/refactor-3185-phase-enumeration-single-owner/50-test-matrix.md
|
||||
*
|
||||
* This file lands FAILING-FIRST. Every test below asserts the behavior the
|
||||
* design requires and that the tree does NOT have yet, so the remote runner
|
||||
@@ -36,10 +36,10 @@ const {
|
||||
createTempProject,
|
||||
createTempGitProject,
|
||||
cleanup,
|
||||
runGsdTools,
|
||||
runMsdTools,
|
||||
} = require('./helpers.cjs');
|
||||
const { SCOPE } = require('../gsd-core/bin/lib/planning-scope.cjs');
|
||||
const { isSentinelPhaseId } = require('../gsd-core/bin/lib/phase-id.cjs');
|
||||
const { SCOPE } = require('../msd-core/bin/lib/planning-scope.cjs');
|
||||
const { isSentinelPhaseId } = require('../msd-core/bin/lib/phase-id.cjs');
|
||||
|
||||
// ─── Fixture helpers ───────────────────────────────────────────────────────
|
||||
|
||||
@@ -102,7 +102,7 @@ function parseJson(result, label) {
|
||||
// ═════════════════════════════════════════════════════════════════════════
|
||||
|
||||
test('progress does not list a 999 backlog directory as a current-milestone phase', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-');
|
||||
const cwd = createTempProject('msd-phase-enum-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
@@ -110,7 +110,7 @@ test('progress does not list a 999 backlog directory as a current-milestone phas
|
||||
makePhaseDir(cwd, '01-foundation', { '01-PLAN.md': '# Plan\n' });
|
||||
makePhaseDir(cwd, '999.1-icebox', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('progress json', cwd), 'progress json');
|
||||
const report = parseJson(runMsdTools('progress json', cwd), 'progress json');
|
||||
|
||||
const numbers = (report.phases || []).map((p) => String(p.number));
|
||||
assert.ok(
|
||||
@@ -128,7 +128,7 @@ test('progress does not list a 999 backlog directory as a current-milestone phas
|
||||
// ═════════════════════════════════════════════════════════════════════════
|
||||
|
||||
test('progress does not list a phase-0 sentinel directory', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-');
|
||||
const cwd = createTempProject('msd-phase-enum-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
@@ -136,7 +136,7 @@ test('progress does not list a phase-0 sentinel directory', (t) => {
|
||||
makePhaseDir(cwd, '0-prep', { '01-PLAN.md': '# Plan\n' });
|
||||
makePhaseDir(cwd, '01-foundation', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('progress json', cwd), 'progress json');
|
||||
const report = parseJson(runMsdTools('progress json', cwd), 'progress json');
|
||||
|
||||
const numbers = (report.phases || []).map((p) => String(p.number));
|
||||
assert.ok(
|
||||
@@ -150,7 +150,7 @@ test('a letter-prefixed decimal directory is NOT read as a phase-0 sentinel', (t
|
||||
// #1324 letter-prefixed-decimal family, NOT sentinel milestone 0. A sentinel
|
||||
// rule that strips a bare letter prefix would silently delete this family
|
||||
// from three commands.
|
||||
const cwd = createTempProject('gsd-phase-enum-');
|
||||
const cwd = createTempProject('msd-phase-enum-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
@@ -166,7 +166,7 @@ test('a letter-prefixed decimal directory is NOT read as a phase-0 sentinel', (t
|
||||
]);
|
||||
makePhaseDir(cwd, 'P0.0-foundation', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('progress json', cwd), 'progress json');
|
||||
const report = parseJson(runMsdTools('progress json', cwd), 'progress json');
|
||||
const numbers = (report.phases || []).map((p) => String(p.number));
|
||||
assert.ok(
|
||||
numbers.length > 0,
|
||||
@@ -179,14 +179,14 @@ test('a letter-prefixed decimal directory is NOT read as a phase-0 sentinel', (t
|
||||
// ═════════════════════════════════════════════════════════════════════════
|
||||
|
||||
test('stats does not emit a row for a 999 backlog heading with no directory', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-');
|
||||
const cwd = createTempProject('msd-phase-enum-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
writeRoadmap(cwd, roadmapWithBacklog());
|
||||
makePhaseDir(cwd, '01-foundation', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('stats json', cwd), 'stats json');
|
||||
const report = parseJson(runMsdTools('stats json', cwd), 'stats json');
|
||||
|
||||
const numbers = (report.phases || []).map((p) => String(p.number));
|
||||
assert.ok(
|
||||
@@ -196,7 +196,7 @@ test('stats does not emit a row for a 999 backlog heading with no directory', (t
|
||||
});
|
||||
|
||||
test('stats does not list a phase-0 sentinel directory', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-');
|
||||
const cwd = createTempProject('msd-phase-enum-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
@@ -204,7 +204,7 @@ test('stats does not list a phase-0 sentinel directory', (t) => {
|
||||
makePhaseDir(cwd, '0-prep', { '01-PLAN.md': '# Plan\n' });
|
||||
makePhaseDir(cwd, '01-foundation', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('stats json', cwd), 'stats json');
|
||||
const report = parseJson(runMsdTools('stats json', cwd), 'stats json');
|
||||
const numbers = (report.phases || []).map((p) => String(p.number));
|
||||
assert.ok(
|
||||
!numbers.some((n) => /^0+$/.test(n)),
|
||||
@@ -222,7 +222,7 @@ test('phases clear preserves a phase-0 sentinel directory, with negative proof o
|
||||
// `0-*` directory that `roadmap analyze` treats as a preserved sentinel is
|
||||
// DELETED here. The exit code alone cannot show this, so the load-bearing
|
||||
// assertion is that the directory still exists afterwards.
|
||||
const cwd = createTempGitProject('gsd-phase-enum-clear-');
|
||||
const cwd = createTempGitProject('msd-phase-enum-clear-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
@@ -231,7 +231,7 @@ test('phases clear preserves a phase-0 sentinel directory, with negative proof o
|
||||
const backlogDir = makePhaseDir(cwd, '999.1-icebox', { '01-PLAN.md': '# Plan\n' });
|
||||
makePhaseDir(cwd, '01-foundation', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
runGsdTools('phases clear --confirm --force', cwd);
|
||||
runMsdTools('phases clear --confirm --force', cwd);
|
||||
|
||||
assert.ok(
|
||||
fs.existsSync(zeroDir),
|
||||
@@ -268,14 +268,14 @@ function roadmapWithNoPhaseHeadings() {
|
||||
}
|
||||
|
||||
test('pass-all degrade still excludes a 999 sentinel directory', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-passall-');
|
||||
const cwd = createTempProject('msd-phase-enum-passall-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
writeRoadmap(cwd, roadmapWithNoPhaseHeadings());
|
||||
makePhaseDir(cwd, '999.1-icebox', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('progress json', cwd), 'progress json');
|
||||
const report = parseJson(runMsdTools('progress json', cwd), 'progress json');
|
||||
const numbers = (report.phases || []).map((p) => String(p.number));
|
||||
assert.ok(
|
||||
!numbers.some((n) => n.startsWith('999')),
|
||||
@@ -284,14 +284,14 @@ test('pass-all degrade still excludes a 999 sentinel directory', (t) => {
|
||||
});
|
||||
|
||||
test('pass-all degrade still excludes a phase-0 sentinel directory', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-passall-');
|
||||
const cwd = createTempProject('msd-phase-enum-passall-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
writeRoadmap(cwd, roadmapWithNoPhaseHeadings());
|
||||
makePhaseDir(cwd, '0-prep', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('progress json', cwd), 'progress json');
|
||||
const report = parseJson(runMsdTools('progress json', cwd), 'progress json');
|
||||
const numbers = (report.phases || []).map((p) => String(p.number));
|
||||
assert.ok(
|
||||
!numbers.some((n) => /^0+$/.test(n)),
|
||||
@@ -305,14 +305,14 @@ test('pass-all degrade stays over-inclusive for NON-sentinel directories', (t) =
|
||||
// getMilestonePhaseFilter's own comment is narrowed minimally, not revoked —
|
||||
// an ordinary phase directory must still be listed when the window declares
|
||||
// no phases, or a project mid-migration loses its real phases from view.
|
||||
const cwd = createTempProject('gsd-phase-enum-passall-');
|
||||
const cwd = createTempProject('msd-phase-enum-passall-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
writeRoadmap(cwd, roadmapWithNoPhaseHeadings());
|
||||
makePhaseDir(cwd, '04-thing', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('progress json', cwd), 'progress json');
|
||||
const report = parseJson(runMsdTools('progress json', cwd), 'progress json');
|
||||
const numbers = (report.phases || []).map((p) => String(p.number));
|
||||
assert.ok(
|
||||
numbers.length > 0,
|
||||
@@ -326,7 +326,7 @@ test('pass-all degrade stays over-inclusive for NON-sentinel directories', (t) =
|
||||
// ═════════════════════════════════════════════════════════════════════════
|
||||
|
||||
test('phases list excludes a 999 backlog dir and a 0-sentinel dir, keeps the real one', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-list-');
|
||||
const cwd = createTempProject('msd-phase-enum-list-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
@@ -335,7 +335,7 @@ test('phases list excludes a 999 backlog dir and a 0-sentinel dir, keeps the rea
|
||||
makePhaseDir(cwd, '999.1-icebox', { '01-PLAN.md': '# Plan\n' });
|
||||
makePhaseDir(cwd, '0-prep', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('phases list', cwd), 'phases list');
|
||||
const report = parseJson(runMsdTools('phases list', cwd), 'phases list');
|
||||
const dirs = report.directories || [];
|
||||
|
||||
assert.ok(
|
||||
@@ -353,7 +353,7 @@ test('phases list excludes a 999 backlog dir and a 0-sentinel dir, keeps the rea
|
||||
});
|
||||
|
||||
test('phases list --phase still finds an out-of-window phase (documented exemption)', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-list-lookup-');
|
||||
const cwd = createTempProject('msd-phase-enum-list-lookup-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
// v1.0 is current; phase 5 belongs to a different (later) milestone and is
|
||||
@@ -374,7 +374,7 @@ test('phases list --phase still finds an out-of-window phase (documented exempti
|
||||
makePhaseDir(cwd, '01-foundation', { '01-PLAN.md': '# Plan\n' });
|
||||
makePhaseDir(cwd, '05-later-work', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const result = runGsdTools('phases list --phase 5', cwd);
|
||||
const result = runMsdTools('phases list --phase 5', cwd);
|
||||
const report = parseJson(result, 'phases list --phase 5');
|
||||
|
||||
assert.strictEqual(
|
||||
@@ -412,7 +412,7 @@ function writeTruncatedRoadmap(cwd) {
|
||||
}
|
||||
|
||||
test('progress json phase_scope is not complete when the milestone window is truncated', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-scope-truncated-');
|
||||
const cwd = createTempProject('msd-phase-enum-scope-truncated-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v3.0' });
|
||||
@@ -420,7 +420,7 @@ test('progress json phase_scope is not complete when the milestone window is tru
|
||||
makePhaseDir(cwd, '1-foo', { '01-PLAN.md': '# Plan\n' });
|
||||
makePhaseDir(cwd, '2-bar', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('progress json', cwd), 'progress json');
|
||||
const report = parseJson(runMsdTools('progress json', cwd), 'progress json');
|
||||
assert.notStrictEqual(
|
||||
report.phase_scope,
|
||||
SCOPE.COMPLETE,
|
||||
@@ -429,14 +429,14 @@ test('progress json phase_scope is not complete when the milestone window is tru
|
||||
});
|
||||
|
||||
test('progress json phase_scope is complete for a healthy, in-window fixture', (t) => {
|
||||
const cwd = createTempProject('gsd-phase-enum-scope-complete-');
|
||||
const cwd = createTempProject('msd-phase-enum-scope-complete-');
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
writeState(cwd, { milestone: 'v1.0' });
|
||||
writeRoadmap(cwd, roadmapWithBacklog());
|
||||
makePhaseDir(cwd, '01-foundation', { '01-PLAN.md': '# Plan\n' });
|
||||
|
||||
const report = parseJson(runGsdTools('progress json', cwd), 'progress json');
|
||||
const report = parseJson(runMsdTools('progress json', cwd), 'progress json');
|
||||
assert.strictEqual(report.phase_scope, SCOPE.COMPLETE);
|
||||
});
|
||||
|
||||
@@ -469,7 +469,7 @@ const SENTINEL_IDS = [
|
||||
'999',
|
||||
'999.1',
|
||||
'999.1-icebox',
|
||||
'GSD-999-icebox',
|
||||
'MSD-999-icebox',
|
||||
];
|
||||
const NON_SENTINEL_IDS = ['01-foundation', 'P0.0-foundation', '9990-x', '998-x', '1000-x', '04-thing'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user