Repository navigation
fix(update): block restart when plugin readiness fails - #134699
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 11:41 PM ET / September 1, 2026, 03:41 UTC. ClawSweeper reviewWhat this changesThe PR adds an internal, plugin-declared Doctor readiness phase that blocks Gateway restart after an update when managed local embeddings are not ready. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessNo introduced correctness defect was found, but the intentionally fail-closed update behavior needs explicit maintainer acceptance before merge because it can leave an update-stopped Gateway down pending interactive remediation. Priority: P1 Review scores
Verification
How this fits togetherThe update command converges installed plugins and validates the updated installation before restarting the Gateway. This change makes an owner-declared readiness result an additional restart-admission decision. flowchart LR
A[Update command] --> B[Plugin convergence]
B --> C[Updated Doctor]
C --> D[Plugin readiness checks]
D --> E{Readiness passes?}
E -->|Yes| F[Restart Gateway]
E -->|No| G[Return remediation and keep Gateway stopped]
Decision needed
Why: The code correctly implements the proposed safety boundary, but choosing a temporary service outage over restarting with unavailable semantic memory is an operator-facing availability policy. Before merge
Agent review detailsSecurityNone. PR surfaceSource +214, Tests +345, Docs +4. Total +563 across 18 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the generic owner-declared gate and land it only after the responsible maintainer explicitly accepts the documented stopped-service behavior for affected upgrades. Do we have a high-confidence way to reproduce the issue? Yes. The linked report supplies a concrete 2026.7.1-to-2026.8.1 upgrade scenario, and the reviewed pre-change completion path had no post-plugin readiness admission step. Is this the best way to solve the issue? Unclear. The technical design correctly keeps provider-specific readiness in Memory Core and the generic admission path in core, but maintainers must choose the service-availability tradeoff before it is the best product solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 09a71580645f. 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 (1 earlier review cycle)
|
310d10f to
e6937fb
Compare
|
Maintainer decision: accept the fail-closed availability policy implemented here. When an owner-declared post-plugin readiness check requires interactive remediation, update finalization must leave the Gateway stopped and return that remediation instead of restarting with an unavailable configured memory path. This resolves the ClawSweeper Decision needed, merge-risk item, and Rank-up move. Original decision: #134204 (comment) |
|
Merged via squash.
|
Summary
post-pluginreadiness phase to Doctor health checksFixes #134204.
Root cause and repair
The managed local embedding check already owned the exact readiness decision, but update finalization only ran fresh Doctor repair and strict config validation. A retained
memory.search.provider: "local"configuration could therefore pass update finalization even when the upgraded llama.cpp provider had no managed service/model setup.The updater now asks the updated process to run only health checks whose owner declares
updateReadiness: "post-plugin". The selection contract remains internal (no public Plugin SDK or CLI surface), the updater names no plugin or check ID, and every readiness run uses an isolated plugin-state snapshot. Structured findings become blocking post-update plugin results; malformed output, execution failure, or zero declared checks fail closed. Existing fresh-resume, current-process, and repair lanes all stop before restart.No compatibility path, config key, schema, migration, model download, or automatic provider setup was added. The issue's non-mutating stop-with-action boundary was approved in #134204 (comment).
TDD and validation
RED was captured before implementation across four independent boundaries: phase selection ran unrelated checks, Memory Core did not declare update readiness, update finalization never invoked readiness, and a readiness finding did not block restart or carry remediation.
GREEN:
pnpm check:changedpnpm buildPackaged Linux proof used retained local-memory config plus an existing semantic index and missing managed llama.cpp setup. The updated CLI ran exactly one declared check, exited 1, and returned:
Run openclaw models --agent main auth login --provider llama-cpp --method local in an interactive terminal, then rerun this check.The config and semantic-index SHA-256 hashes were unchanged before/after, and no model was downloaded.
Scope audit
completePostCorePluginUpdate-> updateddoctor --lint-> Memory Core -> llama.cpp provider policy inspectiondoctor --lint --all; no public flag or SDK contract; no automatic setup fallbackPositive production LOC implements the generic cross-process readiness protocol, strict child-result validation, fail-closed update result mapping, and isolated owner selection; there was no existing post-plugin readiness transport to absorb this into without hardcoding Memory Core policy in the updater.