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:
Jakub Zych
2026-10-06 01:47:40 +02:00
parent fe069b2a56
commit a9a7a328e6
2763 changed files with 78465 additions and 78434 deletions

View File

@@ -18,7 +18,7 @@
*
* BEHAVIORAL, not source-grep: each test extracts the fragment's own fenced
* bash block, executes it under `bash` with the surrounding contract stubbed
* (`gsd_run`, `PHASE_DIR`, `PHASE`), and asserts on the captured variable.
* (`msd_run`, `PHASE_DIR`, `PHASE`), and asserts on the captured variable.
*/
const { describe, test, afterEach } = require('node:test');
@@ -29,21 +29,21 @@ const path = require('node:path');
const { cleanup } = require('./helpers.cjs');
const { runNode, OUTCOME } = require('./helpers/process-seam.cjs');
const { splitLines } = require('../gsd-core/bin/lib/text-lines.cjs');
const { splitLines } = require('../msd-core/bin/lib/text-lines.cjs');
const REPO_ROOT = path.join(__dirname, '..');
const API_FRAGMENT = path.join(
REPO_ROOT, 'capabilities', 'ai-integration', 'fragments', 'api-coverage-plan-pre.md');
const DELTA_FRAGMENT = path.join(
REPO_ROOT, 'capabilities', 'assumption-delta', 'fragments', 'plan-pre.md');
const TOOLS_PATH = path.join(REPO_ROOT, 'gsd-core', 'bin', 'gsd-tools.cjs');
const TOOLS_PATH = path.join(REPO_ROOT, 'msd-core', 'bin', 'msd-tools.cjs');
/**
* The OUTER runNode() timeoutMs bound for a node -e wrapper that itself
* spawns ONE bash subprocess to execute an extracted capability-fragment
* probe snippet (a two-level nested spawn). Distinct from
* HOOK_FANOUT_TIMEOUT_MS (a git-hook-shaped multi-spawn fan-out, ~4 spawns)
* and LOOP_HOOK_POINT_CLI_TIMEOUT_MS (specifically gsd-tools.cjs, not a
* and LOOP_HOOK_POINT_CLI_TIMEOUT_MS (specifically msd-tools.cjs, not a
* generic node -e wrapper) despite the coincidentally-matching value. Does
* NOT touch the inner `timeout: 60000` inside the node-e script's own
* string literal a few lines above -- that is JS text content passed to a
@@ -90,7 +90,7 @@ function extractProbeBlock(fragmentPath, varName) {
*/
function runSnippet({ block, varName, prelude, cwd }) {
const script = `set -u\n${prelude}\n${block}\nprintf '%s' "\${${varName}}"\n`;
const scriptFile = path.join(fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-frag-')), 'run.sh');
const scriptFile = path.join(fs.mkdtempSync(path.join(os.tmpdir(), 'msd-frag-')), 'run.sh');
fs.writeFileSync(scriptFile, script, 'utf8');
try {
const r = runNode(['-e', `
@@ -130,17 +130,17 @@ describe('api-coverage fragment probe fallback is honest (#3909)', () => {
afterEach(() => { if (tmpDir) { cleanup(tmpDir); tmpDir = null; } });
// The fragment's snippet builds SCOPE from `${PHASE_DIR}/*-PLAN.md` plus a
// `gsd_run query roadmap.get-phase` call. Both are stubbed so the test
// `msd_run query roadmap.get-phase` call. Both are stubbed so the test
// controls exactly what reaches the detector.
function preludeFor(planBody) {
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-apifrag-'));
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-apifrag-'));
if (planBody !== null) {
fs.writeFileSync(path.join(tmpDir, '01-PLAN.md'), planBody, 'utf8');
}
return [
`PHASE_DIR=${JSON.stringify(tmpDir)}`,
'PHASE=01',
'gsd_run() { return 0; }',
'msd_run() { return 0; }',
].join('\n');
}
@@ -182,7 +182,7 @@ describe('api-coverage fragment probe fallback is honest (#3909)', () => {
test('a probe that CANNOT LAUNCH reports skipped, never detected:false', () => {
// cwd without the module → node fails, stdout empty. The fragment must not
// manufacture a verdict from that.
const away = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-nomodule-'));
const away = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-nomodule-'));
try {
const j = parseSingleObject(
capture('# Plan\nIntegrate the Stripe API.', { cwd: away }), 'probe unavailable');
@@ -206,7 +206,7 @@ describe('assumption-delta fragment probe fallback is honest (#3909)', () => {
afterEach(() => { if (tmpDir) { cleanup(tmpDir); tmpDir = null; } });
function projectWithRoadmap(body) {
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-deltafrag-'));
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-deltafrag-'));
fs.mkdirSync(path.join(tmpDir, '.planning'), { recursive: true });
if (body !== null) {
fs.writeFileSync(path.join(tmpDir, '.planning', 'ROADMAP.md'), body, 'utf8');
@@ -214,12 +214,12 @@ describe('assumption-delta fragment probe fallback is honest (#3909)', () => {
return tmpDir;
}
// `gsd_run` is the workflow launcher's shell function; stub it to the real
// `msd_run` is the workflow launcher's shell function; stub it to the real
// CLI so the snippet exercises the genuine query route.
function realGsdRunPrelude(projectDir) {
function realMsdRunPrelude(projectDir) {
return [
'PHASE=01',
`gsd_run() { ( cd ${JSON.stringify(projectDir)} && ` +
`msd_run() { ( cd ${JSON.stringify(projectDir)} && ` +
`node ${JSON.stringify(TOOLS_PATH)} "$@" ); }`,
].join('\n');
}
@@ -236,7 +236,7 @@ describe('assumption-delta fragment probe fallback is honest (#3909)', () => {
test('CONTROL: a resolved section with a cue captures a detected verdict', () => {
const dir = projectWithRoadmap(
'# Roadmap\n\n### Phase 01: Auth\n\nAdd a second authentication method.\n');
const j = parseSingleObject(capture(realGsdRunPrelude(dir)), 'detected case');
const j = parseSingleObject(capture(realMsdRunPrelude(dir)), 'detected case');
assert.strictEqual(j.detected, true);
assert.strictEqual(j.skipped, undefined);
});
@@ -244,21 +244,21 @@ describe('assumption-delta fragment probe fallback is honest (#3909)', () => {
test('CONTROL: a resolved section with no cue captures ONE valid negative', () => {
const dir = projectWithRoadmap(
'# Roadmap\n\n### Phase 01: Cleanup\n\nRefactor the internal state machine.\n');
const j = parseSingleObject(capture(realGsdRunPrelude(dir)), 'legit negative');
const j = parseSingleObject(capture(realMsdRunPrelude(dir)), 'legit negative');
assert.strictEqual(j.detected, false);
assert.strictEqual(j.skipped, undefined);
});
test('an unresolvable phase captures skipped, not a fabricated negative', () => {
const dir = projectWithRoadmap(null);
const j = parseSingleObject(capture(realGsdRunPrelude(dir)), 'unresolved phase');
const j = parseSingleObject(capture(realMsdRunPrelude(dir)), 'unresolved phase');
assert.strictEqual(j.skipped, true);
assert.strictEqual(j.detected, undefined);
});
test('a probe that CANNOT LAUNCH reports skipped, never detected:false', () => {
const j = parseSingleObject(
capture(['PHASE=01', 'gsd_run() { return 127; }'].join('\n')), 'probe unavailable');
capture(['PHASE=01', 'msd_run() { return 127; }'].join('\n')), 'probe unavailable');
assert.strictEqual(j.skipped, true, 'a launcher that failed must not yield a verdict');
assert.strictEqual(j.reason, 'probe_unavailable');
assert.strictEqual(j.detected, undefined);
@@ -284,7 +284,7 @@ describe('both fragments share one skipped-with-reason vocabulary (#3909)', () =
prelude: [
'PHASE_DIR=/nonexistent-phase-dir-3909',
'PHASE=01',
'gsd_run() { return 127; }',
'msd_run() { return 127; }',
].join('\n'),
cwd: os.tmpdir(),
});