Repository navigation
fix(browser): keep inspection state independent of error wording - #128625
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 4:20 AM ET / 08:20 UTC. ClawSweeper reviewWhat this changesThe PR preserves validated Browser action-error codes through direct HTTP and browser-node proxy failures so the Control UI can classify disabled inspection without parsing error wording. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessNo blocking correctness defect was found in the proposed structured-error path. Keep this maintainer-authored, maintainer-labeled PR open for explicit maintainer review after its exact-head CI failure is resolved and in-progress checks finish. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherBrowser action routes produce structured failures that travel through either the local Browser client or an optional browser node and Gateway. The Control UI Browser panel consumes the resulting request error to select its inspection state. flowchart LR
A[Browser action route] --> B[Validated action error]
B --> C[Local HTTP client]
B --> D[Browser node proxy]
D --> E[Gateway browser request]
C --> F[Browser service error]
E --> G[Gateway request error]
F --> H[Control UI inspection state]
G --> H
Decision needed
Why: The PR is authored by a MEMBER and carries the protected maintainer label, so automated cleanup must leave the merge decision to a maintainer despite the clean functional review. Before merge
Agent review detailsSecurityNone. PR surfaceSource +36, Tests +162. Total +198 across 12 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the single Browser-owned closed-code parser and structured-first UI classifier, then merge only after the failed exact-head check is resolved and required checks are green. Do we have a high-confidence way to reproduce the issue? Yes for the source-level defect: current main discards the action code in Is this the best way to solve the issue? Yes. Preserving the producer-owned code through the existing bounded transports and using prose only when no structured code state exists is more maintainable than extending message matching. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ff45aafc5e18. LabelsLabel 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 (3 earlier review cycles)
|
|
Addressed the rolling-upgrade finding in exact head Proof: the new old-node case failed before the repair; 46 focused Control UI tests pass, |
bde66fe to
14b1bae
Compare
14b1bae to
64b2220
Compare
|
@/tmp/opencode/pr-128625-proof-final.md |
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Merged via squash.
|
…nclaw#128625) * fix(browser): preserve action error codes * fix(browser): retain legacy evaluation fallback * fix(browser): preserve unknown action-code presence * fix(browser): preserve error payload narrowing
Closes #128624
What Problem This Solves
Fixes an issue where operators using the Control UI Browser panel could get the wrong inspection availability state when Browser error wording changed or the Browser request was routed through a node. The Browser route already emitted
ACT_EVALUATE_DISABLED, but intermediate Browser boundaries dropped that fact and the UI matched human-readable prose instead.Why This Change Was Made
The Browser plugin now owns one closed
ACT_*code set and preserves validated codes through direct HTTP and node-proxy error envelopes. Gatewaybrowser.requestalready carries the route body in additive errordetails, so the Control UI can consumedetails.codewithout a Gateway protocol field change or version bump.Unknown metadata remains discarded at both Browser boundaries. The patch does not remove shipped Gateway text fallbacks: PRs #111013 and #120505 deliberately retained compatibility with older string-only gateways. Unknown-method and audit-cursor cases also remain unchanged because they still require new additive Gateway detail codes.
Blast radius checked:
/actroute and all six stableACT_*codes.BrowserServiceError.browser.request, andGatewayRequestError.details.User Impact
Browser inspection now becomes unavailable from the machine-readable Browser fact, independent of human error wording and whether Browser execution is local or node-proxied. Operators keep the localized unavailable state instead of a generic request failure.
Evidence
Pre-fix deterministic reproduction on
mainat082cdc88661:node --import tsx --input-type=module -e 'const { createBrowserProxyFailure, parseBrowserProxyFailure } = await import("./extensions/browser/src/browser-proxy-envelope.ts"); const input = { error: "evaluation disabled", code: "ACT_EVALUATE_DISABLED" }; const output = parseBrowserProxyFailure(createBrowserProxyFailure(403, input)); console.log(JSON.stringify({ input, output }, null, 2)); if (output?.error.body.code !== input.code) process.exitCode = 1;'Observed pre-fix: exit 1;
{ error: "evaluation disabled", code: "ACT_EVALUATE_DISABLED" }became{ error: "evaluation disabled" }.Regression proof against pre-fix source:
Observed pre-fix: 4 new tests failed for the intended reason: code absent from the parser, proxy envelope, HTTP
BrowserServiceError, and Control UI state classification.Observed fixed head:
b8c0bc20114c7e954816b9b13f1d6702b046b40f: 123 focused Browser/UI boundary tests passed, plus 2/2 isolated mocked-Gateway Control UI flows for structured-code and legacy no-code responses.origin/mainwithgpt-5.6-sol, high reasoning, and P1 scope returned clean with no accepted/actionable findings.check-changedpassed formatting, guards, plugin boundaries, dead-code scans, and i18n before local typecheck hit the host's stale shared dependency tree (@types/pakomissing). Exact-head hosted CI is the clean typecheck authority.No visual layout or copy changed, so screenshot evidence is not applicable. The observable state transition is covered at the real Control UI controller boundary with a
GatewayRequestErrorwhose message intentionally does not containevaluateEnabled=false.