openclaw-test-heap-leaks

Compare heap snapshots to identify memory leaks in OpenClaw test runs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill helps you diagnose memory growth in test suites by capturing and comparing heap snapshots across pnpm test workers to identify leaks and RSS spikes.

Core Features & Use Cases

  • Capture and aggregate heap snapshots from parallel test workers.
  • Compare snapshots between before and after runs for the same PID to reveal dominant leak sources.
  • Triage growth between transformed-module retention and runtime objects, and propose targeted fixes.

Quick Start

Run the heap-leak workflow to reproduce a failing test shape, collect two heap snapshots, and compare them to identify dominant leaks.

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 in vitest workers during pnpm test runs?

To diagnose memory leaks in vitest workers, capture and compare heap snapshots across pnpm test runs to identify dominant leak sources by PID. This skill computes snapshot deltas to reveal whether growth stems from transformed-module retention or runtime objects.

What causes worker OOMs and RSS spikes in CI testing pipelines?

Worker OOMs and RSS spikes in CI testing pipelines occur when test workers exhibit unmanaged memory growth. Comparing heap snapshots between test runs isolates the dominant leak sources, allowing you to triage retention issues and propose targeted fixes.

How do I compare heap snapshots to identify dominant leak sources?

You compare heap snapshots by collecting before and after snapshots for the same PID and computing the deltas. The script reports the top memory differences, optionally filtered by lane and PID with configurable thresholds.

Can I configure memory leak thresholds for specific pnpm test workers?

Yes, you can configure memory leak thresholds for specific pnpm test workers. The heap snapshot delta script computes memory growth and reports top differences with configurable thresholds, optionally segmented by lane and PID.

Does this approach work for local development as well as CI pipelines?

Yes, this heap snapshot approach works for both CI pipelines and local development. It captures and aggregates snapshots from parallel test workers to identify memory growth and RSS spikes wherever pnpm test runs execute.

Why does triaging growth between transformed-module retention and runtime objects matter?

Triaging growth between transformed-module retention and runtime objects matters because it pinpoints the exact mechanism causing memory leaks. This distinction allows you to propose targeted fixes for the specific module or object retention issue.