refactor(server): extract worktree archive command#891
Closed
boudra wants to merge 1 commit into
Closed
Conversation
Collaborator
Author
|
Closing in favor of the single integration PR #893, which contains the full Session/MCP command-boundary stack and is being held until after the stable release. |
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.
Summary
archivePaseoWorktreeCommandfor common worktree archive target resolution, ownership checks, and archive service invocation.Risk and Coverage Notes
archivePaseoWorktree, covered byworktree-session.test.tsarchive cases for agent close, terminal teardown, archiving state updates, failure cleanup, orphaned git metadata, and snapshot refresh.mcp-server.test.tsfor snapshot refresh and workspace archiving callbacks.archive_worktreewithworktreeSlug, proving the shared command preserves slug-to-Paseo-worktree-path behavior and deletes the worktree.NOT_ALLOWEDtopaseo_worktree_archive_response; MCP throws the tool error. Both cross the same command result.Verification
npx vitest run packages/server/src/server/worktree-session.test.ts packages/server/src/server/agent/mcp-server.test.ts --bail=1npm run formatnpm run typechecknpm run lintRefactor Candidate
Chosen: shared archive worktree command.
The deleted duplication was target resolution plus Paseo ownership policy in Session and MCP. Deleting the new command would make
worktree-session.tsregain branch lookup and ownership checks, andmcp-server.tsregain slug/path construction plus archive service assembly.Next likely slice: standalone create/list worktree commands, if a deletion test shows enough remaining drift beyond the existing
createPaseoWorktreeWorkflow.