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:
@@ -13,7 +13,7 @@ const {
|
||||
createMemoryPointerAdapter,
|
||||
getActiveWorkstream,
|
||||
setActiveWorkstream,
|
||||
} = require('../gsd-core/bin/lib/active-workstream-store.cjs');
|
||||
} = require('../msd-core/bin/lib/active-workstream-store.cjs');
|
||||
|
||||
describe('active-workstream-store', () => {
|
||||
test('validateWorkstreamName accepts canonical names', () => {
|
||||
@@ -51,7 +51,7 @@ describe('active-workstream-store', () => {
|
||||
|
||||
test('resolveActiveWorkstream precedence: cli > env > store', () => {
|
||||
const cli = resolveActiveWorkstream('/repo', ['state', 'json', '--ws', 'cli-ws'], {
|
||||
GSD_WORKSTREAM: 'env-ws',
|
||||
MSD_WORKSTREAM: 'env-ws',
|
||||
}, {
|
||||
getStored: () => 'store-ws',
|
||||
});
|
||||
@@ -59,7 +59,7 @@ describe('active-workstream-store', () => {
|
||||
assert.equal(cli.source, 'cli');
|
||||
|
||||
const env = resolveActiveWorkstream('/repo', ['state', 'json'], {
|
||||
GSD_WORKSTREAM: 'env-ws',
|
||||
MSD_WORKSTREAM: 'env-ws',
|
||||
}, {
|
||||
getStored: () => 'store-ws',
|
||||
});
|
||||
@@ -67,7 +67,7 @@ describe('active-workstream-store', () => {
|
||||
assert.equal(env.source, 'env');
|
||||
|
||||
const store = resolveActiveWorkstream('/repo', ['state', 'json'], {
|
||||
GSD_WORKSTREAM: '',
|
||||
MSD_WORKSTREAM: '',
|
||||
}, {
|
||||
getStored: () => 'store-ws',
|
||||
});
|
||||
@@ -77,7 +77,7 @@ describe('active-workstream-store', () => {
|
||||
|
||||
test('resolveActiveWorkstream returns none when no source provides a workstream', () => {
|
||||
const resolved = resolveActiveWorkstream('/repo', ['state', 'json'], {
|
||||
GSD_WORKSTREAM: '',
|
||||
MSD_WORKSTREAM: '',
|
||||
}, {
|
||||
getStored: () => null,
|
||||
});
|
||||
@@ -93,19 +93,19 @@ describe('active-workstream-store', () => {
|
||||
});
|
||||
|
||||
test('applyResolvedWorkstreamEnv sets env only when ws exists', () => {
|
||||
const env = { GSD_WORKSTREAM: 'old' };
|
||||
const env = { MSD_WORKSTREAM: 'old' };
|
||||
applyResolvedWorkstreamEnv({ ws: null }, env);
|
||||
assert.equal(env.GSD_WORKSTREAM, 'old');
|
||||
assert.equal(env.MSD_WORKSTREAM, 'old');
|
||||
|
||||
applyResolvedWorkstreamEnv({ ws: 'new-ws' }, env);
|
||||
assert.equal(env.GSD_WORKSTREAM, 'new-ws');
|
||||
assert.equal(env.MSD_WORKSTREAM, 'new-ws');
|
||||
});
|
||||
|
||||
test('getActiveWorkstream uses session adapter over shared adapter when session key exists', () => {
|
||||
const savedSession = process.env.GSD_SESSION_KEY;
|
||||
process.env.GSD_SESSION_KEY = 'session-123';
|
||||
const savedSession = process.env.MSD_SESSION_KEY;
|
||||
process.env.MSD_SESSION_KEY = 'session-123';
|
||||
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-active-store-precedence-'));
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-active-store-precedence-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(tmpDir, '.planning', 'workstreams', 'session-ws'), { recursive: true });
|
||||
fs.mkdirSync(path.join(tmpDir, '.planning', 'workstreams', 'shared-ws'), { recursive: true });
|
||||
@@ -118,8 +118,8 @@ describe('active-workstream-store', () => {
|
||||
});
|
||||
assert.equal(active, 'session-ws');
|
||||
} finally {
|
||||
if (savedSession !== undefined) process.env.GSD_SESSION_KEY = savedSession;
|
||||
else delete process.env.GSD_SESSION_KEY;
|
||||
if (savedSession !== undefined) process.env.MSD_SESSION_KEY = savedSession;
|
||||
else delete process.env.MSD_SESSION_KEY;
|
||||
cleanup(tmpDir);
|
||||
}
|
||||
});
|
||||
@@ -132,7 +132,7 @@ describe('active-workstream-store', () => {
|
||||
});
|
||||
|
||||
test('getActiveWorkstream self-heals stale pointers', () => {
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-active-store-stale-'));
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-active-store-stale-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(tmpDir, '.planning', 'workstreams'), { recursive: true });
|
||||
const adapter = createMemoryPointerAdapter('ghost');
|
||||
|
||||
Reference in New Issue
Block a user