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

@@ -65,7 +65,7 @@ const SCRIPTS = {
// ADR-3889 (#3908): the generated exit-code registry — codes are resolved
// via exitCodeFor(), never hardcoded, so this suite stays correct if the
// registry's integers ever change.
const { exitCodeFor } = require('../gsd-core/bin/lib/exit-code-registry.cjs');
const { exitCodeFor } = require('../msd-core/bin/lib/exit-code-registry.cjs');
// Helper: create a temp file with given content, run scanner, return { status, stdout, stderr }
const IS_WINDOWS = process.platform === 'win32';
@@ -199,7 +199,7 @@ describe('prompt-injection-scan.sh', { skip: IS_WINDOWS }, () => {
test('passes clean markdown documentation', () => {
const result = runScript(SCRIPTS.injection,
'# Getting Started\n\nInstall the package:\n\n```bash\nnpm install gsd-core\n```\n\nRun your first command:\n\n```bash\ngsd init\n```\n');
'# Getting Started\n\nInstall the package:\n\n```bash\nnpm install msd-core\n```\n\nRun your first command:\n\n```bash\nmsd init\n```\n');
assert.equal(result.status, 0, `False positive: ${result.stdout}`);
});
@@ -554,7 +554,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
describe('shared exit-code classes (identical across all three scanners)', () => {
let repo;
before(() => { repo = createTempGitProject('gsd-scan-shared-'); });
before(() => { repo = createTempGitProject('msd-scan-shared-'); });
after(() => { cleanup(repo); });
for (const [name, scriptPath] of SCANNERS) {
@@ -588,7 +588,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
describe('outside a git repository -> UNAVAILABLE', () => {
let nonRepoDir;
before(() => { nonRepoDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-scan-norepo-')); });
before(() => { nonRepoDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-scan-norepo-')); });
after(() => { cleanup(nonRepoDir); });
for (const [name, scriptPath] of SCANNERS) {
@@ -602,7 +602,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
describe('repo with no commits -> UNAVAILABLE', () => {
let emptyRepo;
before(() => {
emptyRepo = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-scan-nocommit-'));
emptyRepo = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-scan-nocommit-'));
gitOrThrow(['init'], { cwd: emptyRepo, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
});
after(() => { cleanup(emptyRepo); });
@@ -618,7 +618,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
describe('established-empty diff (base === HEAD) -> NO_INPUT', () => {
let repo;
before(() => {
repo = createTempGitProject('gsd-scan-emptydiff-');
repo = createTempGitProject('msd-scan-emptydiff-');
gitOrThrow(['branch', 'base-branch'], { cwd: repo, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
});
after(() => { cleanup(repo); });
@@ -634,7 +634,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
describe('all-images diff -> NO_INPUT (not a failure, not UNAVAILABLE)', () => {
let repo;
before(() => {
repo = createTempGitProject('gsd-scan-images-');
repo = createTempGitProject('msd-scan-images-');
gitOrThrow(['branch', 'base-branch'], { cwd: repo, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
fs.writeFileSync(path.join(repo, 'pic.png'), 'fake png bytes');
gitOrThrow(['add', '-A'], { cwd: repo, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
@@ -657,7 +657,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
// ── Controls ───────────────────────────────────────────────────────────
describe('controls: clean scan / findings scan / mixed diff still work', () => {
test('secret-scan: clean scan with a real file still exits 0', (t) => {
const repo = createTempGitProject('gsd-scan-clean-secret-');
const repo = createTempGitProject('msd-scan-clean-secret-');
t.after(() => cleanup(repo));
gitOrThrow(['branch', 'base-branch'], { cwd: repo, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
fs.writeFileSync(path.join(repo, 'code.txt'), 'clean text content\n');
@@ -668,7 +668,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
});
test('secret-scan: a diff WITH a real secret still reports findings (exit 1)', (t) => {
const repo = createTempGitProject('gsd-scan-findings-secret-');
const repo = createTempGitProject('msd-scan-findings-secret-');
t.after(() => cleanup(repo));
gitOrThrow(['branch', 'base-branch'], { cwd: repo, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
const key = ['AKIA', 'IOSFODNN7EXAMPLE'].join('');
@@ -681,7 +681,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
});
test('prompt-injection-scan: mixed images+code diff scans the code file (exit 0, clean)', (t) => {
const repo = createTempGitProject('gsd-scan-mixed-');
const repo = createTempGitProject('msd-scan-mixed-');
t.after(() => cleanup(repo));
gitOrThrow(['branch', 'base-branch'], { cwd: repo, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
fs.writeFileSync(path.join(repo, 'pic.png'), 'fake png bytes');
@@ -693,7 +693,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
});
test('--file / --dir / --stdin controls still scan and pass on clean content', (t) => {
const repo = createTempGitProject('gsd-scan-modes-');
const repo = createTempGitProject('msd-scan-modes-');
t.after(() => cleanup(repo));
const cleanFile = path.join(repo, 'clean.md');
fs.writeFileSync(cleanFile, '# Clean docs\n');
@@ -707,7 +707,7 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
describe('--dir unreadable -> UNAVAILABLE', () => {
let parent, locked;
before(() => {
parent = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-scan-unreadable-'));
parent = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-scan-unreadable-'));
locked = path.join(parent, 'locked');
fs.mkdirSync(locked);
fs.chmodSync(locked, 0o000);
@@ -733,13 +733,13 @@ describe('scanner exit-code contract', { skip: IS_WINDOWS }, () => {
});
describe('missing exit-codes.sh -> loud non-zero, never 0', () => {
// Isolated copy of the scanner in a throwaway tree whose gsd-core/bin/
// Isolated copy of the scanner in a throwaway tree whose msd-core/bin/
// shared/ directory has no exit-codes.sh — never touches the real
// committed file, so this is safe under parallel test-file execution.
function isolatedCopyWithNoRegistry(scriptPath) {
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-scan-noregistry-'));
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-scan-noregistry-'));
fs.mkdirSync(path.join(root, 'scripts'), { recursive: true });
fs.mkdirSync(path.join(root, 'gsd-core', 'bin', 'shared'), { recursive: true });
fs.mkdirSync(path.join(root, 'msd-core', 'bin', 'shared'), { recursive: true });
const dest = path.join(root, 'scripts', path.basename(scriptPath));
fs.copyFileSync(scriptPath, dest);
fs.chmodSync(dest, 0o755);