Skip to content

🤖 tests: delete test-only helpers in node/common and test the production paths - #7601

Merged
ThomasK33 merged 2 commits into
ta-p3-3/dead-type-aliasesfrom
ta-p3-3/test-only-helpers
Oct 26, 2026
Merged

ThomasK33 merged 2 commits into
ta-p3-3/dead-type-aliasesfrom
ta-p3-3/test-only-helpers

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Delete four node/common helpers that only tests called, and move their tests to the code production runs. All four are in P3-2's pendingDeletion list (#7561).

Deleted Why it was dead Tests now
src/cli/serverSecurity.ts (resolveServerAuthToken, isLoopbackHost) Nothing imports the module. xum server uses serverAuthToken.ts, an older policy with its own tests. Deleted with the module. The live resolver keeps serverAuthToken.test.ts.
withReviewStateSection (reviewState.ts) ReviewStateService.importLegacy imports through deltas. Only two test doubles called it. The doubles (ReviewStateStore.test.ts and the story mock) call assignSection.
ensureWorkspaceScratchDir (workspaceScratchDir.ts) Host scratch dirs come from ensureScratchDirForSpec. The mkdir-failure case moved to runtimeScratchDir.test.ts. The why-comment moved to ensureScratchDirForSpec. The path tests stay on getWorkspaceScratchDir.
buildToolCatalogOverview (toolCatalog.ts) Production builds the overview inside prepareToolSearch. The 8 overview assertions read the tool_catalog_search description that prepareToolSearch builds (advertisedOverview helper).

Kept (P3-2 moves these to allowed)

  • computePriorHistoryFingerprint: the reference implementation that the async twin's tests compare against.
  • replayFixture.ts appendReplayFixtureCompactionBoundary, generateReplayFixtureSession: the replay golden-fixture harness.
  • PhoneChrome: the type of the generated PHONE_CHROME_JSON skeleton. Only tests parse that JSON.
  • updateCodeWorkspaceFile: the unit boundary of the .code-workspace edit algorithm (23 tests). syncProjectCodeWorkspace runs the same updateCodeWorkspaceFileLocked under its own lock.

Validation

I broke the production code for each moved test, ran it, saw it fail, and restored the code:

  • ensureScratchDirForSpec host case with a throwing mkdir: the moved failure test fails.
  • In buildOverview/groupCatalogByServer: the "other tools" label, the ", and more" suffix, the total budget, the name sort, and the label clamp. Each mutant fails at least one overview test.

make typecheck, make lint-eslint, fmt-check and check-test-routing pass. P3-2's checker passes on this stack once the stale entries are removed. Only the four kept items above (five entries) stay.

Part of test-audit phase 3, workstream P3-3.


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

@ThomasK33
ThomasK33 added this pull request to stack #7558 October 26, 2026 13:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-10-26T13:49:27.206645Z 1f4aae9 New commits
🔒 Security Review ✅ Completed 2026-10-26T13:50:05.946010Z 1f4aae9 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

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

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

Reviewed commit: 693e098e0f

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 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: 693e098e0f

ℹ️ 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/browser/stores/ReviewStateStore.test.ts
@ThomasK33
ThomasK33 force-pushed the ta-p3-3/test-only-helpers branch from 693e098 to a671559 Compare October 26, 2026 13:09
@ThomasK33
ThomasK33 force-pushed the ta-p3-3/test-only-helpers branch from a671559 to b4aaeca Compare October 26, 2026 13:13
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: b650ab5ce5

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

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

22 agent steps · 7 replayed from cache · 15 model calls · 45.9k tokens (28% cached)
Spend: $0.08 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 1 step · 1 call 5.7s
🟢 a chat survives a restart of the server 1 step · 1 call 5.7s
🟢 compaction.e2e.ts · 1 passed 1 step · 1 call 8.0s
🟢 /compact replaces the old chat with a summary 1 step · 1 call 8.0s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 10.8s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 10.8s
🟢 settingsRoundTrip.e2e.ts · 1 passed 2 steps · 1 call 11.9s
🟢 a chat survives trips through Settings 2 steps · 1 call 11.9s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 6.5s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 6.5s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 3.1s
🟢 the agent opens the playground workspace 2 steps · 1 call 3.1s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 10.8s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 10.8s
🟢 todoNudge.e2e.ts · 1 passed 1 step · 1 call 2.9s
🟢 the agent finishes open TODO items after the turn-end nudge 1 step · 1 call 2.9s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 23.9s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 3.9s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 4.5s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 5.5s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.6s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 3.2s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 3.2s

e2e 0.20.0 · 1m 28s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 8.0k tokens (32% cached)
Spend: $0.01 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 6.6s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 6.6s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 6.7s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 6.7s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 6.2s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 6.2s

e2e 0.20.0 · 22.1s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $0.00 of the $1.00 cap (proxy ledger)

e2e 0.20.0 · 6.9s · 2 targets (web, phone) · run artifacts

…ion paths

- Delete src/cli/serverSecurity.ts: nothing imports it. The server uses
  serverAuthToken.ts, which has its own tests.
- Delete withReviewStateSection: the review-state service imports legacy
  state through deltas. The two test doubles call assignSection.
- Delete ensureWorkspaceScratchDir: host scratch dirs are made by
  ensureScratchDirForSpec, which now has the mkdir-failure test.
- Delete buildToolCatalogOverview: the overview tests read the
  tool_catalog_search description that prepareToolSearch builds.
@ThomasK33
ThomasK33 force-pushed the ta-p3-3/test-only-helpers branch from b650ab5 to 1f4aae9 Compare October 26, 2026 13:47
@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 215e7ad Oct 26, 2026
34 checks passed
@ThomasK33
ThomasK33 deleted the ta-p3-3/test-only-helpers branch October 26, 2026 14:20
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