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:
@@ -4,7 +4,7 @@
|
||||
// Migrated from pending-migration-to-typed-ir per #455.
|
||||
|
||||
/**
|
||||
* GSD Milestone Summary + Audit Tests
|
||||
* MSD Milestone Summary + Audit Tests
|
||||
*
|
||||
* Validates the milestone-summary command, milestone-audit module (#2158),
|
||||
* workflow audit gates (complete-milestone, verify-work), and STATE.md template.
|
||||
@@ -18,8 +18,8 @@ const path = require('path');
|
||||
const { cleanup } = require('./helpers.cjs');
|
||||
|
||||
const repoRoot = path.resolve(__dirname, '..');
|
||||
const commandPath = path.join(repoRoot, 'commands', 'gsd', 'milestone-summary.md');
|
||||
const workflowPath = path.join(repoRoot, 'gsd-core', 'workflows', 'milestone-summary.md');
|
||||
const commandPath = path.join(repoRoot, 'commands', 'msd', 'milestone-summary.md');
|
||||
const workflowPath = path.join(repoRoot, 'msd-core', 'workflows', 'milestone-summary.md');
|
||||
|
||||
function extractStep(content, stepName) {
|
||||
const start = content.indexOf(`<step name="${stepName}">`);
|
||||
@@ -31,12 +31,12 @@ function extractStep(content, stepName) {
|
||||
|
||||
describe('milestone-summary command', () => {
|
||||
test('command file exists', () => {
|
||||
assert.ok(fs.existsSync(commandPath), 'commands/gsd/milestone-summary.md should exist');
|
||||
assert.ok(fs.existsSync(commandPath), 'commands/msd/milestone-summary.md should exist');
|
||||
});
|
||||
|
||||
test('command has correct frontmatter name', () => {
|
||||
const content = fs.readFileSync(commandPath, 'utf-8');
|
||||
assert.ok(content.includes('name: gsd:milestone-summary'), 'should have correct command name');
|
||||
assert.ok(content.includes('name: msd:milestone-summary'), 'should have correct command name');
|
||||
});
|
||||
|
||||
test('command references workflow in execution_context', () => {
|
||||
@@ -123,7 +123,7 @@ describe('milestone-summary workflow', () => {
|
||||
const content = fs.readFileSync(workflowPath, 'utf-8');
|
||||
assert.ok(
|
||||
content.includes('state record-session') || content.includes('state.record-session'),
|
||||
'should update STATE.md via state record-session (CJS or gsd-sdk query)'
|
||||
'should update STATE.md via state record-session (CJS or msd-sdk query)'
|
||||
);
|
||||
});
|
||||
|
||||
@@ -208,7 +208,7 @@ describe('milestone-summary fixture-based artifact discovery', () => {
|
||||
let tmpDir;
|
||||
|
||||
beforeEach(() => {
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ms-test-'));
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ms-test-'));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -338,7 +338,7 @@ describe('audit.cjs module (#2158)', () => {
|
||||
afterEach(() => { cleanTP(tmpDir); });
|
||||
|
||||
test('auditOpenArtifacts returns structured result with counts', () => {
|
||||
const { auditOpenArtifacts } = require('../gsd-core/bin/lib/audit.cjs');
|
||||
const { auditOpenArtifacts } = require('../msd-core/bin/lib/audit.cjs');
|
||||
const result = auditOpenArtifacts(tmpDir);
|
||||
assert.ok(typeof result === 'object');
|
||||
assert.ok(typeof result.counts === 'object');
|
||||
@@ -347,14 +347,14 @@ describe('audit.cjs module (#2158)', () => {
|
||||
});
|
||||
|
||||
test('auditOpenArtifacts handles missing planning directories gracefully', () => {
|
||||
const { auditOpenArtifacts } = require('../gsd-core/bin/lib/audit.cjs');
|
||||
const { auditOpenArtifacts } = require('../msd-core/bin/lib/audit.cjs');
|
||||
const result = auditOpenArtifacts(tmpDir);
|
||||
assert.strictEqual(result.counts.total, 0);
|
||||
assert.strictEqual(result.has_open_items, false);
|
||||
});
|
||||
|
||||
test('auditOpenArtifacts detects open debug sessions', () => {
|
||||
const { auditOpenArtifacts } = require('../gsd-core/bin/lib/audit.cjs');
|
||||
const { auditOpenArtifacts } = require('../msd-core/bin/lib/audit.cjs');
|
||||
const debugDir = path.join(tmpDir, '.planning', 'debug');
|
||||
fs.mkdirSync(debugDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(debugDir, 'test-bug.md'), [
|
||||
@@ -368,7 +368,7 @@ describe('audit.cjs module (#2158)', () => {
|
||||
});
|
||||
|
||||
test('auditOpenArtifacts ignores resolved debug sessions', () => {
|
||||
const { auditOpenArtifacts } = require('../gsd-core/bin/lib/audit.cjs');
|
||||
const { auditOpenArtifacts } = require('../msd-core/bin/lib/audit.cjs');
|
||||
const resolvedDir = path.join(tmpDir, '.planning', 'debug', 'resolved');
|
||||
fs.mkdirSync(resolvedDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(resolvedDir, 'old-bug.md'), ['---', 'status: resolved', '---', '# Resolved'].join('\n'));
|
||||
@@ -378,14 +378,14 @@ describe('audit.cjs module (#2158)', () => {
|
||||
});
|
||||
|
||||
test('formatAuditReport returns string with header', () => {
|
||||
const { auditOpenArtifacts, formatAuditReport } = require('../gsd-core/bin/lib/audit.cjs');
|
||||
const { auditOpenArtifacts, formatAuditReport } = require('../msd-core/bin/lib/audit.cjs');
|
||||
const report = formatAuditReport(auditOpenArtifacts(tmpDir));
|
||||
assert.ok(typeof report === 'string');
|
||||
assert.ok(report.includes('Artifact Audit') || report.includes('artifact audit') || report.includes('All artifact'));
|
||||
});
|
||||
|
||||
test('formatAuditReport shows all clear when no open items', () => {
|
||||
const { auditOpenArtifacts, formatAuditReport } = require('../gsd-core/bin/lib/audit.cjs');
|
||||
const { auditOpenArtifacts, formatAuditReport } = require('../msd-core/bin/lib/audit.cjs');
|
||||
const report = formatAuditReport(auditOpenArtifacts(tmpDir));
|
||||
assert.ok(report.includes('clear') || report.includes('0 items') || report.includes('no open'));
|
||||
});
|
||||
@@ -393,7 +393,7 @@ describe('audit.cjs module (#2158)', () => {
|
||||
|
||||
describe('complete-milestone workflow has pre-close audit gate (#2158)', () => {
|
||||
const completeMilestoneContent = fs.readFileSync(
|
||||
path.join(__dirname, '..', 'gsd-core', 'workflows', 'complete-milestone.md'),
|
||||
path.join(__dirname, '..', 'msd-core', 'workflows', 'complete-milestone.md'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
@@ -425,7 +425,7 @@ describe('complete-milestone workflow has pre-close audit gate (#2158)', () => {
|
||||
test('verified closeout uses init.manager canonical verification projection (#1522)', () => {
|
||||
const readinessStep = extractStep(completeMilestoneContent, 'verify_readiness');
|
||||
|
||||
assert.match(readinessStep, /INIT_MANAGER=\$\(gsd_run query init\.manager\)/);
|
||||
assert.match(readinessStep, /INIT_MANAGER=\$\(msd_run query init\.manager\)/);
|
||||
assert.ok(
|
||||
readinessStep.includes('if [[ "$INIT_MANAGER" == @file:* ]]; then INIT_MANAGER=$(cat "${INIT_MANAGER#@file:}"); fi'),
|
||||
'complete-milestone readiness must dereference large init.manager payloads before jq',
|
||||
@@ -436,14 +436,14 @@ describe('complete-milestone workflow has pre-close audit gate (#2158)', () => {
|
||||
assert.match(readinessStep, /verification_status === 'passed'/);
|
||||
assert.match(readinessStep, /If not all_phases_verified/);
|
||||
assert.match(readinessStep, /verified_closeout must not proceed/);
|
||||
assert.doesNotMatch(readinessStep, /ROADMAP=\$\(gsd_run query roadmap\.analyze\)/);
|
||||
assert.doesNotMatch(readinessStep, /ROADMAP=\$\(msd_run query roadmap\.analyze\)/);
|
||||
assert.doesNotMatch(readinessStep, /disk_status === 'complete'/);
|
||||
});
|
||||
});
|
||||
|
||||
describe('verify-work workflow has phase artifact check (#2157)', () => {
|
||||
const verifyWorkContent = fs.readFileSync(
|
||||
path.join(__dirname, '..', 'gsd-core', 'workflows', 'verify-work.md'),
|
||||
path.join(__dirname, '..', 'msd-core', 'workflows', 'verify-work.md'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
@@ -460,7 +460,7 @@ describe('verify-work workflow has phase artifact check (#2157)', () => {
|
||||
|
||||
describe('state.md template has Deferred Items section (#2158)', () => {
|
||||
const stateTemplate = fs.readFileSync(
|
||||
path.join(__dirname, '..', 'gsd-core', 'templates', 'state.md'),
|
||||
path.join(__dirname, '..', 'msd-core', 'templates', 'state.md'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
@@ -470,7 +470,7 @@ describe('state.md template has Deferred Items section (#2158)', () => {
|
||||
});
|
||||
|
||||
describe('audit-open CLI command — ReferenceError regression (#2236)', () => {
|
||||
const { createTempProject: createTP, cleanup: cleanTP, runGsdTools: run } = require('./helpers.cjs');
|
||||
const { createTempProject: createTP, cleanup: cleanTP, runMsdTools: run } = require('./helpers.cjs');
|
||||
let tmpDir;
|
||||
|
||||
beforeEach(() => { tmpDir = createTP('audit-open-cli-test'); });
|
||||
|
||||
Reference in New Issue
Block a user