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,6 +1,6 @@
|
||||
'use strict';
|
||||
/**
|
||||
* Tests for marker-driven profile re-application on `gsd update` (Deviation 2).
|
||||
* Tests for marker-driven profile re-application on `msd update` (Deviation 2).
|
||||
*
|
||||
* Verifies:
|
||||
* 1. resolveEffectiveProfile returns the marker's profile when no explicit flag given.
|
||||
@@ -27,13 +27,13 @@ const {
|
||||
loadSkillsManifest,
|
||||
stageSkillsForProfile,
|
||||
cleanupStagedSkills,
|
||||
} = require('../gsd-core/bin/lib/install-profiles.cjs');
|
||||
} = require('../msd-core/bin/lib/install-profiles.cjs');
|
||||
|
||||
const REAL_COMMANDS_DIR = path.join(__dirname, '..', 'commands', 'gsd');
|
||||
const REAL_COMMANDS_DIR = path.join(__dirname, '..', 'commands', 'msd');
|
||||
|
||||
describe('resolveEffectiveProfile', () => {
|
||||
test('no explicit flag and no marker → returns "full"', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-reu-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-reu-'));
|
||||
try {
|
||||
const result = resolveEffectiveProfile({ requestedProfileName: null, targetDir: dir });
|
||||
assert.strictEqual(result, 'full');
|
||||
@@ -43,7 +43,7 @@ describe('resolveEffectiveProfile', () => {
|
||||
});
|
||||
|
||||
test('no explicit flag but marker exists → returns marker profile', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-reu-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-reu-'));
|
||||
try {
|
||||
writeActiveProfile(dir, 'standard');
|
||||
const result = resolveEffectiveProfile({ requestedProfileName: null, targetDir: dir });
|
||||
@@ -54,7 +54,7 @@ describe('resolveEffectiveProfile', () => {
|
||||
});
|
||||
|
||||
test('no explicit flag but core marker exists → returns "core"', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-reu-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-reu-'));
|
||||
try {
|
||||
writeActiveProfile(dir, 'core');
|
||||
const result = resolveEffectiveProfile({ requestedProfileName: null, targetDir: dir });
|
||||
@@ -65,7 +65,7 @@ describe('resolveEffectiveProfile', () => {
|
||||
});
|
||||
|
||||
test('explicit --profile=full overrides a non-full marker', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-reu-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-reu-'));
|
||||
try {
|
||||
writeActiveProfile(dir, 'core');
|
||||
const result = resolveEffectiveProfile({ requestedProfileName: 'full', targetDir: dir });
|
||||
@@ -76,7 +76,7 @@ describe('resolveEffectiveProfile', () => {
|
||||
});
|
||||
|
||||
test('explicit --profile=standard overrides a core marker', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-reu-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-reu-'));
|
||||
try {
|
||||
writeActiveProfile(dir, 'core');
|
||||
const result = resolveEffectiveProfile({ requestedProfileName: 'standard', targetDir: dir });
|
||||
@@ -87,7 +87,7 @@ describe('resolveEffectiveProfile', () => {
|
||||
});
|
||||
|
||||
test('full marker falls back to "full" (not recorded as a restriction)', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-reu-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-reu-'));
|
||||
try {
|
||||
writeActiveProfile(dir, 'full');
|
||||
const result = resolveEffectiveProfile({ requestedProfileName: null, targetDir: dir });
|
||||
@@ -131,11 +131,11 @@ describe('mostRestrictiveProfile', () => {
|
||||
|
||||
describe('marker-driven profile resolution end-to-end', () => {
|
||||
test('fresh install with --profile=standard writes marker, re-read resolves standard', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-e2e-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-e2e-'));
|
||||
try {
|
||||
// Simulate: fresh install with --profile=standard
|
||||
writeActiveProfile(dir, 'standard');
|
||||
// Simulate: re-run without flags (e.g. `gsd update`)
|
||||
// Simulate: re-run without flags (e.g. `msd update`)
|
||||
const effective = resolveEffectiveProfile({ requestedProfileName: null, targetDir: dir });
|
||||
assert.strictEqual(effective, 'standard');
|
||||
// Verify the staged output contains only standard's skills
|
||||
@@ -166,8 +166,8 @@ describe('marker-driven profile resolution end-to-end', () => {
|
||||
});
|
||||
|
||||
test('marker disagreement across runtimes → mostRestrictiveProfile picks smaller set', () => {
|
||||
const dirA = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-rtA-'));
|
||||
const dirB = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-rtB-'));
|
||||
const dirA = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-rtA-'));
|
||||
const dirB = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-rtB-'));
|
||||
try {
|
||||
writeActiveProfile(dirA, 'standard');
|
||||
writeActiveProfile(dirB, 'core');
|
||||
@@ -183,7 +183,7 @@ describe('marker-driven profile resolution end-to-end', () => {
|
||||
});
|
||||
|
||||
test('explicit --profile=full overrides restrictive marker (no narrowing)', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-override-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-override-'));
|
||||
try {
|
||||
writeActiveProfile(dir, 'core');
|
||||
const effective = resolveEffectiveProfile({ requestedProfileName: 'full', targetDir: dir });
|
||||
|
||||
Reference in New Issue
Block a user