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

@@ -2,13 +2,13 @@
/**
* Tests for tests/helpers/process-seam.cjs (the spawnSync-based subprocess
* seam) and its runGsdTools adapter in tests/helpers.cjs.
* seam) and its runMsdTools adapter in tests/helpers.cjs.
*
* Contract: .gsd/phase/test-3055-process-seam-module/40-design.md
* Matrix: .gsd/phase/test-3055-process-seam-module/50-test-matrix.md
* Contract: .msd/phase/test-3055-process-seam-module/40-design.md
* Matrix: .msd/phase/test-3055-process-seam-module/50-test-matrix.md
*
* Rows 1-24 exercise the seam directly. Rows 25-35 exercise the
* `runGsdTools` adapter's contract-parity guarantee for its 136 callers.
* `runMsdTools` adapter's contract-parity guarantee for its 136 callers.
*
* Assertions are on typed fields only (outcome/exitCode/timedOut/signal/
* killed/code) or on structured JSON a fixture prints to stdout — never on
@@ -21,7 +21,7 @@ const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const { createTempDir, cleanup, runGsdTools, TOOLS_PATH } = require('./helpers.cjs');
const { createTempDir, cleanup, runMsdTools, TOOLS_PATH } = require('./helpers.cjs');
const processSeam = require('./helpers/process-seam.cjs');
const { runNode, runGit, runHook, OUTCOME, toSeamResult } = processSeam;
const {
@@ -445,7 +445,7 @@ describe('process-seam', () => {
// tests/read-guard.test.cjs:34 and tests/workflow-guard.test.cjs:28 —
// process.execPath + [HOOK_PATH, ...args] with a JSON stdin payload).
test('runHook invokes a real hook via process.execPath', () => {
const hookPath = path.join(__dirname, '..', 'hooks', 'gsd-read-guard.js');
const hookPath = path.join(__dirname, '..', 'hooks', 'msd-read-guard.js');
const payload = JSON.stringify({ tool_name: 'Read', tool_input: {} });
const env = {
...process.env,
@@ -540,7 +540,7 @@ describe('runHook interpreter option', () => {
});
});
describe('runGsdTools adapter (process-seam parity)', () => {
describe('runMsdTools adapter (process-seam parity)', () => {
let tmpDir;
beforeEach(() => {
@@ -552,14 +552,14 @@ describe('runGsdTools adapter (process-seam parity)', () => {
});
test('adapter returns the legacy success shape', () => {
const result = runGsdTools(['--help'], tmpDir);
const result = runMsdTools(['--help'], tmpDir);
assert.equal(result.success, true);
assert.equal(result.exitCode, 0);
assert.equal(typeof result.output, 'string');
});
test('adapter returns the legacy failure shape', () => {
const result = runGsdTools(['this-is-not-a-real-command'], tmpDir);
const result = runMsdTools(['this-is-not-a-real-command'], tmpDir);
assert.equal(result.success, false);
assert.equal(typeof result.error, 'string');
assert.ok(result.error.length > 0);
@@ -580,7 +580,7 @@ describe('runGsdTools adapter (process-seam parity)', () => {
code: null,
}),
() => {
const result = runGsdTools(['a', 'b'], tmpDir);
const result = runMsdTools(['a', 'b'], tmpDir);
const expected = `Command failed: ${process.execPath} ${TOOLS_PATH} a b [stderr: (empty) exit:9]`;
assert.equal(result.success, false);
assert.equal(result.error, expected);
@@ -613,7 +613,7 @@ describe('runGsdTools adapter (process-seam parity)', () => {
code: null,
}),
(getCallCount) => {
const result = runGsdTools(['x'], tmpDir);
const result = runMsdTools(['x'], tmpDir);
assert.equal(result.success, true);
assert.equal(result.output, 'ok');
assert.equal(getCallCount(), 2);
@@ -645,7 +645,7 @@ describe('runGsdTools adapter (process-seam parity)', () => {
code: null,
}),
(getCallCount) => {
const result = runGsdTools(['x'], tmpDir);
const result = runMsdTools(['x'], tmpDir);
assert.equal(result.success, true);
assert.equal(result.output, 'ok');
assert.equal(getCallCount(), 2);
@@ -667,13 +667,13 @@ describe('runGsdTools adapter (process-seam parity)', () => {
}),
(getCallCount) => {
const expected =
`[runGsdTools: resource-starvation / subprocess-kill after retry] ` +
`gsd-tools was killed before completion ` +
`[runMsdTools: resource-starvation / subprocess-kill after retry] ` +
`msd-tools was killed before completion ` +
`(signal=SIGKILL, code=null, killed=true). ` +
`This indicates host OOM or scheduler contention, not a product bug. ` +
`stdout=partial-out stderr=partial-err`;
assert.throws(
() => runGsdTools(['x'], tmpDir),
() => runMsdTools(['x'], tmpDir),
(err) => err instanceof Error && err.message === expected
);
assert.equal(getCallCount(), 2);
@@ -695,13 +695,13 @@ describe('runGsdTools adapter (process-seam parity)', () => {
}),
() => {
const expected =
`[runGsdTools: resource-starvation / subprocess-kill after retry] ` +
`gsd-tools was killed before completion ` +
`[runMsdTools: resource-starvation / subprocess-kill after retry] ` +
`msd-tools was killed before completion ` +
`(signal=SIGTERM, code=ETIMEDOUT, killed=true). ` +
`This indicates host OOM or scheduler contention, not a product bug. ` +
`stdout=partial-out stderr=partial-err`;
assert.throws(
() => runGsdTools(['x'], tmpDir),
() => runMsdTools(['x'], tmpDir),
(err) => err instanceof Error && err.message === expected
);
}
@@ -721,20 +721,20 @@ describe('runGsdTools adapter (process-seam parity)', () => {
code: 'ETIMEDOUT',
}),
(getCallCount) => {
assert.throws(() => runGsdTools(['x'], tmpDir));
assert.throws(() => runMsdTools(['x'], tmpDir));
assert.equal(getCallCount(), 2);
}
);
});
test('adapter still accepts a shell-style string', () => {
const result = runGsdTools('--help', tmpDir);
const result = runMsdTools('--help', tmpDir);
assert.equal(result.success, true);
assert.equal(result.exitCode, 0);
});
test('adapter still accepts an argv array', () => {
const result = runGsdTools(['--help'], tmpDir);
const result = runMsdTools(['--help'], tmpDir);
assert.equal(result.success, true);
assert.equal(result.exitCode, 0);
});
@@ -743,7 +743,7 @@ describe('runGsdTools adapter (process-seam parity)', () => {
withMockedRunNode(
(_callCount, _args, options) => {
// Capture the merged env the adapter built, then return a fast
// EXITED result — this test is about the merge, not gsd-tools.
// EXITED result — this test is about the merge, not msd-tools.
withMockedRunNode.capturedEnv = options.env;
return {
outcome: OUTCOME.EXITED,
@@ -757,10 +757,10 @@ describe('runGsdTools adapter (process-seam parity)', () => {
};
},
() => {
runGsdTools(['x'], tmpDir, { GSD_SESSION_KEY: 'override-value' });
// TEST_ENV_BASE defaults GSD_SESSION_KEY to '' — the caller's env
runMsdTools(['x'], tmpDir, { MSD_SESSION_KEY: 'override-value' });
// TEST_ENV_BASE defaults MSD_SESSION_KEY to '' — the caller's env
// argument must win over it.
assert.equal(withMockedRunNode.capturedEnv.GSD_SESSION_KEY, 'override-value');
assert.equal(withMockedRunNode.capturedEnv.MSD_SESSION_KEY, 'override-value');
}
);
});
@@ -784,7 +784,7 @@ describe('runGsdTools adapter (process-seam parity)', () => {
code: 'ENOBUFS',
}),
(getCallCount) => {
const result = runGsdTools(['x'], tmpDir);
const result = runMsdTools(['x'], tmpDir);
assert.equal(getCallCount(), 1);
assert.equal(result.success, false);
assert.equal(typeof result.exitCode, 'number');
@@ -808,7 +808,7 @@ describe('runGsdTools adapter (process-seam parity)', () => {
code: 'ENOENT',
}),
(getCallCount) => {
const result = runGsdTools(['x'], tmpDir);
const result = runMsdTools(['x'], tmpDir);
assert.equal(getCallCount(), 1);
assert.equal(result.success, false);
assert.equal(typeof result.exitCode, 'number');