refactor: remove dead descriptor-driven mechanisms (no remaining consumer)

Drop code whose only consumer was a retired runtime: hostBehaviors readers for
agentFileExtension, localTargetIsProjectRoot, sharedHooksDirName,
skillsManifestPrefix and skipCodexSkillsManifest; the empty
NON_REGISTRY_CONFIG_HOME_DESCRIPTORS array and live-config-guard plumbing; the
empty RUNTIME_NOTE_AUDIENCE_BY_HEADING filter; the unused resolveVersionFrom
export; and the WINDSURF_SESSION_ID workstream session key. Delete tests that
only exercised those mechanisms.
This commit is contained in:
Jakub Zych
2026-10-06 20:49:35 +02:00
parent fe3ed06691
commit 6b0b92674a
25 changed files with 63 additions and 912 deletions

View File

@@ -40,7 +40,7 @@ const { createTempDir, cleanup } = require('./helpers.cjs');
const {
writeManifest,
MSD_UNINSTALL_HOOKS,
resolveSharedHooksDirName,
SHARED_HOOKS_DIR,
stripStaleMsdHookBlocks,
} = require('../bin/install.js');
@@ -679,11 +679,7 @@ describe('#1821/#2305: ZCode receives no dead hook files; OpenCode/Claude keep t
`installer exited with status ${result.exitCode} for --${runtime} --global\nstdout: ${result.stdout}\nstderr: ${result.stderr}`);
// Collect results while targetDir still exists — cleanup() below removes it.
const pluginRelPath = opts.pluginRelPath || path.join('plugins', 'msd-core.js');
// #3023: the shared hooks bundle's staged directory name is per-runtime
// (hostBehaviors.sharedHooksDirName) —
// resolve it the same way the installer does rather than hardcoding
// 'hooks', or every non-default runtime would look hookless.
const hooksDirName = resolveSharedHooksDirName(runtime);
const hooksDirName = SHARED_HOOKS_DIR;
return {
hookFiles: msdHookFilesUnder(targetDir, hooksDirName),
hooksLibExists: fs.existsSync(path.join(targetDir, hooksDirName, 'lib')),