fix(fleet): tolerate harness metadata files in the managed install root
ci/woodpecker/pr/ci Pipeline was canceled

Claude Code writes installed_plugins.json and other metadata files into
the seat's plugins directory during a session, so refusing every real
entry made composition fail on each seat's second launch. Only a real
directory is an unmanaged entry the pruner would orphan; plain files are
harness state and pass through untouched. Found by the in-box hour-gate
relaunch of the probe seat.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dtdjx4Gxude9fwyLezCrhh
This commit is contained in:
Jason Woltje
2026-08-13 11:59:31 -05:00
co-authored by Claude Fable 5
parent c16256d48c
commit 5e15431027
2 changed files with 32 additions and 4 deletions
@@ -498,10 +498,16 @@ function resolveManagedLinks(
const path = join(installRoot, entry.name);
if (desired.has(entry.name)) continue;
if (!entry.isSymbolicLink()) {
throw new FleetLaunchError(
'COMPOSITION_FAILED',
`real ${kind} entry occupies managed install root ${path}; refusing to prune it.`,
);
// The harness writes its own metadata files (e.g. installed_plugins.json)
// beside the managed links; only a real directory is an unmanaged entry
// the pruner would orphan.
if (entry.isDirectory()) {
throw new FleetLaunchError(
'COMPOSITION_FAILED',
`real ${kind} directory occupies managed install root ${path}; refusing to prune it.`,
);
}
continue;
}
prune.push(path);
}