惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
M
MIT News - Artificial intelligence
U
Unit 42
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
I
InfoQ
WordPress大学
WordPress大学
H
Help Net Security
D
Docker
B
Blog
腾讯CDC
A
About on SuperTechFans
Recent Announcements
Recent Announcements
雷峰网
雷峰网
有赞技术团队
有赞技术团队
C
Check Point Blog
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(agents): release embedded-run scope on hung provider ...
RomneyDa · 2026-05-01 · via Recent Commits to openclaw:main

@@ -7,6 +7,8 @@ description: Investigate OpenClaw pnpm test memory growth, Vitest OOMs, RSS spik

7788

Use 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.

9910+

For **runtime fixes** (e.g., closure leaks in long-running services like the gateway), see [Validating runtime fixes](#validating-runtime-fixes-not-test-memory) below — that uses a dedicated harness, not the test-parallel snapshot machinery.

11+1012

## Workflow

11131214

1. Reproduce the failing shape first.

@@ -63,6 +65,38 @@ Use this skill for test-memory investigations. Do not guess from RSS alone when

63656466

Read 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/dominators for the top rows before declaring root cause.

656768+

## Validating runtime fixes (not test-memory)

69+70+

The workflow above is for diagnosing Vitest worker memory growth. For

71+

validating that a runtime/closure fix actually releases captured state, use the

72+

dedicated harness:

73+74+

- `pnpm leak:embedded-run` — runs `scripts/embedded-run-abort-leak.ts`. Loops N

75+

aborted runs in a function-shaped scope mimicking `runEmbeddedAttempt`,

76+

writes heap snapshots, and reports a PASS/FAIL verdict on retention growth

77+

using `FinalizationRegistry` for tracked-instance counting plus RSS delta.

78+79+

Modes:

80+81+

- `closure-extracted` (default) — production fix shape (helper at module scope).

82+

- `closure-inline` — pre-fix shape (closure inside the runner scope). Use as a

83+

sensitivity check: if it passes you've broken the harness, not fixed a bug.

84+

- `synthetic-leak` — deliberately retains via a module-level bucket. Use to

85+

confirm the harness can detect leaks before trusting a PASS on a real fix.

86+87+

Snapshots land in `.tmp/embedded-run-abort-leak/`. Diff with the same script

88+

as above:

89+90+

```

91+

node .agents/skills/openclaw-test-heap-leaks/scripts/heapsnapshot-delta.mjs \

92+

.tmp/embedded-run-abort-leak/baseline-*.heapsnapshot \

93+

.tmp/embedded-run-abort-leak/batch-N-*.heapsnapshot --top 30

94+

```

95+96+

When fixing a different runtime leak, add a new harness alongside this one

97+

rather than retrofitting it. The fixture function should mimic the lexical

98+

scope of the function where the leak lives, not be a generic abort-loop.

99+66100

## Output Expectations

6710168102

When using this skill, report: