Repair incomplete skill-cache collisions - #4856
Open
bb-slop-cop[bot] wants to merge 1 commit into
Open
bb-slop-cop[bot] wants to merge 1 commit into
bb-slop-cop[bot] wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
🚨 SLOP COP 🚨 ·
new-issue-autopilotHuman comments
What was wrong
The host's skill-cache installer discarded a complete downloaded tree after a destination rename collision without validating the resident cache. A nonempty incomplete resident therefore survived repeated requests, causing required-skill staging to fail or use incomplete content. Reproduction and root-cause report.
What changed
The change is confined to two host-daemon files: 150 changed text lines (132 additions + 18 deletions). No dependencies, stored-data format, public protocol, CLI, SDK, packaging, or release changes. Underlying transient EIO retries and startup sweeps are deliberately outside this verified fix.
How you verified
09ff18a73bd0a8037f43c6ed86c28eb02228089c, the focused regression failed in two separate clean checkouts: 3 failing cases, 2 passing controls. Each partial-cache case attempts staging twice against the same isolated data directory.pnpm exec turbo run test --filter=@bb/host-daemon -- src/injected-skills.test.ts: 20 tests pass after the fix.pnpm exec turbo run typecheck --filter=@bb/host-daemon: passes.pnpm exec turbo run test typecheck --filter=@bb/host-daemonrun passes 720 tests, including all 62 staging, global-install, and command-dispatch tests, with 2 skipped and 2 unrelated server-move failures.git diff --checkpass; no binary changes.The empty-directory control recovers on this Linux filesystem. The reported storage-restoration trigger and exact last-used error remain unverified; the report distinguishes those limits from the reproduced nonempty-cache bug.
Fixes #4855