Repository navigation
fix(status): prepare runtime config before resolving online usage - #170692
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
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. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 14, 2026
…enclaw#170692) Publish the existing online status config read before resolving usage so Codex runtime readers retain the selected account identity. Await publication and preserve the explicit usage gate without an extra read or synchronous fallback. The status owner tests and original unchanged auth product case passed. The only failing static leaf is the independently verified main recovery-fixture TS2322, repaired separately in openclaw#170722.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
status --usage --jsoncan lose the selected Codex account identity and retain a generic OpenAI “Token expired” result. Passive online status reads the full config for usage arguments, but never prepares it for plugin runtime readers. Codex registration then reachesruntime.config.current()with no published snapshot.The source-supported culprit is 7e48efb (#169714), which changed cold runtime reads to require prior asynchronous preparation. This repair reuses the status owner's existing config read and awaits
setAppliedRuntimeConfigSnapshot(runtimeConfig, sourceConfig)before resolving usage. It preserves the explicit--usagegate and source config; there is no second read, synchronous fallback, or plugin-loader change.The new regression invokes the real online-usage callback from an empty runtime snapshot and checks that policy and source config are visible when usage resolution starts. It catches both missing publication and a missing
await. The adjacent usage-routing fixtures never setscan.collection, so they do not enter this callback and need no changes.Evidence
Failure evidence: CI run 38346907753, job 115130732432 failed
codex-auth-product-proof.e2e.test.ts/ “repairs mixed legacy auth into SQLite and sends the selected OAuth profile to app-server”. The same missing-email assertion was reproduced on baseline 592b7e4 after Doctor and the selected-account Gateway turn succeeded. That diagnostic run substituted the verified version constant0.160.0for the broad test-API version lookup, raised the fixture test limit from 180 to 900 seconds, and raised Doctor/status managed-command fixture limits from 120 to 600 seconds. All assertions and product source stayed unchanged; the product status timeout stayed60000. Fixtures were restored afterward. The test took 196.211 seconds, 286.33 seconds total; those loaded-host timings are not performance claims.Proof: changed-file oxfmt and oxlint plus
git diff --checkpassed. One completed isolated Codex autoreview returnedscoped-cleanat P0–P2; the earlier interrupted attempt never produced a result. No local tests or broad scans were run under the compute-conservation rule. The status owner file passed all five tests in PR CI (run 38353082464, job 115149998826): 2.86 seconds Vitest, 5.02 seconds including its wrapper. The only failed leaf was a stale mock-baseline row for the replaced status-runtime-shared mock; follow-up b80841f removes that exact row. The original unchanged hosted product case passed on final head b80841f in run 38354682615/job115154703436: 105.048 seconds for the case, 155.13 seconds for the filtered file (158.41 seconds with its wrapper). The unrelated second case was intentionally filtered out. The final-head baseline/ratchet job also passed: T1 454→454, compatibility 9→9, and all dialect categories 0→0. One unrelated type defect in the preparation-recovery test fixture is being fixed separately:main-session-restart-recovery-admission.test.ts:705uses unsupportedtitleinstead oflabel. It was introduced by 2251880 on main and is repaired separately in #170722. The actual CI merge a354bc947d26, its main parent 0ae42f0, and observed main 95b3b97 have identical fixture, session-entry type, and failing agents-sessions typecheck configuration blobs. This is the same TS2322 rule on the same file; the inherited static-failure exception applies. All other selected static and security gates passed.Scope: three files, production +3/−1 lines, tests +61 lines, and one obsolete baseline row removed. No schema, SDK, update, or plugin-loading lifecycle changes; no removed authority checks. No warmed-path SQL/request or T1 change is claimed, so no SQL harness was run.