🤖 refactor: delete dead node/common helpers kept alive only by tests - #4486
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
1061441 to
f625497
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f625497a17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…on sets, assisted matchers, workflow transitions) (coder#4483) ## Summary Removes four production exports that only tests called, from the test-audit follow-up campaign (WS2, crosscutting candidates coder#1–coder#4). Behavior-preserving: no production caller changes. ## Removed | Symbol | Why it was dead | Tests | | --- | --- | --- | | `isCopilotRoutableModel` (`copilot/modelRouting.ts`) | Always returned `true`; no caller since coder#3104 | 2 tests restating the constant deleted | | `gatherInstructionSets` (`instructionFiles.ts`) | No caller since coder#439; `systemMessage.ts` calls `readInstructionSet` directly | 4 tests deleted; `readInstructionSet` tests already cover null, local files, scope and `projectName` | | `findAssistedMatch`, `hunkMatchesAssisted` (`assistedReview.ts`) | Replaced by the `*Candidate*` versions in coder#3370; only tests called them | Range overlap, deletion fallback (old-side span), rename (`oldPath`), first-match index and no-match cases moved onto `findAssistedCandidateMatch`, the function `ReviewPanel` calls. `hunkMatchesAssistedCandidate` is now module-private | | `WorkflowRunStatusTransitionSchema` + its table (`orpc/schemas/workflow.ts`) | Never enforced; coder#4089 kept it only because a test imported it. Real enforcement lives in `WorkflowService`/`WorkflowRunStore` (tested in `WorkflowRunStore.test.ts`) and follows different rules | "rejects impossible status transitions" deleted | ## Validation - Mutation check: disabling the deletion fallback and the `oldPath` match in `hunkMatchesPathAndRange` fails the two moved tests. - `bun test src/common/utils/review/ src/common/utils/copilot/ src/node/utils/main/instructionFiles.test.ts src/common/orpc/schemas/workflow.test.ts src/node/services/tools/review_pane.test.ts` - `make static-check` on the stack top. Stack: 1/5 (coder#4483 → coder#4484 → coder#4485 → coder#4486 → coder#4487). --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high` • Cost: `$4.45`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high costs=4.45 -->
Summary
Deletes dead helpers under
src/nodeandsrc/commonwhose only callers were their own tests (WS2 sweep of production exports with zero production callers).Removed
snapshotTranscriptAnchor(+ module, 2 tests)createLatestValueQueue(+ 3 tests)withQueueHeartbeat(+ module, test file)SUBSCRIPTION_HEARTBEAT_INTERVAL_MSmoved tosrc/constants/orpcSubscriptions.ts(used bystreamBridge.ts)createWorktree,pruneWorktrees(git.ts, + 2 tests, unused types/imports)WorktreeManager(#457);pruneWorktreeshad no references at all. ThelistLocalBranchestest staysdiscoverGitRoots(+ module, test file)listSessionWorkspaceIdsWithHistory,listArchivedSubagentWorkspaceIdsdiscoverAllWorkspacessince #2665. The unreadable-transcript-dir and missing-chat.jsonlcases were moved ontodiscoverAllWorkspaces, which has the same branches and no other test for themhasUserPreferenceEntryentriesFromUserPreferences, asUserPreferencesContextdoesAgentPluginInstallsSchema(+ barrel re-export)plugins.jsonis parsed as a record in the registry)Validation
discoverAllWorkspacesrethrow unreadable transcript-dir errors fails the moved test.git grep-checked across the repo (src, tests, scripts, vscode, docs).make static-checkon the stack top; affected suites pass.Stack: 4/5.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$4.45