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,7 +1,7 @@
/**
* Behavioral parity tests for the shared INJECTION_PATTERNS module (#3504, epic #1900 F22a).
*
* gsd-prompt-guard.js and gsd-read-injection-scanner.js previously carried two
* msd-prompt-guard.js and msd-read-injection-scanner.js previously carried two
* byte-identical copies of a 14-regex injection pattern list ("inlined for hook
* independence") — a pattern tightened in one would silently stop protecting the
* other surface. #3504 extracts the list to hooks/lib/injection-patterns.js and
@@ -28,8 +28,8 @@ const { PROBE_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
const { INJECTION_PATTERNS, describePattern } = require('../hooks/lib/injection-patterns.js');
const PROMPT_GUARD_HOOK = path.join(__dirname, '..', 'hooks', 'gsd-prompt-guard.js');
const READ_SCANNER_HOOK = path.join(__dirname, '..', 'hooks', 'gsd-read-injection-scanner.js');
const PROMPT_GUARD_HOOK = path.join(__dirname, '..', 'hooks', 'msd-prompt-guard.js');
const READ_SCANNER_HOOK = path.join(__dirname, '..', 'hooks', 'msd-read-injection-scanner.js');
// One matching sample per shared pattern, same order as the module's array.
// The length assertion below fails if a pattern is added without a sample; the
@@ -124,7 +124,7 @@ describe('#3504: shared INJECTION_PATTERNS fire in both hooks', () => {
let tmpDir;
before(() => {
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-inj-parity-'));
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-inj-parity-'));
});
after(() => {
@@ -148,7 +148,7 @@ describe('#3504: shared INJECTION_PATTERNS fire in both hooks', () => {
});
for (let i = 0; i < SAMPLES.length; i++) {
test(`gsd-prompt-guard detects shared pattern ${i}`, () => {
test(`msd-prompt-guard detects shared pattern ${i}`, () => {
const r = runHookSeam(PROMPT_GUARD_HOOK, [], {
input: JSON.stringify({
tool_name: 'Write',
@@ -170,7 +170,7 @@ describe('#3504: shared INJECTION_PATTERNS fire in both hooks', () => {
);
});
test(`gsd-read-injection-scanner detects shared pattern ${i}`, () => {
test(`msd-read-injection-scanner detects shared pattern ${i}`, () => {
const r = runHookSeam(READ_SCANNER_HOOK, [], {
input: JSON.stringify({
tool_name: 'Read',
@@ -219,7 +219,7 @@ describe('#3504: shared INJECTION_PATTERNS fire in both hooks', () => {
// just in the raw list — and as exactly ONE finding, because the replaced
// narrow-plus-combined layout double-counted one sentence.
for (let i = 0; i < FILLER_REGRESSION_SAMPLES.length; i++) {
test(`#4016 filler regression ${i} fires once in gsd-prompt-guard`, () => {
test(`#4016 filler regression ${i} fires once in msd-prompt-guard`, () => {
const r = runHookSeam(PROMPT_GUARD_HOOK, [], {
input: JSON.stringify({
tool_name: 'Write',
@@ -249,7 +249,7 @@ describe('#3504: shared INJECTION_PATTERNS fire in both hooks', () => {
assert.equal(findings[0].ruleId, 'INJECTION-PATTERN');
});
test(`#4016 filler regression ${i} fires once in gsd-read-injection-scanner`, () => {
test(`#4016 filler regression ${i} fires once in msd-read-injection-scanner`, () => {
const r = runHookSeam(READ_SCANNER_HOOK, [], {
input: JSON.stringify({
tool_name: 'Read',
@@ -279,7 +279,7 @@ describe('#3504: shared INJECTION_PATTERNS fire in both hooks', () => {
});
}
// #4016 advisory readability (PR #4061 review nit). gsd-prompt-guard.js used
// #4016 advisory readability (PR #4061 review nit). msd-prompt-guard.js used
// to echo `pattern.source` verbatim into its advisory; with the superset
// pattern that is a ~280-character regex dump. Both hooks now render the
// same bounded label through the shared `describePattern`.
@@ -440,7 +440,7 @@ describe('#3504: shared INJECTION_PATTERNS fire in both hooks', () => {
});
test('#4016 FP pin: determined linter-doc prose stays LOW and never blocks, even with injection_blocking=true', () => {
const blkDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-inj-fp-blk-'));
const blkDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-inj-fp-blk-'));
try {
fs.mkdirSync(path.join(blkDir, '.planning'), { recursive: true });
fs.writeFileSync(