Repository navigation
refactor(auth): bind OAuth queues to native provider owners - #177676
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
Codex review: needs maintainer review before merge. What this changesThis PR binds OAuth managers directly to existing provider and bootstrap operations and moves fixtures to those module boundaries. Example: Two managers request an expired openai:default credential.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored refactor removes a private adapter while preserving independent OAuth queues and credential settlement; no actionable introduced defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe auth-profile resolver accepts selected credentials, coordinates refresh through queues and durable store ownership, and returns validated provider access credentials. flowchart TD
A[Selected auth profile] --> B[OAuth manager queue]
B --> C[Durable refresh claim]
C --> D[Native provider operations]
D --> E[Provider runtime]
E --> F[Credential settlement]
F --> G[Validated access]
Technical reviewBest possible solution: Keep the shared provider-operation leaf and independent managers while preserving the existing credential lifecycle owners. Do we have a high-confidence way to reproduce the issue? No user bug is claimed; source inspection confirms a private adapter with one production implementation and test alternatives. Is this the best way to solve the issue? The extraction is a focused cutover: both production consumers reuse the existing operations, and the constructor continues to provide independent queues. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 648ea4c01433. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -18, Tests +47. Total +29 across 15 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 19, 2026, 4:11 PM ET / 20:11 UTC. |
|
Merged via squash.
|
* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits) test(gateway): restore local probe deferred import fix(agents): release prompt diagnostics for retired sessions (#177614) fix(release): tag restart plugin cohorts consistently (#177725) refactor(ui): inline single-caller detail requests (#177705) chore(i18n): refresh native locales (#177721) refactor(codex): drop unread private runtime reports (#177689) refactor(ui): consolidate static artwork registries (#177692) refactor(ui): derive settings schema analysis in the view (#177624) refactor(media): consolidate capability defaults and compression grids (#177665) refactor(auth): bind OAuth managers to native provider operations (#177676) refactor(ui): remove redundant component rendering layers (#177607) fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082) fix(agents): report failed secret input prompt delivery (#177688) refactor(ui): share chat message render contracts (#177668) fix(ui): settle model status after overlapping publication (#177667) refactor(gateway): reuse native workspace and lifecycle facts (#177670) refactor(runtime): rely on canonical async lifecycle owners (#177635) refactor: fold private operation helpers into their callers (#177655) refactor(ui): remove unused chat leaf element adapters (#177582) perf(talk): use published authority for foreign voice writes (#177533) ...
#167350) * fix(pr): retain the admitted workflow across maintainer commands * fix: refresh the reviewed correction baseline Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163 * fix(pr): preserve cold workflow admission and repository identity * chore(pr): integrate canonical main CI repair * commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits) test(gateway): restore local probe deferred import fix(agents): release prompt diagnostics for retired sessions (#177614) fix(release): tag restart plugin cohorts consistently (#177725) refactor(ui): inline single-caller detail requests (#177705) chore(i18n): refresh native locales (#177721) refactor(codex): drop unread private runtime reports (#177689) refactor(ui): consolidate static artwork registries (#177692) refactor(ui): derive settings schema analysis in the view (#177624) refactor(media): consolidate capability defaults and compression grids (#177665) refactor(auth): bind OAuth managers to native provider operations (#177676) refactor(ui): remove redundant component rendering layers (#177607) fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082) fix(agents): report failed secret input prompt delivery (#177688) refactor(ui): share chat message render contracts (#177668) fix(ui): settle model status after overlapping publication (#177667) refactor(gateway): reuse native workspace and lifecycle facts (#177670) refactor(runtime): rely on canonical async lifecycle owners (#177635) refactor: fold private operation helpers into their callers (#177655) refactor(ui): remove unused chat leaf element adapters (#177582) perf(talk): use published authority for foreign voice writes (#177533) ... Co-authored-by: Vincent Koc <[email protected]>
openclaw#167350) * fix(pr): retain the admitted workflow across maintainer commands * fix: refresh the reviewed correction baseline Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163 * fix(pr): preserve cold workflow admission and repository identity * chore(pr): integrate canonical main CI repair * commit '4f8617589b6c71d754171052b603fe534901bfa1': (52 commits) test(gateway): restore local probe deferred import fix(agents): release prompt diagnostics for retired sessions (openclaw#177614) fix(release): tag restart plugin cohorts consistently (openclaw#177725) refactor(ui): inline single-caller detail requests (openclaw#177705) chore(i18n): refresh native locales (openclaw#177721) refactor(codex): drop unread private runtime reports (openclaw#177689) refactor(ui): consolidate static artwork registries (openclaw#177692) refactor(ui): derive settings schema analysis in the view (openclaw#177624) refactor(media): consolidate capability defaults and compression grids (openclaw#177665) refactor(auth): bind OAuth managers to native provider operations (openclaw#177676) refactor(ui): remove redundant component rendering layers (openclaw#177607) fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (openclaw#166082) fix(agents): report failed secret input prompt delivery (openclaw#177688) refactor(ui): share chat message render contracts (openclaw#177668) fix(ui): settle model status after overlapping publication (openclaw#177667) refactor(gateway): reuse native workspace and lifecycle facts (openclaw#177670) refactor(runtime): rely on canonical async lifecycle owners (openclaw#177635) refactor: fold private operation helpers into their callers (openclaw#177655) refactor(ui): remove unused chat leaf element adapters (openclaw#177582) perf(talk): use published authority for foreign voice writes (openclaw#177533) ... Co-authored-by: Vincent Koc <[email protected]>
…uth provider seam openclaw#177676 made createOAuthManager take no adapter; provider I/O now goes through oauth-provider-operations. The durable-owner case still passed an adapter, so tsgo reported TS2554/TS7006 and at runtime the synthetic refresh never ran: the case waited on providerStarted until Vitest's 120000 ms limit (CI run 39457916748, checks-node-changed-1 and check-test-types-core-2). The case now installs the refresh through mockOAuthProviderOperations, restores those spies after each case, and races provider start against the run so a run that settles first fails with its own error instead of a test timeout.
What Problem This Solves
OAuth managers carried a private four-operation adapter with one real serving implementation and test-only alternatives.
User Impact
No intended user-visible change. Independent refresh queues, credential authority, cancellation, recovery, persistence, and accepted-work settlement remain. Public runtime refresh and Plugin SDK contracts are unchanged.
Why This Change Was Made
Bind managers directly to the native provider/bootstrap owners. A small provider-operation leaf serves both the manager and the existing public runtime-refresh wrapper without a circular import. The genuine independent-manager constructor stays; this does not replace real queues with a singleton.
Fixtures now control external provider I/O at the actual module boundary while exercising real locks, workers, claims, and store mutation. Only the impossible test that mutates a full credential through a capability query is removed: the native capability API receives provider/config, not credentials. Actual store-replacement and refresh-mutation protections remain covered.
This is an auth-owner area split of the wider cleanup. Net production: 18 lines removed, including all moved operation bodies; test/support: 47 lines added; overall: 29 lines added. No schema, dependency, config, CLI, or protocol changes.
Best-effort tradeoffs accepted
None newly introduced. No current-authority, FIFO, durability, security-effect, or shutdown-settlement guard is removed.
Evidence