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

@@ -1,7 +1,7 @@
'use strict';
/**
* #2351 — `gsd_run run-with-timeout`: a portable, coreutils-independent
* #2351 — `msd_run run-with-timeout`: a portable, coreutils-independent
* wall-clock cap for a spawned command, plus the parity guard that keeps
* hardcoded GNU `timeout` from reappearing in workflow/agent/reference markdown.
*
@@ -12,7 +12,7 @@
* GNU `timeout`'s exit-code contract (124 on timeout) on every platform.
*
* These are behavioral tests driven through the real CLI entrypoint
* (spawnSync of gsd-tools.cjs), never source-text assertions. The parity block
* (spawnSync of msd-tools.cjs), never source-text assertions. The parity block
* consumes the lint module's typed findings, not grepped text.
*/
@@ -44,13 +44,13 @@ const RUN_WITH_TIMEOUT_HARNESS_BACKSTOP_MS = 30000;
const RUN_WITH_TIMEOUT_REAP_BACKSTOP_MS = 20000;
const ROOT = path.join(__dirname, '..');
const GSD_TOOLS = path.join(ROOT, 'gsd-core', 'bin', 'gsd-tools.cjs');
const MSD_TOOLS = path.join(ROOT, 'msd-core', 'bin', 'msd-tools.cjs');
const NODE = process.execPath;
// run-with-timeout intercepts before gsd-tools' cwd/workstream resolution, so it
// run-with-timeout intercepts before msd-tools' cwd/workstream resolution, so it
// needs no project fixture — run from a neutral temp dir to prove independence.
function runVerb(args, opts = {}) {
return spawnSync(NODE, [GSD_TOOLS, 'run-with-timeout', ...args], {
return spawnSync(NODE, [MSD_TOOLS, 'run-with-timeout', ...args], {
cwd: os.tmpdir(),
encoding: 'utf8',
timeout: RUN_WITH_TIMEOUT_HARNESS_BACKSTOP_MS, // test-harness backstop; the verb's own cap is what we assert
@@ -141,8 +141,8 @@ describe('#2351 run-with-timeout — argument handling (negative matrix)', () =>
assert.equal(r.status, 0);
});
test("the wrapped command's argv is opaque — gsd-tools flags are NOT consumed", (t) => {
// --raw / --cwd / --pick are gsd-tools' own global flags. They must reach the
test("the wrapped command's argv is opaque — msd-tools flags are NOT consumed", (t) => {
// --raw / --cwd / --pick are msd-tools' own global flags. They must reach the
// wrapped command verbatim, not be stripped by the dispatcher. Use a script
// FILE, not `node -e` — node parses leading --flags after -e as its OWN options
// ("bad option", exit 9); after a script path it treats them as argv.
@@ -156,7 +156,7 @@ describe('#2351 run-with-timeout — argument handling (negative matrix)', () =>
});
test('the `query` meta-prefix form is accepted', () => {
const r = spawnSync(NODE, [GSD_TOOLS, 'query', 'run-with-timeout', '5', '--', ...OK], {
const r = spawnSync(NODE, [MSD_TOOLS, 'query', 'run-with-timeout', '5', '--', ...OK], {
cwd: os.tmpdir(), encoding: 'utf8', timeout: RUN_WITH_TIMEOUT_HARNESS_BACKSTOP_MS,
});
assert.equal(r.status, 0);
@@ -402,11 +402,11 @@ describe('#2351 parity guard — no hardcoded timeout in workflow/agent/referenc
// Forms that must NEVER be flagged: the approved verb, portable capability
// probes, config keys, the agy flag, prose, and variable names.
const CLEAN_FORMS = [
'gsd_run run-with-timeout 300 -- bash -c "$BUILD_CMD"',
'echo "$X" | gsd_run run-with-timeout "${CROSS_AI_TIMEOUT}" -- ${CROSS_AI_CMD}',
'msd_run run-with-timeout 300 -- bash -c "$BUILD_CMD"',
'echo "$X" | msd_run run-with-timeout "${CROSS_AI_TIMEOUT}" -- ${CROSS_AI_CMD}',
'_AGY_KILLER="$(command -v timeout 2>/dev/null || command -v gtimeout 2>/dev/null || true)"',
'"$_AGY_KILLER" 600 agy --print-timeout 540s "$@" -p "$PROMPT"',
'TEST_GATE_TIMEOUT=$(gsd_run query config-get workflow.test_gate_timeout || echo "600")',
'TEST_GATE_TIMEOUT=$(msd_run query config-get workflow.test_gate_timeout || echo "600")',
'echo "⚠ test gate timed out after ${TEST_GATE_TIMEOUT}s"',
'# bound the build with a 5-minute timeout',
'const TIMEOUT = 300;',
@@ -431,7 +431,7 @@ describe('#2351 parity guard — no hardcoded timeout in workflow/agent/referenc
}
test('multi-line input reports the correct line numbers', () => {
const text = ['clean line', 'gsd_run run-with-timeout 5 -- true', 'timeout 30 bash x'].join('\n');
const text = ['clean line', 'msd_run run-with-timeout 5 -- true', 'timeout 30 bash x'].join('\n');
const findings = findRawTimeoutInvocations(text);
assert.equal(findings.length, 1);
assert.equal(findings[0].line, 3);