Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 11:02 PM ET / August 25, 2026, 03:02 UTC. ClawSweeper reviewWhat this changesThe PR keeps prepared model catalogs and reply-dispatch snapshots aligned with a committed no-op Gateway configuration update, rebuilding instead when provider-auth state changes. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep this PR open for landing: current main still lacks the committed-config restamp path, while the branch has a source-backed fix, focused regressions, and inspected before/after Telegram proof. No blocking patch defect was found; rebase/refresh and exact-head required checks remain the merge gate. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherGateway configuration transactions publish resolved runtime configuration, while prepared model-runtime owners serve model catalogs to reply and channel-command paths. The PR keeps those prepared owners synchronized with the committed generation without rebuilding artifacts for model-neutral edits. flowchart LR
A[Config edit] --> B[Gateway reload planner]
B --> C{No-op and auth-neutral?}
C -->|Yes| D[Restamp prepared owners]
C -->|No| E[Rebuild prepared owners]
D --> F[Model catalog and reply dispatch]
E --> F
F --> G[Channel model picker]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +130, Tests +451. Total +581 across 12 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the reload planner as the sole classification authority, restamp only the resolved committed config for auth-neutral no-op publications, and land the refreshed exact head once required checks are green. Do we have a high-confidence way to reproduce the issue? Yes—source establishes the stale whole-config identity path, and the supplied real Telegram baseline reproduces the resulting silent callback failure; this review did not rerun it locally. Is this the best way to solve the issue? Yes—the fix acts at the Gateway publication owner, preserves existing immutable readers, and uses the established reload-plan classification rather than adding a parallel model-config policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fd6576afcf82. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
e62f2b0 to
a5fd35f
Compare
|
Updated the PR description; two notes on the review. The two P1 Telegram findings are a stale-base artifact. This branch touches no Telegram files. It was based on On real behavior proof. Agreed, and the description now carries the live before capture: two If there is a reproduction that does not require a configured Discord application, point me at it and I will run it against this branch and post the capture. |
Mantis Telegram proof — PASSSummary: On current main, an unrelated no-op config publication left the Telegram /models provider callback permanently silent while the Gateway remained ready. At the pull request revision, the same callback continued to edit the Telegram message into the nine-model OpenAI catalog after the same config publication, and a subsequent Telegram turn also completed through the mock provider.
Motion-trimmed clips: |
|
Real behavior proof added to the description — this is the evidence the review asked for. Reproduced on a second, independent host running stock current Two findings that took most of the effort and are worth recording: The failure is specific to the interaction path. Four other surfaces against the same stock build do not reproduce it — a minimal two-provider Gateway, the Restart is the only recovery and it is total. On the originally reporting host a restart at 16:01:23 ended both symptoms at once: the background-lane retry logged 1248 occurrences from 11:19:43 to 16:01:07 and zero afterwards; Still outstanding: a matching post-fix capture on the same surface. The branch is built and deployed on that host now; I will post it. Also restating, because the 1248-row symptom is easy to misread as in scope — that is a different guard and is not claimed fixed here. |
1da29d9 to
dd8661c
Compare
…ecovers A config transaction whose reload plan is empty publishes the new runtime config but never advances the prepared model owner's config stamp. Owners are stamped with a hash of the whole config, so a key with no bearing on models leaves every strict-policy catalog read rejected for the life of the gateway process. Advance the model-neutral config stamp in place on no-op publications instead of rebuilding the prepared generation, which the planner has already determined is unnecessary. Existing leases keep their immutable snapshot, auth bindings carry onto the restamped snapshot, pending builds restamp at commit, and read-only owners are untouched. Deferred startup publication now resolves its config inside the serialized refresh so a no-op commit landing mid-startup cannot publish an already-stale stamp. Related: openclaw#128515 Co-Authored-By: Claude Opus 5 <[email protected]>
The no-op commit path resolves secrets and commits prepared.config, but the rebuild that follows used the source-derived candidate. Where resolution returns a different object -- secrets.providers.* edits, which are exactly the changes that must rebuild rather than restamp -- the rebuilt owner carries an identity no reader supplies, so every strict catalog read rejects it and the failure this change removes reappears on its own fallback path. Reuse the config the runtime-commit hook already receives, cleared per transaction so a rebuild cannot inherit one committed by an earlier one. Co-Authored-By: Claude Opus 5 <[email protected]>
76dabde to
b0de521
Compare
|
Both findings addressed. Head is now [P1] Preserve the prepared GitHub publication capability — this one is a stale-base artifact, not a real regression. This branch does not touch [P1] Use the committed runtime config for auth rewarm — real, and fixed. On the requested resolved-secret regression — I could not write an honest one, and I would rather say so than ship a green test. I wrote one, it passed, and it also passed against the unfixed source, so it proved nothing and I deleted it. The reason is the one the review already identified: the harness's secrets preparation returns the input config unchanged, and both
|
The ownership scenario returned the config secrets activation received, so a rebuild against the source candidate looked correct. Let activation resolve to a distinct object and assert by identity which config the rebuild used -- deep equality matches either object and proves nothing. Fails without the committed-config selection, passes with it. Co-Authored-By: Claude Opus 5 <[email protected]>
|
The resolved-config regression now exists. Head You were right that a narrow mechanical regression was reachable, and right about where: the ownership scenario returned the config secrets activation received. The test lets activation resolve to a distinct object and asserts by identity which config the rebuild used. That detail matters: my first attempt used Verified both directions on this head: The failure message is the point — deeply equal, different identity, which is exactly the mismatch that reaches strict catalog reads and revives the rejection.
That should close the last actionable finding; the two merge-risk items were both conditioned on this regression existing. |
|
Thanks for The no-op rebuild was passing only Verified your head independently rather than assuming: Happy for you to keep pushing directly to the branch. If you would rather I take anything from here, say the word. |
|
Exact-head landing evidence for
Exact repaired-head proof:
Hosted exact-head CI is running and remains the final merge gate. Current |
|
Merged via squash.
|
…ecovers (openclaw#128608) * fix: /models stops working after an unrelated config edit and never recovers A config transaction whose reload plan is empty publishes the new runtime config but never advances the prepared model owner's config stamp. Owners are stamped with a hash of the whole config, so a key with no bearing on models leaves every strict-policy catalog read rejected for the life of the gateway process. Advance the model-neutral config stamp in place on no-op publications instead of rebuilding the prepared generation, which the planner has already determined is unnecessary. Existing leases keep their immutable snapshot, auth bindings carry onto the restamped snapshot, pending builds restamp at commit, and read-only owners are untouched. Deferred startup publication now resolves its config inside the serialized refresh so a no-op commit landing mid-startup cannot publish an already-stale stamp. Related: openclaw#128515 Co-Authored-By: Claude Opus 5 <[email protected]> * fix(gateway): rebuild prepared owners from the committed runtime config The no-op commit path resolves secrets and commits prepared.config, but the rebuild that follows used the source-derived candidate. Where resolution returns a different object -- secrets.providers.* edits, which are exactly the changes that must rebuild rather than restamp -- the rebuilt owner carries an identity no reader supplies, so every strict catalog read rejects it and the failure this change removes reappears on its own fallback path. Reuse the config the runtime-commit hook already receives, cleared per transaction so a rebuild cannot inherit one committed by an earlier one. Co-Authored-By: Claude Opus 5 <[email protected]> * test(gateway): cover the resolved-config auth rewarm The ownership scenario returned the config secrets activation received, so a rebuild against the source candidate looked correct. Let activation resolve to a distinct object and assert by identity which config the rebuild used -- deep equality matches either object and proves nothing. Fails without the committed-config selection, passes with it. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(gateway): preserve prepared runtime options on auth rewarm --------- Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>


Related: #128515
AI-assisted: implemented by a Codex-based agent, reviewed and validated by Claude (Opus 5).
What Problem This Solves
Fixes an issue where operators who edit a config key that needs no reload work would find
/modelspermanently broken on every chat surface until they restart the gateway.
openclaw config set <key>prints "No gateway restart needed.", the config publishes, agentturns keep working, and
/readykeeps returning 200 — but the model picker never appears again.Re-running the command produces the same failure for the life of the process. The trigger key does
not have to be model-related; the reported case was
talk.realtime.instructions.Why This Change Was Made
Prepared model owners are stamped with a hash of the whole config. A config transaction whose
reload plan is empty publishes the new runtime config but never advances that stamp, so a strict
policy read compares the newly published config against the previous stamp and is rejected. Nothing
repairs it before a restart.
This advances the model-neutral config stamp in place for no-op publications rather than rebuilding
the prepared generation — a rebuild is waste when the planner has already determined that nothing
needs doing. Existing leases keep their immutable snapshot, auth stores and materializations are
carried onto the restamped snapshot, pending builds restamp at commit, and read-only owners are left
alone. Deferred startup publication now resolves its config inside the serialized refresh and fences
a superseded plugin generation, so a no-op commit that lands mid-startup cannot publish a stamp that
is already stale.
Boundaries. The advance is gated on
isNoopGatewayReloadPlan— no restart, no hot reasons, nochannel, hook, or plugin work. Hot and restart plans rebuild exactly as before. Correctness rests on
the reload rule table in
src/gateway/config-reload-plan.tsbeing the single authority on what ismodel-relevant; no second copy of that classification is introduced.
Non-goal. #128515 also reports
prepared model runtime plugin generation was supersededfrombackground lanes. That is a different guard and this change is not claimed to address it.
User Impact
/modelsand other prepared-catalog consumers keep working after a config edit that reports "Nogateway restart needed." Operators no longer have to restart the gateway to recover the model
picker. No behavior change for hot or restart reloads, and no change to what a prepared generation
contains.
Evidence
Regression tests fail on stock and pass patched. Reverting only the source hunks — the tests left
in place — fails 11 assertions across 4 files:
With the source restored, on the current
mainbase:The no-op test asserts absence as well as presence —
ensureOpenClawModelsJsonis called exactlyonce across the advance, so the prepared generation is demonstrably not rebuilt, and the prior
reader's
configis unchanged.The
isNoopGatewayReloadPlangate is mutation-tested. Removing the gate so every commit advancesthe stamp left all 219 tests in
server-reload-handlers.test.tsgreen, so an assertion was addedthat a hot plan must not advance the stamp in place. The same mutation now fails:
node scripts/check-changed.mjsexits 0.Live failure on a real Gateway (before). The reported host runs a Discord native command
surface. Editing
talk.realtime.instructionsthere — the CLI printing "No gateway restart needed." —and then invoking
/modelsproduced this, twice, with no recovery between attempts (paths redacted):Throughout, the Gateway reported healthy,
/readyreturned 200, and ordinary agent turns worked.Live reproduction on a real Gateway. Reproduced on a second, independent host running stock
current
main(no part of this branch), with a full ten-provider catalog and a live Discordchannel. Sequence: restart, one ordinary agent turn to publish a prepared owner,
openclaw config set talk.realtime.instructions ...(which prints "No gateway restart needed."),then
/modelsas a Discord slash command:The command never returns; the user sees a spinner that does not resolve.
The failure is specific to the interaction path. Four other surfaces were tried against the same
stock build and none reproduces it: a minimal Gateway with two providers, the
chat.sendRPC withthe full catalog, a cold browse cache (restart, then a non-
/modelsturn to publish the ownerbefore the edit), and an ordinary Discord message reading
/models, which answered normally in2.4 s. Only the native slash command, which enters through the Discord interaction dispatcher,
fails.
Restarting the Gateway is the only recovery, and it is complete. On the originally reporting
host, a restart at 16:01:23 ended both symptoms in the same instant:
plugin generation was superseded(background lane, 30 s retry)PreparedModelCatalogConfigReplacedError(/models)What this evidence does not establish. The rows above are for the unfixed build. A matching
post-fix capture on the same surface is not included yet. Note also that the 1248-row symptom is a
different guard from the one this PR changes; it is reported in #128515 and is not claimed to be
fixed here.