🤖 refactor: auto-cleanup#3635
Conversation
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
The streamToUint8Array helper in src/node/runtime/streamUtils.ts had zero references anywhere in the repository (verified via git grep across all tracked files). It was orphaned after the experimental image-editing tool work (#3282) that introduced it. Removing it is behavior-preserving: the function uses only global APIs, so no imports needed cleanup, and the file's other exports (shescape, streamToString) are unaffected.
1390676 to
4c966ec
Compare
|
@codex review Small follow-up cleanup: the |
|
To use Codex here, create a Codex account and connect to github. |
4c966ec to
94e4987
Compare
|
This is an infrastructure/flaky failure, not a code regression:
No code was pushed. A re-run of the |
…Call The header summary pill computed its tone with hardcoded "danger"/"warn"/"muted" literals that duplicated the existing GROUP_TONE mapping (already used for the dot chips just below). Pick the most severe non-empty OutcomeGroup and map it through GROUP_TONE so the group->tone relationship is single-sourced. Behavior-preserving: GROUP_TONE.failed/blocked/settled equal the prior literals.
94e4987 to
f698445
Compare
Summary
This is the long-lived auto-cleanup PR. Each run, the auto-cleanup agent reviews new commits merged to
mainand applies at most one extremely low-risk, behavior-preserving cleanup.This run de-duplicates the header-summary tone computation in
WorkspaceLifecycleToolCallso the group → tone mapping lives in a single place.Background
WorkspaceLifecycleToolCall(added in #3638) renders thetask_workspace_lifecycletranscript card. Its collapsed header pill picks a "worst" tone for mixed batches with a ternary of hardcoded token names ("danger"/"warn"/"muted"). Those literals silently duplicate the existingGROUP_TONErecord, which already maps eachOutcomeGroupto its tone and is used right below for the per-group dot chips. Repeating the mapping risks the two drifting apart ifGROUP_TONEever changes.Implementation
OutcomeGroup(failed→blocked→settled), then resolve its tone throughGROUP_TONEinstead of re-spelling the tone literals.GROUP_TONE.This is behavior-preserving:
GROUP_TONE.failed === "danger",GROUP_TONE.blocked === "warn", andGROUP_TONE.settled === "muted", so the selected tone is identical for every input.Earlier cleanups in this PR
streamToUint8Arrayhelper (src/node/runtime/streamUtils.ts): the helper was introduced alongside the experimental image-editing tool (🤖 feat: add experimental image editing tool #3282) but had no remaining callers anywhere in the repo, so it was dead code.Validation
make static-checkpasses (eslint, typecheck ×2, prettier, shfmt, ruff, shellcheck, hadolint, code-docs-links, eager-imports).bun test src/browser/features/Tools/WorkspaceLifecycleToolCall.ui.test.tsx(18 tests) passes, covering the outcome-group classification the header pill depends on.Risks
Negligible. Both changes are local and behavior-preserving — one removes a zero-reference symbol, the other re-routes a tone lookup through an equal-valued constant with no rendered-output change.
Auto-cleanup checkpoint: 7aaf5b5
Generated with
mux• Model:anthropic:claude-opus-4-8• Thinking:xhigh