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:
@@ -47,7 +47,7 @@ const {
|
||||
} = require('./install-shared.cjs');
|
||||
const { ACK_TRAILER_HASH, ACK_TRAILER_GROWTH, parseAckTrailers } = require('./emitted-diff.cjs');
|
||||
const { runGit, OUTCOME } = require('./process-seam.cjs');
|
||||
const { escapeRegex } = require('../../gsd-core/bin/lib/pattern.cjs');
|
||||
const { escapeRegex } = require('../../msd-core/bin/lib/pattern.cjs');
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '..', '..');
|
||||
const FIXTURE_SUBDIR = 'tests/fixtures/golden-install-parity';
|
||||
@@ -141,7 +141,7 @@ function touchesRuntimeRegistry(changedPaths) {
|
||||
* that shrank uniformly, which a same-count self-check passes vacuously.
|
||||
*
|
||||
* Pure and IO-free by construction: the real-tree caller skips wherever no base ref
|
||||
* exists (the gsd-test runner shallow-clones, so `origin/*` is absent), which would make
|
||||
* exists (the msd-test runner shallow-clones, so `origin/*` is absent), which would make
|
||||
* a regression written at that altitude silently skip instead of proving anything.
|
||||
*
|
||||
* @param {object} o
|
||||
@@ -299,19 +299,19 @@ function resolveBaseSha(base = 'origin/next') {
|
||||
* Base-ref candidates, most-specific first.
|
||||
*
|
||||
* The differential needs a ref for `next`, and that ref is NOT universally present:
|
||||
* - the gsd-test runner shallow-clones and merges base+head, so no `origin/*`
|
||||
* - the msd-test runner shallow-clones and merges base+head, so no `origin/*`
|
||||
* remote-tracking refs exist in the container (verified: `git rev-parse
|
||||
* origin/next` fails there, which is what turned this test red on its first run);
|
||||
* - GitHub Actions' checkout does not create remote-tracking branches for OTHER
|
||||
* branches by default, which is exactly why `changeset-required.yml` carries an
|
||||
* explicit `git fetch origin "${BASE_REF}:refs/remotes/origin/${BASE_REF}"` step.
|
||||
*
|
||||
* `GSD_EMITTED_BASE` lets a lane name the ref (or sha) directly. `GITHUB_BASE_REF` is
|
||||
* `MSD_EMITTED_BASE` lets a lane name the ref (or sha) directly. `GITHUB_BASE_REF` is
|
||||
* set by Actions on pull_request events.
|
||||
*/
|
||||
function baseRefCandidates(env = process.env) {
|
||||
const candidates = [];
|
||||
if (env.GSD_EMITTED_BASE) candidates.push(env.GSD_EMITTED_BASE);
|
||||
if (env.MSD_EMITTED_BASE) candidates.push(env.MSD_EMITTED_BASE);
|
||||
if (env.GITHUB_BASE_REF) {
|
||||
candidates.push(`origin/${env.GITHUB_BASE_REF}`, env.GITHUB_BASE_REF);
|
||||
}
|
||||
@@ -325,7 +325,7 @@ function baseRefCandidates(env = process.env) {
|
||||
* Returning null is NOT a pass — the caller turns it into an explicit `t.skip()` with
|
||||
* the full candidate list in the message, so an environment where the gate did not run
|
||||
* says so out loud. A bare `return` there would be a PASS (ADR-2719 §6), and a hard
|
||||
* failure would make the suite permanently red in the gsd-test container, where no
|
||||
* failure would make the suite permanently red in the msd-test container, where no
|
||||
* base ref can exist by construction.
|
||||
*/
|
||||
function resolveBase(env = process.env) {
|
||||
@@ -431,7 +431,7 @@ function baselineManifestsAtRef(base = 'origin/next') {
|
||||
* needs no `npm ci`: `bin/install.js` and the `tests/helpers/*.cjs` real-tree shells are
|
||||
* all Node-builtins-only (CONTRIBUTING.md's "No external dependencies in core"). It DOES
|
||||
* need `npm run build:lib` run there first, though — `tests/helpers/install-shared.cjs`
|
||||
* requires the TSC-COMPILED `gsd-core/bin/lib/runtime-artifact-layout.cjs`, which is
|
||||
* requires the TSC-COMPILED `msd-core/bin/lib/runtime-artifact-layout.cjs`, which is
|
||||
* gitignored, not committed, and therefore absent from a bare worktree checkout, and
|
||||
* `<worktreeDir>/bin/install.js` (spawned BY `cwd`'s generator via `currentManifests`'s
|
||||
* `repoRoot` override) needs its own compiled copy alongside it, not `cwd`'s. `node_modules`
|
||||
@@ -466,12 +466,12 @@ const BUILD_LIB_TIMEOUT_MS = 180_000;
|
||||
// observation and 20% above the censored one, while leaving 240s of chunk
|
||||
// headroom for every other file sharing the chunk.
|
||||
//
|
||||
// The old 300s sat INSIDE that variance band. Under gsd-test this slow path runs
|
||||
// The old 300s sat INSIDE that variance band. Under msd-test this slow path runs
|
||||
// on every verification, because the on-disk baseline cache is restored by
|
||||
// actions/cache keyed on github.event.pull_request.base.sha — a key that exists
|
||||
// only inside GitHub Actions. The real remedy is making that cache reachable from
|
||||
// the remote runner so the in-job build returns to being the rare fallback
|
||||
// ADR-2719 §5 describes; that is a gsd-test-runner change, not one this repo can
|
||||
// ADR-2719 §5 describes; that is a msd-test-runner change, not one this repo can
|
||||
// make.
|
||||
const BUILD_TIMEOUT_MS = 360_000;
|
||||
// Mirrors `scripts/run-tests.cjs:973`'s default. Duplicated deliberately and
|
||||
@@ -481,11 +481,11 @@ const BUILD_TIMEOUT_MS = 360_000;
|
||||
const CHUNK_TIMEOUT_CEILING_MS = 600_000;
|
||||
|
||||
function buildBaselineAtRef(ref, { cwd = REPO_ROOT } = {}) {
|
||||
const worktreeDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-emitted-baseline-wt-'));
|
||||
const worktreeDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-emitted-baseline-wt-'));
|
||||
// mkdtempSync already created the directory; `git worktree add` requires the
|
||||
// target to not exist (or be empty) — remove it and let git recreate it.
|
||||
fs.rmdirSync(worktreeDir);
|
||||
const outFile = path.join(os.tmpdir(), `gsd-emitted-baseline-out-${crypto.randomBytes(8).toString('hex')}.json`);
|
||||
const outFile = path.join(os.tmpdir(), `msd-emitted-baseline-out-${crypto.randomBytes(8).toString('hex')}.json`);
|
||||
|
||||
// Per-step timings, carried into the thrown error. A bare "spawnSync ETIMEDOUT"
|
||||
// names neither the step nor its elapsed time, which is exactly the information
|
||||
@@ -584,7 +584,7 @@ function baselineSizesAtRef(base = 'origin/next') {
|
||||
/**
|
||||
* The package version of the tree whose emitted output is about to be measured.
|
||||
*
|
||||
* `bin/install.js` bakes `{{GSD_VERSION}}` -> `pkg.version` into every emitted hook,
|
||||
* `bin/install.js` bakes `{{MSD_VERSION}}` -> `pkg.version` into every emitted hook,
|
||||
* and `buildParityManifest`'s `pkgVersion` normalization exists to collapse that stamp
|
||||
* back to '<VERSION>' so a version bump alone never moves a hash. That normalization is
|
||||
* only correct when `pkgVersion` matches the version of the tree that PRODUCED the
|
||||
@@ -697,14 +697,14 @@ function currentManifests({ repoRoot } = {}) {
|
||||
/**
|
||||
* Current on-disk sizes for the workflow + agent families the ratchet covers.
|
||||
* @param {object} [opts]
|
||||
* @param {string} [opts.repoRoot] - Read `<repoRoot>/gsd-core/workflows` and
|
||||
* @param {string} [opts.repoRoot] - Read `<repoRoot>/msd-core/workflows` and
|
||||
* `<repoRoot>/agents` instead of this checkout's own (#2767) — same rationale as
|
||||
* `currentManifests`'s `repoRoot`.
|
||||
*/
|
||||
function currentSizes({ repoRoot = REPO_ROOT } = {}) {
|
||||
const sizes = {};
|
||||
for (const [dir, filter] of [
|
||||
[path.join(repoRoot, 'gsd-core', 'workflows'), (f) => f.endsWith('.md')],
|
||||
[path.join(repoRoot, 'msd-core', 'workflows'), (f) => f.endsWith('.md')],
|
||||
[path.join(repoRoot, 'agents'), (f) => f.endsWith('.md')],
|
||||
]) {
|
||||
if (!fs.existsSync(dir)) continue;
|
||||
@@ -747,7 +747,7 @@ function ackTrailerGit(args, { cwd = REPO_ROOT, timeoutMs = GIT_TIMEOUT_MS, inpu
|
||||
// commit unconditionally — silently bury it: git's parser (correctly, by its own
|
||||
// contract) stops at the first non-conforming line scanning backward, so it never even
|
||||
// reaches past `---------` to see the real content underneath, let alone further back
|
||||
// to an earlier bullet. Confirmed directly against a real squash commit (gsd-core
|
||||
// to an earlier bullet. Confirmed directly against a real squash commit (msd-core
|
||||
// 78013b3b74): `%(trailers)` there returns ONLY GitHub's own two `Co-authored-by:`
|
||||
// lines — not even the last original commit's own trailer survives, only GitHub's
|
||||
// appended one.
|
||||
@@ -844,7 +844,7 @@ function extractSquashBuriedTrailers(rawBody, { cwd, timeoutMs }) {
|
||||
|
||||
// Record/field/value separators for the `git log --format` trailer extraction below.
|
||||
// ASCII control characters (RS/US/GS) so they can never collide with real trailer
|
||||
// content, following the precedent at gsd-core/workflows/ship.md:312 (`%x1f`/`%x1e` for
|
||||
// content, following the precedent at msd-core/workflows/ship.md:312 (`%x1f`/`%x1e` for
|
||||
// a different `%(trailers:...)` extraction in this same repo).
|
||||
const ACK_TRAILER_RECORD_SEP = '\x1e'; // between commits
|
||||
const ACK_TRAILER_FIELD_SEP = '\x1f'; // between the hash-space list and growth-space list
|
||||
|
||||
Reference in New Issue
Block a user