Skip to content

test(wizard): run inference recovery with shared-state broker - #148353

Merged
vincentkoc merged 1 commit into
mainfrom
fix/wizard-recovery-db-worker
Sep 14, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/wizard-recovery-db-worker

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes a CI regression where the wizard inference-recovery integration test ran without the host-owned SQLite broker and failed before reaching its intended rollback assertion.

Why This Change Was Made

Routes the existing integration test through the canonical forked infra Vitest project. The production admission guard, test assertions, broker behavior, and timeouts remain unchanged.

User Impact

No user-visible runtime change. CI now exercises wizard recovery through the shared-state owner that the production path requires.

Evidence

  • Before: src/wizard/setup.inference-recovery.integration.test.ts failed the pending=true, superseded=false case with Shared-state admission requires the host broker; 7 tests passed and 1 failed.
  • After: the same file ran under the infra project with 8 tests passed, including the expected promotion refused path and unchanged pending-record/rollback assertions.
  • Required sibling and routing proof: 821 tests passed across:
    • src/plugins/install-record-commit.test.ts
    • src/plugins/install-record-commit.sqlite.test.ts
    • src/infra/sqlite-worker-shared-state.test.ts
    • test/scripts/test-projects.test.ts
    • test/vitest-scoped-config.test.ts
  • pnpm check:changed
  • git diff --check
  • Autoreview: scoped-clean, no accepted P0-P2 findings.
  • Test-only change: +1/-0. Production LOC: 0.

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

@vincentkoc vincentkoc self-assigned this Sep 14, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 14, 2026 16:05
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 14, 2026
@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:21 PM ET / 16:21 UTC.

ClawSweeper review

What this changes

Routes the wizard inference-recovery integration test through the existing forked database test project so it can reach its rollback assertions.

Merge readiness

✅ Ready for maintainer review

The patch is correct and still useful: current main lacks the routing entry, and the existing test requires a fork-hosted SQLite broker. No actionable findings. Maintainer authorship and the protected label also preclude automatic closure.

Priority: P2
Reviewed head: ba336f037fd3d3bdd3cc707f3045acdd375090e4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, maintainable routing repair with relevant reported validation and no identified correctness or security defects.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored test-routing change is exempt from external-contributor runtime proof; its body reports the affected recovery cases passing through infra, and no production authority boundary changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored test-routing change is exempt from external-contributor runtime proof; its body reports the affected recovery cases passing through infra, and no production authority boundary changes.
Evidence reviewed 8 items Verified introduced change: The pinned merge-base-to-head diff adds only the recovery test to the shared routing list. Host-verified test-merge evidence likewise identifies only this file; base-only changes are not attributed to this PR.
Existing routing owner: The infra configuration includes the shared list with pool=forks, isolation enabled, and file parallelism disabled. The wizard configuration excludes the same list, and focused test routing classifies its entries as infra. Existing table-driven routing tests automatically cover the added entry.
Concrete broker requirement: Shared-state admission rejects calls outside the process main thread. The pending-install recovery case writes through the real wizard config owner and checks that the install record survives rollback; its assertions remain unchanged. Main and head have identical recovery-test and broker-guard contents.
Findings None None.
Security None None.

How this fits together

OpenClaw’s test router selects the execution environment for integration tests. Tests that use shared SQLite state need a forked process where the host-owned broker can run.

flowchart LR
  A[Recovery integration test] --> B[Shared database test list]
  B --> C[Forked infra project]
  B --> D[Excluded from wizard project]
  C --> E[Host SQLite broker]
  E --> F[Recovery and rollback 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 broker-dependent recovery coverage under the canonical forked test owner while preserving production admission checks and rollback assertions.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: the pending-install recovery case reaches shared-state admission from the default threaded wizard project, which the main-thread guard rejects. Execution was not repeated in this read-only review.

Is this the best way to solve the issue?

Yes. Adding the test to the existing shared list updates both inclusion and exclusion through one owner without duplicating routing logic or weakening the tested behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 50090f5df4e9.

Labels

Label changes:

  • add P2: Repairs a concrete integration-test execution failure with limited scope and no user-facing runtime 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: This MEMBER-authored test-routing change is exempt from external-contributor runtime proof; its body reports the affected recovery cases passing through infra, and no production authority boundary changes.

Label justifications:

  • P2: Repairs a concrete integration-test execution failure with limited scope and no user-facing runtime 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: This MEMBER-authored test-routing change is exempt from external-contributor runtime proof; its body reports the affected recovery cases passing through infra, and no production authority boundary changes.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base-to-head diff adds only the recovery test to the shared routing list. Host-verified test-merge evidence likewise identifies only this file; base-only changes are not attributed to this PR. (test/vitest/vitest.database-worker-core-paths.mjs:10, ba336f037fd3)
  • Existing routing owner: The infra configuration includes the shared list with pool=forks, isolation enabled, and file parallelism disabled. The wizard configuration excludes the same list, and focused test routing classifies its entries as infra. Existing table-driven routing tests automatically cover the added entry. (test/vitest/vitest.infra.config.ts:7, ba336f037fd3)
  • Concrete broker requirement: Shared-state admission rejects calls outside the process main thread. The pending-install recovery case writes through the real wizard config owner and checks that the install record survives rollback; its assertions remain unchanged. Main and head have identical recovery-test and broker-guard contents. (src/infra/sqlite-worker-store.ts:112, ba336f037fd3)
  • Preserved recovery contract: The pending=true case expects promotion refusal, restoration of concurrent configuration, and preservation of the fixture install record in the canonical index. (src/wizard/setup.inference-recovery.integration.test.ts:267, ba336f037fd3)
  • Current-main necessity: Fetched main still omits this recovery test from the database-worker list while retaining the same infra inclusion and wizard exclusion mechanism. (test/vitest/vitest.database-worker-core-paths.mjs:9, 50090f5df4e9)
  • Release and related-work checks: The routing-list path does not exist in the supplied latest release v2026.9.4, so that release does not contain this specific correction. A bounded GitHub search for inference recovery broker was rejected by the read proxy; no canonical replacement was established. (3a9d69db306c)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: 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.

@vincentkoc
vincentkoc merged commit 88304ff into main Sep 14, 2026
169 checks passed
@vincentkoc
vincentkoc deleted the fix/wizard-recovery-db-worker branch September 14, 2026 16:56
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

@vincentkoc

Copy link
Copy Markdown
Member Author

Closing as a verified duplicate of #148337. Both add the same wizard recovery test to the database-worker fork routing list; the canonical repair landed in commit 6fd4d0d.

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