Repository navigation
fix: keep Gateway responsive during channel owner selection - #158783
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: needs maintainer review before merge. Reviewed September 26, 2026, 5:52 AM ET / 09:52 UTC (Revision 2). ClawSweeper reviewWhat this changesChannel setup now awaits a worker-backed configuration policy read after agent selection, rechecks the config write path, and adds regression coverage and worker-access documentation. Merge readiness✅ Ready for maintainer review Current main still performs the blocking read during channel owner selection. This focused PR remains useful; the reviewed patch has no identified blocking defect. Priority: P1 Review scores
Verification
How this fits togetherThe channel setup wizard serves both flowchart LR
A[Channel setup request] --> B[Agent selection]
B --> C[Config path check]
C --> D[Migration rows in worker]
D --> E[Current config read]
E --> F[Agent validation]
F --> G[Guarded config write]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +17, Tests +82, Docs +7. Total +106 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep fresh migration-policy reads in the existing SQLite worker and config-reader owners, with roster validation and config write checks through the final commit. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main reaches the synchronous migration-policy read after multi-agent channel selection. This read-only review did not run a Gateway reproduction. Is this the best way to solve the issue? Yes. The patch uses the existing asynchronous config and SQLite worker paths while preserving the selected-agent and config-write checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against eb2235795995. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…58783) Co-authored-by: Peter Steinberger <[email protected]>
…0230) Move deferred plugin migration reads out of ordinary CLI and Gateway config loading. Doctor owns legacy plugin repairs, while update admission and config writes carry explicit migration facts, preserve unavailable-plugin inputs, and retain generation checks at repair publication. Normal config reads and writes now consume canonical config without a migration-ledger database query. `openclaw update status` exposes pending work; after a source or package-manager upgrade, run `openclaw doctor --fix` before restarting. Candidate validation keeps the previous Gateway running when canonical config remains invalid. Preserve the published 2026.10.1 Windows updater's state-worker contract. Align ClawRouter's Solid dependencies to 2.0.0-rc.14 with Canvas, Workboard, and X, as explicitly approved, and regenerate its browser asset manifest and lockfile. The reviewed product changes, focused tests, and package/update evidence are documented in the PR. Merge current main to incorporate its correction of the inherited idle-input durability test expectation; do not treat the historical failed run as current-head passing evidence. Related: #147711, #158783, #160682. Current-head CI run 38335235541: 91 passed, 23 skipped, 6 failed including aggregate. Native inherited-failure admin evidence binds five unchanged-owner shards, matching scheduled-main profile-authority failures, isolated archive-fixture noninteraction, exact tested merge, zero cancellations, and independent security clearance. Failed CI remains failed; details and limits are in the PR body.
…nclaw#170230) Move deferred plugin migration reads out of ordinary CLI and Gateway config loading. Doctor owns legacy plugin repairs, while update admission and config writes carry explicit migration facts, preserve unavailable-plugin inputs, and retain generation checks at repair publication. Normal config reads and writes now consume canonical config without a migration-ledger database query. `openclaw update status` exposes pending work; after a source or package-manager upgrade, run `openclaw doctor --fix` before restarting. Candidate validation keeps the previous Gateway running when canonical config remains invalid. Preserve the published 2026.10.1 Windows updater's state-worker contract. Align ClawRouter's Solid dependencies to 2.0.0-rc.14 with Canvas, Workboard, and X, as explicitly approved, and regenerate its browser asset manifest and lockfile. The reviewed product changes, focused tests, and package/update evidence are documented in the PR. Merge current main to incorporate its correction of the inherited idle-input durability test expectation; do not treat the historical failed run as current-head passing evidence. Related: openclaw#147711, openclaw#158783, openclaw#160682. Current-head CI run 38335235541: 91 passed, 23 skipped, 6 failed including aggregate. Native inherited-failure admin evidence binds five unchanged-owner shards, matching scheduled-main profile-authority failures, isolated archive-fixture noninteraction, exact tested merge, zero cancellations, and independent security clearance. Failed CI remains failed; details and limits are in the PR body.
What Problem This Solves
Fixes a blocking SQLite read on the Gateway when channel setup rechecks policy after selecting an agent from a multi-agent roster.
User Impact
The Gateway can continue serving other work while channel setup reads retained plugin-migration policy. Setup still validates the current roster and rejects a config owner that closes during that read. No configuration migration or operator action is required.
Why This Change Was Made
The awaited policy path uses the existing shared-state worker and config reader, obtaining fresh migration rows on every call. It captures the selected config path and environment before awaiting, then the channel caller rechecks its original write owner before using the result. The existing synchronous updater and plugin cleanup effect guards remain unchanged; this focused change does not preload stale migration facts for those long-lived guards or claim their broader migration is complete.
Evidence
The real-SQLite regression failed on the old reader because it invoked the synchronously waited snapshot worker. The async path passes with zero main-thread SQL, zero synchronous snapshot-worker calls, unchanged config/database/WAL/SHM artifacts, and fresh visibility after migration completion. The focused policy case takes approximately 4.8 seconds including real worker reads.
All 85 channel and owner tests pass, including owner revocation during the new await and the existing hosted wizard roster-change cases. The new owner tests take approximately 0.2 seconds; the existing channel suite takes approximately 28 seconds of test execution.
The broader config suite encounters two pre-existing filesystem-watch assertions in
reads current runtime migration obligations without full database snapshots(sync and async). Both failures were independently reproduced on clean main at a2792b9 with its frozen dependency graph; these assertions are unchanged. Independent review found no actionable issues through P2, all changed checks passed, and CI run 36232617155 passed on 15deecb. The native exact-head watcher is green. The baseline watcher repair is tracked separately in #158798.