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

@@ -5,13 +5,13 @@
*
* ADR-3889 ("One exit-code registry — 0 and 1 are free, everything else is
* allocated") Phase 1 (#3905): behavioral tests for the allocator —
* gsd-core/bin/shared/exit-codes.json (declaration), scripts/gen-exit-code-registry.cjs
* (generator + validator), and the generated gsd-core/bin/lib/exit-code-registry.cjs
* msd-core/bin/shared/exit-codes.json (declaration), scripts/gen-exit-code-registry.cjs
* (generator + validator), and the generated msd-core/bin/lib/exit-code-registry.cjs
* artifact (`EXIT_CODES`, `exitCodeFor`, `nameForExitCode`).
*
* Every test that needs a mutated declaration or artifact operates on a
* temp-dir copy driven via --declaration/--out — the real repo files under
* gsd-core/bin/shared and gsd-core/bin/lib are never mutated, since test
* msd-core/bin/shared and msd-core/bin/lib are never mutated, since test
* files in this repo run in parallel.
*
* fast-check is confirmed present in package.json devDependencies (^4.8.0);
@@ -30,16 +30,16 @@ const { createTempDir, cleanup } = require('./helpers.cjs');
const { PROBE_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
const fc = require('./helpers/fast-check-setup.cjs');
const { ensureScriptsOut } = require('./helpers/exit-code-artifact-flags.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.resolve(__dirname, '..');
const GEN_SCRIPT = path.join(REPO_ROOT, 'scripts', 'gen-exit-code-registry.cjs');
const REAL_DECLARATION_PATH = path.join(REPO_ROOT, 'gsd-core', 'bin', 'shared', 'exit-codes.json');
const REAL_ARTIFACT_PATH = path.join(REPO_ROOT, 'gsd-core', 'bin', 'lib', 'exit-code-registry.cjs');
const REAL_DECLARATION_PATH = path.join(REPO_ROOT, 'msd-core', 'bin', 'shared', 'exit-codes.json');
const REAL_ARTIFACT_PATH = path.join(REPO_ROOT, 'msd-core', 'bin', 'lib', 'exit-code-registry.cjs');
const REAL_SCRIPTS_ARTIFACT_PATH = path.join(REPO_ROOT, 'scripts', 'lib', 'exit-code-registry.cjs');
const REAL_HOOKS_ARTIFACT_PATH = path.join(REPO_ROOT, 'hooks', 'lib', 'exit-code-registry.js');
const REAL_DTS_ARTIFACT_PATH = path.join(REPO_ROOT, 'src', 'exit-code-registry.d.cts');
const REAL_SH_ARTIFACT_PATH = path.join(REPO_ROOT, 'gsd-core', 'bin', 'shared', 'exit-codes.sh');
const REAL_SH_ARTIFACT_PATH = path.join(REPO_ROOT, 'msd-core', 'bin', 'shared', 'exit-codes.sh');
const generator = require(GEN_SCRIPT);
const registry = require(REAL_ARTIFACT_PATH);
@@ -60,16 +60,16 @@ function makeEntry(overrides) {
/**
* #3906 (ADR-3889 Phase 2): the generator now emits FIVE artifacts — a
* primary (gsd-core/bin/lib), a secondary (scripts/lib), and the ambient
* primary (msd-core/bin/lib), a secondary (scripts/lib), and the ambient
* `.d.cts` type declaration (src/exit-code-registry.d.cts). #3908 (Phase 4)
* added a FOURTH: the shell-sourceable fragment (gsd-core/bin/shared/
* added a FOURTH: the shell-sourceable fragment (msd-core/bin/shared/
* exit-codes.sh). #3911 (Phase 7) added a FIFTH: the hooks/lib/ copy
* (hooks/lib/exit-code-registry.js). Every existing call site below only
* overrides the PRIMARY path via `--out`; without matching
* `--scripts-out`/`--hooks-out`/`--dts-out`/`--sh-out` overrides, a
* `--write` here would clobber the real committed
* `scripts/lib/exit-code-registry.cjs`, `hooks/lib/exit-code-registry.js`,
* `src/exit-code-registry.d.cts`, and `gsd-core/bin/shared/exit-codes.sh` —
* `src/exit-code-registry.d.cts`, and `msd-core/bin/shared/exit-codes.sh` —
* dangerous since test files in this repo run in parallel. Rather than
* touch every call site, this single seam derives co-located,
* per-call-unique secondary/hooks/dts/sh paths from whatever `--out` value
@@ -377,7 +377,7 @@ describe('gen-exit-code-registry: cross-entry invariants', () => {
describe('gen-exit-code-registry: declaration file handling', () => {
let tmpDir;
before(() => {
tmpDir = createTempDir('gsd-exit-code-decl-');
tmpDir = createTempDir('msd-exit-code-decl-');
});
after(() => {
cleanup(tmpDir);
@@ -427,7 +427,7 @@ describe('gen-exit-code-registry: declaration file handling', () => {
describe('gen-exit-code-registry: CLI', () => {
let tmpDir;
before(() => {
tmpDir = createTempDir('gsd-exit-code-cli-');
tmpDir = createTempDir('msd-exit-code-cli-');
});
after(() => {
cleanup(tmpDir);
@@ -644,7 +644,7 @@ describe('gen-exit-code-registry: CLI', () => {
describe('gen-exit-code-registry: CLI positive controls for the ten guard rows', () => {
let tmpDir;
before(() => {
tmpDir = createTempDir('gsd-exit-code-positive-');
tmpDir = createTempDir('msd-exit-code-positive-');
});
after(() => {
cleanup(tmpDir);
@@ -742,7 +742,7 @@ describe('gen-exit-code-docs: generated exit-code reference page (matrix F1-F4)'
describe('F2: --check catches drift (mutate-then-observe, not read-the-code)', () => {
let tmpDir;
before(() => {
tmpDir = createTempDir('gsd-exit-code-docs-f2-');
tmpDir = createTempDir('msd-exit-code-docs-f2-');
});
after(() => {
cleanup(tmpDir);
@@ -824,7 +824,7 @@ describe('gen-exit-code-docs: generated exit-code reference page (matrix F1-F4)'
// freshly-rendered table for the widened logic diverges from the committed
// page's band table and --check must exit non-zero.
test('band table is DERIVED: widening isAllocatableCode without regenerating fails --check (regression, #1)', () => {
const tmp = createTempDir('gsd-exit-code-docs-band-parity-');
const tmp = createTempDir('msd-exit-code-docs-band-parity-');
try {
const registrySrc = fs.readFileSync(GEN_SCRIPT, 'utf8');
// Widen the SAME BANDS table isAllocatableCode/bandFor/classifyBand are
@@ -875,7 +875,7 @@ describe('gen-exit-code-docs: generated exit-code reference page (matrix F1-F4)'
}
test('T1: a BANDS category with no CATEGORY_ROW_ORDER/CATEGORY_MERGE_INTO entry throws generation, not a silent omission', () => {
const tmp = createTempDir('gsd-exit-code-docs-p9cat-');
const tmp = createTempDir('msd-exit-code-docs-p9cat-');
try {
const registrySrc = fs.readFileSync(GEN_SCRIPT, 'utf8');
const NEEDLE = " { category: 'shell-signal', allocatable: false, test: (code) => code >= 126 },\n]);";
@@ -908,7 +908,7 @@ describe('gen-exit-code-docs: generated exit-code reference page (matrix F1-F4)'
// T2: a CATEGORY_ROW_ORDER entry with no BAND_PROSE entry must throw rather
// than rendering the literal string "undefined" into the table.
test('T2: a CATEGORY_ROW_ORDER entry with no BAND_PROSE entry throws rather than rendering undefined', () => {
const tmp = createTempDir('gsd-exit-code-docs-p9cat-');
const tmp = createTempDir('msd-exit-code-docs-p9cat-');
try {
fs.copyFileSync(GEN_SCRIPT, path.join(tmp, 'gen-exit-code-registry.cjs'));
@@ -941,7 +941,7 @@ describe('gen-exit-code-docs: generated exit-code reference page (matrix F1-F4)'
// CATEGORY_MERGE_INTO) produces must throw — dead prose for a band that no
// longer exists is the same drift in the other direction.
test('T3: a stale BAND_PROSE category no BANDS entry produces throws', () => {
const tmp = createTempDir('gsd-exit-code-docs-p9cat-');
const tmp = createTempDir('msd-exit-code-docs-p9cat-');
try {
fs.copyFileSync(GEN_SCRIPT, path.join(tmp, 'gen-exit-code-registry.cjs'));