Repository navigation
fix(setup): activate saved sign-ins through Gateway reload - #148312
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: blocked before merge. Reviewed September 14, 2026, 10:20 PM ET / September 15, 2026, 02:20 UTC (Revision 6). ClawSweeper reviewWhat this changesCoordinates saved-sign-in activation with Gateway reload, restores owned settings and credentials after failure, and shares secret-safe error handling across immediate and deferred completion. Merge readiness⛔ Blocked before merge - 5 items remain This remains a useful fix: current main retains the failing deferred-activation path, and the supplied recovery proof matches this head’s central implementation. No blocking code defect was found. Priority: P2 Review scores
Verification
How this fits togetherSetup verifies a saved provider credential before selecting it for an agent. The Gateway config reloader then publishes the selected connection, while the config and credential stores own conditional recovery. flowchart TD
A[Saved sign-in] --> B[Setup verification and confirmation]
B --> C[Config write preflight]
C --> D{Can apply immediately?}
D -->|No| E[Preserve working connection and explain prerequisite]
D -->|Yes| F[Gateway reload and credential activation]
F -->|Success| G[Next conversation reply]
F -->|Failure| H[Restore still-owned settings and credentials]
Decision needed
Why: The approval names the exact head, but neither its text nor the available review metadata establishes the listed-owner relationship. Before merge
Agent review detailsSecurityNone. PR surfaceSource +233, Tests +457. Total +690 across 22 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep activation and conditional recovery with the existing Gateway, config, and credential owners, preserving the working connection and explaining prerequisites before a refused switch. Do we have a high-confidence way to reproduce the issue? Yes: verify and confirm a saved replacement with Gateway reload disabled, then restart unchanged state. Current-main source retains the failure mechanism, and the PR supplies before/after observations; this review did not execute the scenario. Is this the best way to solve the issue? Yes: extending the existing reload receipt and conditional recovery owners addresses the failure without another persistence system or public configuration option. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 210907758ea0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
0d131cf to
e0e625d
Compare
e0e625d to
d9dbb0e
Compare
d9dbb0e to
41f365e
Compare
|
landpr-approve-admin-merge |
|
Proof: The same conversation completed before and after restart following a refused saved-sign-in activation. Installed stable-update and Doctor checks also preserved successful activation and conversation use.
| Before | After | |
…148312) Prepare saved-credential activation inside the existing Gateway reload transaction. Recover only owned config and credential writes after refusal or failure, preserving newer edits and the working connection. Reload prerequisites require an explicit retry. Recovery from process termination during the handoff remains outside this change. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
A refused saved-sign-in activation can still select an inactive credential in the agent's saved settings. The current conversation works until Gateway restart, then fails authentication.
Why This Change Was Made
The existing config reloader prepares activation before publishing the runtime. Config and credential owners undo only their own changes, preserving newer edits. Setup waits outside its execution queue. Initial and deferred errors share secret-safe handling and retain their error types.
User Impact
A refused switch keeps the working selection usable before and after restart. Successful activation makes the next reply use the replacement. Reload-disabled or restart-dependent setup reports the prerequisite before changing the selected connection.
Evidence
A running pre-change Gateway at 75ca643 verified the saved connection and received real wizard confirmation. Its reload-disabled refusal persisted the inactive per-agent selection. The same conversation worked immediately, then failed after restarting unchanged state with an unconfigured-profile error and no provider request.
The matching corrected build at aa8a2e284453 preserved the working agent/model settings. After the same refusal and unchanged-state restart, the same conversation completed through the working provider with the expected credential. The affected reload, recovery, and credential owners are unchanged at 41f365e.
The installed v2026.9.4 CLI also updated itself to the corrected build. Hot reload activated a saved secret reference, and the next reply used it in the same conversation. The secret stayed out of config, profile plaintext, and captured output.
The earlier d9dbb0e checks passed: 79 runtime/dependency controls, 76 CI planner checks, lint, types, and protocol generation. The 41f365e refresh preserves all 22 changed files, passes lint/types/protocol checks and 92 checks covering the repaired test routing from main.
Compatibility
No new schema, storage format, or config option. Doctor preview preserved settings; repair retained connection intent; repeated repair was idempotent. The existing fixture warnings remain documented. Successful activation and its conversation also survived Doctor and restart.
Recovery requires the Gateway process to stay alive; a process exit between saving config and preparing activation can leave saved settings selecting an inactive credential.
Consumers
CLI, guided setup, and Gateway activation share the coordinator. Existing config and credential owners retain publication and conditional recovery.
Refs #136257. Builds on #148195.