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:
@@ -29,11 +29,11 @@ function bugBody(versionValue) {
|
||||
const versionSection =
|
||||
versionValue === undefined
|
||||
? '' // no section at all
|
||||
: `### GSD Version\n\n${versionValue}\n\n`;
|
||||
: `### MSD Version\n\n${versionValue}\n\n`;
|
||||
return (
|
||||
versionSection +
|
||||
'### What happened?\n\nSomething broke.\n\n' +
|
||||
'### Steps to reproduce\n\n1. Run gsd\n2. Observe error\n\n' +
|
||||
'### Steps to reproduce\n\n1. Run msd\n2. Observe error\n\n' +
|
||||
'### Expected behavior\n\nIt should work.'
|
||||
);
|
||||
}
|
||||
@@ -122,21 +122,21 @@ describe('hasExemptLabel', () => {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
describe('hasVersionHeading', () => {
|
||||
test('true for "### GSD Version" heading', () => {
|
||||
test('true for "### MSD Version" heading', () => {
|
||||
assert.equal(hasVersionHeading(bugBody('1.18.0')), true);
|
||||
});
|
||||
|
||||
test('false for "### Version" (without GSD prefix — bare Version no longer matches)', () => {
|
||||
test('false for "### Version" (without MSD prefix — bare Version no longer matches)', () => {
|
||||
assert.equal(hasVersionHeading('### Version\n\n1.0.0'), false);
|
||||
});
|
||||
|
||||
test('true for h1 "# GSD Version"', () => {
|
||||
assert.equal(hasVersionHeading('# GSD Version\n\n1.0.0'), true);
|
||||
test('true for h1 "# MSD Version"', () => {
|
||||
assert.equal(hasVersionHeading('# MSD Version\n\n1.0.0'), true);
|
||||
});
|
||||
|
||||
test('false for body with no version heading', () => {
|
||||
assert.equal(
|
||||
hasVersionHeading('### What happened?\n\nSomething broke.\n\n### Steps to reproduce\n\n1. Run gsd'),
|
||||
hasVersionHeading('### What happened?\n\nSomething broke.\n\n### Steps to reproduce\n\n1. Run msd'),
|
||||
false,
|
||||
);
|
||||
});
|
||||
@@ -162,28 +162,28 @@ describe('extractVersion', () => {
|
||||
});
|
||||
|
||||
test('returns null when section is absent', () => {
|
||||
// bugBody with no arg produces no ### GSD Version section
|
||||
// bugBody with no arg produces no ### MSD Version section
|
||||
const body = bugBody(undefined);
|
||||
assert.equal(extractVersion(body), null);
|
||||
});
|
||||
|
||||
test('returns "" when section present but value is blank line', () => {
|
||||
const body = '### GSD Version\n\n\n### What happened?\n\nSomething broke.';
|
||||
const body = '### MSD Version\n\n\n### What happened?\n\nSomething broke.';
|
||||
assert.equal(extractVersion(body), '');
|
||||
});
|
||||
|
||||
test('returns "_No response_" raw string for GitHub placeholder (isValidVersion will reject it)', () => {
|
||||
const body = '### GSD Version\n\n_No response_\n\n### What happened?';
|
||||
const body = '### MSD Version\n\n_No response_\n\n### What happened?';
|
||||
assert.equal(extractVersion(body), '_No response_');
|
||||
});
|
||||
|
||||
test('trims surrounding blank lines from extracted value', () => {
|
||||
const body = '### GSD Version\n\n\n 1.18.0 \n\n### What happened?';
|
||||
const body = '### MSD Version\n\n\n 1.18.0 \n\n### What happened?';
|
||||
assert.equal(extractVersion(body), '1.18.0');
|
||||
});
|
||||
|
||||
test('stops at the next section heading', () => {
|
||||
const body = '### GSD Version\n\n1.4.1\n\n### What happened?\n\n1.18.0';
|
||||
const body = '### MSD Version\n\n1.4.1\n\n### What happened?\n\n1.18.0';
|
||||
assert.equal(extractVersion(body), '1.4.1');
|
||||
});
|
||||
|
||||
@@ -196,7 +196,7 @@ describe('extractVersion', () => {
|
||||
});
|
||||
|
||||
test('handles CRLF line endings', () => {
|
||||
const body = '### GSD Version\r\n\r\n1.18.0\r\n\r\n### What happened?';
|
||||
const body = '### MSD Version\r\n\r\n1.18.0\r\n\r\n### What happened?';
|
||||
assert.equal(extractVersion(body), '1.18.0');
|
||||
});
|
||||
});
|
||||
@@ -296,13 +296,13 @@ describe('isBugReport', () => {
|
||||
assert.equal(isBugReport({ labels: ['Bug'], body: '' }), true);
|
||||
});
|
||||
|
||||
test('true when no bug label but body has "### GSD Version" heading', () => {
|
||||
test('true when no bug label but body has "### MSD Version" heading', () => {
|
||||
// API-filed bug: copied template body but omitted labels
|
||||
const body = bugBody('1.18.0');
|
||||
assert.equal(isBugReport({ labels: [], body }), true);
|
||||
});
|
||||
|
||||
test('false when no bug label and body has bare "### Version" heading (no GSD prefix — not matched)', () => {
|
||||
test('false when no bug label and body has bare "### Version" heading (no MSD prefix — not matched)', () => {
|
||||
assert.equal(isBugReport({ labels: [], body: '### Version\n\n1.0.0\n\n### Steps' }), false);
|
||||
});
|
||||
|
||||
@@ -333,7 +333,7 @@ describe('evaluateVersionGate', () => {
|
||||
});
|
||||
|
||||
test('bug label + no version section → close / missing-version', () => {
|
||||
// bug label present but body has no ### GSD Version section
|
||||
// bug label present but body has no ### MSD Version section
|
||||
const result = evaluateVersionGate({
|
||||
labels: ['bug'],
|
||||
body: '### What happened?\n\nSomething broke.',
|
||||
@@ -341,10 +341,10 @@ describe('evaluateVersionGate', () => {
|
||||
assert.deepEqual(result, { action: 'close', reason: 'missing-version' });
|
||||
});
|
||||
|
||||
test('bug label + ### GSD Version section present but blank → close / invalid-version', () => {
|
||||
test('bug label + ### MSD Version section present but blank → close / invalid-version', () => {
|
||||
const result = evaluateVersionGate({
|
||||
labels: ['bug'],
|
||||
body: '### GSD Version\n\n\n### What happened?\n\nSomething broke.',
|
||||
body: '### MSD Version\n\n\n### What happened?\n\nSomething broke.',
|
||||
});
|
||||
assert.deepEqual(result, { action: 'close', reason: 'invalid-version' });
|
||||
});
|
||||
@@ -391,23 +391,23 @@ describe('evaluateVersionGate', () => {
|
||||
assert.deepEqual(result, { action: 'skip', reason: 'valid-version' });
|
||||
});
|
||||
|
||||
test('no bug label and no version heading (body omits GSD Version section entirely) → skip / not-a-bug', () => {
|
||||
// bugBody(undefined) produces NO ### GSD Version section, so isBugReport
|
||||
test('no bug label and no version heading (body omits MSD Version section entirely) → skip / not-a-bug', () => {
|
||||
// bugBody(undefined) produces NO ### MSD Version section, so isBugReport
|
||||
// returns false via both label and heading paths → not a bug report at all.
|
||||
const result = evaluateVersionGate({ labels: [], body: bugBody(undefined) });
|
||||
assert.deepEqual(result, { action: 'skip', reason: 'not-a-bug' });
|
||||
});
|
||||
|
||||
test('no bug label but body has GSD Version heading with invalid value "idk" → isBugReport true via heading fallback → close / invalid-version', () => {
|
||||
// API-filed bug: body includes ### GSD Version heading (isBugReport = true)
|
||||
test('no bug label but body has MSD Version heading with invalid value "idk" → isBugReport true via heading fallback → close / invalid-version', () => {
|
||||
// API-filed bug: body includes ### MSD Version heading (isBugReport = true)
|
||||
// but the value is a junk string that fails isValidVersion.
|
||||
const result = evaluateVersionGate({ labels: [], body: bugBody('idk') });
|
||||
assert.deepEqual(result, { action: 'close', reason: 'invalid-version' });
|
||||
});
|
||||
|
||||
test('API-filed bug: version heading present but empty, no bug label → close / invalid-version', () => {
|
||||
// Body has the ### GSD Version heading but the value is empty (heading present → invalid, not missing)
|
||||
const body = '### GSD Version\n\n\n### What happened?\n\nSomething broke.';
|
||||
// Body has the ### MSD Version heading but the value is empty (heading present → invalid, not missing)
|
||||
const body = '### MSD Version\n\n\n### What happened?\n\nSomething broke.';
|
||||
const result = evaluateVersionGate({ labels: [], body });
|
||||
assert.deepEqual(result, { action: 'close', reason: 'invalid-version' });
|
||||
});
|
||||
@@ -417,15 +417,15 @@ describe('evaluateVersionGate', () => {
|
||||
assert.deepEqual(result, { action: 'skip', reason: 'valid-version' });
|
||||
});
|
||||
|
||||
test('CRLF body with GSD Version 1.18.0 → skip / valid-version', () => {
|
||||
test('CRLF body with MSD Version 1.18.0 → skip / valid-version', () => {
|
||||
const body =
|
||||
'### GSD Version\r\n\r\n1.18.0\r\n\r\n### What happened?\r\n\r\nBoom.';
|
||||
'### MSD Version\r\n\r\n1.18.0\r\n\r\n### What happened?\r\n\r\nBoom.';
|
||||
const result = evaluateVersionGate({ labels: ['bug'], body });
|
||||
assert.deepEqual(result, { action: 'skip', reason: 'valid-version' });
|
||||
});
|
||||
|
||||
test('GSD Version is the last section with value on final line (no trailing newline) → skip / valid-version', () => {
|
||||
const body = '### What happened?\n\nBoom.\n\n### GSD Version\n\n1.18.0';
|
||||
test('MSD Version is the last section with value on final line (no trailing newline) → skip / valid-version', () => {
|
||||
const body = '### What happened?\n\nBoom.\n\n### MSD Version\n\n1.18.0';
|
||||
const result = evaluateVersionGate({ labels: ['bug'], body });
|
||||
assert.deepEqual(result, { action: 'skip', reason: 'valid-version' });
|
||||
});
|
||||
@@ -435,7 +435,7 @@ describe('evaluateVersionGate', () => {
|
||||
// Additional isBugReport tests
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
describe('isBugReport — bare Version heading (no GSD prefix)', () => {
|
||||
describe('isBugReport — bare Version heading (no MSD prefix)', () => {
|
||||
test('bare "### Version" heading, no bug label → false (not treated as bug)', () => {
|
||||
assert.equal(isBugReport({ labels: [], body: '### Version\n\n1.0.0\n\n### Steps' }), false);
|
||||
});
|
||||
@@ -446,23 +446,23 @@ describe('isBugReport — bare Version heading (no GSD prefix)', () => {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
describe('isBugReport — labels are authoritative', () => {
|
||||
test('labels ["enhancement"] + body with "### GSD Version" heading → false (labels win)', () => {
|
||||
const body = '### GSD Version\n\n_No response_\n\n### What happened?\n\nSomething broke.';
|
||||
test('labels ["enhancement"] + body with "### MSD Version" heading → false (labels win)', () => {
|
||||
const body = '### MSD Version\n\n_No response_\n\n### What happened?\n\nSomething broke.';
|
||||
assert.equal(isBugReport({ labels: ['enhancement'], body }), false);
|
||||
});
|
||||
|
||||
test('labels ["enhancement","needs-review"] + body with "### GSD Version" heading → false', () => {
|
||||
const body = '### GSD Version\n\n_No response_\n\n### What happened?\n\nSomething broke.';
|
||||
test('labels ["enhancement","needs-review"] + body with "### MSD Version" heading → false', () => {
|
||||
const body = '### MSD Version\n\n_No response_\n\n### What happened?\n\nSomething broke.';
|
||||
assert.equal(isBugReport({ labels: ['enhancement', 'needs-review'], body }), false);
|
||||
});
|
||||
|
||||
test('labels [] (unlabeled) + body with "### GSD Version" heading → true (heading fallback)', () => {
|
||||
const body = '### GSD Version\n\n1.18.0\n\n### What happened?\n\nSomething broke.';
|
||||
test('labels [] (unlabeled) + body with "### MSD Version" heading → true (heading fallback)', () => {
|
||||
const body = '### MSD Version\n\n1.18.0\n\n### What happened?\n\nSomething broke.';
|
||||
assert.equal(isBugReport({ labels: [], body }), true);
|
||||
});
|
||||
|
||||
test('labels ["bug"] + body with "### GSD Version" heading → true (bug label fast-path)', () => {
|
||||
const body = '### GSD Version\n\n1.18.0\n\n### What happened?\n\nSomething broke.';
|
||||
test('labels ["bug"] + body with "### MSD Version" heading → true (bug label fast-path)', () => {
|
||||
const body = '### MSD Version\n\n1.18.0\n\n### What happened?\n\nSomething broke.';
|
||||
assert.equal(isBugReport({ labels: ['bug'], body }), true);
|
||||
});
|
||||
});
|
||||
@@ -491,9 +491,9 @@ describe('renderCloseComment', () => {
|
||||
assert.ok(comment.includes(VERSION_GATE_MARKER), `expected marker in comment: ${comment}`);
|
||||
});
|
||||
|
||||
test('contains the words "GSD Version"', () => {
|
||||
test('contains the words "MSD Version"', () => {
|
||||
const comment = renderCloseComment();
|
||||
assert.ok(comment.includes('GSD Version'), `expected "GSD Version" in comment: ${comment}`);
|
||||
assert.ok(comment.includes('MSD Version'), `expected "MSD Version" in comment: ${comment}`);
|
||||
});
|
||||
|
||||
test('contains reopen instructions', () => {
|
||||
@@ -517,8 +517,8 @@ describe('renderCloseComment', () => {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
describe('evaluateVersionGate — labels authoritative', () => {
|
||||
test('labels ["enhancement"] + body with "### GSD Version" heading → skip / not-a-bug', () => {
|
||||
const body = '### GSD Version\n\nidk\n\n### What happened?\n\nSomething broke.';
|
||||
test('labels ["enhancement"] + body with "### MSD Version" heading → skip / not-a-bug', () => {
|
||||
const body = '### MSD Version\n\nidk\n\n### What happened?\n\nSomething broke.';
|
||||
const result = evaluateVersionGate({ labels: ['enhancement'], body });
|
||||
assert.deepEqual(result, { action: 'skip', reason: 'not-a-bug' });
|
||||
});
|
||||
@@ -529,9 +529,9 @@ describe('evaluateVersionGate — labels authoritative', () => {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
describe('extractVersion — double heading', () => {
|
||||
test('two "### GSD Version" headings: first section "_No response_", second "1.18.0" → returns "_No response_" (first wins)', () => {
|
||||
test('two "### MSD Version" headings: first section "_No response_", second "1.18.0" → returns "_No response_" (first wins)', () => {
|
||||
const body =
|
||||
'### GSD Version\n\n_No response_\n\n### GSD Version\n\n1.18.0\n\n### What happened?\n\nBoom.';
|
||||
'### MSD Version\n\n_No response_\n\n### MSD Version\n\n1.18.0\n\n### What happened?\n\nBoom.';
|
||||
assert.equal(extractVersion(body), '_No response_');
|
||||
});
|
||||
});
|
||||
@@ -539,7 +539,7 @@ describe('extractVersion — double heading', () => {
|
||||
describe('evaluateVersionGate — double heading', () => {
|
||||
test('labels ["bug"] + double-heading body (first "_No response_") → close / invalid-version (first heading wins)', () => {
|
||||
const body =
|
||||
'### GSD Version\n\n_No response_\n\n### GSD Version\n\n1.18.0\n\n### What happened?\n\nBoom.';
|
||||
'### MSD Version\n\n_No response_\n\n### MSD Version\n\n1.18.0\n\n### What happened?\n\nBoom.';
|
||||
const result = evaluateVersionGate({ labels: ['bug'], body });
|
||||
assert.deepEqual(result, { action: 'close', reason: 'invalid-version' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user