openclaw-test-heap-leaks

Compare heap snapshots to diagnose memory growth in OpenClaw test runs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Diagnose memory growth and heap-related failures in OpenClaw test runs, enabling precise triage of leaks, OOMs, and RSS spikes.

Core Features & Use Cases

  • Guided heap-delta analysis: Reproduces failure shapes, collects and compares heap snapshots, and surfaces dominant object families driving growth.
  • Triage workflow: Identifies whether growth is due to transformed module retention in shared workers or runtime objects, guiding targeted fixes.
  • Automated tooling integration: Reuses provided scripts to compare heap snapshots and generate delta reports for faster triage.

Quick Start

Follow the reproduction steps to reproduce the failure shape, then run the heapsnapshot-delta.mjs script to compare two snapshots.

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 leaks and heap growth in vitest test runs?

To diagnose memory leaks and heap growth in vitest test runs, compare heap snapshots to identify dominant object families. This process surfaces runtime objects or transformed module retention driving memory spikes during unit-fast and batch lanes.

Why does my pnpm test suite fail with OOM errors during continuous integration?

OOM errors during pnpm test suites often stem from unchecked memory growth in shared workers. Analyzing heap snapshot deltas helps identify whether transformed module retention or runtime objects cause the memory exhaustion.

How do I compare heap snapshots to find dominant retainers in Node.js tests?

You compare heap snapshots to find dominant retainers by running the heapsnapshot-delta.mjs script between two test states. This script computes deltas to reveal specific object families retaining memory and causing growth.

What is the best way to reproduce and triage memory spikes in local development environments?

The best way to reproduce and triage memory spikes locally is by enforcing reproducible steps to trigger the failure shape. Collecting and comparing heap snapshots then isolates the exact module or runtime object causing the leak.

Can I use heap snapshot analysis for Linux CI-style test failures?

Yes, heap snapshot analysis applies directly to Linux CI-style test failures. It guides targeted fixes by focusing on unit-fast and batch lanes to surface dominant retainers causing heap-related failures in automated environments.

Does heap delta analysis work for detecting memory leaks in shared workers?

Heap delta analysis works for detecting memory leaks in shared workers by identifying transformed module retention. It distinguishes between shared worker module retention and standard runtime objects to guide targeted fixes.