[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E2H2EBHHSVGP0J95G1G1PK":3,"skill-same:01M6E2H2EBHHSVGP0J95G1G1PK":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":13,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":45,"install":46,"resources":58},"01M6E2H2EBHHSVGP0J95G1G1PK","openclaw-test-heap-leaks",null,"Investigate OpenClaw pnpm test memory growth, Vitest OOMs, RSS spikes, and heap snapshot deltas.","7dvq6yrkgs-stack\u002Fplaywright","7dvq6yrkgs-stack","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F251638143?v=4","01M6E061J2AMGWYZ6TK7Y8NM74","01M6E061PQCQJGQMPBERMCFN5G",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fopenclaw-test-heap-leaks\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33],"openclaw","openclaw test heap leaks","test","memory","investigate","vitest","rss","growth","snapshot","deltas","pnpm","2026-11-10 10:12:30",false,"---\nname: openclaw-test-heap-leaks\ndescription: Investigate OpenClaw pnpm test memory growth, Vitest OOMs, RSS spikes, and heap snapshot deltas.\n---\n\n# OpenClaw Test Heap Leaks\n\nUse this skill for test-memory investigations. Do not guess from RSS alone when heap snapshots are available. Treat snapshot-name deltas as triage evidence, not proof, until retainers or dominators support the call.\n\n## Workflow\n\n1. Reproduce the failing shape first.\n   - Match the real entrypoint if possible. For Linux CI-style unit failures, start with:\n   - `pnpm canvas:a2ui:bundle && OPENCLAW_TEST_MEMORY_TRACE=1 OPENCLAW_TEST_HEAPSNAPSHOT_INTERVAL_MS=60000 OPENCLAW_TEST_HEAPSNAPSHOT_DIR=.tmp\u002Fheapsnap OPENCLAW_TEST_WORKERS=2 OPENCLAW_TEST_MAX_OLD_SPACE_SIZE_MB=6144 pnpm test`\n   - Keep `OPENCLAW_TEST_MEMORY_TRACE=1` enabled so the wrapper prints per-file RSS summaries alongside the snapshots.\n   - If the report is about a specific shard or worker budget, preserve that shape.\n   - Before you analyze snapshots, identify the real lane names from `[test-parallel] start ...` lines or `pnpm test --plan`. Do not assume a single `unit-fast` lane; local plans often split into `unit-fast-batch-*`.\n\n2. Wait for repeated snapshots before concluding anything.\n   - Take at least two intervals from the same lane.\n   - Compare snapshots from the same PID inside the real lane directory such as `.tmp\u002Fheapsnap\u002Funit-fast-batch-2\u002F`.\n   - Use `.agents\u002Fskills\u002Fopenclaw-test-heap-leaks\u002Fscripts\u002Fheapsnapshot-delta.mjs` to compare either two files directly or the earliest\u002Flatest pair per PID in one lane directory.\n   - If the helper suggests transformed-module retention, confirm the top entries in DevTools retainers\u002Fdominators before calling it solved.\n\n3. Classify the growth before choosing a fix.\n   - If growth is dominated by Vite\u002FVitest transformed source strings, `Module`, `system \u002F Context`, bytecode, descriptor arrays, or property maps, treat it as likely retained module graph growth in long-lived workers.\n   - If growth is dominated by app objects, caches, buffers, server handles, timers, mock state, sqlite state, or similar runtime objects, treat it as a likely cleanup or lifecycle leak.\n   - If the names are ambiguous, stop short of a confident label and inspect retainers\u002Fdominators in DevTools for the top deltas.\n\n4. Fix the right layer.\n   - For likely retained transformed-module growth in shared workers:\n   - Prefer timing and hotspot-driven scheduling fixes first. Check whether the file is already represented in `test\u002Ffixtures\u002Ftest-timings.unit.json` and whether `scripts\u002Ftest-update-memory-hotspots.mjs` should refresh the measured hotspot manifest before hand-editing behavior overrides.\n   - Move hotspot files out of the real shared lane by updating `test\u002Ffixtures\u002Ftest-parallel.behavior.json` only when timing-driven peeling is insufficient.\n   - Prefer `singletonIsolated` for files that are safe alone but inflate shared worker heaps.\n   - If the file should already have been peeled out by timings but is absent from `test\u002Ffixtures\u002Ftest-timings.unit.json`, call that out explicitly. Missing timings are a scheduling blind spot.\n   - For real leaks:\n   - Patch the implicated test or runtime cleanup path.\n   - Look for missing `afterEach`\u002F`afterAll`, module-reset gaps, retained global state, unreleased DB handles, or listeners\u002Ftimers that survive the file.\n\n5. Verify with the most direct proof.\n   - Re-run the targeted lane or file with heap snapshots enabled if the suite still finishes in reasonable time.\n   - If snapshot overhead pushes tests over Vitest timeouts, fall back to the same lane without snapshots and confirm the RSS trend or OOM is reduced.\n   - For wrapper-only changes, at minimum verify the expected lanes start and the snapshot files are written.\n\n## Heuristics\n\n- Do not call everything a leak. In this repo, large `unit-fast` or `unit-fast-batch-*` growth can be a worker-lifetime problem rather than an application object leak.\n- `scripts\u002Ftest-parallel.mjs` and `scripts\u002Ftest-parallel-memory.mjs` are the primary control points for wrapper diagnostics.\n- The lane names printed by `[test-parallel] start ...` and `[test-parallel][mem] summary ...` tell you where to focus.\n- When one or two files account for most of the delta and they are missing from timings, reducing impact by isolating them is usually the first pragmatic fix.\n- When the same retained object families grow across multiple intervals in the same worker PID, trust the snapshots over intuition, then confirm ambiguous calls with retainer evidence.\n\n## Snapshot Comparison\n\n- Direct comparison:\n  - `node .agents\u002Fskills\u002Fopenclaw-test-heap-leaks\u002Fscripts\u002Fheapsnapshot-delta.mjs before.heapsnapshot after.heapsnapshot`\n- Auto-select earliest\u002Flatest snapshots per PID within one lane:\n  - `node .agents\u002Fskills\u002Fopenclaw-test-heap-leaks\u002Fscripts\u002Fheapsnapshot-delta.mjs --lane-dir .tmp\u002Fheapsnap\u002Funit-fast-batch-2`\n- Useful flags:\n  - `--top 40`\n  - `--min-kb 32`\n  - `--pid 16133`\n\nRead the top positive deltas first. Large positive growth in module-transform artifacts suggests lane isolation; large positive growth in runtime objects suggests a real leak. If the names alone do not settle it, open the same snapshot pair in DevTools and inspect retainers\u002Fdominators for the top rows before declaring root cause.\n\n## Output Expectations\n\nWhen using this skill, report:\n\n- The exact reproduce command.\n- Which lane and PID were compared.\n- The dominant retained object families from the snapshot delta.\n- Whether the issue is a likely real leak or likely shared-worker retained module growth, plus whether retainers\u002Fdominators confirmed it.\n- The concrete fix or impact-reduction patch.\n- What you verified, and what snapshot overhead prevented you from verifying.\n","# OpenClaw Test Heap Leaks\n\nUse this skill for test-memory investigations. Do not guess from RSS alone when heap snapshots are available. Treat snapshot-name deltas as triage evidence, not proof, until retainers or dominators support the call.\n\n## Workflow\n\n1. Reproduce the failing shape first.\n   - Match the real entrypoint if possible. For Linux CI-style unit failures, start with:\n   - `pnpm canvas:a2ui:bundle && OPENCLAW_TEST_MEMORY_TRACE=1 OPENCLAW_TEST_HEAPSNAPSHOT_INTERVAL_MS=60000 OPENCLAW_TEST_HEAPSNAPSHOT_DIR=.tmp\u002Fheapsnap OPENCLAW_TEST_WORKERS=2 OPENCLAW_TEST_MAX_OLD_SPACE_SIZE_MB=6144 pnpm test`\n   - Keep `OPENCLAW_TEST_MEMORY_TRACE=1` enabled so the wrapper prints per-file RSS summaries alongside the snapshots.\n   - If the report is about a specific shard or worker budget, preserve that shape.\n   - Before you analyze snapshots, identify the real lane names from `[test-parallel] start ...` lines or `pnpm test --plan`. Do not assume a single `unit-fast` lane; local plans often split into `unit-fast-batch-*`.\n\n2. Wait for repeated snapshots before concluding anything.\n   - Take at least two intervals from the same lane.\n   - Compare snapshots from the same PID inside the real lane directory such as `.tmp\u002Fheapsnap\u002Funit-fast-batch-2\u002F`.\n   - Use `.agents\u002Fskills\u002Fopenclaw-test-heap-leaks\u002Fscripts\u002Fheapsnapshot-delta.mjs` to compare either two files directly or the earliest\u002Flatest pair per PID in one lane directory.\n   - If the helper suggests transformed-module retention, confirm the top entries in DevTools retainers\u002Fdominators before calling it solved.\n\n3. Classify the growth before choosing a fix.\n   - If growth is dominated by Vite\u002FVitest transformed source strings, `Module`, `system \u002F Context`, bytecode, descriptor arrays, or property maps, treat it as likely retained module graph growth in long-lived workers.\n   - If growth is dominated by app objects, caches, buffers, server handles, timers, mock state, sqlite state, or similar runtime objects, treat it as a likely cleanup or lifecycle leak.\n   - If the names are ambiguous, stop short of a confident label and inspect retainers\u002Fdominators in DevTools for the top deltas.\n\n4. Fix the right layer.\n   - For likely retained transformed-module growth in shared workers:\n   - Prefer timing and hotspot-driven scheduling fixes first. Check whether the file is already represented in `test\u002Ffixtures\u002Ftest-timings.unit.json` and whether `scripts\u002Ftest-update-memory-hotspots.mjs` should refresh the measured hotspot manifest before hand-editing behavior overrides.\n   - Move hotspot files out of the real shared lane by updating `test\u002Ffixtures\u002Ftest-parallel.behavior.json` only when timing-driven peeling is insufficient.\n   - Prefer `singletonIsolated` for files that are safe alone but inflate shared worker heaps.\n   - If the file should already have been peeled out by timings but is absent from `test\u002Ffixtures\u002Ftest-timings.unit.json`, call that out explicitly. Missing timings are a scheduling blind spot.\n   - For real leaks:\n   - Patch the implicated test or runtime cleanup path.\n   - Look for missing `afterEach`\u002F`afterAll`, module-reset gaps, retained global state, unreleased DB handles, or listeners\u002Ftimers that survive the file.\n\n5. Verify with the most direct proof.\n   - Re-run the targeted lane or file with heap snapshots enabled if the suite still finishes in reasonable time.\n   - If snapshot overhead pushes tests over Vitest timeouts, fall back to the same lane without snapshots and confirm the RSS trend or OOM is reduced.\n   - For wrapper-only changes, at minimum verify the expected lanes start and the snapshot files are written.\n\n## Heuristics\n\n- Do not call everything a leak. In this repo, large `unit-fast` or `unit-fast-batch-*` growth can be a worker-lifetime problem rather than an application object leak.\n- `scripts\u002Ftest-parallel.mjs` and `scripts\u002Ftest-parallel-memory.mjs` are the primary control points for wrapper diagnostics.\n- The lane names printed by `[test-parallel] start ...` and `[test-parallel][mem] summary ...` tell you where to focus.\n- When one or two files account for most of the delta and they are missing from timings, reducing impact by isolating them is usually the first pragmatic fix.\n- When the same retained object families grow across multiple intervals in the same worker PID, trust the snapshots over intuition, then confirm ambiguous calls with retainer evidence.\n\n## Snapshot Comparison\n\n- Direct comparison:\n  - `node .agents\u002Fskills\u002Fopenclaw-test-heap-leaks\u002Fscripts\u002Fheapsnapshot-delta.mjs before.heapsnapshot after.heapsnapshot`\n- Auto-select earliest\u002Flatest snapshots per PID within one lane:\n  - `node .agents\u002Fskills\u002Fopenclaw-test-heap-leaks\u002Fscripts\u002Fheapsnapshot-delta.mjs --lane-dir .tmp\u002Fheapsnap\u002Funit-fast-batch-2`\n- Useful flags:\n  - `--top 40`\n  - `--min-kb 32`\n  - `--pid 16133`\n\nRead the top positive deltas first. Large positive growth in module-transform artifacts suggests lane isolation; large positive growth in runtime objects suggests a real leak. If the names alone do not settle it, open the same snapshot pair in DevTools and inspect retainers\u002Fdominators for the top rows before declaring root cause.\n\n## Output Expectations\n\nWhen using this skill, report:\n\n- The exact reproduce command.\n- Which lane and PID were compared.\n- The dominant retained object families from the snapshot delta.\n- Whether the issue is a likely real leak or likely shared-worker retained module growth, plus whether retainers\u002Fdominators confirmed it.\n- The concrete fix or impact-reduction patch.\n- What you verified, and what snapshot overhead prevented you from verifying.\n",{"name":5,"description":7},"main","a2e3284ed4488780397ee2f78217366e11470dfb","skills\u002Fopenclaw-test-heap-leaks","https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright","https:\u002F\u002Fplaywright.dev","https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack","2026-04-25 06:04:45",{"source":8,"skillName":5,"commands":47,"prompt":56,"zipAvailable":57},[48,51,54],{"tool":49,"command":50},"npx","npx skills add 7dvq6yrkgs-stack\u002Fplaywright --skill openclaw-test-heap-leaks",{"tool":52,"command":53},"bunx","bunx skills add 7dvq6yrkgs-stack\u002Fplaywright --skill openclaw-test-heap-leaks",{"tool":33,"command":55},"pnpm dlx skills add 7dvq6yrkgs-stack\u002Fplaywright --skill openclaw-test-heap-leaks","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fopenclaw-test-heap-leaks\u002FSKILL.md",true,[59,65,69,75],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},".skillfish.json","REFERENCE","参考文档",249,"https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fopenclaw-test-heap-leaks\u002F.skillfish.json",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"agents\u002Fopenai.yaml",237,"https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fopenclaw-test-heap-leaks\u002Fagents\u002Fopenai.yaml",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fheapsnapshot-delta.mjs","SCRIPT","脚本",14141,"https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fopenclaw-test-heap-leaks\u002Fscripts\u002Fheapsnapshot-delta.mjs",{"path":76,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":77,"sourceHtmlUrl":78},"SKILL-ja.md",1193,"https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fengineering\u002Fgit-commit\u002FSKILL-ja.md",[80,110,120,130,145,160],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":98,"publishedAt":34},"01M6E3XK4PRPMQHM7Y98FQPTY1","zyte-api-automation","Automate Zyte API tasks via Rube MCP (Composio). Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fzyte-api-automation\u002FSKILL.md",[86,87,90,93],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":88,"categoryName":89,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":91,"categoryName":92,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[99,100,101,102,103,104,105,106,107,108,109],"zyte api automation","api","automation","MCP","tasks","search","Tools","first","automate","composio","via",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":118,"publishedAt":34},"01M6E3XFX6QSTR1QR59NFXJTMA","zylvie-automation","Automate Zylvie tasks via Rube MCP (Composio). Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fzylvie-automation\u002FSKILL.md",[116,117],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":91,"categoryName":92,"taxonomyType":20,"taxonomyTypeDesc":21},[119,101,107,102,103,104,105,106,108,109],"zylvie automation",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":128,"publishedAt":34},"01M6E3XCX2GDYYCHN58ZJHT37M","zoominfo-automation","Automate Zoominfo tasks via Rube MCP (Composio). Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fzoominfo-automation\u002FSKILL.md",[126,127],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":91,"categoryName":92,"taxonomyType":20,"taxonomyTypeDesc":21},[129,101,104,105,106,107,108,109,103,102],"zoominfo automation",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":138,"publishedAt":34},"01M6E3X9WJ2T73216WQHHTB9BD","zoho_mail-automation","Automate Zoho Mail tasks via Rube MCP (Composio): email sending, folders, labels, and mailbox management. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fzoho_mail-automation\u002FSKILL.md",[136,137],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":91,"categoryName":92,"taxonomyType":20,"taxonomyTypeDesc":21},[139,140,141,101,102,103,104,142,105,106,107,143,108,144,109],"mail","zoho mail automation","zoho","email","management","mailbox",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":156,"publishedAt":34},"01M6E3X719W648XZBW1EC6JQ64","zoho_invoice-automation","Automate Zoho Invoice tasks via Rube MCP (Composio): invoices, estimates, expenses, clients, and payment tracking. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fzoho_invoice-automation\u002FSKILL.md",[151,152,153],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":91,"categoryName":92,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":154,"categoryName":155,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000040","财务",[157,141,101,103,104,105,106,107,158,159,108,109,102],"zoho invoice automation","tracking","payment",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":168,"publishedAt":34},"01M6E3X28JYTC3QTK32AQF7BYB","zoho_inventory-automation","Automate Zoho Inventory tasks via Rube MCP (Composio): items, orders, warehouses, shipments, and stock management. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002F7dvq6yrkgs-stack\u002Fplaywright\u002Fblob\u002Fmain\u002Fskills\u002Fzoho_inventory-automation\u002FSKILL.md",[166,167],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":91,"categoryName":92,"taxonomyType":20,"taxonomyTypeDesc":21},[101,169,141,170,106,107,105,104,103,102,108,109,171,172,143],"inventory","zoho inventory automation","stock","orders"]