steipete avatar

Openclaw Test Heap Leaks

When Vitest workers start OOMing or your test suite RSS climbs into the gigabytes, you need to distinguish between actual object leaks and Vite's transformed module graph bloating long-lived worker heaps. This skill walks you through heap snapshot comparison with a purpose-built delta script, explains how to classify growth by dominant retained families, and teaches you when to isolate hotspot test files versus when to fix real cleanup bugs. It also covers a separate harness for validating runtime closure leaks outside the test context. The tone is refreshingly blunt about not trusting RSS alone and not calling everything a leak until you've checked retainers in DevTools.

skills.sh installs
182
GitHub stars
376.2K
last updated
Jun 3, 2026

Install

$ npx -y skills add steipete/clawdis --skill openclaw-test-heap-leaks --agent claude-code

Installs into .claude/skills of the current project.

Files

OpenClaw Test Heap Leaks

Use this skill for test-memory investigations. Do not guess from RSS alone when heap snapshots are available. Treat snapshot-name deltas as triage evidence, not proof, until retainers or dominators support the call.

Read ../openclaw-test-performance/SKILL.md first for the current test-performance commands and proof routing.

For runtime fixes (e.g., closure leaks in long-running services like the gateway), see Validating runtime fixes below — that uses a dedicated harness rather than the unit-test profiling workflow.

Workflow

  1. Reproduce the failing shape first.
    • Match the real entrypoint and worker budget. For a broad unit-fast baseline with per-config max RSS and top-file timing, start with:

      pnpm test:perf:groups \
        --config test/vitest/vitest.unit-fast.config.ts \
        --allow-failures \
        --output .artifacts/test-perf/unit-fast-memory.json
      

Sponsors

Details

Repository
github.com/steipete/clawdis
Category
Testing & QA
First seen
Jun 3, 2026

More from steipete/clawdis

All 61
1leeovery avatarlaravel-testingleeovery/claude-laravellaravel testing177skills.sh installs
2absolutelyskilled avatartest-strategyabsolutelyskilled/absolutelyskilledtest strategy157skills.sh installs
3skillcreatorai avatarwebapp-testingskillcreatorai/ai-agent-skillswebapp testing155skills.sh installs
4volter-ai avatarrunhuman-testingvolter-ai/runhuman-skillsrunhuman testing147skills.sh installs
5absolutelyskilled avatarapi-testingabsolutelyskilled/absolutelyskilledapi testing146skills.sh installs
6vudovn avatartesting-patternsvudovn/antigravity-kittesting patterns138skills.sh installs