Repository navigation
fix(runtime): bound hook output under constrained memory - #10
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 11:22 AM ET / 15:22 UTC. ClawSweeper reviewWhat this changesThis PR limits stdout and stderr from imported Codex and Claude Code command hooks to 1 MiB per stream, terminates overflowing hook processes, documents the compatibility contract, and adds constrained-memory Docker validation. Merge readinessKeep this PR open for normal maintainer merge review. The previous documentation blocker is resolved: the current head adds the requested compatibility-table row for the 1 MiB per-stream hook-output contract, and the reported checks—including the constrained-memory workflow—are green; no new line-level correctness defect is evident from the available diff and review context. Priority: P2 Review scores
Verification
How this fits togetherBabelfish translates source-plugin command hooks into OpenClaw runtime hooks. The runtime starts a hook process, captures its stdout and stderr for hook handling, and reports process failures back to the calling OpenClaw flow. flowchart LR
A[Source plugin manifest] --> B[Imported command hook]
B --> C[Hook process runtime]
C --> D[Per-stream output and timeout checks]
D --> E[Hook result or reported failure]
E --> F[OpenClaw plugin flow]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the narrowly documented per-stream cap if maintainers accept 1 MiB as the supported hook-output contract, preserving the existing hook-failure behavior and constrained-memory regression coverage. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the focused test creates an imported command hook that emits 2 MiB, and the proposed runtime path explicitly detects and terminates that overflow. The available review environment did not permit independently running the test. Is this the best way to solve the issue? Yes: independently capping each captured stream, terminating the process tree, and routing the failure through existing hook-failure handling is a narrow solution that addresses the stated memory-exhaustion path without changing hook result formats. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 807a7c54e76f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer decision: accepting the documented 1 MiB per-stream limit for imported Codex and Claude Code command hooks. The change is narrowly scoped, preserves existing hook-failure handling, and the exact head passed cross-platform CI, CodeQL, and the 1 GiB / 512 MiB / 256 MiB Docker matrix with zero OOM kills. |
Summary
Compatibility
Verification
npm run check(63 tests).npm run pack:check.NODE_OPTIONS=--max-old-space-size=64 npm run test:low-memory:e2e(Hermes, Claude Code, Codex lifecycle plus MCP stdio).CHANGELOG.mdfor user-visible or operational changes.