Repository navigation
refactor: remove dead branches and test-only helpers - #121345
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 8:00 AM ET / 12:00 UTC. ClawSweeper reviewWhat this changesRemoves unused private branches and error subclasses, moves live-test-only helpers under test support, and preserves deprecated Gateway error-code constants for client compatibility. Merge readinessKeep open for maintainer handling: the cleanup remains useful and no discrete source-level defect was found, but the branch is behind main, its current-head checks are not green, and the required direct Codex-contract inspection was unavailable. Priority: P3 Review scores
Verification
How this fits togetherThe PR touches agent execution, bundled channel plugins, Gateway protocol errors, and test-only live-validation utilities. Runtime paths emit errors and lifecycle events to clients, while the relocated helpers feed expensive provider-backed regression tests. flowchart LR
A[Agent and channel runtime] --> B[Private errors and lifecycle paths]
B --> C[Gateway protocol clients]
A --> D[Live test helpers]
D --> E[Regression test runners]
C --> F[Operator and client behavior]
Decision needed
Why: The protected maintainer label prevents automated closure, while repository policy requires personal inspection of the sibling Codex source for this dependency-backed change and the available check state does not establish a landable head. Before merge
Agent review detailsSecurityNone. PR surfaceSource -125, Tests 0, Docs 0, Generated 0, Other +7. Total -118 across 43 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase the coherent net-negative cleanup onto current main, establish an exact-head green or explicitly waived CI result, and directly recheck the upstream Codex contract before landing. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes source-proven zero-set-site switches and private error types rather than fixing a reported runtime failure. Is this the best way to solve the issue? Yes, conditionally: deletion at the private owner boundaries and relocation to test support are the cleanest shape, but landing still requires base-refresh, check, and Codex-contract evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6b565c047f98. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
7946ee6 to
4d0cb66
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
47c51e5 to
87091ff
Compare
87091ff to
e21c0d5
Compare
e21c0d5 to
c4ee38c
Compare
c4ee38c to
399a8a6
Compare
d9fe155 to
78d6af3
Compare
|
Final-head review refresh requested for The previous review's rank-up moves are addressed on this head:
The head changed materially since the prior review: commit @clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Merged via squash.
|
What Problem This Solves
OpenClaw retained dead configuration branches, cosmetic private error subclasses with no type-sensitive consumers, and runtime-located helpers used only by tests. That stale surface made ownership and protocol review harder without preserving live behavior.
While this PR was open, it temporarily carried a repair for the delivery-custody architecture introduced by #121507. Current
mainexplicitly reverted #121507, so commitd9fe1554e49d9741ae06d39ccccf468d670ce2cband all ten of its delivery/test-harness paths were dropped before the final rebase. This PR does not partially restore that reverted architecture.This cleanup was AI-assisted and maintainer-reviewed.
Why This Change Was Made
The change removes verified zero-set-site options and unused private error subclasses, and moves live-test-only helpers under test-support ownership. Messages and meaningful
causechains are preserved with nativeErrorandAggregateError; named error types that still carry a real consumer contract remain untouched.ErrorCodes.NOT_LINKEDandErrorCodes.AGENT_TIMEOUThave no current server emitters, but they are shipped public API through the Gateway protocol and generated Swift. They therefore remain as deprecated source-compatibility constants without a protocol version bump. Their dormant admin HTTP mappings and documentation also remain because the generic adapter may receive these codes from external or plugin Gateway errors.MCP_APP_VIEW_EXPIREDremains unchanged because it has a live producer in the Gateway MCP app handler and live consumers in the Control UI. Live contracts including worker error metadata, swarm guest error shape, and reply-session generation invalidation semantics are also unchanged.The cache regression runner and related live-only utilities now live under
src/agents/test-helpers/, the test-project router follows their new path, and the prompt-caching documentation points to the canonical runner location.User Impact
Runtime behavior is unchanged. Existing TypeScript and Swift clients retain both compatibility Gateway error-code cases, with no protocol, config, schema, migration, or changelog change.
Rename-aware review metrics against final
origin/main: production+66/-191(net-125); tests and test support+54/-46(net+8); docs net zero; generated API baseline net zero; one obsolete Knip exception removed.Evidence
Final exact branch head:
f3fb726aad82e4fe757eb1e20e4662abe590cfde.pnpm protocol:check:swift: passed.pnpm protocol-registry:check: passed.pnpm plugin-sdk:surface:check: passed (4,847 public exports; 2,917 public callable exports).pnpm plugin-sdk:api:genwas used after taking current main's generated baseline;pnpm plugin-sdk:api:checkpasses.pnpm docs:list, andgit diff --check: passed.origin/main: three complete chunks, zero findings, clean secret scan, overall patch-correct confidence 0.99.31392496042passed conflict-marker classification and stopped only at the known repository-wide environment-variable ratchet (503observed versus budget507). This PR does not edit that protected budget; exact-head pull-request CI remains the landing authority.openai/codexinspection confirms the retained contract:codex-rs/app-server-protocol/src/protocol/common.rs:504mapsThreadForktothread/fork, andcodex-rs/app-server-protocol/src/protocol/v2/thread.rs:509definesThreadForkParams. The removed private OpenClaw cleanup-error subclass does not cross that protocol boundary.d9fe1554e49appears in the final branch diff.