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:
@@ -17,16 +17,16 @@ const { PROBE_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
|
||||
const {
|
||||
createTempProject,
|
||||
cleanup,
|
||||
runGsdTools,
|
||||
runMsdTools,
|
||||
captureFdSync,
|
||||
} = require('./helpers.cjs');
|
||||
const { withFaultyFs } = require('./helpers/faulty-deps.cjs');
|
||||
const stateMod = require('../gsd-core/bin/lib/state.cjs');
|
||||
const { stateExtractField } = require('../gsd-core/bin/lib/state-document.cjs');
|
||||
const { parseMarkdownTable } = require('../gsd-core/bin/lib/markdown-table.cjs');
|
||||
const { collectSection } = require('../gsd-core/bin/lib/markdown-sectionizer.cjs');
|
||||
const stateMod = require('../msd-core/bin/lib/state.cjs');
|
||||
const { stateExtractField } = require('../msd-core/bin/lib/state-document.cjs');
|
||||
const { parseMarkdownTable } = require('../msd-core/bin/lib/markdown-table.cjs');
|
||||
const { collectSection } = require('../msd-core/bin/lib/markdown-sectionizer.cjs');
|
||||
|
||||
const TOOLS_PATH = path.join(__dirname, '..', 'gsd-core', 'bin', 'gsd-tools.cjs');
|
||||
const TOOLS_PATH = path.join(__dirname, '..', 'msd-core', 'bin', 'msd-tools.cjs');
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Fixtures
|
||||
@@ -48,7 +48,7 @@ function projectWithDriftedState() {
|
||||
// STATE.md with a drift: body says Current Phase 1, frontmatter says 2.
|
||||
const stateContent = [
|
||||
'---',
|
||||
'gsd_state_version: \'1.0\'',
|
||||
'msd_state_version: \'1.0\'',
|
||||
'status: executing',
|
||||
'milestone: 1.0.0',
|
||||
'milestone_name: Test',
|
||||
@@ -138,7 +138,7 @@ function projectWithOnlyPhaseTableDrift() {
|
||||
|
||||
const stateContent = [
|
||||
'---',
|
||||
'gsd_state_version: \'1.0\'',
|
||||
'msd_state_version: \'1.0\'',
|
||||
'status: executing',
|
||||
'milestone: 1.0.0',
|
||||
'milestone_name: Test',
|
||||
@@ -234,7 +234,7 @@ describe('ADR-1817 Phase 2: `state rebuild` CLI subcommand dispatch (criterion #
|
||||
const cwd = projectWithDriftedState();
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
const result = runGsdTools('state rebuild', cwd);
|
||||
const result = runMsdTools('state rebuild', cwd);
|
||||
assert.ok(result.success, `state rebuild should succeed; stderr: ${result.stderr || result.error || ''}`);
|
||||
|
||||
// Body fields reconciled with frontmatter.
|
||||
@@ -262,7 +262,7 @@ describe('ADR-1817 Phase 2: `state rebuild` CLI subcommand dispatch (criterion #
|
||||
t.after(() => cleanup(cwd));
|
||||
const before = fs.readFileSync(path.join(cwd, '.planning', 'STATE.md'), 'utf8');
|
||||
|
||||
const result = runGsdTools('state rebuild --dry-run', cwd);
|
||||
const result = runMsdTools('state rebuild --dry-run', cwd);
|
||||
assert.ok(result.success, `state rebuild --dry-run should succeed; error: ${result.error || ''}`);
|
||||
|
||||
const after = fs.readFileSync(path.join(cwd, '.planning', 'STATE.md'), 'utf8');
|
||||
@@ -282,13 +282,13 @@ describe('ADR-1817 Phase 2: `state rebuild` CLI subcommand dispatch (criterion #
|
||||
const cwd = projectWithDriftedState();
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
// runGsdTools returns stdout only on success; --verbose writes to stderr,
|
||||
// so invoke gsd-tools directly to capture both streams separately.
|
||||
// runMsdTools returns stdout only on success; --verbose writes to stderr,
|
||||
// so invoke msd-tools directly to capture both streams separately.
|
||||
const r = runNode(
|
||||
[TOOLS_PATH, 'state', 'rebuild', '--verbose'],
|
||||
{ cwd, timeoutMs: PROBE_TIMEOUT_MS },
|
||||
);
|
||||
throwIfFailed(r, 'gsd-tools state rebuild --verbose');
|
||||
throwIfFailed(r, 'msd-tools state rebuild --verbose');
|
||||
const stdout = r.stdout;
|
||||
// The seam's runNode captures stderr separately (unlike execFileSync's
|
||||
// default inherited stderr) but this test does not need it — see below.
|
||||
@@ -312,12 +312,12 @@ describe('ADR-1817 Phase 2: `state rebuild` CLI subcommand dispatch (criterion #
|
||||
t.after(() => cleanup(cwd));
|
||||
|
||||
// First run: reconcile the drift.
|
||||
const first = runGsdTools('state rebuild', cwd);
|
||||
const first = runMsdTools('state rebuild', cwd);
|
||||
assert.ok(first.success, 'first rebuild should succeed');
|
||||
const afterFirst = fs.readFileSync(path.join(cwd, '.planning', 'STATE.md'), 'utf8');
|
||||
|
||||
// Second run: should detect no drift, write nothing beyond what's there.
|
||||
const second = runGsdTools('state rebuild', cwd);
|
||||
const second = runMsdTools('state rebuild', cwd);
|
||||
assert.ok(second.success, 'second rebuild should succeed');
|
||||
const afterSecond = fs.readFileSync(path.join(cwd, '.planning', 'STATE.md'), 'utf8');
|
||||
|
||||
@@ -330,7 +330,7 @@ describe('ADR-1817 Phase 2: `state rebuild` CLI subcommand dispatch (criterion #
|
||||
t.after(() => cleanup(cwd));
|
||||
// No STATE.md written.
|
||||
|
||||
const result = runGsdTools('state rebuild', cwd);
|
||||
const result = runMsdTools('state rebuild', cwd);
|
||||
// The command emits a typed JSON error result and exits 0 — it does not
|
||||
// crash the process (src/state.cts:3136 `cmdStateRebuild`'s missing-file
|
||||
// guard: `emit({ error: 'STATE.md not found' }, raw); return;`, no
|
||||
|
||||
Reference in New Issue
Block a user