Repository navigation
fix(test): run wizard recovery with the shared-state broker - #148337
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 14, 2026, 12:06 PM ET / 16:06 UTC. ClawSweeper reviewWhat this changesRuns the wizard recovery integration suite in the existing database-capable fork pool instead of the wizard thread pool. Merge readiness✅ Ready for maintainer review This remains a useful, narrowly scoped repair: current main still omits the recovery suite from broker-capable workers. No introduced correctness defect was found, and the maintainer-protected PR should remain open for normal landing. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s test routing assigns suites to execution environments. Tests that read plugin metadata through the shared SQLite worker need a forked process where the host broker is available. flowchart TD
A[Wizard recovery suite] --> B[Canonical database test list]
B --> C[Infra fork pool]
B --> D[Exclude from wizard threads]
C --> E[Shared SQLite broker]
E --> F[Plugin metadata reads]
F --> G[Recovery assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +1. Total +1 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep database-dependent recovery coverage under the existing fork owner while preserving its assertions and awaited fixture cleanup. Do we have a high-confidence way to reproduce the issue? Yes, source identifies a clear path: pending-install recovery invokes asynchronous metadata reads while the current wizard pool uses threads, which shared-state admission rejects. This review did not execute the failing case. Is this the best way to solve the issue? Yes. Extending the existing shared routing list moves the suite into forks and excludes it from threads together, without weakening assertions or adding another routing mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ac7de4a3427e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Main now routes wizard recovery through the database forks and excludes it from the wizard thread pool (#148337). Remove this PR's duplicate changes so the final merged list contains the test exactly once.
* commit '3c08384584f57787a26da9998488233fc15ccf7e': (122 commits) fix(agents): keep tool result summaries when middleware details exceed shape limits (#147805) test: make full-suite fixtures portable across runtimes (#148247) refactor(qa): share unknown confidence results (#148200) chore(android): remove unused test dependencies and duplicate Wear settings (#148231) test: reuse compiled preflight in startup fixtures (#148330) test(wizard): route recovery integration through database forks (#148337) refactor(plugins): simplify provider auth patch recursion (#147933) fix(cli): drain failed web capability output (#148234) refactor(android): remove unused production helpers (#148233) fix(plugins): scope feed integrity to hosted ClawHub (#148220) test(qa): compare Telegram entities semantically (#148219) test(qa): recognize native Slack exec progress rows (#148217) test(cron): distinguish repeated delivery incidents (#148151) test(qa): preserve restart command ownership (#148218) test(qa): isolate bundled skill CLI gateway state (#148150) test(qa): align process lifecycle contracts (#148149) improve(media): reduce metadata fetched during orphan cleanup (#148244) fix(matrix): retain sync state runtime for deferred persistence (#148152) test: deduplicate gateway watch exit fixtures (#148237) refactor(cli): derive daemon status contract from gatherer (#148108) ...
* refactor(update): consolidate status check state Keep connection and read-error facts in the progress snapshot, represent status checks with one request state, and reuse the recovery predicate. Remove redundant test waits and the warning assertion covered before registry lookup. Preserve the behavior introduced in #147883. * test(ui): reuse shared server for accent selection Keep the existing accent and persistence assertions while replacing the private mock-dev subprocess with the suite-owned server and a signed-in mock Gateway. * test(ui): keep cloud recovery history consistent Use the same durable assistant reply and producer run identity in history and live events. Preserve cloud recovery assertions and deadlines when terminal delivery precedes the persisted reply. * test(wizard): run recovery integration in the broker host Route the real shared-state consumer through the existing isolated infra forks and exclude it from the wizard thread pool. Preserve recovery assertions and broker admission guards after the metadata-worker migration. * chore(test): drop routing changes already landed on main Main now routes wizard recovery through the database forks and excludes it from the wizard thread pool (#148337). Remove this PR's duplicate changes so the final merged list contains the test exactly once. * fix(test): remove duplicate wizard recovery registration The independent routing additions in #148337 and #147684 registered the same test twice and stopped CI shard planning. Retain the canonical entry after setup.test.ts and remove the duplicate before it. * test(custodian): follow immediate wizard choices Choose Twitch through the current two-option button instead of the retired radio and Continue controls. Preserve the typed answer, single session rotation, and no-replay assertions after the UI change in #148300.
* refactor(update): consolidate status check state Keep connection and read-error facts in the progress snapshot, represent status checks with one request state, and reuse the recovery predicate. Remove redundant test waits and the warning assertion covered before registry lookup. Preserve the behavior introduced in openclaw#147883. * test(ui): reuse shared server for accent selection Keep the existing accent and persistence assertions while replacing the private mock-dev subprocess with the suite-owned server and a signed-in mock Gateway. * test(ui): keep cloud recovery history consistent Use the same durable assistant reply and producer run identity in history and live events. Preserve cloud recovery assertions and deadlines when terminal delivery precedes the persisted reply. * test(wizard): run recovery integration in the broker host Route the real shared-state consumer through the existing isolated infra forks and exclude it from the wizard thread pool. Preserve recovery assertions and broker admission guards after the metadata-worker migration. * chore(test): drop routing changes already landed on main Main now routes wizard recovery through the database forks and excludes it from the wizard thread pool (openclaw#148337). Remove this PR's duplicate changes so the final merged list contains the test exactly once. * fix(test): remove duplicate wizard recovery registration The independent routing additions in openclaw#148337 and openclaw#147684 registered the same test twice and stopped CI shard planning. Retain the canonical entry after setup.test.ts and remove the duplicate before it. * test(custodian): follow immediate wizard choices Choose Twitch through the current two-option button instead of the retired radio and Continue controls. Preserve the typed answer, single session rotation, and no-replay assertions after the UI change in openclaw#148300.
Related: #148017, #148291
What Problem This Solves
Wizard recovery integration tests with pending plugin installs run in a Vitest thread and fail with “Shared-state admission requires the host broker” before reaching their intended recovery assertion.
Why This Change Was Made
Add the existing fixture to the canonical database-worker test list. The same list selects the isolated infra fork pool and excludes it from the wizard thread pool. The fixture keeps its real SQLite operations, assertions, mocks and cleanup unchanged; there is no production-code change.
Evidence
The retained CI failure reports the pending-install recovery case failing with the broker error. Independent source comparison verified the same fixture and owning admission/routing files in the tested merge and its parents. A local run reproduced that threaded-pool failure; a fork-pool control passed all eight cases.
On this PR’s exact head
0460bec07a133135e6891be90e7f026542e4a3be, the normalnode scripts/run-vitest.mjs src/wizard/setup.inference-recovery.integration.test.tscommand selects the infra project and passes all eight existing cases, including credential changes, staged promotion, pending-install recovery and refusal handling. The wrapper completed generated-worker cleanup and exited zero.The full selected changed-file check and fresh independent P2 review passed. Exact-head CI completed successfully. This establishes test routing and recovery coverage; it is not a production performance claim.