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:
@@ -6,7 +6,7 @@
|
||||
* FAILING-FIRST against the #3942 stubs in tests/helpers/emitted-diff.cjs
|
||||
* (`parseAckTrailers`, `renderAckTrailer`, `ACK_TRAILER_HASH`, `ACK_TRAILER_GROWTH`,
|
||||
* `ACK_TRAILER_DELIM`, `MAX_ACK_TRAILERS`) and tests/helpers/emitted-runtime.cjs
|
||||
* (`readAckTrailers`). See `.gsd/phase/chore-3942-ack-commit-trailer/40-design.md` for
|
||||
* (`readAckTrailers`). See `.msd/phase/chore-3942-ack-commit-trailer/40-design.md` for
|
||||
* the grammar/behavior table and `50-test-matrix.md` for the 37-row matrix this file
|
||||
* covers.
|
||||
*
|
||||
@@ -81,7 +81,7 @@ function commitMessage(dir, message, { branch } = {}) {
|
||||
if (branch) {
|
||||
gitOrThrow(['checkout', '-q', '-b', branch], { cwd: dir, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
|
||||
}
|
||||
const msgFile = path.join(os.tmpdir(), `gsd-ack-trailer-msg-${crypto.randomBytes(6).toString('hex')}.txt`);
|
||||
const msgFile = path.join(os.tmpdir(), `msd-ack-trailer-msg-${crypto.randomBytes(6).toString('hex')}.txt`);
|
||||
fs.writeFileSync(msgFile, message);
|
||||
try {
|
||||
gitOrThrow(['commit', '-q', '--allow-empty', '-F', msgFile], { cwd: dir, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
|
||||
@@ -336,22 +336,22 @@ describe('boundary: MAX_ACK_TRAILERS cap', () => {
|
||||
|
||||
describe('real fixture reads via readAckTrailers', () => {
|
||||
test('hash trailer excuses a rippled path — row 1', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-1-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-1-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'init\n\nbaseline commit, no trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
commitMessage(
|
||||
dir,
|
||||
`ripple the workflow\n\n${trailerLine(ACK_TRAILER_HASH, 'gsd-core/workflows/foo.md', 'deliberate ripple, #3942')}\n`,
|
||||
`ripple the workflow\n\n${trailerLine(ACK_TRAILER_HASH, 'msd-core/workflows/foo.md', 'deliberate ripple, #3942')}\n`,
|
||||
);
|
||||
const r = readAckTrailers({ baseRef: baseSha, headRef: 'HEAD', cwd: dir });
|
||||
assert.equal(r.errors.length, 0);
|
||||
assert.equal(r.hash.get('gsd-core/workflows/foo.md')?.reason, 'deliberate ripple, #3942');
|
||||
assert.equal(r.hash.get('msd-core/workflows/foo.md')?.reason, 'deliberate ripple, #3942');
|
||||
assert.equal(r.growth.size, 0);
|
||||
});
|
||||
|
||||
test('growth trailer excuses a grown file — row 2', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-2-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-2-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'init\n\nbaseline commit, no trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -366,19 +366,19 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
});
|
||||
|
||||
test('both spaces coexist in one range — row 3', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-3-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-3-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'init\n\nbaseline commit, no trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
commitMessage(
|
||||
dir,
|
||||
'hash and growth together\n\n'
|
||||
+ `${trailerLine(ACK_TRAILER_HASH, 'gsd-core/workflows/bar.md', 'ripple reason')}\n`
|
||||
+ `${trailerLine(ACK_TRAILER_HASH, 'msd-core/workflows/bar.md', 'ripple reason')}\n`
|
||||
+ `${trailerLine(ACK_TRAILER_GROWTH, 'bar.md', 'growth reason')}\n`,
|
||||
);
|
||||
const r = readAckTrailers({ baseRef: baseSha, headRef: 'HEAD', cwd: dir });
|
||||
assert.equal(r.errors.length, 0);
|
||||
assert.equal(r.hash.get('gsd-core/workflows/bar.md')?.reason, 'ripple reason');
|
||||
assert.equal(r.hash.get('msd-core/workflows/bar.md')?.reason, 'ripple reason');
|
||||
assert.equal(r.growth.get('bar.md')?.reason, 'growth reason');
|
||||
});
|
||||
|
||||
@@ -392,7 +392,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
+ 'separator, never the value separator between multiple values of the SAME key; '
|
||||
+ 'this test is what actually exercises `separator=` in the git --format string.',
|
||||
(t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-sep-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-sep-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'init\n\nbaseline commit, no trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -419,7 +419,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
+ 'error exists to catch, but never fired because the value never reached the '
|
||||
+ 'parser split into two pieces)',
|
||||
(t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-sep-conflict-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-sep-conflict-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'init\n\nbaseline commit, no trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -437,7 +437,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
);
|
||||
|
||||
test('clean tree needs no trailer — row 4', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-4-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-4-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'init\n\nbaseline commit, no trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -449,7 +449,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
});
|
||||
|
||||
test('growth trailer does not excuse a hash ripple — row 5', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-5-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-5-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'init\n\nbaseline commit, no trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -457,15 +457,15 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
// hash ripple from the wrong namespace — the latent defect this row closes.
|
||||
commitMessage(
|
||||
dir,
|
||||
`mis-scoped ack\n\n${trailerLine(ACK_TRAILER_GROWTH, 'gsd-core/workflows/baz.md', 'wrong space')}\n`,
|
||||
`mis-scoped ack\n\n${trailerLine(ACK_TRAILER_GROWTH, 'msd-core/workflows/baz.md', 'wrong space')}\n`,
|
||||
);
|
||||
const r = readAckTrailers({ baseRef: baseSha, headRef: 'HEAD', cwd: dir });
|
||||
assert.equal(r.growth.get('gsd-core/workflows/baz.md')?.reason, 'wrong space');
|
||||
assert.equal(r.hash.has('gsd-core/workflows/baz.md'), false, 'the growth space must never leak into the hash space');
|
||||
assert.equal(r.growth.get('msd-core/workflows/baz.md')?.reason, 'wrong space');
|
||||
assert.equal(r.hash.has('msd-core/workflows/baz.md'), false, 'the growth space must never leak into the hash space');
|
||||
});
|
||||
|
||||
test('hash trailer does not excuse growth — row 6', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-6-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-6-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'init\n\nbaseline commit, no trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -476,7 +476,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
});
|
||||
|
||||
test('trailer before the merge-base is out of range — row 7', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-7-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-7-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'fork point\n\nnothing to acknowledge yet\n');
|
||||
commitMessage(
|
||||
@@ -494,7 +494,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
});
|
||||
|
||||
test('empty range yields no acks — row 25', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-25-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-25-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'only commit\n\nno trailer\n');
|
||||
const sha = headSha(dir);
|
||||
@@ -505,7 +505,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
});
|
||||
|
||||
test('single-commit range is read — row 26', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-26-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-26-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'base\n\nno trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -516,13 +516,13 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
});
|
||||
|
||||
test('CRLF commit message parses identically — row 27', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-27-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-27-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'base\n\nno trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
const crlfMessage =
|
||||
`crlf commit\r\n\r\n${trailerLine(ACK_TRAILER_HASH, 'crlf-key.md', 'same reason regardless of line ending')}\r\n`;
|
||||
const msgFile = path.join(os.tmpdir(), `gsd-ack-trailer-crlf-${crypto.randomBytes(6).toString('hex')}.txt`);
|
||||
const msgFile = path.join(os.tmpdir(), `msd-ack-trailer-crlf-${crypto.randomBytes(6).toString('hex')}.txt`);
|
||||
fs.writeFileSync(msgFile, crlfMessage);
|
||||
try {
|
||||
gitOrThrow(['commit', '-q', '--allow-empty', '-F', msgFile], { cwd: dir, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
|
||||
@@ -538,7 +538,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
});
|
||||
|
||||
test('merge commit without a trailer is ignored — row 31', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-31-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-31-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'fork\n\nno trailer\n');
|
||||
const forkSha = headSha(dir);
|
||||
@@ -546,7 +546,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
checkout(dir, 'main');
|
||||
commitMessage(dir, 'main change\n\nno trailer\n');
|
||||
|
||||
const mergeMsgFile = path.join(os.tmpdir(), `gsd-ack-trailer-merge-${crypto.randomBytes(6).toString('hex')}.txt`);
|
||||
const mergeMsgFile = path.join(os.tmpdir(), `msd-ack-trailer-merge-${crypto.randomBytes(6).toString('hex')}.txt`);
|
||||
fs.writeFileSync(mergeMsgFile, "Merge branch 'topic'\n\nno trailer here either\n");
|
||||
try {
|
||||
gitOrThrow(['merge', '--no-ff', '-q', '-F', mergeMsgFile, 'topic'], { cwd: dir, timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
|
||||
@@ -561,7 +561,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
});
|
||||
|
||||
test('mid-body mention is not a trailer — row 32', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-32-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-32-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'base\n\nno trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -582,7 +582,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
+ '(reader-level analog: the reader is diff-content-agnostic; the "never gated" '
|
||||
+ 'behavior itself lives in diffEmitted, not rewired by this stub-only change)',
|
||||
(t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-34-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-34-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'large\n\nno trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -600,18 +600,18 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
+ 'the trailer like any other hash entry; refusing to let it excuse the cap is '
|
||||
+ 'diffEmitted\'s job, not rewired by this stub-only change)',
|
||||
(t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-35-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-35-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'base\n\nno trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
commitMessage(
|
||||
dir,
|
||||
'new oversized file\n\n'
|
||||
+ `${trailerLine(ACK_TRAILER_HASH, 'gsd-core/workflows/huge-new-file.md', 'trying to excuse a new-file-cap violation')}\n`,
|
||||
+ `${trailerLine(ACK_TRAILER_HASH, 'msd-core/workflows/huge-new-file.md', 'trying to excuse a new-file-cap violation')}\n`,
|
||||
);
|
||||
const r = readAckTrailers({ baseRef: baseSha, headRef: 'HEAD', cwd: dir });
|
||||
assert.equal(
|
||||
r.hash.get('gsd-core/workflows/huge-new-file.md')?.reason,
|
||||
r.hash.get('msd-core/workflows/huge-new-file.md')?.reason,
|
||||
'trying to excuse a new-file-cap violation',
|
||||
);
|
||||
},
|
||||
@@ -627,7 +627,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
test(
|
||||
'a growth trailer buried mid-message by squash-merge concatenation is recovered — #4454',
|
||||
(t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-4454-buried-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-4454-buried-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'base\n\nno trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -662,7 +662,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
test(
|
||||
'an ordinary commit with markdown bullets but no squash suffix finds nothing — #4454 (no false positive)',
|
||||
(t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-4454-ordinary-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-4454-ordinary-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'base\n\nno trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -688,7 +688,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
test(
|
||||
'a squash-shaped commit where one bullet merely MENTIONS trailer syntax mid-paragraph stays inert — #4454 (row 32, per-chunk)',
|
||||
(t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-4454-mention-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-4454-mention-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'base\n\nno trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -727,7 +727,7 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
test(
|
||||
'an earlier bullet\'s own markdown HR does not truncate the scan before a LATER bullet\'s real ack — #4454 (last-match, not first-match)',
|
||||
(t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-4454-earlier-hr-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-4454-earlier-hr-');
|
||||
withCleanup(t, dir);
|
||||
commitMessage(dir, 'base\n\nno trailer\n');
|
||||
const baseSha = headSha(dir);
|
||||
@@ -761,14 +761,14 @@ describe('real fixture reads via readAckTrailers', () => {
|
||||
|
||||
describe('hostile IO: uncomputable range, subprocess failure, timeout', () => {
|
||||
test('uncomputable range throws, never passes vacuously — row 22', (t) => {
|
||||
const origin = makeTempRepo('gsd-ack-trailer-22-origin-');
|
||||
const origin = makeTempRepo('msd-ack-trailer-22-origin-');
|
||||
withCleanup(t, origin);
|
||||
commitMessage(origin, 'origin A\n\nfirst commit\n');
|
||||
const shaA = headSha(origin);
|
||||
commitMessage(origin, 'origin B\n\nsecond commit\n');
|
||||
commitMessage(origin, 'origin C\n\nthird commit\n');
|
||||
|
||||
const clone = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ack-trailer-22-clone-'));
|
||||
const clone = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ack-trailer-22-clone-'));
|
||||
t.after(() => cleanup(clone));
|
||||
gitOrThrow(['clone', '-q', '--depth', '1', `file://${origin}`, clone], {
|
||||
cwd: origin,
|
||||
@@ -784,7 +784,7 @@ describe('hostile IO: uncomputable range, subprocess failure, timeout', () => {
|
||||
});
|
||||
|
||||
test('git failure surfaces, not swallowed — row 23', (t) => {
|
||||
const notARepo = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ack-trailer-23-'));
|
||||
const notARepo = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ack-trailer-23-'));
|
||||
t.after(() => cleanup(notARepo));
|
||||
assert.throws(
|
||||
() => readAckTrailers({ baseRef: 'main', headRef: 'HEAD', cwd: notARepo }),
|
||||
@@ -806,7 +806,7 @@ describe('hostile IO: uncomputable range, subprocess failure, timeout', () => {
|
||||
const IMPOSSIBLY_SHORT_GIT_TIMEOUT_MS = 20;
|
||||
|
||||
test('git log is bounded by a timeout — row 24', (t) => {
|
||||
const dir = makeTempRepo('gsd-ack-trailer-24-');
|
||||
const dir = makeTempRepo('msd-ack-trailer-24-');
|
||||
withCleanup(t, dir);
|
||||
const rootSha = growHistoryFastImport(dir, 50000);
|
||||
|
||||
@@ -829,13 +829,13 @@ describe('hostile IO: uncomputable range, subprocess failure, timeout', () => {
|
||||
|
||||
describe('round-trip and properties', () => {
|
||||
test('taught syntax round-trips through the reader — row 33', () => {
|
||||
const line = renderAckTrailer(ACK_TRAILER_HASH, 'gsd-core/workflows/plan-phase.md', 'converter change, #3942');
|
||||
const line = renderAckTrailer(ACK_TRAILER_HASH, 'msd-core/workflows/plan-phase.md', 'converter change, #3942');
|
||||
const prefix = `${ACK_TRAILER_HASH}:`;
|
||||
assert.ok(line.startsWith(prefix), 'rendered line must start with its own trailer name');
|
||||
const value = line.slice(prefix.length).trimStart();
|
||||
const { hash, errors } = parseAckTrailers({ hash: [value], growth: [] });
|
||||
assert.deepEqual(errors, []);
|
||||
assert.equal(hash.get('gsd-core/workflows/plan-phase.md')?.reason, 'converter change, #3942');
|
||||
assert.equal(hash.get('msd-core/workflows/plan-phase.md')?.reason, 'converter change, #3942');
|
||||
});
|
||||
|
||||
const KEY_ALPHABET = 'abcdefghijklmnopqrstuvwxyz0123456789_./-'.split('');
|
||||
|
||||
Reference in New Issue
Block a user