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:
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
process.env.GSD_TEST_MODE = '1';
|
||||
process.env.MSD_TEST_MODE = '1';
|
||||
|
||||
const { test, describe } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
@@ -21,7 +21,7 @@ const {
|
||||
REVIEWER_SECTION_MAX,
|
||||
INTERACTION_STRING_MAX,
|
||||
INTERACTION_ARRAY_MAX,
|
||||
isValidGsdRange,
|
||||
isValidMsdRange,
|
||||
validateEntries,
|
||||
renderMarkdown,
|
||||
} = require(path.join(__dirname, '..', 'scripts', 'registry-schema.cjs'));
|
||||
@@ -34,12 +34,12 @@ function validCapabilityEntry() {
|
||||
name: 'My Capability',
|
||||
type: 'capability',
|
||||
repo: 'octocat/my-capability',
|
||||
description: 'Does a useful thing for GSD users.',
|
||||
description: 'Does a useful thing for MSD users.',
|
||||
author: 'Octocat',
|
||||
license: 'MIT',
|
||||
enginesGsd: '>=1.6.0 <3.0.0',
|
||||
install: 'gsd capability install https://github.com/octocat/my-capability.git#v1.0.0',
|
||||
uninstall: 'gsd capability remove my-capability',
|
||||
enginesMsd: '>=1.6.0 <3.0.0',
|
||||
install: 'msd capability install https://github.com/octocat/my-capability.git#v1.0.0',
|
||||
uninstall: 'msd capability remove my-capability',
|
||||
interactions: {
|
||||
loopExtensionPoints: ['execute:pre'],
|
||||
hookKinds: ['step'],
|
||||
@@ -59,10 +59,10 @@ function validEosEntry() {
|
||||
name: 'My Host Plugin',
|
||||
type: 'eos',
|
||||
repo: 'octocat/my-host-plugin',
|
||||
description: 'Embeds GSD as an orchestration engine in My Host.',
|
||||
description: 'Embeds MSD as an orchestration engine in My Host.',
|
||||
author: 'Octocat',
|
||||
license: 'MIT',
|
||||
enginesGsd: '>=1.6.0 <3.0.0',
|
||||
enginesMsd: '>=1.6.0 <3.0.0',
|
||||
install: 'See the My Host plugin marketplace listing.',
|
||||
uninstall: 'Uninstall via the My Host plugin manager.',
|
||||
protocolVersion: 1,
|
||||
@@ -90,12 +90,12 @@ function validReviewerEntry() {
|
||||
name: 'My Reviewer',
|
||||
type: 'reviewer',
|
||||
repo: 'octocat/my-reviewer',
|
||||
description: 'Reviews GSD PRs for a specific concern.',
|
||||
description: 'Reviews MSD PRs for a specific concern.',
|
||||
author: 'Octocat',
|
||||
license: 'MIT',
|
||||
enginesGsd: '>=1.6.0 <3.0.0',
|
||||
install: 'gsd capability install https://github.com/octocat/my-reviewer.git#v1.0.0',
|
||||
uninstall: 'gsd capability remove my-reviewer',
|
||||
enginesMsd: '>=1.6.0 <3.0.0',
|
||||
install: 'msd capability install https://github.com/octocat/my-reviewer.git#v1.0.0',
|
||||
uninstall: 'msd capability remove my-reviewer',
|
||||
interactions: {
|
||||
slug: 'my-reviewer',
|
||||
flags: ['--my-reviewer'],
|
||||
@@ -165,14 +165,14 @@ describe('registry-schema: closed vocabulary constants', () => {
|
||||
test('CAPABILITY_REQUIRED lists the 12 required capability entry fields', () => {
|
||||
assert.deepEqual(CAPABILITY_REQUIRED, [
|
||||
'id', 'name', 'type', 'repo', 'description', 'author', 'license',
|
||||
'enginesGsd', 'install', 'uninstall', 'interactions', 'discussion',
|
||||
'enginesMsd', 'install', 'uninstall', 'interactions', 'discussion',
|
||||
]);
|
||||
});
|
||||
|
||||
test('EOS_REQUIRED lists the 13 required eos entry fields (adds protocolVersion)', () => {
|
||||
assert.deepEqual(EOS_REQUIRED, [
|
||||
'id', 'name', 'type', 'repo', 'description', 'author', 'license',
|
||||
'enginesGsd', 'install', 'uninstall', 'interactions', 'discussion', 'protocolVersion',
|
||||
'enginesMsd', 'install', 'uninstall', 'interactions', 'discussion', 'protocolVersion',
|
||||
]);
|
||||
});
|
||||
});
|
||||
@@ -220,12 +220,12 @@ describe('validateEntries: capability — field shape violations', () => {
|
||||
assert.ok(verdict.errors.some((e) => e.field === 'repo'));
|
||||
});
|
||||
|
||||
test('bad enginesGsd (malformed range) fails', () => {
|
||||
test('bad enginesMsd (malformed range) fails', () => {
|
||||
const entry = validCapabilityEntry();
|
||||
entry.enginesGsd = 'not-a-semver-range';
|
||||
entry.enginesMsd = 'not-a-semver-range';
|
||||
const verdict = validateEntries([entry], { type: 'capability' });
|
||||
assert.equal(verdict.ok, false);
|
||||
assert.ok(verdict.errors.some((e) => e.field === 'enginesGsd'));
|
||||
assert.ok(verdict.errors.some((e) => e.field === 'enginesMsd'));
|
||||
});
|
||||
|
||||
test('bad discussion URL fails', () => {
|
||||
@@ -391,13 +391,13 @@ describe('renderMarkdown', () => {
|
||||
|
||||
test('a recognized type still renders the capability page (guard is not unconditional)', () => {
|
||||
const rendered = renderMarkdown([], { type: 'capability', sourceFile: 'capabilities.json' });
|
||||
assert.equal(rendered.split('\n')[2], '# GSD Community Capability Registry');
|
||||
assert.equal(rendered.split('\n')[2], '# MSD Community Capability Registry');
|
||||
});
|
||||
});
|
||||
|
||||
// ─── isValidGsdRange ────────────────────────────────────────────────────────
|
||||
// ─── isValidMsdRange ────────────────────────────────────────────────────────
|
||||
|
||||
describe('isValidGsdRange', () => {
|
||||
describe('isValidMsdRange', () => {
|
||||
test('fast-check property: well-formed operator+M.N.P ranges are valid', () => {
|
||||
fc.assert(
|
||||
fc.property(
|
||||
@@ -407,7 +407,7 @@ describe('isValidGsdRange', () => {
|
||||
fc.integer({ min: 0, max: 999 }),
|
||||
(op, major, minor, patch) => {
|
||||
const range = `${op}${major}.${minor}.${patch}`;
|
||||
assert.equal(isValidGsdRange(range), true, range);
|
||||
assert.equal(isValidMsdRange(range), true, range);
|
||||
},
|
||||
),
|
||||
);
|
||||
@@ -426,7 +426,7 @@ describe('isValidGsdRange', () => {
|
||||
.array(fc.constantFrom(...'abcdefghijklmnopqrstuvwxyz'.split('')), { minLength: 1, maxLength: 6 })
|
||||
.map((chars) => chars.join('')),
|
||||
(op, letters) => {
|
||||
assert.equal(isValidGsdRange(`${op}${letters}.0.0`), false, `${op}${letters}.0.0`);
|
||||
assert.equal(isValidMsdRange(`${op}${letters}.0.0`), false, `${op}${letters}.0.0`);
|
||||
},
|
||||
),
|
||||
);
|
||||
@@ -434,13 +434,13 @@ describe('isValidGsdRange', () => {
|
||||
|
||||
test('boundary: valid range strings', () => {
|
||||
for (const good of ['1.0.0', '>=1.0.0', '^1.0.0 <2.0.0', '*']) {
|
||||
assert.equal(isValidGsdRange(good), true, good);
|
||||
assert.equal(isValidMsdRange(good), true, good);
|
||||
}
|
||||
});
|
||||
|
||||
test('boundary: invalid range strings', () => {
|
||||
for (const bad of ['1.0', '>=abc', '']) {
|
||||
assert.equal(isValidGsdRange(bad), false, bad);
|
||||
assert.equal(isValidMsdRange(bad), false, bad);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -541,7 +541,7 @@ describe('validateEntries: null/non-object element guard (F2)', () => {
|
||||
describe('renderMarkdown: eos registry (F4)', () => {
|
||||
test('renders the eos heading, the free-form dispatch text, protocol wording, and integration wording', () => {
|
||||
const rendered = renderMarkdown([validEosEntry()], { type: 'eos', sourceFile: 'eos.json' });
|
||||
assert.match(rendered, /# GSD EoS Registry/);
|
||||
assert.match(rendered, /# MSD EoS Registry/);
|
||||
assert.ok(rendered.includes('Supports nested background dispatch up to depth 3.'));
|
||||
assert.match(rendered, /protocol v1/);
|
||||
assert.match(rendered, /integration/);
|
||||
@@ -679,13 +679,13 @@ describe('validateEntries: tightened discussion/license regexes', () => {
|
||||
// REVIEWER_SECTION_MAX vocabulary constants, `interactions` validation, and
|
||||
// renderMarkdown's `type: 'reviewer'` output. They were authored FAILING-FIRST
|
||||
// against the unmodified module, ahead of the implementation. See
|
||||
// .gsd/phase/feat-2904-enh-registries-add-a-reviewer-entry-type/50-test-matrix.md.
|
||||
// .msd/phase/feat-2904-enh-registries-add-a-reviewer-entry-type/50-test-matrix.md.
|
||||
|
||||
describe('registry-schema: reviewer vocabulary constants', () => {
|
||||
test('REVIEWER_REQUIRED lists the 12 required reviewer entry fields', () => {
|
||||
assert.deepEqual(REVIEWER_REQUIRED, [
|
||||
'id', 'name', 'type', 'repo', 'description', 'author', 'license',
|
||||
'enginesGsd', 'install', 'uninstall', 'interactions', 'discussion',
|
||||
'enginesMsd', 'install', 'uninstall', 'interactions', 'discussion',
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -1134,7 +1134,7 @@ describe('validateEntries: reviewer — may-be-empty arrays', () => {
|
||||
describe('renderMarkdown: reviewer registry', () => {
|
||||
test('an empty reviewer catalog renders the reviewer heading, not the capability one', () => {
|
||||
const rendered = renderMarkdown([], { type: 'reviewer', sourceFile: 'reviewers.json' });
|
||||
assert.match(rendered, /# GSD Reviewer Lane Registry/);
|
||||
assert.match(rendered, /# MSD Reviewer Lane Registry/);
|
||||
assert.ok(rendered.includes('_To add your reviewer lane, see the [registry README](./README.md)._'));
|
||||
assert.match(rendered, /No entries yet/);
|
||||
});
|
||||
@@ -1146,7 +1146,7 @@ describe('renderMarkdown: reviewer registry', () => {
|
||||
const expected =
|
||||
`Lane: ${slug}; flags: ${flags.join(', ')}; transport: ${transport}; evidence: ${evidenceClass}; ` +
|
||||
`REVIEWS.md section: ${reviewsSection}`;
|
||||
const line = rendered.split('\n').find((l) => l.startsWith('- **Every interaction with GSD:** '));
|
||||
const line = rendered.split('\n').find((l) => l.startsWith('- **Every interaction with MSD:** '));
|
||||
assert.ok(line, `expected the summary bullet line, got: ${rendered}`);
|
||||
assert.ok(line.includes(expected), `expected summary to include "${expected}", got: ${line}`);
|
||||
});
|
||||
@@ -1187,7 +1187,7 @@ describe('renderMarkdown: reviewer registry', () => {
|
||||
);
|
||||
assert.ok(rendered.includes('\\['), 'expected an escaped [ (\\[)');
|
||||
|
||||
const line = rendered.split('\n').find((l) => l.startsWith('- **Every interaction with GSD:** '));
|
||||
const line = rendered.split('\n').find((l) => l.startsWith('- **Every interaction with MSD:** '));
|
||||
assert.ok(line, 'expected the summary bullet line');
|
||||
assert.ok(!line.includes('```evil```'), 'expected the raw backtick run in reviewsSection to be escaped');
|
||||
assert.ok(!line.includes('<script>'), 'expected angle brackets in reviewsSection to be escaped');
|
||||
@@ -1202,8 +1202,8 @@ describe('renderMarkdown: capability and eos rendering are unchanged by the thir
|
||||
// implemented (git rev 9f567a162, unmodified scripts/registry-schema.cjs).
|
||||
// The reviewer feature must not perturb a single byte of capability/eos
|
||||
// output — this is the regression pin for matrix row 55.
|
||||
const GOLDEN_CAPABILITY_MD = "<!-- GENERATED by scripts/gen-registry.cjs from docs/registries/capabilities.json — do not edit by hand; run `npm run gen:registry` -->\n\n# GSD Community Capability Registry\n\n> **Not an endorsement.** Inclusion means only that a maintainer merged a PR linking the author's repository — GSD has not reviewed, tested, or verified any listing. See the [registry README](./README.md).\n\n_To add your capability, see the [registry README](./README.md)._\n\n| Name | What it is | Latest release | GSD compat | Discussion |\n|---|---|---|---|---|\n| [My Capability](https://github.com/octocat/my-capability) | Does a useful thing for GSD users. |  | `>=1.6.0 <3.0.0` | [discuss](https://github.com/octocat/my-capability/discussions/1) |\n\n## My Capability\n- **Repository:** https://github.com/octocat/my-capability — [latest release](https://github.com/octocat/my-capability/releases/latest)\n- **What it is:** Does a useful thing for GSD users.\n- **Author:** Octocat\n- **Every interaction with GSD:** Loop Extension Points: execute:pre; hook kinds: step; configKeys: myCapability.enabled; runtimeCompat: all\n- **Install:**\n```sh\ngsd capability install https://github.com/octocat/my-capability.git#v1.0.0\n```\n- **Uninstall:**\n```sh\ngsd capability remove my-capability\n```\n- **GSD compatibility:** `>=1.6.0 <3.0.0`\n- **License:** MIT\n- **Discussion / ranking:** https://github.com/octocat/my-capability/discussions/1\n";
|
||||
const GOLDEN_EOS_MD = "<!-- GENERATED by scripts/gen-registry.cjs from docs/registries/eos.json — do not edit by hand; run `npm run gen:registry` -->\n\n# GSD EoS Registry\n\n> **Not an endorsement.** Inclusion means only that a maintainer merged a PR linking the author's repository — GSD has not reviewed, tested, or verified any listing. See the [registry README](./README.md).\n\n_To add your integration, see the [registry README](./README.md)._\n\n| Name | What it is | Latest release | GSD compat | Discussion |\n|---|---|---|---|---|\n| [My Host Plugin](https://github.com/octocat/my-host-plugin) | Embeds GSD as an orchestration engine in My Host. |  | `>=1.6.0 <3.0.0` | [discuss](https://github.com/octocat/my-host-plugin/discussions/2) |\n\n## My Host Plugin\n- **Repository:** https://github.com/octocat/my-host-plugin — [latest release](https://github.com/octocat/my-host-plugin/releases/latest)\n- **What it is:** Embeds GSD as an orchestration engine in My Host.\n- **Author:** Octocat\n- **Every interaction with GSD:** Interface points: command, state; profile: programmatic-cli; protocol v1; axes: embeddingMode=imperative, commandSurface=slash-file, dispatch=Supports nested background dispatch up to depth 3., modelMode=active, hookBus=host, stateIO=filesystem, transport=mcp, runtime=node\n- **Install:**\n```sh\nSee the My Host plugin marketplace listing.\n```\n- **Uninstall:**\n```sh\nUninstall via the My Host plugin manager.\n```\n- **GSD compatibility:** `>=1.6.0 <3.0.0`, protocol v1\n- **License:** MIT\n- **Discussion / ranking:** https://github.com/octocat/my-host-plugin/discussions/2\n";
|
||||
const GOLDEN_CAPABILITY_MD = "<!-- GENERATED by scripts/gen-registry.cjs from docs/registries/capabilities.json — do not edit by hand; run `npm run gen:registry` -->\n\n# MSD Community Capability Registry\n\n> **Not an endorsement.** Inclusion means only that a maintainer merged a PR linking the author's repository — MSD has not reviewed, tested, or verified any listing. See the [registry README](./README.md).\n\n_To add your capability, see the [registry README](./README.md)._\n\n| Name | What it is | Latest release | MSD compat | Discussion |\n|---|---|---|---|---|\n| [My Capability](https://github.com/octocat/my-capability) | Does a useful thing for MSD users. |  | `>=1.6.0 <3.0.0` | [discuss](https://github.com/octocat/my-capability/discussions/1) |\n\n## My Capability\n- **Repository:** https://github.com/octocat/my-capability — [latest release](https://github.com/octocat/my-capability/releases/latest)\n- **What it is:** Does a useful thing for MSD users.\n- **Author:** Octocat\n- **Every interaction with MSD:** Loop Extension Points: execute:pre; hook kinds: step; configKeys: myCapability.enabled; runtimeCompat: all\n- **Install:**\n```sh\nmsd capability install https://github.com/octocat/my-capability.git#v1.0.0\n```\n- **Uninstall:**\n```sh\nmsd capability remove my-capability\n```\n- **MSD compatibility:** `>=1.6.0 <3.0.0`\n- **License:** MIT\n- **Discussion / ranking:** https://github.com/octocat/my-capability/discussions/1\n";
|
||||
const GOLDEN_EOS_MD = "<!-- GENERATED by scripts/gen-registry.cjs from docs/registries/eos.json — do not edit by hand; run `npm run gen:registry` -->\n\n# MSD EoS Registry\n\n> **Not an endorsement.** Inclusion means only that a maintainer merged a PR linking the author's repository — MSD has not reviewed, tested, or verified any listing. See the [registry README](./README.md).\n\n_To add your integration, see the [registry README](./README.md)._\n\n| Name | What it is | Latest release | MSD compat | Discussion |\n|---|---|---|---|---|\n| [My Host Plugin](https://github.com/octocat/my-host-plugin) | Embeds MSD as an orchestration engine in My Host. |  | `>=1.6.0 <3.0.0` | [discuss](https://github.com/octocat/my-host-plugin/discussions/2) |\n\n## My Host Plugin\n- **Repository:** https://github.com/octocat/my-host-plugin — [latest release](https://github.com/octocat/my-host-plugin/releases/latest)\n- **What it is:** Embeds MSD as an orchestration engine in My Host.\n- **Author:** Octocat\n- **Every interaction with MSD:** Interface points: command, state; profile: programmatic-cli; protocol v1; axes: embeddingMode=imperative, commandSurface=slash-file, dispatch=Supports nested background dispatch up to depth 3., modelMode=active, hookBus=host, stateIO=filesystem, transport=mcp, runtime=node\n- **Install:**\n```sh\nSee the My Host plugin marketplace listing.\n```\n- **Uninstall:**\n```sh\nUninstall via the My Host plugin manager.\n```\n- **MSD compatibility:** `>=1.6.0 <3.0.0`, protocol v1\n- **License:** MIT\n- **Discussion / ranking:** https://github.com/octocat/my-host-plugin/discussions/2\n";
|
||||
|
||||
test('capability rendering is byte-identical to the pre-reviewer-type golden output', () => {
|
||||
const rendered = renderMarkdown([validCapabilityEntry()], { type: 'capability', sourceFile: 'capabilities.json' });
|
||||
@@ -1359,7 +1359,7 @@ describe('validateEntries: regression — hostile interactions entry can no long
|
||||
description: 'd',
|
||||
author: 'a',
|
||||
license: 'MIT',
|
||||
enginesGsd: '>=1.6.0',
|
||||
enginesMsd: '>=1.6.0',
|
||||
install: 'i',
|
||||
uninstall: 'u',
|
||||
discussion: 'https://github.com/o/r/discussions/1',
|
||||
|
||||
Reference in New Issue
Block a user