Repository navigation
fix: let published updates finish after Doctor reads model catalogs - #206877
Conversation
Retain the catalog read pool on the default native worker source when no update generation owns it. Executable CLI cleanup and delegated update Doctor both drain that source before checking for live workers. Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: b8848d5d-940c-4700-a8a5-6d42aea9dc49
|
🦞👀 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: passed. What this changesRegister unbound model catalog reader pools with the existing native-worker shutdown owner. Example: A published 2026.10.34 updater installs the candidate and Doctor reads an agent’s model catalog.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This PR provides a focused fix for a current cleanup defect; no introduced correctness or security findings remain, and current-head CI is still pending. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherDoctor and offline session listings read persisted model catalogs through a worker pool; executable cleanup must close that pool before joining its shared native host. flowchart TD
A[Doctor or sessions CLI] --> B[Catalog read pool]
B --> C[Shared worker host]
D[CLI cleanup] --> E[Native shutdown owner]
E --> B
E --> C
Technical reviewBest possible solution: Keep catalog-pool settlement under the existing generation or default native lifecycle owner, preserving shared hosting and the live-worker guard. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the missing unbound pool drain and matching native-shutdown error, supported by reported published-updater and offline-session reproductions; this review executed no target code. Is this the best way to solve the issue? The change repairs resource ownership at the catalog-pool producer using an existing lifecycle callback, without weakening shutdown checks or adding a parallel cleanup path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b42b9f8876a7. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +5, Tests +11. Total +16 across 2 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: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed November 27, 2026, 2:06 PM ET / 19:06 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…206877) Retain the catalog read pool on the default native worker source when no update generation owns it. Executable CLI cleanup and delegated update Doctor both drain that source before checking for live workers. Co-authored-by: daniel-lxs <[email protected]> Co-authored-by: daniel-lxs <[email protected]> (cherry picked from commit a8a503e)
…penclaw#206877) Retain the catalog read pool on the default native worker source when no update generation owns it. Executable CLI cleanup and delegated update Doctor both drain that source before checking for live workers. Co-authored-by: daniel-lxs <[email protected]> Co-authored-by: daniel-lxs <[email protected]>
Closes #206861
What Problem This Solves
An update could roll back after Doctor printed “Doctor complete.” With the Gateway stopped,
openclaw sessions --jsoncould return the saved session and exit 0, yet print a cleanup failure on stderr. Both paths left the same model catalog reader running.User Impact
Published updaters finish installing the new build. Offline session listings no longer print a false cleanup failure after reading a saved session’s model catalog. Neither fix requires a configuration change. Genuine Doctor failures still trigger rollback.
Why This Change Was Made
One-shot worker sharing in #206721 exposed a missing cleanup owner. The catalog pool registered its close callback only when an update generation owned it. Without a generation, its reader kept the shared worker alive. The pool now registers the same callback with the default native worker source. Both the regular CLI and the published updater’s delegated Doctor drain that source. Worker sharing and the live-worker check stay intact.
Evidence
I ran
published-driver-update-docker.shagainst real npm installs on AWS CrabBox Linux. Each driver used the same packaged PR head.a14e58f056a0f4d789f8e6a9All three Gateways returned
/readyz200 and reported build ID2026.11.10-f4d789f8e6a9-2026-11-27T18-31-02.273Z. Durable history survived restart; incognito history did not.Offline sessions red/green: I created a saved session through a real Gateway, stopped it, verified its listener was down and configured a model.
openclaw sessions --jsonreturned the saved row and exited 0 on every run. Cleanup warnings:2026.11.100/3, main1decc8613/3, PR headf4d789f80/3. On main, the only remaining endpoint wasplugin-model-catalog-readwith no stop requested. On the PR head none remained. Without a configured model, none of the three builds warned.The focused worker regression failed on the baseline and passed on this head. The catalog and CLI cleanup suites, formatting, targeted lint and core typecheck passed. I confirmed main CI failed at the published update step. The hosted PR update lane was skipped, not counted as green; I did not run its PostgreSQL or native systemd cells.
Reported and co-authored by @daniel-lxs.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by
🦞 Made with OpenClaw