Skip to content

test: keep local full-suite RAM within the host budget #100429

Description

@steipete

Bug type

Behavior bug (incorrect resource scheduling without a process crash)

Beta release blocker

No

Summary

The automatic local full-suite profile multiplies its host-aware worker budget across nested Vitest shards, causing avoidable peak RAM pressure and OOM risk.

Steps to reproduce

  1. Resolve local Vitest scheduling for a representative roomy host with 14 CPUs, 48 GB total memory, and no load; the scheduler returns a six-worker host budget.
  2. Resolve the current local full-suite profile for the same host; it launches ten shard processes with two Vitest workers each.
  3. Run the isolated full-suite inventory on a fresh Blacksmith Testbox. Individual two-worker leaf runs reach over 2 GB RSS, so multiplying them across 20 workers creates substantially more aggregate memory pressure than the inferred six-worker budget permits.

Expected behavior

The automatic full-suite profile should spend the inferred host worker budget once across the full process tree and keep each shard to one Vitest worker.

Actual behavior

The six-worker host budget selects a ten-shard by two-worker profile, allowing up to 20 Vitest workers plus their separate process and module-graph overhead.

OpenClaw version

Current main at d7e2096dc78.

Operating system

Linux on a fresh Blacksmith Testbox; scheduling behavior is platform-independent.

Install method

Source checkout with pnpm install.

Model

Not applicable; test-runner infrastructure.

Provider / routing chain

Not applicable; test-runner infrastructure.

Additional provider/model setup details

Not applicable.

Logs

The full isolated Testbox inventory and paired aggregate-RSS run will be linked from the fixing PR.

Screenshots, recordings, and evidence

Source-level scheduler reproduction plus fresh Testbox memory sampling; no visual surface is involved.

Impact and severity

  • Affected: developers and maintainers running the full local suite on roomy machines.
  • Severity: high resource pressure; can OOM the test run or make the workstation unresponsive.
  • Frequency: every default full-suite run that selects the large local profile.
  • Consequence: avoidable retries, lost test progress, and interference with other local work.

Additional information

The existing Vitest worker cap is sufficient when treated as a global budget. The fix should preserve explicit operator overrides and CI serialization while removing nested automatic concurrency.

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PR

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions