Repository navigation
fix: confirm recovered config edits while the Gateway is busy - #207918
Conversation
…ctor Read live plugin metadata through the shared-state worker when this Gateway owns the database. Keep external and sealed inspections isolated and leave the CLI confirmation deadline and revision checks intact. Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 58ab85e4-f064-4888-9c5e-314957a86e56
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review startedThis attempt replaced any previous blocked status for this revision. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: passed. What this changesThe Gateway reads its own live plugin metadata through the shared-state worker so recovered config edits can be confirmed promptly. Example: Run
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it makes a focused, worthwhile repair to recovered config confirmation, and no actionable defect was found in the introduced hunks. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCLI config writes reach the Gateway over RPC; reload preparation reads plugin metadata, and the CLI briefly checks whether the exact saved revision became active. flowchart LR
A[CLI config set] --> B[Gateway config RPC]
B --> C[Config reload owner]
C --> D[Shared state read worker]
D --> E[Plugin metadata rows]
C --> F[Applied config revision]
F --> G[CLI confirmation]
Technical reviewBest possible solution: Use the existing shared worker for Gateway-owned live plugin reads while preserving fresh ledger queries, isolated external inspections, and bounded CLI confirmation. Do we have a high-confidence way to reproduce the issue? Source confirms that main starts a retiring metadata inspector on this reload path, and supplied baseline captures demonstrate the false failure under contention; this read-only review did not independently execute the reproduction. Is this the best way to solve the issue? The predicate change removes unnecessary inspector startup at the existing read owner without extending polling, replaying writes, caching rows, or changing PostgreSQL behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 890b27730f34. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +3, Tests +40. Total +43 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 November 28, 2026, 10:10 PM ET / November 29, 2026, 03:10 UTC. |
* commit 'a012e91c821705e443e42660c34e352623fb0a70': (584 commits) fix: confirm recovered config edits while the Gateway is busy (#207918) fix: make desktop chat presence avatars slightly smaller (#207966) fix: list and select routed Claude models without requiring Claude CLI (#207806) fix(ci): check out verifier before plugin preflight reuse test(reply): prove channel replacement on user messages (#207813) fix(release): bootstrap smoke uses persistent agent creation fix(ui): stop model picker Enter checks from failing on cold opens (#207963) fix: explain when a provider policy stops a chat reply (#207411) fix: show context usage during Claude CLI turns (#207036) fix: align the side panel with its resize divider (#207936) fix: stop the manual handoff UI test from hanging after completion (#207945) fix: surface favorites and recommended models in picker search (#201450) fix: show the saved quota reset when chat skips its only model (#207210) fix: avoid reloading unchanged plugins after Gateway boot (#207949) fix: keep Task progress double-clicks from changing the window (#207937) fix(doctor): continue repairs past retained conflicting exec approvals (#207951) test(reply): make account isolation assertion decisive (#207793) fix: keep task progress compact when reopening Details (#207943) fix(ui): restore the saved reading position after an empty search (#207673) fix: remove four Memory Wiki settings that had no effect (#207882) ...
* commit 'ea8cd30a48de1f42962bb95535d2e1b3b201fc36': (599 commits) fix(ui): show a subtle placeholder while a new chat gets its title (#207809) fix: remove dismissed chat suggestions without waiting (#207792) test(gateway): isolate publication recovery memory pressure (#207993) fix(workboard): let users delete an empty default board (#207909) fix(ui): remove Open PR from the session menu (#207808) feat(ui): offer Add to Home agent when Home sidebar is open (#207773) fix(ui): keep narrow desktop composers on desktop icon and control sizes (#207772) fix: remove extra space on the right of the compact iPad chat bar (#207763) fix: keep the task progress options button inside the Details header (#207940) fix(workboard): update the active list when you archive or restore a card (#207790) fix: move dropped sessions into their Workboard column immediately (#207787) fix(whatsapp): retain sender for explicit current-message reactions (#190121) fix: return the agent ID when agents add finishes offline (#207926) fix: stop sending internal steering errors to the chat (#207150) fix(agents): scheduled runs fail after a read or fetch error the model recovered from (#180922) fix: confirm recovered config edits while the Gateway is busy (#207918) fix: make desktop chat presence avatars slightly smaller (#207966) fix: list and select routed Claude models without requiring Claude CLI (#207806) fix(ci): check out verifier before plugin preflight reuse test(reply): prove channel replacement on user messages (#207813) ...
Read fresh plugin metadata through the owning Gateway’s shared-state reader so the CLI can confirm the saved revision within its two-second deadline. Keep startup and external SQLite inspections isolated. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 58ab85e4-f064-4888-9c5e-314957a86e56 (cherry picked from commit a012e91) Co-authored-by: RomneyDa <[email protected]>
…aw#207918) Read fresh plugin metadata through the owning Gateway’s shared-state reader so the CLI can confirm the saved revision within its two-second deadline. Keep startup and external SQLite inspections isolated. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 58ab85e4-f064-4888-9c5e-314957a86e56
Related: #196174. The shard 34 failure surfaced on #207713; this is a separate fix, not a change to that PR.
What Problem This Solves
openclaw config setcan exit 1 and tell the operator to reapply a change that the Gateway has already recovered and applied. I reproduced this on a busy SQLite-backed Gateway after the first apply failed.User Impact
The running Gateway reads its own plugin install ledger through its existing shared-state reader, leaving time for the CLI to confirm the exact saved revision. The CLI still sends the write only once, stops confirming after two seconds, and returns the original error if the revision stays inactive. No setting or migration is required.
Why This Change Was Made
#202714 deliberately bounded confirmation after the write RPC releases admission. Reading current ledger rows before the first reload checkpoint is also deliberate: a plugin may be removed without a corresponding change to the config bytes (#149910). The unnecessary work was starting and retiring an inspector process to read a ledger the Gateway already owns. No row cache was added. External and sealed inspections keep their existing path, including the process exit that releases maintenance custody (#189722, #202608).
The recovery test already supplies its own file observation (#203117). It now holds back competing native notifications during that case so the write consumes the injected failure before the retry. Without this ordering, the faster reader could produce ordinary success without exercising CLI confirmation. The deadline, exit-code, output, saved/applied revision, and persistent-failure assertions are unchanged.
Evidence
I ran the real CLI process test against an isolated Gateway on CrabBox AWS, with 16 CPU competitors on four cores. The first apply failure was injected; the save, ledger read, watcher retry, RPC, and CLI were real.
2f2edbf1667a8cThe saved and applied hashes matched on both sides of the timed pair. All 19 CLI process cases passed on the fix, including a permanently inactive revision still returning exit 1. In the fresh-row regression and controls, two committed values caused two startup inspections on main and zero on the fix; the reader observed both new values without main-thread SQL. The 9 plugin metadata tests, 11 SQLite worker-operation tests, core typecheck, and touched-file lint and formatting passed. I verified both leases were released.
Not verified: the full hosted shard, the original PostgreSQL exception, or the full suite. Local autoreview stopped before review because its isolation preflight requires a temporary directory outside the checkout; no clean review is claimed.
Captured CLI output
Terminal replays of the instrumented AWS pair. The last two lines show the process exit and the Gateway revision comparison.
Worked on by:
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by
🦞 Made with OpenClaw