Repository navigation
fix(gateway): refresh model availability after OAuth renewal - #102289
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 8, 2026, 4:42 PM ET / 20:42 UTC. Summary PR surface: Source 0, Tests +71. Total +71 across 2 files. Reproducibility: yes. from source inspection and the added regression shape: current main can consult a stale runtime auth snapshot before persisted auth, while the PR test models fresh persisted OAuth plus an expired runtime snapshot. I did not run the tests in this read-only review. Review metrics: none identified. Stored data model 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 persisted-auth read for Gateway browse/metadata availability while keeping prepared execution on the existing runtime auth snapshot path. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection and the added regression shape: current main can consult a stale runtime auth snapshot before persisted auth, while the PR test models fresh persisted OAuth plus an expired runtime snapshot. I did not run the tests in this read-only review. Is this the best way to solve the issue? Yes. The fix is at the narrow browse/metadata availability boundary, uses the existing persisted read-only auth-store helper, and avoids changing the runtime execution auth snapshot path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b81666ca6af2. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source 0, Tests +71. Total +71 across 2 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
|
|
Merged via squash.
|
Backport of #102289 to release/2026.7.1.
…w#104732) Backport of openclaw#102289 to release/2026.7.1.
Summary
Verification
node scripts/run-vitest.mjs src/gateway/server-methods/models.test.ts --reporter=verbosenode scripts/run-vitest.mjs src/gateway/server.chat.gateway-server-chat-b.test.ts -t "chat.metadata coalesces configured models and text commands" --reporter=verbosenode_modules/.bin/oxfmt --write src/gateway/server-methods/models-list-result.ts src/gateway/server-methods/models.test.tsgit diff --checkpnpm check:changed --base b81666ca6af25c86cc099983a4358cdc5ea9ced8cbx_1f05b0e6e357run_8d4a5fccd4f6Real behavior proof
Behavior addressed: Control UI model rows remain unavailable after OAuth is refreshed by a separate CLI process because
chat.metadatareads a stale gateway runtime snapshot.Real environment tested: macOS source checkout for focused Gateway RPC tests and AWS Linux Crabbox for the exact-base changed gate.
Exact steps or command run after this patch: Ran the focused
models.listregression suite, the realchat.metadataGateway RPC test, and exact-basepnpm check:changed.Evidence after fix: The regression stores fresh OAuth in SQLite, installs an expired process-local snapshot, and receives
available: true; thechat.metadataRPC test also passes.Observed result after fix: Model availability follows the refreshed persisted credential without mutating or refreshing the gateway execution snapshot.
What was not tested: A live xAI OAuth refresh against a packaged patched gateway; the provider-independent stale-snapshot contract and the Control UI metadata RPC path were exercised directly.