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:
@@ -2,17 +2,17 @@
|
||||
|
||||
/**
|
||||
* quick-batch-command-router.test.cjs — Behavioral tests for the
|
||||
* `gsd-tools quick-batch` command router (#3676, Phase 4 of epic #3344 /
|
||||
* `msd-tools quick-batch` command router (#3676, Phase 4 of epic #3344 /
|
||||
* ADR-1239 "Quick-batch binding").
|
||||
*
|
||||
* Module: gsd-core/bin/lib/quick-batch-command-router.cjs
|
||||
* Module: msd-core/bin/lib/quick-batch-command-router.cjs
|
||||
* (compiled from src/quick-batch-command-router.cts)
|
||||
*
|
||||
* Follows `tests/roadmap-command-router.test.cjs`'s pattern: unit-level
|
||||
* tests inject `_quickBatch`/`_quickBatchDispatch` mocks (same `_`-prefix
|
||||
* seam convention `graphify-command-router.cts` established) and assert on
|
||||
* recorded call shapes; a smaller set of end-to-end tests drive the REAL
|
||||
* compiled router through `gsd-tools quick-batch <verb>` via `runGsdTools`
|
||||
* compiled router through `msd-tools quick-batch <verb>` via `runMsdTools`
|
||||
* to prove the `HOST_COMMAND_ROUTERS` wiring itself (test-matrix rows 46-47).
|
||||
*/
|
||||
|
||||
@@ -22,8 +22,8 @@ const fs = require('fs');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
|
||||
const { routeQuickBatchCommand } = require('../gsd-core/bin/lib/quick-batch-command-router.cjs');
|
||||
const { runGsdTools, cleanup } = require('./helpers.cjs');
|
||||
const { routeQuickBatchCommand } = require('../msd-core/bin/lib/quick-batch-command-router.cjs');
|
||||
const { runMsdTools, cleanup } = require('./helpers.cjs');
|
||||
|
||||
function mkTmpProject() {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'quick-batch-router-'));
|
||||
@@ -162,7 +162,7 @@ describe('quick-batch-command-router: argument shaping (mocked modules)', () =>
|
||||
_quickBatch: {},
|
||||
_quickBatchDispatch: {},
|
||||
});
|
||||
assert.match(message, /Usage: gsd-tools quick-batch complete/);
|
||||
assert.match(message, /Usage: msd-tools quick-batch complete/);
|
||||
});
|
||||
|
||||
test('effective-concurrency forwards jobs/task-count/capacity/isolation/mutating to the dispatch module', () => {
|
||||
@@ -331,7 +331,7 @@ describe('quick-batch-command-router: argument shaping (mocked modules)', () =>
|
||||
_quickBatch: {},
|
||||
_quickBatchDispatch: {},
|
||||
});
|
||||
assert.match(message, /Usage: gsd-tools quick-batch cleanup-entry/);
|
||||
assert.match(message, /Usage: msd-tools quick-batch cleanup-entry/);
|
||||
});
|
||||
|
||||
test('cleanup-entry forwards all fields, defaulting --agent-id to null when omitted', () => {
|
||||
@@ -439,11 +439,11 @@ describe('quick-batch-command-router: argument shaping (mocked modules)', () =>
|
||||
|
||||
// ─── End-to-end: real router wiring via HOST_COMMAND_ROUTERS (rows 46-47) ──
|
||||
|
||||
describe('quick-batch-command-router: end-to-end via gsd-tools (rows 46-47)', () => {
|
||||
describe('quick-batch-command-router: end-to-end via msd-tools (rows 46-47)', () => {
|
||||
test('row 47: unknown subcommand errors via the Hub\'s manifest check, same shape as graphify\'s', () => {
|
||||
const dir = mkTmpProject();
|
||||
try {
|
||||
const result = runGsdTools(['quick-batch', 'nonsense'], dir);
|
||||
const result = runMsdTools(['quick-batch', 'nonsense'], dir);
|
||||
assert.equal(result.success, false);
|
||||
assert.match(result.error, /Unknown quick-batch subcommand\. Available:/);
|
||||
} finally {
|
||||
@@ -457,12 +457,12 @@ describe('quick-batch-command-router: end-to-end via gsd-tools (rows 46-47)', ()
|
||||
const tasksFile = path.join(dir, '.planning', 'tasks.md');
|
||||
fs.writeFileSync(tasksFile, '- first task\n- second task\n');
|
||||
|
||||
const created = runGsdTools(['quick-batch', 'create', '--file', tasksFile, '--raw'], dir);
|
||||
const created = runMsdTools(['quick-batch', 'create', '--file', tasksFile, '--raw'], dir);
|
||||
assert.equal(created.success, true, `create failed: ${created.error}`);
|
||||
const createdJson = JSON.parse(created.output);
|
||||
assert.ok(createdJson.batchId);
|
||||
|
||||
const resumed = runGsdTools(['quick-batch', 'resume', '--batch', createdJson.batchId, '--raw'], dir);
|
||||
const resumed = runMsdTools(['quick-batch', 'resume', '--batch', createdJson.batchId, '--raw'], dir);
|
||||
assert.equal(resumed.success, true, `resume failed: ${resumed.error}`);
|
||||
const resumedJson = JSON.parse(resumed.output);
|
||||
assert.equal(resumedJson.eligible.length, 2, 'both items are eligible before any leaf runs');
|
||||
@@ -474,7 +474,7 @@ describe('quick-batch-command-router: end-to-end via gsd-tools (rows 46-47)', ()
|
||||
test('effective-concurrency verb is reachable end-to-end and returns a number', () => {
|
||||
const dir = mkTmpProject();
|
||||
try {
|
||||
const result = runGsdTools(['quick-batch', 'effective-concurrency', '--jobs', 'auto', '--task-count', '5', '--capacity', '3', '--isolation', 'harness-worktree', '--raw'], dir);
|
||||
const result = runMsdTools(['quick-batch', 'effective-concurrency', '--jobs', 'auto', '--task-count', '5', '--capacity', '3', '--isolation', 'harness-worktree', '--raw'], dir);
|
||||
assert.equal(result.success, true, `command failed: ${result.error}`);
|
||||
assert.deepEqual(JSON.parse(result.output), { concurrency: 3 });
|
||||
} finally {
|
||||
@@ -493,7 +493,7 @@ describe('quick-batch-command-router: end-to-end via gsd-tools (rows 46-47)', ()
|
||||
test(`--jobs ${badJobs} is rejected and .planning/quick-batches/ stays absent`, () => {
|
||||
const dir = mkTmpProject();
|
||||
try {
|
||||
const result = runGsdTools(['quick-batch', 'parse-args', '--raw', '--text', `--jobs ${badJobs}`], dir);
|
||||
const result = runMsdTools(['quick-batch', 'parse-args', '--raw', '--text', `--jobs ${badJobs}`], dir);
|
||||
assert.equal(result.success, false, `expected rejection for --jobs ${badJobs}`);
|
||||
assert.equal(
|
||||
fs.existsSync(path.join(dir, '.planning', 'quick-batches')),
|
||||
@@ -515,7 +515,7 @@ describe('quick-batch-command-router: end-to-end via gsd-tools (rows 46-47)', ()
|
||||
try {
|
||||
// No .planning/quick-batches/<id>/ directory exists at all for this id —
|
||||
// never created, never touched by any prior call in this test.
|
||||
const result = runGsdTools(['quick-batch', 'resume', '--batch', '999999-zzz', '--raw'], dir);
|
||||
const result = runMsdTools(['quick-batch', 'resume', '--batch', '999999-zzz', '--raw'], dir);
|
||||
assert.equal(result.success, false);
|
||||
assert.match(result.error, /no BATCH\.json found for batch 999999-zzz/);
|
||||
assert.equal(
|
||||
|
||||
Reference in New Issue
Block a user