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 @@
|
||||
/**
|
||||
* GSD Tools Tests - UAT Audit
|
||||
* MSD Tools Tests - UAT Audit
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -9,7 +9,7 @@ const assert = require('node:assert/strict');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const fc = require('./helpers/fast-check-setup.cjs');
|
||||
const { runGsdTools, createTempProject, createTempDir, cleanup } = require('./helpers.cjs');
|
||||
const { runMsdTools, createTempProject, createTempDir, cleanup } = require('./helpers.cjs');
|
||||
const {
|
||||
buildCheckpoint,
|
||||
CHECKPOINT_FRAMES,
|
||||
@@ -24,8 +24,8 @@ const {
|
||||
DEFERRED_BULLET_MARKERS,
|
||||
parseVerificationItems,
|
||||
parsedEntriesFor,
|
||||
} = require('../gsd-core/bin/lib/uat.cjs');
|
||||
const { iterateBullets } = require('../gsd-core/bin/lib/markdown-sectionizer.cjs');
|
||||
} = require('../msd-core/bin/lib/uat.cjs');
|
||||
const { iterateBullets } = require('../msd-core/bin/lib/markdown-sectionizer.cjs');
|
||||
|
||||
describe('audit-uat command', () => {
|
||||
let tmpDir;
|
||||
@@ -43,7 +43,7 @@ describe('audit-uat command', () => {
|
||||
fs.mkdirSync(path.join(tmpDir, '.planning', 'phases', '01-foundation'), { recursive: true });
|
||||
fs.writeFileSync(path.join(tmpDir, '.planning', 'phases', '01-foundation', '.gitkeep'), '');
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -74,7 +74,7 @@ expected: Submitting shows loading state
|
||||
result: pending
|
||||
`);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -114,7 +114,7 @@ result: pending
|
||||
'result: [skipped]',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -144,7 +144,7 @@ blocked_by: server
|
||||
reason: Server not running locally
|
||||
`);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -176,7 +176,7 @@ expected: Grid collapses to single column on mobile
|
||||
result: pending
|
||||
`);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -205,7 +205,7 @@ All passed.
|
||||
3. Verify MFA enrollment on new device
|
||||
`);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -257,7 +257,7 @@ result: skipped
|
||||
reason: device not available
|
||||
`);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -309,7 +309,7 @@ expected: New behavior
|
||||
result: pending
|
||||
`);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -350,7 +350,7 @@ expected: Processes refund
|
||||
result: pending
|
||||
`);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -374,7 +374,7 @@ phase: 01-foundation
|
||||
All checks passed.
|
||||
`);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -405,7 +405,7 @@ All checks passed.
|
||||
'| 3 | Verify MFA enrollment | PASS | Verified 2025-01-15 |',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -432,7 +432,7 @@ All checks passed.
|
||||
'2. Test password reset flow end-to-end',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -474,7 +474,7 @@ All checks passed.
|
||||
'1. Stray human check',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
const output = JSON.parse(result.output);
|
||||
|
||||
@@ -504,7 +504,7 @@ All checks passed.
|
||||
'### 1. Own Test', 'expected: Works', 'result: pending', '',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
const output = JSON.parse(result.output);
|
||||
|
||||
@@ -612,7 +612,7 @@ All checks passed.
|
||||
' status: resolved',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -641,7 +641,7 @@ All checks passed.
|
||||
' test: 2',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -677,7 +677,7 @@ All checks passed.
|
||||
' status: resolved',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -713,7 +713,7 @@ All checks passed.
|
||||
' test: 3',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -756,7 +756,7 @@ All checks passed.
|
||||
' debug_session: ""',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -786,7 +786,7 @@ All checks passed.
|
||||
' reason: "why it is open"',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -810,7 +810,7 @@ All checks passed.
|
||||
'',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -963,7 +963,7 @@ human_verification:
|
||||
'2. Test password reset flow end-to-end',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -989,7 +989,7 @@ human_verification:
|
||||
'None — see frontmatter human_verification array.',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1037,7 +1037,7 @@ human_verification:
|
||||
'None.',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1064,7 +1064,7 @@ human_verification:
|
||||
'1. A body-scan item that must NOT be double-counted',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1097,7 +1097,7 @@ human_verification:
|
||||
'**Why human:** Timing-based UI behavior requires visual confirmation.',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1291,7 +1291,7 @@ describe('uat render-checkpoint', () => {
|
||||
// itself, precisely because the keys stay distinct. The remaining case — two
|
||||
// byte-identical keys, where the object genuinely no longer records what was
|
||||
// written — is rejected by tsc as TS1117 before this suite can run, since the
|
||||
// tests execute against `gsd-core/bin/lib/uat.cjs` built from this source.
|
||||
// tests execute against `msd-core/bin/lib/uat.cjs` built from this source.
|
||||
test('checkpoint alias catalog declares no colliding or unreachable alias keys', () => {
|
||||
const declared = Object.keys(CHECKPOINT_LANGUAGE_ALIASES);
|
||||
|
||||
@@ -1415,7 +1415,7 @@ expected: |
|
||||
awaiting: user response
|
||||
`);
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
assert.strictEqual(result.success, true, `render-checkpoint failed: ${result.error}`);
|
||||
assert.ok(result.output.includes('**Test 2: Submit form validation**'));
|
||||
assert.ok(result.output.includes('Empty submit keeps controls visible.'));
|
||||
@@ -1441,7 +1441,7 @@ expected: |
|
||||
awaiting: user response
|
||||
`);
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
assert.strictEqual(result.success, true, `render-checkpoint failed: ${result.error}`);
|
||||
assert.ok(!result.output.includes('user to=all:final code'));
|
||||
assert.ok(!result.output.includes('彩票平台'));
|
||||
@@ -1465,7 +1465,7 @@ expected: |
|
||||
awaiting: user response
|
||||
`);
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
assert.strictEqual(result.success, true, `render-checkpoint failed: ${result.error}`);
|
||||
assert.ok(result.output.includes('Timezone abbreviation shows CET.'),
|
||||
'Expected text before Z-containing word should be present');
|
||||
@@ -1488,7 +1488,7 @@ expected: |
|
||||
It ends at the section boundary.
|
||||
`);
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
assert.strictEqual(result.success, true, `render-checkpoint failed: ${result.error}`);
|
||||
assert.ok(result.output.includes('This block has no trailing YAML key.'));
|
||||
assert.ok(result.output.includes('It ends at the section boundary.'));
|
||||
@@ -1531,7 +1531,7 @@ expected: |
|
||||
'[none yet]',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md'], tmpDir);
|
||||
assert.strictEqual(result.success, true, `render-checkpoint failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1558,7 +1558,7 @@ expected: |
|
||||
'result: [pending]',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
assert.strictEqual(result.success, true, `render-checkpoint failed: ${result.error}`);
|
||||
assert.ok(result.output.length > 0, 'raw mode must emit a checkpoint');
|
||||
});
|
||||
@@ -1581,7 +1581,7 @@ expected: |
|
||||
'result: pass',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md'], tmpDir);
|
||||
assert.strictEqual(result.success, false, 'Should fail when a paused placeholder has no pending test to resume');
|
||||
assert.ok(result.error.includes('no pending UAT test remains'));
|
||||
assert.ok(!result.error.includes('Current Test section is malformed'));
|
||||
@@ -1598,7 +1598,7 @@ phase: 01-test-phase
|
||||
[testing complete]
|
||||
`);
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md'], tmpDir);
|
||||
assert.strictEqual(result.success, false, 'Should fail when no current test exists');
|
||||
assert.ok(result.error.includes('already complete'));
|
||||
});
|
||||
@@ -1626,7 +1626,7 @@ expected: |
|
||||
awaiting: user response
|
||||
`);
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
assert.strictEqual(result.success, true, `render-checkpoint failed: ${result.error}`);
|
||||
|
||||
// Frame strings must be localized, not English.
|
||||
@@ -1664,7 +1664,7 @@ expected: |
|
||||
awaiting: user response
|
||||
`);
|
||||
|
||||
const result = runGsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
const result = runMsdTools(['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md', '--raw'], tmpDir);
|
||||
assert.strictEqual(result.success, true, `render-checkpoint failed: ${result.error}`);
|
||||
|
||||
const expected = [
|
||||
@@ -1701,7 +1701,7 @@ describe('#2287 cmdAuditUat: deferred-items.md awareness', () => {
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(phaseDir, '.gitkeep'), '');
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1721,7 +1721,7 @@ describe('#2287 cmdAuditUat: deferred-items.md awareness', () => {
|
||||
' status: resolved',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1741,7 +1741,7 @@ describe('#2287 cmdAuditUat: deferred-items.md awareness', () => {
|
||||
' this phase\'s task. Out of scope for this task — logged here per SCOPE BOUNDARY.',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1777,7 +1777,7 @@ describe('#2287 cmdAuditUat: deferred-items.md awareness', () => {
|
||||
' status: resolved',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1808,7 +1808,7 @@ describe('#2287 cmdAuditUat: deferred-items.md awareness', () => {
|
||||
'- Phase 2 unrelated finding.',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1829,7 +1829,7 @@ describe('#2287 cmdAuditUat: deferred-items.md awareness', () => {
|
||||
'- An entry with no status field at all.',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1862,7 +1862,7 @@ describe('#2287 cmdAuditUat: deferred-items.md awareness', () => {
|
||||
'- An unrelated out-of-scope finding.',
|
||||
].join('\n'));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -1880,10 +1880,10 @@ describe('#2287 cmdAuditUat: deferred-items.md awareness', () => {
|
||||
// ─── forensic_audit workflow-prose source-contract guard (#2287) ──────────
|
||||
|
||||
// #2994 fragmentization moved the --forensic-gated forensic_audit step out of
|
||||
// progress.md into gsd-core/workflows/progress/steps/forensic-audit.md behind
|
||||
// progress.md into msd-core/workflows/progress/steps/forensic-audit.md behind
|
||||
// a section marker. Read that step file directly — it is the sole remaining
|
||||
// source of the forensic_audit step body these guards assert on.
|
||||
const PROGRESS_MD = path.join(__dirname, '..', 'gsd-core', 'workflows', 'progress', 'steps', 'forensic-audit.md');
|
||||
const PROGRESS_MD = path.join(__dirname, '..', 'msd-core', 'workflows', 'progress', 'steps', 'forensic-audit.md');
|
||||
|
||||
describe('#2287 progress.md forensic_audit: deferred-items.md contract', () => {
|
||||
const content = fs.readFileSync(PROGRESS_MD, 'utf-8');
|
||||
@@ -2150,7 +2150,7 @@ describe('#2766 cmdAuditUat: archived phase directories', () => {
|
||||
fs.mkdirSync(archiveDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(archiveDir, '01-UAT.md'), UAT_ONE_PENDING);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -2172,7 +2172,7 @@ describe('#2766 cmdAuditUat: archived phase directories', () => {
|
||||
fs.mkdirSync(archiveDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(archiveDir, '01-UAT.md'), UAT_ONE_PENDING);
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -2190,7 +2190,7 @@ describe('#2766 cmdAuditUat: archived phase directories', () => {
|
||||
fs.writeFileSync(path.join(dir, `${phase.slice(0, 2)}-UAT.md`), UAT_ONE_PENDING);
|
||||
}
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -2205,7 +2205,7 @@ describe('#2766 cmdAuditUat: archived phase directories', () => {
|
||||
// createTempProject() ships an empty `.planning/phases/`, so this is the
|
||||
// shape the existing uat.test.cjs "no UAT files" case covers — the archive
|
||||
// change must not turn it into an error.
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -2222,7 +2222,7 @@ describe('#2766 cmdAuditUat: archived phase directories', () => {
|
||||
|
||||
fs.mkdirSync(path.join(bare, '.planning'), { recursive: true });
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', bare);
|
||||
const result = runMsdTools('audit-uat --raw', bare);
|
||||
assert.strictEqual(result.success, false, 'expected a failure when no phases exist at all');
|
||||
});
|
||||
});
|
||||
@@ -2991,7 +2991,7 @@ describe('#3702 round 4: the fence gate is indent-unbounded, like the rest of th
|
||||
// sits at four spaces. Driven before the fix at indents 4, 5, 8 and a
|
||||
// leading tab — all four silently resolved.
|
||||
//
|
||||
// `gsd-core/references/executor-examples.md` states flatly that "nothing
|
||||
// `msd-core/references/executor-examples.md` states flatly that "nothing
|
||||
// inside a fenced code block is an entry or a field". These pin that claim
|
||||
// instead of quietly bounding it.
|
||||
const H = '## Deferred Items\n\n';
|
||||
@@ -3766,7 +3766,7 @@ describe('#2766 parseGapsItems: GFM table shape', () => {
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(phaseDir, '50-UAT.md'), uatWithGaps(gapsBody));
|
||||
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
const output = JSON.parse(result.output);
|
||||
const uat = output.results.find(r => r.type === 'uat');
|
||||
@@ -3871,7 +3871,7 @@ describe("#3707: audit-uat must not silently drop outstanding UAT rows", () => {
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -4325,7 +4325,7 @@ describe("#3707 review: end-anchored result matcher regressed trailing-text rows
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -4412,7 +4412,7 @@ describe("#3707 review: parse_gap must reflect headings seen vs. items yielded",
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -4479,7 +4479,7 @@ describe("#3707 follow-up BLOCKER: a MIXED file must not drop its unparseable ro
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -4575,7 +4575,7 @@ describe("#3707 follow-up MAJOR: a result: inside a fenced code block must not b
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -4648,7 +4648,7 @@ describe("#3707 follow-up MINOR: headings without a name are still surfaced", ()
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -4710,7 +4710,7 @@ describe("#3707 follow-up MINOR: trailing-text-to-reason synthesis is removed",
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -4764,7 +4764,7 @@ describe("#3707 follow-up: unparsed_blocks and by_phase 0-valued keys", () => {
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -4812,7 +4812,7 @@ describe("#3707 round-3 review: unterminated fence and decimal sub-headings", ()
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -4925,7 +4925,7 @@ describe("#3078: fenced/scalar boundaries must never silently drop a UAT row", (
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -5368,7 +5368,7 @@ phase: 01-test-phase
|
||||
`;
|
||||
|
||||
function renderCheckpoint() {
|
||||
const result = runGsdTools(["uat", "render-checkpoint", "--file", ".planning/phases/01-test-phase/01-UAT.md"], tmpDir);
|
||||
const result = runMsdTools(["uat", "render-checkpoint", "--file", ".planning/phases/01-test-phase/01-UAT.md"], tmpDir);
|
||||
assert.strictEqual(result.success, true, `render-checkpoint failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -5441,7 +5441,7 @@ expected: SECRET-FROM-ROW-2
|
||||
result: pending
|
||||
${FENCE}
|
||||
`);
|
||||
const result = runGsdTools(["uat", "render-checkpoint", "--file", ".planning/phases/01-test-phase/01-UAT.md"], tmpDir);
|
||||
const result = runMsdTools(["uat", "render-checkpoint", "--file", ".planning/phases/01-test-phase/01-UAT.md"], tmpDir);
|
||||
assert.strictEqual(result.success, false, `expected failure, got: ${result.output}`);
|
||||
assert.ok(/missing an expected field/.test(result.error), `unexpected error: ${result.error}`);
|
||||
assert.ok(!/SECRET-FROM-ROW-2/.test(result.error), `hidden row leaked into error: ${result.error}`);
|
||||
@@ -5579,7 +5579,7 @@ expected: |
|
||||
result: pending
|
||||
`,
|
||||
);
|
||||
const result = runGsdTools(
|
||||
const result = runMsdTools(
|
||||
["uat", "render-checkpoint", "--file", ".planning/phases/01-test-phase/01-UAT.md"],
|
||||
tmpDir,
|
||||
);
|
||||
@@ -5761,7 +5761,7 @@ updated: 2025-01-01T00:00:00Z
|
||||
}
|
||||
|
||||
function runAudit() {
|
||||
const result = runGsdTools("audit-uat --raw", tmpDir);
|
||||
const result = runMsdTools("audit-uat --raw", tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -5985,7 +5985,7 @@ updated: 2025-01-01T00:00:00Z
|
||||
### 1. Indented Row
|
||||
result: pending
|
||||
`);
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
const output = JSON.parse(result.output);
|
||||
const entry = output.results.find((r) => r.file === '01-UAT.md');
|
||||
@@ -6285,7 +6285,7 @@ result: pending
|
||||
|
||||
function renderCheckpoint(headingText) {
|
||||
fs.writeFileSync(uatPath, `${FRONTMATTER}${documentFor(headingText)}`);
|
||||
return runGsdTools(
|
||||
return runMsdTools(
|
||||
['uat', 'render-checkpoint', '--file', '.planning/phases/01-test-phase/01-UAT.md'],
|
||||
tmpDir,
|
||||
);
|
||||
@@ -6447,7 +6447,7 @@ blocked_by: Server team
|
||||
// `countUnattributedIndentedRows` walked back from an indented `### N.`-shaped
|
||||
// line to the nearest preceding column-0 line and tested it against an
|
||||
// `expected:`-ONLY grammar. A `reported: |` or `reason: |` block scalar
|
||||
// (both template-sanctioned — `reported:` ships in gsd-core/templates/UAT.md)
|
||||
// (both template-sanctioned — `reported:` ships in msd-core/templates/UAT.md)
|
||||
// holding free-form prose that happens to contain an indented `### N.`-shaped
|
||||
// line was therefore miscounted as a lost row on a file with nothing missing.
|
||||
describe('#3078 MINOR 1: indented-row counter recognizes ANY key\'s block scalar, not only expected:', () => {
|
||||
@@ -7380,7 +7380,7 @@ result: pending
|
||||
}
|
||||
|
||||
function audit() {
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -7765,7 +7765,7 @@ describe('#3707-CR follow-up MAJOR: VERIFICATION.md and deferred-items.md ingres
|
||||
});
|
||||
|
||||
function audit() {
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
}
|
||||
@@ -7918,8 +7918,8 @@ describe('#3707-CR follow-up MAJOR: VERIFICATION.md and deferred-items.md ingres
|
||||
const lfDir = build(LF);
|
||||
const crDir = build(CR);
|
||||
try {
|
||||
const lfResult = runGsdTools('audit-uat --raw', lfDir);
|
||||
const crResult = runGsdTools('audit-uat --raw', crDir);
|
||||
const lfResult = runMsdTools('audit-uat --raw', lfDir);
|
||||
const crResult = runMsdTools('audit-uat --raw', crDir);
|
||||
assert.ok(lfResult.success, `LF run failed: ${lfResult.error}`);
|
||||
assert.ok(crResult.success, `CR run failed: ${crResult.error}`);
|
||||
const lfOutput = JSON.parse(lfResult.output);
|
||||
@@ -7950,7 +7950,7 @@ describe('#3707-CR follow-up MAJOR: VERIFICATION.md and deferred-items.md ingres
|
||||
|
||||
// #3078-CR: a column-0 line-terminator boundary defect in
|
||||
// `parseUatItemsWithStats`'s `result:` scan, reproduced directly against the
|
||||
// LIVE built copy (`../gsd-core/bin/lib/uat.cjs`, imported at the top of this
|
||||
// LIVE built copy (`../msd-core/bin/lib/uat.cjs`, imported at the top of this
|
||||
// file) rather than through a rebuilt fixture, so these rows fail against the
|
||||
// ACTUAL shipped parser, not a stale mental model of it.
|
||||
//
|
||||
@@ -8433,7 +8433,7 @@ describe('#3850 gaps_found VERIFICATION files', () => {
|
||||
const phaseDir = path.join(tmpDir, '.planning', 'phases', phase);
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(phaseDir, `${phase.split('-')[0]}-VERIFICATION.md`), body);
|
||||
const result = runGsdTools('audit-uat --raw', tmpDir);
|
||||
const result = runMsdTools('audit-uat --raw', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
return JSON.parse(result.output);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user