Repository navigation
fix(cli): explain failed local secret resolution - #141395
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 1:34 PM ET / 17:34 UTC. ClawSweeper reviewWhat this changesThe PR updates CLI secret-resolution errors to explain that local fallback also failed and extends the existing regression test. Merge readiness✅ Ready for maintainer review Keep open: current main still gives incomplete recovery guidance. The focused patch has no actionable correctness findings and remains useful. Priority: P3 Review scores
Verification
How this fits togetherCLI commands resolve configured secret references through the Gateway, then try local resolution when the Gateway request fails. The resulting configuration lets commands proceed, while unresolved required secrets produce an error. flowchart TD
A[CLI command and secret references] --> B[Gateway resolution]
B -->|Success| E[Resolved command configuration]
B -->|Failure| C[Local resolution]
C -->|Success| E
C -->|Required secrets unresolved| D[Error with recovery guidance]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +4. Total +4 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep recovery guidance at the shared failure boundary while preserving strict rejection, successful local fallback, and secret masking. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the path: an unavailable Gateway plus an unresolved required local secret reaches the misleading current-main error. Runtime reproduction was not performed during this read-only review. Is this the best way to solve the issue? Yes, updating the existing shared error is a narrow solution, and extending its existing failure test protects the observable guidance without adding a parallel resolution path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2a6df250c911. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Verified landing: Proof: Real source CLI
Five focused controls passed. Exact-head local ClawSweeper passed at tier B with no findings. Required CI passed. AI-assisted. |
When Gateway secret resolution is unavailable and local resolution also fails, strict commands only advised starting the Gateway. The final error now identifies the local failure too and advises checking configured secret sources and Gateway access. Strict rejection, the JSON error shape and the existing Gateway context stay intact; no local error, reference or secret value is added to output. Validation: - The new regression assertion fails on main `aeb9557d4092`; five focused strict, local-success and incomplete-snapshot controls pass with the fix. - Real source CLI `models status --json --check`: a missing secret file still exits 1 with both resolution failures explained; a valid local file still exits 0 without a Gateway. Both outputs preserve secret-value masking. - Pinned formatting, syntax-only lint, assertion-safety and max-lines ratchets pass. Full type checks remain CI-owned. Production changes one message with no net line growth. AI-assisted. Co-authored-by: Ayaan Zaidi <[email protected]>
When Gateway secret resolution is unavailable and local resolution also fails, strict commands only advised starting the Gateway. The final error now identifies the local failure too and advises checking configured secret sources and Gateway access. Strict rejection, the JSON error shape and the existing Gateway context stay intact; no local error, reference or secret value is added to output.
Validation:
4b1f467dff76; five focused strict, local-success and incomplete-snapshot controls pass with the fix.models status --json --check: a missing secret file still exits 1 with both resolution failures explained; a valid local file still exits 0 without a Gateway. Both outputs preserve secret-value masking.Production changes one message with no net line growth. AI-assisted.