openclaw-test-heap-leaks

Analyze heap snapshot deltas to diagnose memory growth in OpenClaw's test suite.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Investigates memory growth and OOM scenarios in OpenClaw's test suite by guiding the collection and comparison of heap snapshots to identify retained objects and leaks.

Core Features & Use Cases

  • Heap snapshot automation: Reproduce and capture repeated .heapsnapshot files across test lanes.
  • Delta analysis: Compare before/after heap snapshots to surface dominant retained objects and growth.
  • Triage guidance: Differentiate between transformed-module retention in shared workers versus runtime leaks, and propose patch directions.

Quick Start

Run the dedicated heap-leak investigation workflow to reproduce memory growth and generate before/after heap snapshot pairs.

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 a vitest test suite?

Diagnose memory leaks in a vitest test suite by capturing and comparing repeated .heapsnapshot files to identify retained objects and memory growth. This process uses delta analysis to surface dominant retained objects across test lanes.

Why does my test suite experience OOM scenarios during CI debugging?

OOM scenarios during CI debugging often occur due to memory growth from retained objects or transformed-module retention in shared workers. Analyzing heap snapshot deltas helps identify whether the issue is runtime leaks or module retention.

How do I capture before and after heap snapshots for memory growth analysis?

Capture before and after heap snapshots for memory growth analysis by running a dedicated heap-leak investigation workflow. This automation reproduces memory growth across test lanes and generates snapshot pairs for comparison.

Can I use heap snapshot deltas to triage transformed-module retention versus runtime leaks?

Yes, you can use heap snapshot deltas to triage transformed-module retention versus runtime leaks. The analysis differentiates between retention in shared workers and actual runtime leaks, providing guidance for cleanup or isolation patches.

What is the best way to automate heap snapshot collection in unit-fast lanes?

Automate heap snapshot collection in unit-fast lanes by applying the heapsnapshot-delta.mjs tool to capture repeated .heapsnapshot files. This ensures deterministic snapshot collection and per-PID delta analysis for accurate triaging.

Does pnpm support deterministic snapshot collection for memory leak diagnostics?

pnpm environments support deterministic snapshot collection for memory leak diagnostics by running the dedicated heap-leak investigation workflow. This setup captures repeated .heapsnapshot files and compares per-PID deltas to identify memory growth.