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

@@ -6,7 +6,7 @@
* issue #1355: read-only detector for claude-code's experimental agent-teams.
* Uses node:test + node:assert/strict.
* Pure-function tests (resolveTeamsStatus) pass {runtime, env} directly — no I/O.
* End-to-end tests use gsd-tools CLI via spawnSync with explicit hermetic envs.
* End-to-end tests use msd-tools CLI via spawnSync with explicit hermetic envs.
*/
const { describe, test } = require('node:test');
@@ -14,23 +14,23 @@ const assert = require('node:assert/strict');
const path = require('node:path');
const { spawnSync } = require('node:child_process');
const { resolveTeamsStatus } = require('../gsd-core/bin/lib/teams-status.cjs');
const { resolveTeamsStatus } = require('../msd-core/bin/lib/teams-status.cjs');
/**
* Reuses the existing PROBE_TIMEOUT_MS constant rather than declaring a
* new one, despite this batch's own issue (#4525, epic #4445) cautioning
* against forcing a "long-lived status renderer" onto PROBE_TIMEOUT_MS
* without checking. Checked directly: gsd-core/bin/lib/teams-status.cjs's
* cmdTeamsStatus (what these 5 sites spawn via `gsd-tools.cjs query
* without checking. Checked directly: msd-core/bin/lib/teams-status.cjs's
* cmdTeamsStatus (what these 5 sites spawn via `msd-tools.cjs query
* teams-status`) is a lightweight env-truthiness check plus one fast
* synchronous runtime resolution -- no rendering, no subprocess fan-out --
* genuinely matching PROBE_TIMEOUT_MS's class, not the heavier
* "long-lived renderer" class the issue's caution targets (that class is
* hooks/gsd-statusline.js, correctly kept off PROBE_TIMEOUT_MS in this
* same batch's sibling file, tests/gsd-statusline.test.cjs).
* hooks/msd-statusline.js, correctly kept off PROBE_TIMEOUT_MS in this
* same batch's sibling file, tests/msd-statusline.test.cjs).
*/
const { PROBE_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
const gsdToolsPath = path.resolve(__dirname, '..', 'gsd-core', 'bin', 'gsd-tools.cjs');
const msdToolsPath = path.resolve(__dirname, '..', 'msd-core', 'bin', 'msd-tools.cjs');
// ─── resolveTeamsStatus — pure unit tests ─────────────────────────────────────
@@ -112,7 +112,7 @@ describe('resolveTeamsStatus — pure unit tests', () => {
/**
* Build a minimal hermetic env for subprocess tests.
* NEVER inherit the dev shell env — always set GSD_RUNTIME and
* NEVER inherit the dev shell env — always set MSD_RUNTIME and
* CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS explicitly.
*/
function makeEnv({ runtime, teamsFlag } = {}) {
@@ -120,25 +120,25 @@ function makeEnv({ runtime, teamsFlag } = {}) {
const env = {
PATH: process.env['PATH'] || '',
HOME: process.env['HOME'] || '',
// Prevent any ambient GSD env from leaking in
// Prevent any ambient MSD env from leaking in
};
if (runtime !== undefined) env['GSD_RUNTIME'] = runtime;
if (runtime !== undefined) env['MSD_RUNTIME'] = runtime;
if (teamsFlag !== undefined) env['CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS'] = teamsFlag;
return env;
}
describe('gsd-tools query teams-status — CLI subprocess tests', () => {
test('default: prints JSON with correct shape (GSD_RUNTIME=claude, flag=1)', () => {
describe('msd-tools query teams-status — CLI subprocess tests', () => {
test('default: prints JSON with correct shape (MSD_RUNTIME=claude, flag=1)', () => {
const result = spawnSync(
process.execPath,
[gsdToolsPath, 'query', 'teams-status'],
[msdToolsPath, 'query', 'teams-status'],
{
encoding: 'utf8',
timeout: PROBE_TIMEOUT_MS,
env: makeEnv({ runtime: 'claude', teamsFlag: '1' }),
},
);
assert.strictEqual(result.status, 0, `gsd-tools exited ${result.status}: ${result.stderr}`);
assert.strictEqual(result.status, 0, `msd-tools exited ${result.status}: ${result.stderr}`);
const status = JSON.parse(result.stdout);
assert.strictEqual(status.active, true, 'active should be true');
assert.strictEqual(status.env_present, true, 'env_present should be true');
@@ -153,23 +153,23 @@ describe('gsd-tools query teams-status — CLI subprocess tests', () => {
test('default: prints JSON with active=false when flag unset', () => {
const result = spawnSync(
process.execPath,
[gsdToolsPath, 'query', 'teams-status'],
[msdToolsPath, 'query', 'teams-status'],
{
encoding: 'utf8',
timeout: PROBE_TIMEOUT_MS,
env: makeEnv({ runtime: 'claude' }),
},
);
assert.strictEqual(result.status, 0, `gsd-tools exited ${result.status}: ${result.stderr}`);
assert.strictEqual(result.status, 0, `msd-tools exited ${result.status}: ${result.stderr}`);
const status = JSON.parse(result.stdout);
assert.strictEqual(status.active, false);
assert.strictEqual(status.source, 'off: flag absent');
});
test('--active: exits 0 when GSD_RUNTIME=claude + flag=1', () => {
test('--active: exits 0 when MSD_RUNTIME=claude + flag=1', () => {
const result = spawnSync(
process.execPath,
[gsdToolsPath, 'query', 'teams-status', '--active'],
[msdToolsPath, 'query', 'teams-status', '--active'],
{
encoding: 'utf8',
timeout: PROBE_TIMEOUT_MS,
@@ -181,10 +181,10 @@ describe('gsd-tools query teams-status — CLI subprocess tests', () => {
assert.strictEqual(result.stdout, '', '--active must not print to stdout');
});
test('--active: exits 1 when flag unset (GSD_RUNTIME=claude, no flag)', () => {
test('--active: exits 1 when flag unset (MSD_RUNTIME=claude, no flag)', () => {
const result = spawnSync(
process.execPath,
[gsdToolsPath, 'query', 'teams-status', '--active'],
[msdToolsPath, 'query', 'teams-status', '--active'],
{
encoding: 'utf8',
timeout: PROBE_TIMEOUT_MS,
@@ -194,10 +194,10 @@ describe('gsd-tools query teams-status — CLI subprocess tests', () => {
assert.strictEqual(result.status, 1, `Expected exit 1 when teams not active, got ${result.status}`);
});
test('--active: exits 1 when GSD_RUNTIME=codex + flag=1 (non-claude)', () => {
test('--active: exits 1 when MSD_RUNTIME=codex + flag=1 (non-claude)', () => {
const result = spawnSync(
process.execPath,
[gsdToolsPath, 'query', 'teams-status', '--active'],
[msdToolsPath, 'query', 'teams-status', '--active'],
{
encoding: 'utf8',
timeout: PROBE_TIMEOUT_MS,