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,5 +1,5 @@
|
||||
/**
|
||||
* GSD Tools Tests - roadmap get-phase fallback to full ROADMAP.md
|
||||
* MSD Tools Tests - roadmap get-phase fallback to full ROADMAP.md
|
||||
*
|
||||
* Covers issue #1634: phases outside the current milestone slice should still
|
||||
* resolve by falling back to the full ROADMAP.md content.
|
||||
@@ -9,26 +9,26 @@ const { test, describe, beforeEach, afterEach } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { runGsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
||||
const { runMsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
||||
|
||||
// The planning-dir resolver (planningDir) is workstream-aware and honours
|
||||
// GSD_PROJECT / GSD_WORKSTREAM. These suites write STATE.md to <tmp>/.planning
|
||||
// and assume that is where it is read from, so a developer shell inside a GSD
|
||||
// MSD_PROJECT / MSD_WORKSTREAM. These suites write STATE.md to <tmp>/.planning
|
||||
// and assume that is where it is read from, so a developer shell inside a MSD
|
||||
// workstream would otherwise redirect the read and break extractCurrentMilestone.
|
||||
// Isolate the vars so the file is hermetic when run directly via `node --test`.
|
||||
let savedGsdProject;
|
||||
let savedGsdWorkstream;
|
||||
let savedMsdProject;
|
||||
let savedMsdWorkstream;
|
||||
beforeEach(() => {
|
||||
savedGsdProject = process.env.GSD_PROJECT;
|
||||
savedGsdWorkstream = process.env.GSD_WORKSTREAM;
|
||||
delete process.env.GSD_PROJECT;
|
||||
delete process.env.GSD_WORKSTREAM;
|
||||
savedMsdProject = process.env.MSD_PROJECT;
|
||||
savedMsdWorkstream = process.env.MSD_WORKSTREAM;
|
||||
delete process.env.MSD_PROJECT;
|
||||
delete process.env.MSD_WORKSTREAM;
|
||||
});
|
||||
afterEach(() => {
|
||||
if (savedGsdProject !== undefined) process.env.GSD_PROJECT = savedGsdProject;
|
||||
else delete process.env.GSD_PROJECT;
|
||||
if (savedGsdWorkstream !== undefined) process.env.GSD_WORKSTREAM = savedGsdWorkstream;
|
||||
else delete process.env.GSD_WORKSTREAM;
|
||||
if (savedMsdProject !== undefined) process.env.MSD_PROJECT = savedMsdProject;
|
||||
else delete process.env.MSD_PROJECT;
|
||||
if (savedMsdWorkstream !== undefined) process.env.MSD_WORKSTREAM = savedMsdWorkstream;
|
||||
else delete process.env.MSD_WORKSTREAM;
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -74,7 +74,7 @@ describe('roadmap get-phase fallback to full ROADMAP.md (#1634)', () => {
|
||||
`
|
||||
);
|
||||
|
||||
const result = runGsdTools('roadmap get-phase 1', tmpDir);
|
||||
const result = runMsdTools('roadmap get-phase 1', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -102,7 +102,7 @@ describe('roadmap get-phase fallback to full ROADMAP.md (#1634)', () => {
|
||||
`
|
||||
);
|
||||
|
||||
const result = runGsdTools('roadmap get-phase 999.60', tmpDir);
|
||||
const result = runMsdTools('roadmap get-phase 999.60', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -132,7 +132,7 @@ describe('roadmap get-phase fallback to full ROADMAP.md (#1634)', () => {
|
||||
`
|
||||
);
|
||||
|
||||
const result = runGsdTools('roadmap get-phase 1025', tmpDir);
|
||||
const result = runMsdTools('roadmap get-phase 1025', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -162,7 +162,7 @@ describe('roadmap get-phase fallback to full ROADMAP.md (#1634)', () => {
|
||||
`
|
||||
);
|
||||
|
||||
const result = runGsdTools('roadmap get-phase 9999', tmpDir);
|
||||
const result = runMsdTools('roadmap get-phase 9999', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -187,7 +187,7 @@ describe('roadmap get-phase fallback to full ROADMAP.md (#1634)', () => {
|
||||
`
|
||||
);
|
||||
|
||||
const result = runGsdTools('roadmap get-phase 50', tmpDir);
|
||||
const result = runMsdTools('roadmap get-phase 50', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -216,7 +216,7 @@ describe('roadmap get-phase fallback to full ROADMAP.md (#1634)', () => {
|
||||
`
|
||||
);
|
||||
|
||||
const result = runGsdTools('roadmap get-phase 50', tmpDir);
|
||||
const result = runMsdTools('roadmap get-phase 50', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -229,7 +229,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/roadmap-parser.cjs');
|
||||
const core = require('../msd-core/bin/lib/roadmap-parser.cjs');
|
||||
writeState(tmpDir, 'v1.1');
|
||||
const roadmap = `# Roadmap
|
||||
|
||||
@@ -260,7 +260,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/roadmap-parser.cjs');
|
||||
const core = require('../msd-core/bin/lib/roadmap-parser.cjs');
|
||||
writeState(tmpDir, 'v1.1');
|
||||
const roadmap = `# Roadmap
|
||||
|
||||
@@ -318,7 +318,7 @@ This phase covers:
|
||||
`
|
||||
);
|
||||
|
||||
const result = runGsdTools('roadmap get-phase 10', tmpDir);
|
||||
const result = runMsdTools('roadmap get-phase 10', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -331,7 +331,7 @@ This phase covers:
|
||||
|
||||
describe('extractCurrentMilestone — closed-sibling heading selection (#145)', () => {
|
||||
let tmpDir;
|
||||
const core = require('../gsd-core/bin/lib/roadmap-parser.cjs');
|
||||
const core = require('../msd-core/bin/lib/roadmap-parser.cjs');
|
||||
|
||||
beforeEach(() => {
|
||||
tmpDir = createTempProject();
|
||||
@@ -383,12 +383,12 @@ This is the active milestone body.
|
||||
);
|
||||
});
|
||||
|
||||
test('(7) workstream-aware: STATE.md under GSD_WORKSTREAM is read from the workstream subdir', () => {
|
||||
test('(7) workstream-aware: STATE.md under MSD_WORKSTREAM is read from the workstream subdir', () => {
|
||||
// Regression guard for the env-leak that made these suites pass in clean CI but
|
||||
// fail in a developer's GSD_WORKSTREAM shell. planningDir() is workstream-aware,
|
||||
// fail in a developer's MSD_WORKSTREAM shell. planningDir() is workstream-aware,
|
||||
// so STATE.md lives at <cwd>/.planning/workstreams/<ws>/STATE.md. Setting the env
|
||||
// here makes clean CI exercise the polluted-env resolution path.
|
||||
process.env.GSD_WORKSTREAM = 'guard-ws';
|
||||
process.env.MSD_WORKSTREAM = 'guard-ws';
|
||||
try {
|
||||
const wsPlanning = path.join(tmpDir, '.planning', 'workstreams', 'guard-ws');
|
||||
fs.mkdirSync(wsPlanning, { recursive: true });
|
||||
@@ -424,7 +424,7 @@ This is the active milestone body.
|
||||
'closed section must still be excluded under a workstream env',
|
||||
);
|
||||
} finally {
|
||||
delete process.env.GSD_WORKSTREAM;
|
||||
delete process.env.MSD_WORKSTREAM;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -654,7 +654,7 @@ This is the only milestone.
|
||||
|
||||
describe('extractCurrentMilestone — boundary / active-override hardening (#145 follow-up)', () => {
|
||||
let tmpDir;
|
||||
const core = require('../gsd-core/bin/lib/roadmap-parser.cjs');
|
||||
const core = require('../msd-core/bin/lib/roadmap-parser.cjs');
|
||||
|
||||
beforeEach(() => {
|
||||
tmpDir = createTempProject();
|
||||
|
||||
Reference in New Issue
Block a user