openclaw-test-heap-leaks

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Investigate test memory growth and heap snapshot behavior in OpenClaw to identify leaks and retention patterns.

Core Features & Use Cases

  • Heap-snapshot analysis across CI and local test runs to pinpoint memory growth.
  • Compare before/after snapshots per PID using the built-in heapsnapshot-delta tool and derive actionable deltas.
  • Guides for triage between retained module growth and runtime leaks, plus patch strategies to reduce impact.

Quick Start

Use this skill to reproduce a failing test shape and collect repeated .heapsnapshot files for analysis.

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 running with pnpm test parallel lanes?

Identify test memory leaks by analyzing repeated .heapsnapshot files generated per PID during pnpm test parallel runs. The heapsnapshot-delta tool groups snapshots by lane and reports dominant deltas to pinpoint retention patterns.

What is the best way to compare heap snapshots to find retained module growth?

Compare before/after heap snapshots per PID using the heapsnapshot-delta tool to derive actionable deltas. This triages retained module growth versus runtime leaks and suggests patch strategies to reduce impact.

Can I use heap snapshot analysis for CI test runs and local pnpm test environments?

Yes, you can analyze heap snapshot behavior across both CI and local pnpm test runs. The tool groups repeated .heapsnapshot files by lane-based PID to evaluate memory growth and retention patterns.

How do I reproduce a failing test shape to collect repeated .heapsnapshot files?

Reproduce a failing test shape by running pnpm test with parallel lanes to generate repeated .heapsnapshot files per PID. These collected snapshots provide the baseline data required for delta analysis.

Why does vitest parallel test execution produce memory growth across different PIDs?

Vitest parallel test execution produces memory growth when runtime leaks or retained module growth occur across isolated lanes. Analyzing .heapsnapshot files per PID identifies the dominant deltas causing retention.