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:
@@ -20,8 +20,8 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
|
||||
const { createHub } = require('../../gsd-core/bin/lib/command-routing-hub.cjs');
|
||||
const { createDefaultLogger } = require('../../gsd-core/bin/lib/observability/logger.cjs');
|
||||
const { createHub } = require('../../msd-core/bin/lib/command-routing-hub.cjs');
|
||||
const { createDefaultLogger } = require('../../msd-core/bin/lib/observability/logger.cjs');
|
||||
const { cleanup } = require('../helpers.cjs');
|
||||
|
||||
// ─── Test fixture setup ───────────────────────────────────────────────────────
|
||||
@@ -60,12 +60,12 @@ let capturedEvents;
|
||||
describe('trace correlation — end-to-end parentTraceId propagation', () => {
|
||||
before(() => {
|
||||
// Create an isolated temp dir for this test group
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-trace-correlation-test-'));
|
||||
auditPath = path.join(tmpDir, '.planning', '.gsd-trace.jsonl');
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-trace-correlation-test-'));
|
||||
auditPath = path.join(tmpDir, '.planning', '.msd-trace.jsonl');
|
||||
|
||||
// Enable audit file writes
|
||||
savedAudit = process.env.GSD_AUDIT;
|
||||
process.env.GSD_AUDIT = '1';
|
||||
savedAudit = process.env.MSD_AUDIT;
|
||||
process.env.MSD_AUDIT = '1';
|
||||
|
||||
// Build a Hub backed by the real logger writing to our temp dir
|
||||
const logger = createDefaultLogger({ cwd: tmpDir });
|
||||
@@ -93,11 +93,11 @@ describe('trace correlation — end-to-end parentTraceId propagation', () => {
|
||||
});
|
||||
|
||||
after(() => {
|
||||
// Restore GSD_AUDIT to whatever it was before this test group
|
||||
// Restore MSD_AUDIT to whatever it was before this test group
|
||||
if (savedAudit === undefined) {
|
||||
delete process.env.GSD_AUDIT;
|
||||
delete process.env.MSD_AUDIT;
|
||||
} else {
|
||||
process.env.GSD_AUDIT = savedAudit;
|
||||
process.env.MSD_AUDIT = savedAudit;
|
||||
}
|
||||
// Clean up the temp directory
|
||||
cleanup(tmpDir);
|
||||
@@ -138,7 +138,7 @@ describe('trace correlation — end-to-end parentTraceId propagation', () => {
|
||||
|
||||
test('JS filter on parentTraceId returns exactly the 3 children (jq-style)', () => {
|
||||
const rootTraceId = capturedEvents[0].traceId;
|
||||
// Simulates: jq 'select(.parentTraceId == $rootTraceId)' .gsd-trace.jsonl
|
||||
// Simulates: jq 'select(.parentTraceId == $rootTraceId)' .msd-trace.jsonl
|
||||
const children = capturedEvents.filter(e => e.parentTraceId === rootTraceId);
|
||||
assert.equal(children.length, 3,
|
||||
'filtering events by parentTraceId === rootTraceId must yield exactly 3 events');
|
||||
@@ -151,11 +151,11 @@ describe('trace correlation — end-to-end parentTraceId propagation', () => {
|
||||
test('invalid parentTraceId in a child dispatch breaks the correlation tree for that child but does not poison sibling traces', () => {
|
||||
// This test uses its own isolated Hub + audit file to avoid interfering with
|
||||
// the shared capturedEvents fixture above.
|
||||
const isolatedTmp = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-poison-test-'));
|
||||
const isolatedTmp = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-poison-test-'));
|
||||
let isolatedSavedAudit;
|
||||
try {
|
||||
isolatedSavedAudit = process.env.GSD_AUDIT;
|
||||
process.env.GSD_AUDIT = '1';
|
||||
isolatedSavedAudit = process.env.MSD_AUDIT;
|
||||
process.env.MSD_AUDIT = '1';
|
||||
|
||||
const logger = createDefaultLogger({ cwd: isolatedTmp });
|
||||
const hub = createHub({
|
||||
@@ -167,7 +167,7 @@ describe('trace correlation — end-to-end parentTraceId propagation', () => {
|
||||
// Root dispatch — no parentTraceId
|
||||
hub.dispatch({ family: 'plan', subcommand: '' });
|
||||
|
||||
const isolatedAuditPath = path.join(isolatedTmp, '.planning', '.gsd-trace.jsonl');
|
||||
const isolatedAuditPath = path.join(isolatedTmp, '.planning', '.msd-trace.jsonl');
|
||||
const afterRoot = readJsonl(isolatedAuditPath);
|
||||
assert.equal(afterRoot.length, 1, 'setup: one root event');
|
||||
const rootTraceId = afterRoot[0].traceId;
|
||||
@@ -207,9 +207,9 @@ describe('trace correlation — end-to-end parentTraceId propagation', () => {
|
||||
assert.equal(new Set(ids).size, 3, 'all 3 events must have unique traceIds');
|
||||
} finally {
|
||||
if (isolatedSavedAudit === undefined) {
|
||||
delete process.env.GSD_AUDIT;
|
||||
delete process.env.MSD_AUDIT;
|
||||
} else {
|
||||
process.env.GSD_AUDIT = isolatedSavedAudit;
|
||||
process.env.MSD_AUDIT = isolatedSavedAudit;
|
||||
}
|
||||
cleanup(isolatedTmp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user