openclaw-test-heap-leaks

Analyze heap snapshots to diagnose memory growth and OOMs in OpenClaw test runs.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/pertain99/openclaw-better --skill openclaw-test-heap-leaks-pertain99
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openclaw-test-heap-leaks
Source: https://github.com/pertain99/openclaw-better/tree/main/.agents/skills/openclaw-test-heap-leaks
Command: npx skills add https://github.com/pertain99/openclaw-better --skill openclaw-test-heap-leaks-pertain99

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps engineers diagnose memory growth and occasional OOM events in the OpenClaw test suite by collecting and comparing heap snapshots across test workers, enabling triage between transformed-module retention and runtime leaks.

Core Features & Use Cases

  • Heap snapshot automation: reproduce memory growth scenarios, capture multiple heap snapshots per worker PID, and compare deltas to identify hotspots.
  • Triage and debugging: distinguish between module retention in long lived workers and actual leaks in runtime objects.
  • Patch and verify: guide patching cleanup logic or isolating hotspot tests to reduce RSS growth and OOM risk.

Quick Start

Run a reproducible workflow to collect and compare heap snapshots for the failing test lane and PID.

Frequently Asked Questions about openclaw-test-heap-leaks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose memory growth and OOM events in vitest worker processes?

To diagnose memory growth in vitest workers, capture multiple heap snapshots per worker PID during pnpm test runs. Comparing snapshot deltas isolates hotspot tests and distinguishes between transformed-module retention and actual runtime object leaks.

What is the best way to compare heap snapshots across test workers to find memory leaks?

Comparing heap snapshots across test workers involves capturing them per worker PID under the test-parallel workflow. This isolates memory hotspots by analyzing delta changes between snapshots across multiple test runs.

How do I tell if my test memory growth is caused by transformed-module retention or runtime leaks?

Distinguishing transformed-module retention from runtime leaks requires analyzing heap snapshots captured per worker PID. This triage separates long-lived worker module retention from actual leaks in runtime objects.

Does this test diagnostics workflow support patching cleanup logic to reduce RSS growth?

Yes, the test diagnostics workflow supports patching cleanup logic. After isolating hotspot tests via heap snapshot analysis, you can patch cleanup mechanisms to reduce RSS growth and mitigate OOM risk.

Can I use heap snapshots to isolate specific hotspot tests causing OOM in pnpm test runs?

Yes, heap snapshots can isolate specific hotspot tests causing OOM in pnpm test runs. Capturing snapshots per worker PID and comparing deltas identifies the exact tests driving memory growth.