Repository navigation
fix(gateway): clarify URL override auth recovery - #100418
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 2:59 PM ET / 18:59 UTC. Summary PR surface: Source +7, Tests +2. Total +9 across 3 files. Reproducibility: yes. from source inspection: current main throws only the generic URL override explicit-credentials message in the Gateway and TUI tests, while the existing docs/credential resolver already define distinct CLI and env recovery paths. I did not run local tests because this review is read-only. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the narrow shared-guard error-message change once the protected maintainer landing path and required checks are satisfied, preserving existing credential precedence and fail-closed behavior. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main throws only the generic URL override explicit-credentials message in the Gateway and TUI tests, while the existing docs/credential resolver already define distinct CLI and env recovery paths. I did not run local tests because this review is read-only. Is this the best way to solve the issue? Yes. The shared ensureExplicitGatewayAuth guard is the right layer because both Gateway call paths and the TUI CLI override path use it, and the patch changes only recovery text plus focused assertions rather than credential precedence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c730d8f1f1bb. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +7, Tests +2. Total +9 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Land-ready on exact head
|
Co-authored-by: Gabriel A. Mays <[email protected]>
0373543 to
5eb0624
Compare
|
Merged via squash.
|
Co-authored-by: Gabriel A. Mays <[email protected]>
What Problem This Solves
Gateway URL overrides deliberately refuse implicit configuration/device credentials, but the generic error did not tell users how recovery differs between CLI
--urlandOPENCLAW_GATEWAY_URL. This made a correct security boundary look like a broken token lookup in CLI, TUI, container, and SSH-tunnel workflows.This is the clean maintainer replacement for #54692. The contributor branch could no longer be updated after final-base drift; this branch preserves Gabriel A. Mays's authorship with
Co-authored-byand carries only the reviewed three-file fix.Why This Change Was Made
Keep the existing authentication decisions unchanged and add source-specific recovery text inside the existing guard. CLI overrides explain both explicit
--token/--passwordand removing--urlfor the configured local/tunneled target. Environment overrides name the paired environment credentials and state that config credentials are intentionally not reused.User Impact
The failure remains fail-closed, but now points directly to the safe fix for the override source. No credential precedence, fallback, configuration, or protocol behavior changes.
Release note: Improved Gateway URL override authentication errors with direct recovery guidance for CLI and environment-based targets.
Evidence
tbx_01kwsk3hcn6vvycz4w38neampv, run 28747758963: gateway matrix 468/468 passed; TUI gateway 29/29 passed.corepack pnpm check:changedpassed for the exact three-file core/coreTests scope.tbx_01kwsjkjbed1es2qrvgym31y8d: realgateway health --url, env URL override, andtui --urlcommands each rendered the correct source-specific recovery text; combined build + live run exited 0.git diff --checkpassed.No config, protocol, dependency, or storage surface changes.