Skip to content

test: replace removed Vitest sequential API - #138175

Merged
vincentkoc merged 1 commit into
mainfrom
test/vitest5-sequential-compat
Sep 4, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
test/vitest5-sequential-compat

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Related: #137201

Source PR: #137202

Additional instructions

This branch allows maintainer edits.

What Problem This Solves

Vitest 5 removes the chained describe.sequential(...) suite API used by 16 OpenClaw test suites. This prepares those suites for the stable Vitest 5 migration without changing their ordering behavior or requiring the dependency upgrade in the same PR.

This extracts Peter Steinberger's v4-compatible preparation from the source PR above and preserves his authorship credit.

Why This Change Was Made

Each affected suite now uses the supported options form, { concurrent: false }. The change remains compatible with Vitest 4, preserves the explicit serial-execution contract, and leaves assertions, fixtures, runtime code, dependencies, and the lockfile unchanged.

User Impact

There is no user-visible runtime impact. Developers can land this compatibility preparation independently, reducing the size and risk of the later Vitest 5 dependency migration.

Evidence

  • Inspected and integrity-verified the official Vitest 5.0.0 registry artifact. Its suite API removes the sequential chain property and retains the concurrent option.
  • Focused tests: 104 passed total.
    • memory-host: 4 passed
    • tooling: 98 passed
    • Control UI: 2 passed
  • Changed-file formatting, targeted lint, script lint, and git diff --check passed.
  • The repository inventory contains zero remaining .sequential(...) calls after this change.
  • Broader local collection was blocked before test execution because the exact-head worktree shared stale node_modules missing compatible markdown-it, mermaid, and @panzoom/panzoom resolution. Exact-head hosted CI remains required.
  • Changelog: none; this is test-only compatibility preparation.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vincentkoc vincentkoc self-assigned this Sep 4, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 4, 2026 10:12
@vincentkoc
vincentkoc requested a review from a team as a code owner September 4, 2026 10:12
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime extensions: browser size: XS maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 6:51 AM ET / 10:51 UTC.

ClawSweeper review

What this changes

The PR replaces sixteen deprecated Vitest serial-suite declarations with the supported { concurrent: false } option while leaving test bodies and production code unchanged.

Merge readiness

✅ Ready for maintainer review

Keep open. This is a clean, maintainer-authored test-only compatibility preparation with no blocking correctness or security findings; the recorded member decision resolves the prior Vitest-contract question and exact-head CI is green.

Priority: P3
Reviewed head: 5c88ceb2c4f4bd06d1f7b09ee9ea1b62c5d484ab

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-neutral test compatibility patch with green exact-head validation and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored PR changes only Vitest suite scheduling declarations; its relevant evidence is exact-head CI and the recorded stable-Vitest contract inspection, not user-visible runtime proof.
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 PR changes only Vitest suite scheduling declarations; its relevant evidence is exact-head CI and the recorded stable-Vitest contract inspection, not user-visible runtime proof.
Evidence reviewed 5 items Introduced test-only replacement: The verified PR-introduced delta changes exactly sixteen suite declarations from describe.sequential to describe(..., { concurrent: false }, ...), with no production, dependency, lockfile, workflow, fixture, or assertion edits.
Current dependency baseline: Fetched current main still declares Vitest 4.1.11, so this PR does not itself upgrade the runner or change deployed runtime behavior.
Serial-lifecycle provenance: The Gateway suite’s original serial declaration was introduced with the request-entry lifecycle test; its surrounding setup creates shared state and a kernel per case, making explicit non-concurrency an intentional fixture boundary.
Findings None None.
Security None None.

How this fits together

Vitest suite declarations schedule OpenClaw’s gateway, browser, cron, TUI, script, and Control UI tests. This change preserves serial fixture lifecycles while preparing those suites for a later Vitest 5 dependency migration.

flowchart LR
A[Test suites] --> B[Suite scheduling declaration]
B --> C[Vitest test scheduler]
C --> D[Serial fixture lifecycle]
D --> E[Gateway, UI, and tooling test results]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 16 files.

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

Review metrics

Metric Value Why it matters
Production versus test LOC production 0; tests +16/-16 Every changed line is a one-for-one test-suite scheduling replacement, so the PR adds no shipped runtime surface.

Technical review

Best possible solution:

Land this standalone compatibility preparation before the broader Vitest 5 migration so runner modernization does not also have to carry obsolete suite syntax.

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

