Skip to content

fix(test): run wizard recovery with the shared-state broker - #148337

Merged
steipete merged 1 commit into
mainfrom
codex/wizard-metadata-worker-routing-20260914
Sep 14, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/wizard-metadata-worker-routing-20260914

Conversation

@steipete

@steipete steipete commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

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 normal node scripts/run-vitest.mjs src/wizard/setup.inference-recovery.integration.test.ts command 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.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 14, 2026
@steipete
steipete marked this pull request as ready for review September 14, 2026 15:22
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 12:06 PM ET / 16:06 UTC.

ClawSweeper review

What this changes

Runs 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
Reviewed head: 0460bec07a133135e6891be90e7f026542e4a3be

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair using the existing routing owner, with no actionable defect found and accurately bounded validation claims.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-associated test-only PR is exempt from external-contributor runtime proof; supplied validation covers routing and ordinary activation, while the original recovery failure remains explicitly unreplayed locally.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-associated test-only PR is exempt from external-contributor runtime proof; supplied validation covers routing and ordinary activation, while the original recovery failure remains explicitly unreplayed locally.
Evidence reviewed 7 items Verified introduced change: The pinned base-to-head diff adds only the recovery suite to the existing routing list; assertions and production code are unchanged. The diff whitespace check passed.
Single routing owner: Infra includes the canonical list with forks and isolation enabled; wizard excludes the same list. This changes execution ownership without dropping the suite.
Broker requirement and relevant scenario: Shared-state admission explicitly rejects non-main threads. The recovery suite includes a pending-install scenario and awaits installed-index records, whose asynchronous reader reaches the shared-state worker. Existing fixture cleanup awaits database closure before restoring selectors and removing temporary state.
Findings None None.
Security None None.

How this fits together

OpenClaw’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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +1. Total +1 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 0 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 0 +1

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P2: Repairs a concrete test-environment mismatch with a bounded scope and no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-associated test-only PR is exempt from external-contributor runtime proof; supplied validation covers routing and ordinary activation, while the original recovery failure remains explicitly unreplayed locally.

Label justifications:

  • P2: Repairs a concrete test-environment mismatch with a bounded scope and no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-associated test-only PR is exempt from external-contributor runtime proof; supplied validation covers routing and ordinary activation, while the original recovery failure remains explicitly unreplayed locally.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 6fd4d0d into main Sep 14, 2026
173 of 174 checks passed
@steipete
steipete deleted the codex/wizard-metadata-worker-routing-20260914 branch September 14, 2026 16:22
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 14, 2026
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.
vincentkoc added a commit that referenced this pull request Sep 14, 2026
* 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)
  ...
steipete added a commit that referenced this pull request Sep 14, 2026
Resolve the shared cloud reply fixture overlap with #147684. Keep main's
history fixture and the producer run ID and sequence in the live event.
Main continues to own the wizard routing fix from #148337.
steipete added a commit that referenced this pull request Sep 14, 2026
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.
steipete added a commit that referenced this pull request Sep 14, 2026
* 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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant