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,5 +1,5 @@
/**
* GSD Tools Tests - Schema Drift Detection
* MSD Tools Tests - Schema Drift Detection
*
* Tests for schema-relevant file detection (plan-phase injection)
* and post-execution schema drift gate (execute-phase verification).
@@ -9,12 +9,12 @@ const { test, describe, beforeEach, afterEach } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('fs');
const path = require('path');
const { createTempGitProject, cleanup, runGsdTools } = require('./helpers.cjs');
const { createTempGitProject, cleanup, runMsdTools } = require('./helpers.cjs');
// ─── Unit: detectSchemaFiles ─────────────────────────────────────────────────
const { detectSchemaFiles, detectSchemaOrm, checkSchemaDrift } = require(
path.join(__dirname, '..', 'gsd-core', 'bin', 'lib', 'schema-detect.cjs')
path.join(__dirname, '..', 'msd-core', 'bin', 'lib', 'schema-detect.cjs')
);
describe('detectSchemaFiles', () => {
@@ -221,7 +221,7 @@ describe('checkSchemaDrift', () => {
assert.strictEqual(result.blocking, false);
});
test('respects GSD_SKIP_SCHEMA_CHECK override', () => {
test('respects MSD_SKIP_SCHEMA_CHECK override', () => {
const changedFiles = ['src/collections/Posts.ts'];
const executionLog = 'npm run build';
const result = checkSchemaDrift(changedFiles, executionLog, { skipCheck: true });
@@ -255,7 +255,7 @@ describe('verify schema-drift CLI command', () => {
let tmpDir;
beforeEach(() => {
tmpDir = createTempGitProject('gsd-schema-drift-');
tmpDir = createTempGitProject('msd-schema-drift-');
});
afterEach(() => {
@@ -274,7 +274,7 @@ describe('verify schema-drift CLI command', () => {
'Plan content',
].join('\n'));
const result = runGsdTools(['verify', 'schema-drift', '01-setup'], tmpDir);
const result = runMsdTools(['verify', 'schema-drift', '01-setup'], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.strictEqual(output.drift_detected, false);
@@ -303,7 +303,7 @@ describe('verify schema-drift CLI command', () => {
'- npm run test',
].join('\n'));
const result = runGsdTools(['verify', 'schema-drift', '01-setup'], tmpDir);
const result = runMsdTools(['verify', 'schema-drift', '01-setup'], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.strictEqual(output.drift_detected, true);
@@ -331,7 +331,7 @@ describe('verify schema-drift CLI command', () => {
'- npm run build',
].join('\n'));
const result = runGsdTools(['verify', 'schema-drift', '01-setup'], tmpDir);
const result = runMsdTools(['verify', 'schema-drift', '01-setup'], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.strictEqual(output.drift_detected, false);
@@ -350,7 +350,7 @@ describe('verify schema-drift CLI command', () => {
].join('\n'));
fs.writeFileSync(path.join(phaseDir, '01-01-SUMMARY.md'), '# Summary\n');
const result = runGsdTools(['verify', 'schema-drift', '01-setup', '--skip'], tmpDir);
const result = runMsdTools(['verify', 'schema-drift', '01-setup', '--skip'], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.strictEqual(output.blocking, false);
@@ -361,7 +361,7 @@ describe('#1571 regression: verify schema-drift resolves the phase by token, not
let tmpDir;
beforeEach(() => {
tmpDir = createTempGitProject('gsd-schema-drift-1571-');
tmpDir = createTempGitProject('msd-schema-drift-1571-');
});
afterEach(() => {
@@ -391,7 +391,7 @@ describe('#1571 regression: verify schema-drift resolves the phase by token, not
// Only "11-expansion" exists. "1" is a substring of "11" but is NOT phase 1.
writePhase('11-expansion');
const result = runGsdTools(['verify', 'schema-drift', '1'], tmpDir);
const result = runMsdTools(['verify', 'schema-drift', '1'], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
// Must NOT have matched 11-expansion. A wrong match yields an empty message and
@@ -405,7 +405,7 @@ describe('#1571 regression: verify schema-drift resolves the phase by token, not
test('requesting the real phase by its token still resolves and runs the gate', () => {
writePhase('11-expansion');
const result = runGsdTools(['verify', 'schema-drift', '11'], tmpDir);
const result = runMsdTools(['verify', 'schema-drift', '11'], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
// Resolved to a real phase → gate ran (no "not found" message).
@@ -415,7 +415,7 @@ describe('#1571 regression: verify schema-drift resolves the phase by token, not
test('requesting the full directory name still resolves', () => {
writePhase('11-expansion');
const result = runGsdTools(['verify', 'schema-drift', '11-expansion'], tmpDir);
const result = runMsdTools(['verify', 'schema-drift', '11-expansion'], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.notStrictEqual(output.message, 'Phase directory not found: 11-expansion');