Not applicable: this PR prepares test declarations for an upstream API removal rather than reporting a deployed product failure.

Is this the best way to solve the issue?

Yes. Replacing the removed chained suite API at its sixteen call sites preserves the existing serial fixture boundary without coupling a dependency upgrade or runtime change into this PR.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against bcbb0b5fc328.

Labels

Label changes:

  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.

Label justifications:

  • P3: This is low-risk developer test-harness compatibility work with no operator-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 PR changes only Vitest suite scheduling declarations; its relevant evidence is exact-head CI and the recorded stable-Vitest contract inspection, not user-visible runtime proof.

Evidence

What I checked:

  • Introduced test-only replacement: The verified PR-introduced delta changes exactly sixteen suite declarations from describe.sequential to describe(..., { concurrent: false }, ...), with no production, dependency, lockfile, workflow, fixture, or assertion edits. (src/gateway/server-request-entry.test.ts:46, 5c88ceb2c4f4)
  • Current dependency baseline: Fetched current main still declares Vitest 4.1.11, so this PR does not itself upgrade the runner or change deployed runtime behavior. (package.json:2203, bcbb0b5fc328)
  • Serial-lifecycle provenance: The Gateway suite’s original serial declaration was introduced with the request-entry lifecycle test; its surrounding setup creates shared state and a kernel per case, making explicit non-concurrency an intentional fixture boundary. (src/gateway/server-request-entry.test.ts:46, 3ed226a746a8)
  • Recorded Vitest compatibility decision: A repository member recorded direct inspection of stable Vitest 5 runtime and declarations, confirming the removed chained API and retained SuiteOptions.concurrent form, then explicitly accepted that evidence for this exact head. (5c88ceb2c4f4)
  • Exact-head validation: The supplied check rollup reports the required openclaw/ci-gate and relevant checks successful for this head; the PR is cleanly mergeable. (5c88ceb2c4f4)

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-04T10:31:08.006Z sha 5c88ceb :: blocked before merge. :: none
  • reviewed 2026-09-04T10:40:30.173Z sha 5c88ceb :: blocked before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper follow-up for reviewed head 5c88ceb2c4f4bd06d1f7b09ee9ea1b62c5d484ab:

  • Upstream contract resolved by direct inspection of installed stable [email protected]: at runtime, typeof describe.sequential === "undefined" and typeof describe === "function".
  • The published types in dist/chunks/config.d.CU_b-wJj.d.ts declare describe as SuiteAPI; SuiteCollectorCallable accepts (name, options: SuiteOptions, fn); SuiteOptions includes concurrent?: boolean; and ChainableSuiteContextMap contains concurrent | only | skip | todo | shuffle, with no sequential.
  • Current main had exactly 16 .sequential occurrences. This PR changes exactly those 16 declarations to { concurrent: false }, preserving callbacks and suite ordering semantics.
  • Exact-head CI completed successfully, including openclaw/ci-gate: https://github.com/openclaw/openclaw/actions/runs/33862127825

This addresses the upstream-contract merge-risk item. The review-confidence item remains gated on the requested fresh verdict; the existing blocked marker will not be bypassed.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

Maintainer decision for exact head 5c88ceb2c4f4bd06d1f7b09ee9ea1b62c5d484ab: accept the recorded direct inspection of stable [email protected] as sufficient compatibility evidence for this test-only preparation.

Reason: the runtime probe confirms describe.sequential is absent, the published declarations retain the SuiteOptions.concurrent option form used by this PR, the diff is exactly the 16 current-main call sites, and exact-head CI is green. This applies the sole Rank-up move and resolves the review's dependency-contract decision without changing code or arming ClawSweeper automerge.

@vincentkoc

Copy link
Copy Markdown
Member Author

The explicit maintainer decision for exact head 5c88ceb2c4f4bd06d1f7b09ee9ea1b62c5d484ab is recorded at #138175 (comment). It accepts the documented stable Vitest 5 artifact/runtime/type inspection as sufficient for this test-only preparation; no repeat retrieval is needed. The optional Rank-up move is satisfied.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 4, 2026
@vincentkoc
vincentkoc merged commit 7251a20 into main Sep 4, 2026
224 of 233 checks passed
@vincentkoc
vincentkoc deleted the test/vitest5-sequential-compat branch September 4, 2026 10:55
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui extensions: browser gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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