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

@@ -25,7 +25,7 @@ const { cleanup } = require('./helpers.cjs');
// ─── Module under test ────────────────────────────────────────────────────────
const configLoader = require('../gsd-core/bin/lib/config-loader.cjs');
const configLoader = require('../msd-core/bin/lib/config-loader.cjs');
const {
loadConfig,
_setFederatedRegistryForTests,
@@ -35,7 +35,7 @@ const {
// ─── Helpers ──────────────────────────────────────────────────────────────────
function makeTempProject() {
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-fed-cfg-test-'));
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-fed-cfg-test-'));
fs.mkdirSync(path.join(tmpDir, '.planning', 'phases'), { recursive: true });
return tmpDir;
}
@@ -261,7 +261,7 @@ describe('FIX 1: nested user config drives federated overlay in loadConfig', ()
describe('FIX 2: overlay applied on the no-config path', () => {
test('project with NO config.json → federated default is surfaced (non-central key)', () => {
// Create a project dir WITHOUT a .planning/config.json
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-fed-noconfig-'));
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-fed-noconfig-'));
tmpDirs.push(tmpDir);
fs.mkdirSync(path.join(tmpDir, '.planning', 'phases'), { recursive: true });
// Intentionally do NOT write a config.json
@@ -293,7 +293,7 @@ describe('FIX 2: overlay applied on the no-config path', () => {
test('no-config path with REAL registry → capability defaults are surfaced', () => {
_resetFederatedRegistryForTests();
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-fed-noconfig-real-'));
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-fed-noconfig-real-'));
tmpDirs.push(tmpDir);
fs.mkdirSync(path.join(tmpDir, '.planning', 'phases'), { recursive: true });
// No config.json
@@ -436,11 +436,11 @@ describe('MALFORMED registry: loadConfig does not throw', () => {
// the project where the overlay is installed — never globally, never for the wrong
// project, never from a bare require (no seam used here — the real loadRegistry path).
describe('ADR-1244 D2: overlay config-key federation (cwd-aware, real loader)', () => {
const configSchema = require('../gsd-core/bin/lib/config-schema.cjs');
const configSchema = require('../msd-core/bin/lib/config-schema.cjs');
const KEY = 'workflow.overlay_demo_gate';
const overlayCap = {
id: 'overlay-demo', role: 'feature', version: '1.0.0', title: 'Overlay demo', description: 'overlay',
tier: 'standard', requires: [], engines: { gsd: '>=1.0.0' },
tier: 'standard', requires: [], engines: { msd: '>=1.0.0' },
runtimeCompat: { supported: ['*'], unsupported: [] },
skills: ['overlay-demo-skill'], agents: [], hooks: [],
config: { [KEY]: { type: 'boolean', default: true, description: 'overlay-owned federated key' } },
@@ -450,28 +450,28 @@ describe('ADR-1244 D2: overlay config-key federation (cwd-aware, real loader)',
let sandboxHome, withOverlay, withoutOverlay, savedHome;
beforeEach(() => {
_resetFederatedRegistryForTests(); // NO seam override — exercise the real cwd-aware path
savedHome = process.env.GSD_HOME;
savedHome = process.env.MSD_HOME;
sandboxHome = makeTempProject();
process.env.GSD_HOME = sandboxHome; // empty global overlay root
process.env.MSD_HOME = sandboxHome; // empty global overlay root
withOverlay = mkTemp();
const capDir = path.join(withOverlay, '.gsd', 'capabilities', 'overlay-demo');
const capDir = path.join(withOverlay, '.msd', 'capabilities', 'overlay-demo');
fs.mkdirSync(capDir, { recursive: true });
fs.writeFileSync(path.join(capDir, 'capability.json'), JSON.stringify(overlayCap), 'utf-8');
// #1459: a PROJECT-scope overlay activates only with a committed ledger AND a user consent record
// on this machine. Write both so the cwd-aware federation under test reflects a genuinely-installed
// + consented overlay (a forged/cloned in-repo project ledger alone no longer federates the key).
fs.writeFileSync(
path.join(withOverlay, '.gsd-capabilities.json'),
path.join(withOverlay, '.msd-capabilities.json'),
JSON.stringify({ version: '1', updatedAt: '2026-01-01T00:00:00Z', entries: {
'overlay-demo': { id: 'overlay-demo', version: '1.0.0', source: 's', integrity: 'sha512-od', files: [], sharedEdits: [] },
} }),
'utf-8',
);
{
const trust = require('../gsd-core/bin/lib/capability-trust.cjs');
const consent = require('../gsd-core/bin/lib/capability-consent.cjs');
const trust = require('../msd-core/bin/lib/capability-trust.cjs');
const consent = require('../msd-core/bin/lib/capability-consent.cjs');
consent.recordProjectConsent({
gsdHome: sandboxHome, projectRoot: withOverlay, id: 'overlay-demo',
msdHome: sandboxHome, projectRoot: withOverlay, id: 'overlay-demo',
integrity: 'sha512-od',
// IC-10: single-arg signatureForManifest (lifecycle RECORD convention). CB-1/CB-2: the contentHash
// is THE security binding the loader recomputes — it MUST be present + non-empty (recordProjectConsent
@@ -483,7 +483,7 @@ describe('ADR-1244 D2: overlay config-key federation (cwd-aware, real loader)',
withoutOverlay = mkTemp();
});
afterEach(() => {
if (savedHome === undefined) delete process.env.GSD_HOME; else process.env.GSD_HOME = savedHome;
if (savedHome === undefined) delete process.env.MSD_HOME; else process.env.MSD_HOME = savedHome;
try { cleanup(sandboxHome); } catch { /* ignore */ }
});
@@ -513,12 +513,12 @@ describe('ADR-1244 D2: overlay config-key federation (cwd-aware, real loader)',
// record — a forged/cloned repo would inject config keys. The consent gate suppresses it, so the key
// is ABSENT from isValidConfigKey AND from loadConfig output.
const noConsent = mkTemp();
const capDir = path.join(noConsent, '.gsd', 'capabilities', 'overlay-demo');
const capDir = path.join(noConsent, '.msd', 'capabilities', 'overlay-demo');
fs.mkdirSync(capDir, { recursive: true });
fs.writeFileSync(path.join(capDir, 'capability.json'), JSON.stringify(overlayCap), 'utf-8');
// A committed-looking project ledger (repo-plantable) — but NO consent record on this machine.
fs.writeFileSync(
path.join(noConsent, '.gsd-capabilities.json'),
path.join(noConsent, '.msd-capabilities.json'),
JSON.stringify({ version: '1', updatedAt: '2026-01-01T00:00:00Z', entries: {
'overlay-demo': { id: 'overlay-demo', version: '1.0.0', source: 's', integrity: 'sha512-od', files: [], sharedEdits: [] },
} }),