Tracking the six round-6 review findings from #4381 that were declined as overthinking per the round-weighted bar but are real, low-priority polish items worth addressing later.
All six are on currently-correct code — none gate correctness or block #4381 from merging.
Observability
SHA-256 future-proofing
Test coverage
Reviewer: @wenshao via qwen3.7-max /review.
Source: #4381 round 6 review batch (2026-05-25). PR is otherwise green and ready to merge.
Tracking the six round-6 review findings from #4381 that were declined as
overthinkingper the round-weighted bar but are real, low-priority polish items worth addressing later.All six are on currently-correct code — none gate correctness or block #4381 from merging.
Observability
packages/cli/src/startup/worktreeStartup.ts:407—writeWorktreeSessionMarker(...).catch(() => {})swallows EPERM / ENOSPC silently.enter-worktree.tsalready logs at warn level for the same operation. Mirror that pattern. (PR #4381 thread)packages/core/src/services/gitWorktreeService.ts:1174—getRegisteredWorktreeBranchreturns null onlines.length < 4with nodebugLogger.debugbreadcrumb, while every other rejection branch in the same function logs. (PR #4381 thread)SHA-256 future-proofing
packages/core/src/services/gitWorktreeService.ts:392—resolveRefvalidates with/^[0-9a-f]{40}$/(SHA-1 only). In a SHA-256 git repo,--worktree=#123fails with "FETCH_HEAD did not resolve to a commit SHA" even though the ref resolved fine. Relax to/^[0-9a-f]{40,64}$/. Asymmetric withgetCurrentCommitHashwhich has no length check. (PR #4381 thread)Test coverage
packages/cli/src/startup/worktreeStartup.test.ts— add a real-worktree-on-different-branch case to exercise the branch-mismatch guard atworktreeStartup.ts:219. Current test uses a plain directory, which short-circuits viagetRegisteredWorktreeBranch() === null. (PR #4381 thread)packages/cli/src/startup/worktreeStartup.test.ts— extend the re-attach test to commit between first/secondsetupStartupWorktreecalls and assertoriginalHeadCommitequals the worktree's HEAD (not the launch repo's). (PR #4381 thread)packages/core/src/services/gitWorktreeService.test.ts:570— add aparsePRReference('https://github.com/o/r/pull/123/files')assertion. JSDoc documents/files//commits//checkssub-paths but no test exercises them. (PR #4381 thread)Reviewer: @wenshao via
qwen3.7-max/review.Source: #4381 round 6 review batch (2026-05-25). PR is otherwise green and ready to merge.