Repository navigation
fix(update): retained Voice Call stores block activation - #174523
vishnusenthil-16 wants to merge 3 commits into
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. What this changesExclude retained Voice Call shared-state databases from agent-schema verification during update activation. Example: A disabled Voice Call plugin retains voice-calls/state/openclaw.sqlite at schema 25 while the candidate agent schema is 27.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review This PR fixes a current-main activation bug with a focused change and sufficient managed-update proof; the failing PostgreSQL check still needs CI attribution. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe updater inventories databases, runs candidate migration and activation, then checks schema readiness and rollback compatibility before completing the update. flowchart TD
A[Update CLI] --> B[Database discovery]
B --> C[Candidate migration and activation]
C --> D[Schema verification]
E[Shared store resolver] --> B
E --> D
D --> F[Completion or recovery]
Technical reviewBest possible solution: Use the discovery owner's shared-store paths to classify activation entries while preserving primary-state, active-agent, and rollback checks. Do we have a high-confidence way to reproduce the issue? Current-main discovery includes retained Voice Call shared stores, and activation compares them against the agent schema; the supplied before/after regression results corroborate this path without executing target code during review. Is this the best way to solve the issue? The existing resolver provides a small, consistent repair at the activation classifier, with no duplicate discovery policy or change to persisted data. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4579af08ce8a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +51. Total +56 across 2 files. Added test files: 0. View PR surface stats
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 HistoryReview history (1 earlier review cycle)
Reviewed October 16, 2026, 3:09 PM ET / 19:09 UTC (Revision 2). |
|
@clawsweeper please reevaluate this PR at Ran two actual CLI managed updates directly on macOS with a separate npm installation, fresh named profile, synthetic state, unique port, and real launchd service:
Both used Between hops, the disposable Gateway was stopped and its PID exit confirmed before adding the retained Voice Call database. Plugins stayed disabled. The database was a valid SQLite integrity checks passed, the sentinel The proof service and plist were removed afterward. The live Gateway was untouched and retained its original PID. Scope/limitations:
Also passed after conflict resolution: 35/35 updater tests, full build, core/updater-test typechecks, focused lint, formatting, and diff checks. Please reassess the “needs real behavior proof before merge” finding using these results. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Use the existing state inventory's agent ownership and registrations to limit agent schema checks to agent databases. Keep retained plugin stores in snapshot and rollback verification without imposing the agent schema. Preserve explicit agent-directory overrides and held deleted-agent stores. Add enabled/disabled default and configured plugin-store regressions, and keep the schema inspection cases in their own bounded test file. Fixes #174913 Supersedes #174523, thanks @vishnusenthil-16. Co-authored-by: vishnusenthil-16 <[email protected]>
…er activation (#174973) Managed updates could fail after activation and leave the Gateway stopped because the post-activation verifier treated retained plugin shared-state stores (such as the Voice Call state database) as agent databases and required the agent schema. Verification now uses the inventory's existing ownership and registration facts to compare only real agent databases against the agent schema, keeping backup/rollback coverage and the held deleted-agent exemption. Live: an isolated managed update with retained plugin stores returned status ok, both stores stayed byte-identical, and the replacement Gateway passed health and readiness. Supersedes #174523, thanks @vishnusenthil-16. Fixes #174913 Co-authored-by: vishnusenthil-16 <[email protected]>
…er activation (openclaw#174973) Managed updates could fail after activation and leave the Gateway stopped because the post-activation verifier treated retained plugin shared-state stores (such as the Voice Call state database) as agent databases and required the agent schema. Verification now uses the inventory's existing ownership and registration facts to compare only real agent databases against the agent schema, keeping backup/rollback coverage and the held deleted-agent exemption. Live: an isolated managed update with retained plugin stores returned status ok, both stores stayed byte-identical, and the replacement Gateway passed health and readiness. Supersedes openclaw#174523, thanks @vishnusenthil-16. Fixes openclaw#174913 Co-authored-by: vishnusenthil-16 <[email protected]>
Related: #174913
Related: #173676
What Problem This Solves
Git updates can pass candidate rehearsal, then fail activation and leave the Gateway stopped when a retained Voice Call shared-state database is present.
PR #173676 added discovery of that store, but the activation check still incorrectly treats it as an agent database. An affected 2026.10.4 update reported
voice-calls/state/openclaw.sqlite; expected schema 27, found 25andstate-migrated-no-rollback, even though the database was a valid shared-state store at schema 25.User Impact
The updated verifier accepts retained default and configured Voice Call stores, including when the plugin is disabled. It still rejects incomplete active-agent migrations and checks the primary shared-state schema. Database contents, schemas, configuration, and rollback checks are unchanged.
An updater process that was started from an older installation keeps its previously loaded verifier. Its first update to a version containing this fix can therefore still encounter the old failure; this change takes effect when the fixed updater runs in a new process.
Why This Change Was Made
Reuse
resolveStatePortRoots, the same resolver used by database discovery, to exclude shared-state stores from the agent-schema predicate. Retained stores stay in the snapshot and rollback inventory under the existing opaque-capture contract. This adds no schema metadata, migration, or worker-protocol change.Evidence
voice-callstore, and configured@openclaw/voice-callstore, with plugins disabled.node scripts/run-vitest.mjs src/cli/update-cli/update-command-migrated.test.ts --maxWorkers=1: 35/35 passed after conflict resolution, including existing incomplete-agent, pending-deletion, and rollback checks. Vitest duration: 60.28 seconds; wrapper shard including runtime preparation: 112.52 seconds.pnpm buildpassed after conflict resolution (2m 30.3s).git diff --checkpassed.Conflict resolution at
a2fa6235c7epreserves main'sresolveClientCredentialStorePathexclusion alongside the retained shared-store exclusion. The PR remains a five-line production change plus 51 test lines relative to merged main.Real managed update proof (native macOS)
Ran two actual
openclaw update --tag <local-tarball> --yes --jsonoperations using a separately installed npm prefix, a fresh named profile, synthetic configuration/session data, a unique loopback port, and a real launchd LaunchAgent. No mocked update, restart, RPC, or schema-inspection results.2026.10.3CLI → patched2026.10.4: succeeded / finished, 144.535 s; launchd PID 7867 → 10802. The candidate-admission path adopted the update driver. Gateway build identity, RPC,/readyzHTTP 200, and the durable conversation were verified afterward.voice-calls/state/openclaw.sqlitewith roleglobal, schema/user version 25, while the candidate agent schema is 27. Plugins remained disabled. A fresh patched CLI then updated to the same candidate relabeled2026.10.5-first-hop.0using the repository's fixture stamper to force a real second activation: succeeded / finished, 150.200 s; launchd PID 11850 → 13655. RPC/build identity,/readyz, conversation content, Gateway settings, and workspace settings passed afterward.0288318a3ba15d9573087d77b7f0f5d50a9bb940d82d4db1cbe8330b4458655e. Its sentinel row and schema stayed unchanged. The disposable service was then removed; the existing live Gateway kept the same PID throughout.Sanitized results from the real CLI and durable update ledger
Scope and reproducibility: this exercises the native macOS npm-package managed-update path and shared finalization verifier, not every Git-only activation branch. The retained store is added between hops; the first hop does not claim an already-loaded old verifier is repaired. The old-driver limitation above still applies. No provider inference or external channel traffic was used.
The candidate was built from the resolved tracked tree that became merge commit
a2fa6235c7e; build metadata still names its pre-merge parent0f875b33f91abecause the build preceded the merge commit. Candidate tarball SHA-256:080fdfdee5e5bc9b5893a8c0ce4fd972c1a46e3861d3aaba8df2bdcea5e17d01. The second tarball changes fixture version metadata, not the fix.Packaging caveat: the canonical tarball checker initially found a missing
dist/windows-security-helper.exereferenced by bundled@openclaw/fs-safecode. The exact helper from the installed@openclaw/[email protected]dependency was staged into local build output, then canonical packaging and integrity checks passed. No source change or checker exclusion was used; Windows behavior is not claimed. An initial Docker attempt was discarded after cgroup OOM kills; only the completed native macOS runs above are counted as behavior proof.