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

@@ -10,7 +10,7 @@
* day AHEAD of `last_updated`'s local date, written by the same call.
*
* The fix adds `clock.localToday()` (host-local calendar day, honoring the same
* GSD_NOW_MS pin) and routes operator-facing date-only fields through it. These
* MSD_NOW_MS pin) and routes operator-facing date-only fields through it. These
* tests prove:
* (1) realClock.localToday() returns the local day under a pinned instant + TZ;
* (2) realClock.today() is unchanged (UTC) — internal/cosmetic stamps stay UTC;
@@ -23,9 +23,9 @@ const { describe, test } = require('node:test');
const assert = require('node:assert/strict');
const path = require('node:path');
const CLOCK_CJS = path.join(__dirname, '..', 'gsd-core', 'bin', 'lib', 'clock.cjs');
const STATE_TRANSITION_CJS = path.join(__dirname, '..', 'gsd-core', 'bin', 'lib', 'state-transition.cjs');
const { stateExtractField } = require('../gsd-core/bin/lib/state-document.cjs');
const CLOCK_CJS = path.join(__dirname, '..', 'msd-core', 'bin', 'lib', 'clock.cjs');
const STATE_TRANSITION_CJS = path.join(__dirname, '..', 'msd-core', 'bin', 'lib', 'state-transition.cjs');
const { stateExtractField } = require('../msd-core/bin/lib/state-document.cjs');
const { makeFakeClock } = require('./helpers/clock.cjs');
const { runNode } = require('./helpers/process-seam.cjs');
const { throwIfFailed } = require('./helpers/git-fixture.cjs');
@@ -39,7 +39,7 @@ const PINNED_MS = '1592186400000';
/**
* Run a one-liner in a FRESH subprocess so TZ is set at process start (Node
* caches timezone; runtime mutation of process.env.TZ is unreliable across
* versions). GSD_TEST_MODE + GSD_NOW_MS pin realClock via the documented seam.
* versions). MSD_TEST_MODE + MSD_NOW_MS pin realClock via the documented seam.
*/
function clockInSubprocess(expr, env) {
const result = runNode(['-e', expr], { env, timeoutMs: PROBE_TIMEOUT_MS });
@@ -51,7 +51,7 @@ describe('#2136 realClock.localToday() — host-local calendar day', () => {
test('returns the LOCAL calendar day under a negative-UTC-offset zone', () => {
const out = clockInSubprocess(
`const {realClock}=require(${JSON.stringify(CLOCK_CJS)});process.stdout.write(realClock.localToday());`,
{ PATH: process.env.PATH, GSD_TEST_MODE: '1', GSD_NOW_MS: PINNED_MS, TZ: 'America/Chicago' },
{ PATH: process.env.PATH, MSD_TEST_MODE: '1', MSD_NOW_MS: PINNED_MS, TZ: 'America/Chicago' },
);
assert.strictEqual(out, '2020-06-14',
'localToday() must be the local calendar day (2020-06-14 in Chicago), not the UTC day (2020-06-15)');
@@ -60,7 +60,7 @@ describe('#2136 realClock.localToday() — host-local calendar day', () => {
test('realClock.today() is unchanged (UTC calendar day) — internal stamps stay UTC', () => {
const out = clockInSubprocess(
`const {realClock}=require(${JSON.stringify(CLOCK_CJS)});process.stdout.write(realClock.today());`,
{ PATH: process.env.PATH, GSD_TEST_MODE: '1', GSD_NOW_MS: PINNED_MS, TZ: 'America/Chicago' },
{ PATH: process.env.PATH, MSD_TEST_MODE: '1', MSD_NOW_MS: PINNED_MS, TZ: 'America/Chicago' },
);
assert.strictEqual(out, '2020-06-15',
'today() must remain the UTC calendar day; only operator-facing fields moved to localToday()');
@@ -69,7 +69,7 @@ describe('#2136 realClock.localToday() — host-local calendar day', () => {
test('localToday === today on a UTC host (no spurious divergence)', () => {
const out = clockInSubprocess(
`const {realClock}=require(${JSON.stringify(CLOCK_CJS)});process.stdout.write(realClock.localToday()+'|'+realClock.today());`,
{ PATH: process.env.PATH, GSD_TEST_MODE: '1', GSD_NOW_MS: PINNED_MS, TZ: 'UTC' },
{ PATH: process.env.PATH, MSD_TEST_MODE: '1', MSD_NOW_MS: PINNED_MS, TZ: 'UTC' },
);
const [local, utc] = out.split('|');
assert.strictEqual(local, '2020-06-15');