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 @@
/**
* Tests for gsd-workflow-guard.js PreToolUse hook.
* Tests for msd-workflow-guard.js PreToolUse hook.
*
* #2304 — Kimi tool vocabulary engages the guard: Kimi CLI registers this
* guard with matcher 'Shell|WriteFile|StrReplaceFile' and forwards its own
@@ -12,13 +12,13 @@
'use strict';
process.env.GSD_TEST_MODE = '1';
process.env.MSD_TEST_MODE = '1';
const { test, describe, before, after } = require('node:test');
// #3504: test-only fault injection flag for the fail-closed posture tests below.
// Makes the hook throw right after stdin parse — the internal-error vector the
// outer catch must handle without downgrading the force-add block to an allow.
const FAULT_ENV = { ...process.env, GSD_TEST_WORKFLOW_GUARD_FAULT: '1' };
const FAULT_ENV = { ...process.env, MSD_TEST_WORKFLOW_GUARD_FAULT: '1' };
const assert = require('node:assert/strict');
const fs = require('node:fs');
const os = require('node:os');
@@ -29,7 +29,7 @@ const { PROBE_TIMEOUT_MS, HOOK_FANOUT_TIMEOUT_MS } = require('./helpers/timeouts
const { cleanup } = require('./helpers.cjs');
const HOOK_PATH = path.join(__dirname, '..', 'hooks', 'gsd-workflow-guard.js');
const HOOK_PATH = path.join(__dirname, '..', 'hooks', 'msd-workflow-guard.js');
function runHook(payload, timeoutMs = 5000) {
const input = JSON.stringify(payload);
@@ -51,13 +51,13 @@ describe('#2304: Kimi tool vocabulary engages the workflow guard', () => {
let repoDir;
before(() => {
repoDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-workflow-guard-'));
repoDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-workflow-guard-'));
const initResult = runHookSeam(
'-c',
['git init -q -b worktree-agent-test && git config user.email t@t && git config user.name t'],
{ interpreter: 'bash', cwd: repoDir },
);
throwIfFailed(initResult, 'bash -c <git init/config for gsd-workflow-guard fixture>');
throwIfFailed(initResult, 'bash -c <git init/config for msd-workflow-guard fixture>');
fs.mkdirSync(path.join(repoDir, '.planning'));
fs.writeFileSync(
path.join(repoDir, '.planning', 'config.json'),
@@ -196,12 +196,12 @@ describe('#2304: Kimi tool vocabulary engages the workflow guard', () => {
// any throw between stdin parse and the block decision silently downgraded a
// should-BLOCK call into an allow. No JSON-expressible input throws today
// (#2547/#2595 hardened every read; tokenize is total), so the fault vector is
// the hook's test-only seam GSD_TEST_WORKFLOW_GUARD_FAULT=1, which throws
// the hook's test-only seam MSD_TEST_WORKFLOW_GUARD_FAULT=1, which throws
// immediately after parse. The payload uses a BENIGN command — proving the
// catch's own context re-derivation blocks, not the happy-path detector.
describe('#3504: internal error fails closed for the enabled force-add guard', () => {
function makeGuardRepo(branch, workflowGuard) {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-workflow-guard-fc-'));
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-workflow-guard-fc-'));
const initResult = runHookSeam(
'-c',
[`git init -q -b ${branch} && git config user.email t@t && git config user.name t`],
@@ -294,17 +294,17 @@ describe('#3504: internal error fails closed for the enabled force-add guard', (
assert.equal(r.exitCode, 0, `disabled guard is inert even on faults. stderr: ${r.stderr}`);
});
test('internal error outside a GSD project (no .planning/) stays exit 0', (t) => {
const bare = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-workflow-guard-bare-'));
test('internal error outside a MSD project (no .planning/) stays exit 0', (t) => {
const bare = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-workflow-guard-bare-'));
t.after(() => cleanup(bare));
const initResult = runHookSeam(
'-c',
['git init -q -b worktree-agent-test'],
{ interpreter: 'bash', cwd: bare, timeoutMs: PROBE_TIMEOUT_MS },
);
throwIfFailed(initResult, 'bash -c <git init for non-GSD fixture>');
throwIfFailed(initResult, 'bash -c <git init for non-MSD fixture>');
const r = runFaultHook({ tool_name: 'Bash', tool_input: { command: 'git status' } }, bare);
assert.equal(r.exitCode, 0, `non-GSD dir must stay allowed. stderr: ${r.stderr}`);
assert.equal(r.exitCode, 0, `non-MSD dir must stay allowed. stderr: ${r.stderr}`);
});
});
});
@@ -322,7 +322,7 @@ describe('#3504: global-flag spellings of git add -f reach the shared classifier
before(() => {
const mk = (branch) => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-workflow-guard-bypass-'));
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-workflow-guard-bypass-'));
// Bash FAN-OUT: three chained git commands under one `bash`
// interpreter, not a single git plumbing call — the wrong class for
// `PROBE_TIMEOUT_MS`. Same class as the observed CI failures in