openclaw-test-heap-leaks

Compare heap snapshots and RSS deltas to identify test memory growth.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/MaxSaiets/myOpenCL --skill openclaw-test-heap-leaks-maxsaiets
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openclaw-test-heap-leaks
Source: https://github.com/MaxSaiets/myOpenCL/tree/main/openclaw/.agents/skills/openclaw-test-heap-leaks
Command: npx skills add https://github.com/MaxSaiets/myOpenCL --skill openclaw-test-heap-leaks-maxsaiets

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Investigate test memory growth, Vitest worker OOMs, and RSS increases in OpenClaw using heap snapshot tooling. Use when Codex needs to reproduce test-lane memory growth, collect repeated .heapsnapshot files, compare snapshots from the same worker PID, distinguish transformed-module retention from real data leaks, and patch cleanup logic or isolate hotspot tests.

Core Features & Use Cases

  • Heap snapshot collection and per-file RSS summaries to identify memory growth in test workers.
  • Compare snapshots across iterations with scripts/heapsnapshot-delta.mjs to distinguish retained module growth from runtime object leaks.
  • Patch tests or cleanup paths to isolate hotspot files and reduce RSS growth in long-running workers.

Quick Start

Run the recommended reproduction workflow to capture two or more heap snapshots and compare them with heapsnapshot-delta.mjs.

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 Vitest worker memory leaks using heap snapshots?

Analyze test memory growth by collecting repeated .heapsnapshot files from Vitest workers and comparing before/after states using heapsnapshot-delta.mjs to identify retained modules or runtime object leaks.

What causes out of memory errors in Vitest workers during long test runs?

Vitest worker OOMs often stem from retained transformed modules or real data leaks across iterations. Comparing heap snapshots from the same worker PID isolates whether module retention or runtime object accumulation drives RSS growth.

How do I compare heap snapshots from different test workers by PID?

Compare heap snapshots by PID by organizing snapshots into per-PID groups or lane directories, then run heapsnapshot-delta.mjs to quantify memory deltas between iterations for each specific worker.

Can I use heap snapshot tooling to isolate hotspot test files causing memory growth on Linux CI?

Yes, apply heap snapshot tooling to CI-style Linux test runs to generate per-file RSS summaries and compare snapshots by worker PID, allowing you to isolate hotspot test files and patch cleanup logic.

How many heap snapshots do I need to identify test memory growth?

You need at least two heap snapshots to identify test memory growth. Capturing repeated snapshots across iterations allows heapsnapshot-delta.mjs to compare before and after states and distinguish transformed-module retention from real data leaks.

What is the best way to distinguish transformed-module retention from actual memory leaks in tests?

The best way to distinguish transformed-module retention from actual memory leaks is to compare heap snapshots across iterations using heapsnapshot-delta.mjs, which quantifies memory deltas and separates module growth from runtime object leaks.