Skip to content

🤖 refactor: delete dead node/common helpers kept alive only by tests - #4486

Merged
ThomasK33 merged 3 commits into
test-audit/ws2-dead-testsfrom
test-audit/ws2-dead-utils
Sep 25, 2026
Merged

ThomasK33 merged 3 commits into
test-audit/ws2-dead-testsfrom
test-audit/ws2-dead-utils

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Deletes dead helpers under src/node and src/common whose only callers were their own tests (WS2 sweep of production exports with zero production callers).

Removed

Symbol Evidence
snapshotTranscriptAnchor (+ module, 2 tests) Only production caller removed in #3816
createLatestValueQueue (+ 3 tests) Last caller replaced by Effect streams in #4039
withQueueHeartbeat (+ module, test file) Same (#4039). SUBSCRIPTION_HEARTBEAT_INTERVAL_MS moved to src/constants/orpcSubscriptions.ts (used by streamBridge.ts)
createWorktree, pruneWorktrees (git.ts, + 2 tests, unused types/imports) Worktree creation moved to WorktreeManager (#457); pruneWorktrees had no references at all. The listLocalBranches test stays
discoverGitRoots (+ module, test file) Added in #2759, never wired in
listSessionWorkspaceIdsWithHistory, listArchivedSubagentWorkspaceIds Analytics uses discoverAllWorkspaces since #2665. The unreadable-transcript-dir and missing-chat.jsonl cases were moved onto discoverAllWorkspaces, which has the same branches and no other test for them
hasUserPreferenceEntry No production caller; tests now read keys via entriesFromUserPreferences, as UserPreferencesContext does
AgentPluginInstallsSchema (+ barrel re-export) No references anywhere (plugins.json is parsed as a record in the registry)

Validation

  • Mutation check: making discoverAllWorkspaces rethrow unreadable transcript-dir errors fails the moved test.
  • Every name git grep-checked across the repo (src, tests, scripts, vscode, docs).
  • make static-check on the stack top; affected suites pass.

Stack: 4/5.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $4.45

@ThomasK33
ThomasK33 added this pull request to stack #4488 September 25, 2026 08:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T11:01:38.274782Z eb2b7af New commits
🔒 Security Review ✅ Completed 2026-09-25T11:03:09.076530Z eb2b7af New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThomasK33 ThomasK33 changed the title refactor: delete dead node/common helpers kept alive only by tests 🤖 refactor: delete dead node/common helpers kept alive only by tests Sep 25, 2026
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 10614410fa

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 10614410fa

ℹ️ 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".

@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Sep 25, 2026
@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Sep 25, 2026
@ThomasK33
ThomasK33 force-pushed the test-audit/ws2-dead-utils branch from 1061441 to f625497 Compare September 25, 2026 10:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/node/orpc/streamBridge.ts Outdated
@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit 2c47467 Sep 25, 2026
30 of 31 checks passed
@ThomasK33
ThomasK33 deleted the test-audit/ws2-dead-utils branch September 25, 2026 11:49
yermakoffivan pushed a commit to yermakoffivan/mux that referenced this pull request Sep 25, 2026
…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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant