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 @@
'use strict';
// Task Content Resolution Module tests (ADR-3646 Phase 1, #3970).
// Covers test matrix rows 5-16 (.gsd/phase/feat-3970-task-content-resolution-seam/50-test-matrix.md).
// Covers test matrix rows 5-16 (.msd/phase/feat-3970-task-content-resolution-seam/50-test-matrix.md).
// Every subprocess call is a fake execFn — never a real spawn, never a real
// timeout wait (CLAUDE.md's clock-seam rule).
@@ -10,7 +10,7 @@ const assert = require('node:assert');
const fc = require('fast-check');
const { TASK_RESOLVER_INVOKE_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
const m = require('../gsd-core/bin/lib/task-content-resolution.cjs');
const m = require('../msd-core/bin/lib/task-content-resolution.cjs');
const {
TASK_CONTENT_RESULT,
splitTrackerId,
@@ -68,7 +68,7 @@ test('splitTrackerId returns null for null and empty input', () => {
});
test('splitTrackerId splits on the first colon', () => {
assert.deepStrictEqual(splitTrackerId('beads:GSD-42'), { prefix: 'beads', id: 'GSD-42' });
assert.deepStrictEqual(splitTrackerId('beads:MSD-42'), { prefix: 'beads', id: 'MSD-42' });
});
test('splitTrackerId with no colon returns null (row 16 boundary partner)', () => {
@@ -77,8 +77,8 @@ test('splitTrackerId with no colon returns null (row 16 boundary partner)', () =
test('id containing colons splits on first colon only (row 16)', () => {
assert.deepStrictEqual(
splitTrackerId('beads:issue:GSD-1'),
{ prefix: 'beads', id: 'issue:GSD-1' },
splitTrackerId('beads:issue:MSD-1'),
{ prefix: 'beads', id: 'issue:MSD-1' },
);
});
@@ -86,9 +86,9 @@ test('id containing colons splits on first colon only (row 16)', () => {
test('buildInvocation replaces every {{id}} entry with the literal id', () => {
const resolver = { invoke: { binary: 'bd', args: ['show', '{{id}}', '--json'], timeoutMs: TASK_RESOLVER_INVOKE_TIMEOUT_MS } };
assert.deepStrictEqual(buildInvocation(resolver, 'GSD-42'), {
assert.deepStrictEqual(buildInvocation(resolver, 'MSD-42'), {
binary: 'bd',
args: ['show', 'GSD-42', '--json'],
args: ['show', 'MSD-42', '--json'],
timeoutMs: TASK_RESOLVER_INVOKE_TIMEOUT_MS,
});
});
@@ -156,7 +156,7 @@ test('row 7: ambiguous prefix registration throws, never silently picks one', ()
const capA = beadsCapability();
const capB = { ...beadsCapability(), id: 'other-capability' };
assert.throws(
() => resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [capA, capB], execFn: () => { throw new Error('must not be called'); } }),
() => resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [capA, capB], execFn: () => { throw new Error('must not be called'); } }),
ResolverAmbiguousError,
);
});
@@ -173,7 +173,7 @@ test('row 8: non-empty description resolves true with mapped content', () => {
}),
stderr: '',
});
const result = resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn });
const result = resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn });
assert.deepStrictEqual(result, {
kind: TASK_CONTENT_RESULT.RESOLVED,
content: {
@@ -188,26 +188,26 @@ test('row 8: non-empty description resolves true with mapped content', () => {
test('row 9: empty description string resolves empty', () => {
const execFn = () => ({ status: 0, stdout: JSON.stringify({ description: '' }), stderr: '' });
const result = resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn });
const result = resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn });
assert.deepStrictEqual(result, { kind: TASK_CONTENT_RESULT.EMPTY });
});
test('row 9b: whitespace-only description resolves empty', () => {
const execFn = () => ({ status: 0, stdout: JSON.stringify({ description: ' ' }), stderr: '' });
const result = resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn });
const result = resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn });
assert.deepStrictEqual(result, { kind: TASK_CONTENT_RESULT.EMPTY });
});
test('row 10: absent description resolves empty, same as empty string', () => {
const execFn = () => ({ status: 0, stdout: JSON.stringify({}), stderr: '' });
const result = resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn });
const result = resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn });
assert.deepStrictEqual(result, { kind: TASK_CONTENT_RESULT.EMPTY });
});
test('row 11: non-zero resolver exit throws ResolverFailedError, never falls back silently', () => {
const execFn = () => ({ status: 1, stdout: '', stderr: 'no such issue GSD-42' });
const execFn = () => ({ status: 1, stdout: '', stderr: 'no such issue MSD-42' });
assert.throws(
() => resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn }),
() => resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn }),
(err) => {
assert.ok(err instanceof ResolverFailedError);
assert.strictEqual(err.exitCode, 1);
@@ -222,7 +222,7 @@ test('row 11b: a spawn error (e.g. ENOENT) also throws ResolverFailedError', ()
enoent.code = 'ENOENT';
const execFn = () => ({ status: null, stdout: '', stderr: '', error: enoent });
assert.throws(
() => resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn }),
() => resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn }),
ResolverFailedError,
);
});
@@ -230,7 +230,7 @@ test('row 11b: a spawn error (e.g. ENOENT) also throws ResolverFailedError', ()
test('row 12: resolver exceeding timeoutMs throws ResolverTimeoutError (simulated, no real wait)', () => {
const execFn = () => ({ status: null, stdout: '', stderr: '', error: timeoutError() });
assert.throws(
() => resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn }),
() => resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn }),
(err) => {
assert.ok(err instanceof ResolverTimeoutError);
assert.strictEqual(err.timeoutMs, TASK_RESOLVER_INVOKE_TIMEOUT_MS);
@@ -242,7 +242,7 @@ test('row 12: resolver exceeding timeoutMs throws ResolverTimeoutError (simulate
test('row 13: malformed JSON stdout throws, is not conflated with empty content', () => {
const execFn = () => ({ status: 0, stdout: 'not json', stderr: '' });
assert.throws(
() => resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn }),
() => resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn }),
ResolverMalformedOutputError,
);
});
@@ -252,7 +252,7 @@ test('row 14: valid JSON non-object stdout (null/array/string/number/bool) throw
for (const value of cases) {
const execFn = () => ({ status: 0, stdout: JSON.stringify(value), stderr: '' });
assert.throws(
() => resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn }),
() => resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn }),
ResolverMalformedOutputError,
`expected throw for JSON value ${JSON.stringify(value)}`,
);
@@ -265,7 +265,7 @@ test('row 15: invoke.args without {{id}} placeholder is rejected — resolves no
taskContentResolver: { trackerPrefix: 'beads', invoke: { binary: 'bd', args: ['show'], timeoutMs: TASK_RESOLVER_INVOKE_FILLER_TIMEOUT_MS } },
};
const execFn = () => { throw new Error('must not spawn a rejected declaration'); };
const result = resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [badCapability], execFn });
const result = resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [badCapability], execFn });
assert.deepStrictEqual(result, { kind: TASK_CONTENT_RESULT.NO_RESOLVER });
});
@@ -275,8 +275,8 @@ test('row 16: id containing colons splits on first colon only, end to end', () =
capturedArgs = args;
return { status: 0, stdout: JSON.stringify({ description: 'do X' }), stderr: '' };
};
const result = resolveTaskContent({ trackerId: 'beads:issue:GSD-1', capabilities: [beadsCapability()], execFn });
assert.deepStrictEqual(capturedArgs, ['show', 'issue:GSD-1', '--json']);
const result = resolveTaskContent({ trackerId: 'beads:issue:MSD-1', capabilities: [beadsCapability()], execFn });
assert.deepStrictEqual(capturedArgs, ['show', 'issue:MSD-1', '--json']);
assert.strictEqual(result.kind, TASK_CONTENT_RESULT.RESOLVED);
});
@@ -284,7 +284,7 @@ test('row 16: id containing colons splits on first colon only, end to end', () =
test('stderr output on a successful (exit 0) run is not treated as a failure', () => {
const execFn = () => ({ status: 0, stdout: JSON.stringify({ description: 'do X' }), stderr: 'informational log line' });
const result = resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn });
const result = resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn });
assert.strictEqual(result.kind, TASK_CONTENT_RESULT.RESOLVED);
});
@@ -303,7 +303,7 @@ test('property: any valid-JSON-but-not-an-object stdout always throws ResolverMa
(value) => {
const execFn = () => ({ status: 0, stdout: JSON.stringify(value), stderr: '' });
try {
resolveTaskContent({ trackerId: 'beads:GSD-42', capabilities: [beadsCapability()], execFn });
resolveTaskContent({ trackerId: 'beads:MSD-42', capabilities: [beadsCapability()], execFn });
return false;
} catch (err) {
return err instanceof ResolverMalformedOutputError;