fix(cli): resolve archive worktrees from machine Flock - #382
Open
UniversePeak wants to merge 1 commit into
Open
Conversation
Model: gpt-5.6-luna
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.
Related issue
Closes #377
Problem / pressure
Archiving a local-project session did not remove its worktree or run the configured cleanup script when the project metadata was stored only in the machine Flock document. The archive path resolved local projects from legacy machine metadata but did not load the Flock rows that are authoritative for current local projects.
Summary
Load the machine Flock command snapshot's
localProjectrows while processing archive requests and pass them to worktree cleanup target resolution. Add a regression that creates a real local Git worktree with project metadata available only through the machine Flock and verifies archiving removes that worktree.Before / after
Test plan
corepack pnpm install --frozen-lockfile --ignore-scripts— passed.corepack pnpm --dir packages/acp-extension-core build, plus Claude, Codex, Grok, and DSH adapter builds — passed; required for the CLI test imports.corepack pnpm --dir apps/cli exec vitest run tests/message-handler-terminal-cleanup.test.ts— 13 tests passed, including the new archive regression.corepack pnpm --filter lody typecheck— passed.corepack pnpm lint:fast— 0 errors (465 existing warnings).corepack pnpm check:public-boundary— passed.git diff --check— passed.Context handoff
Instructions for reviewing agents
localProjectrows from Machine Flock and passes them toresolveWorktreeCleanupTarget, matching the existing permanent-delete path.Authoring context