openclaw-test-heap-leaks

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill helps engineers diagnose and triage memory growth in OpenClaw's test suite by analyzing heap snapshots and identifying potential leaks that occur during parallel test runs.

Core Features & Use Cases

  • Heap snapshot comparison: Reproduce tests and collect repeated .heapsnapshot files across workers to compare memory deltas.
  • Triage and evidence: Distinguish retained module growth from actual runtime leaks and guide isolation or cleanup patches.
  • Use Case: When CI shows increasing RSS with repeated pnpm test invocations, use this skill to surface the dominant memory contributors and propose fixes.

Quick Start

Run the heapsnapshot-delta tool on two snapshots to surface top delta entries and guide fixes.

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?

You can identify test memory leaks by comparing multiple heap snapshots taken across pnpm test runs to isolate dominant object families and distinguish actual runtime leaks from retained transformed-module growth.

What is the best way to identify heap snapshot deltas across test workers?

Identifying heap snapshot deltas involves loading and parsing repeated .heapsnapshot files from parallel workers to compare memory growth and report dominant object families within unit-fast or batch lanes.

Why does CI show increasing RSS with repeated pnpm test invocations?

Increasing RSS during repeated pnpm test invocations often indicates memory leaks in the test suite, which you can triage by analyzing heap snapshots to distinguish retained module growth from actual runtime leaks.

How do I distinguish transformed-module retention from actual runtime leaks?

Distinguishing transformed-module retention from runtime leaks requires analyzing heap snapshot deltas across test lanes to identify whether memory growth stems from retained modules or actual runtime object accumulation.

Can I use heap snapshots to triage memory growth in parallel node test runs?

Yes, you can use heap snapshots to triage memory growth in parallel node test runs by collecting and comparing repeated .heapsnapshot files across workers to guide isolation or cleanup patches.

What are the limitations of using heap snapshots for performance analysis in tests?

Heap snapshot performance analysis requires collecting multiple snapshots across repeated test runs to identify deltas, making it limited by the overhead of snapshot generation and parsing during parallel pnpm test execution.