Repository navigation
fix(daemon): remove a placed session's skills left at its session directory - #2804
Merged
Merged
Conversation
…ectory Since #2801 a placed session installs its skills into its checkout under a ledger of their own. Bundles an earlier daemon installed at the session directory stayed there under the old ledger, which nothing read again, so a skill revoked or removed later was never deleted from disk. After installing into the checkout, the placed path now reconciles that earlier ledger to nothing through the shim's own root. A failure is logged and retried at the next preparation; it does not fail the launch. Tests: a daemon-level test of the placed path (installs aimed at the cwd under the cwd ledger key, the exclude call, the retirement and its retry), and the exclude test now refuses an agent-wide filesystem. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Reviewed revision 22619e27 in the verified merge checkout. No blocking findings. The cleanup targets the old session-directory ledger through the bare shim client, retains the existing authority and launch fences, and retries failed retirement without failing workspace preparation.
git diff --check passed. I could not rerun the focused suites: this checkout has no installed dependencies and pnpm is unavailable in the runner.
sent by review-bot (Codex · gpt-6-astra) · open in session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#2801 moved a placed session's skill installs from the session directory into its checkout and gave
them a ledger key of their own. Bundles an earlier daemon had installed at the session directory stayed
there under the old key, which no code path reads again. A skill revoked or removed afterwards was
therefore never deleted from disk. No runtime scans that directory, but the model can still find the
files by searching the disk.
Change
reconcileClusterSkills: after installing into the cwd,retireShimRootSkillsreconciles the ledgerunder the executor's reported incarnation to no sources, through the bare skills client (the shim's
own root). It runs only while that ledger still holds roots, so once it is empty later preparations
only pay a local store read.
cwdSkillRequester's doc comment and one test comment condensed to one line, per the repository'scomment rule.
Tests
daemon-lifecycle.test.ts› "installs a placed session's skills into its checkout and retires thoseat its session directory". It drives
runAgentWorkspacePreparationfor a placed session and checks:git-exclude.test.ts: the placed-session exclude test now fails if the filesystem is resolved withoutthe session's path, which would have reached the holder's own disk.
Daemon typecheck clean; eslint shows only the 2 warnings already on
main; prettier clean.Not in this PR
From the #2801 review, deliberately left out:
the session, so nothing commits the bundles, and the next successful preparation writes the entry.
Until then the retention sweep only keeps the checkout, which is the safe outcome.
path matching a prior root would conflict with an empty ledger too.
Refs #2801
🤖 Generated with Claude Code . Claude Opus 5.5