Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 1:31 AM ET / 05:31 UTC. ClawSweeper reviewWhat this changesThe PR rejects remote skill-installer downloads above 256 MiB through strict header validation and streamed-byte counting, with cleanup coverage and documentation. Merge readinessKeep open: current main still writes skill downloads without a size bound, and this PR places one at the lifecycle owner with no actionable correctness finding. A maintainer should explicitly accept the documented 256 MiB compatibility boundary before merge. Priority: P2 Review scores
Verification
How this fits togetherThe skill installer fetches remote artifacts into temporary staging before copying or extracting them into a skill’s tools directory. This change bounds that staging download so a remote response cannot consume unbounded local disk. flowchart LR
A[Skill install request] --> B[Remote artifact response]
B --> C[Download and staging boundary]
C --> D{Within 256 MiB?}
D -->|Yes| E[Staged artifact]
E --> F[Copy or extract skill]
D -->|No| G[Cancel response and clean staging]
Decision needed
Why: Current main has no limit, so this security boundary deliberately changes the outcome for a class of existing remote artifacts; source review cannot establish operator prevalence or product acceptance. Before merge
Agent review detailsSecurityNone. PR surfaceSource +53, Tests +130, Docs +1. Total +184 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one documented 256 MiB limit at the lifecycle downloader, preserving the existing cleanup path, once the compatibility boundary is accepted and exact-head gates settle. Do we have a high-confidence way to reproduce the issue? Yes—current main is source-reproducible because the sole download-installer path directly pipelines an arbitrary response to staging without a byte bound. The PR body also supplies after-fix loopback HTTP evidence for advertised and headerless overflow cases. Is this the best way to solve the issue? Yes—the lifecycle downloader is the narrowest owner because every download spec reaches it before copying or extraction; downstream archive limits cannot prevent the initial unbounded write. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1aeecb9be64c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
This comment was marked as low quality.
This comment was marked as low quality.
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
Exact-head real installer proof is now in the PR body for the active Both advertised and headerless streamed overflow paths used a real HTTP server |
b93b630 to
902aacd
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: Andrii Furmanets <[email protected]> Punchcard-Session: cobalt-brook-meadow-m9
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
902aacd to
e3320ba
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Closing due to inactivity. |
What Problem This Solves
Fixes #81817.
The skill installer streamed remote download responses directly into
.openclaw-download-stagingwithout a byte limit. A remote skill download couldtherefore become an unbounded local disk write when the server omitted or lied
about
Content-Length.Why This Change Was Made
The owning boundary is
src/skills/lifecycle/install-download.ts, reached byinstallSkill()before copy or archive extraction. The previous PRimplementation targeted the former
src/agents/skills-install-download.tslocation; that stale path is not carried forward.
The canonical repair:
parseMediaContentLengthfor strict advertised-size validation;Transformso headerless and misleadingresponses cannot exceed the same limit;
finallypath; andNo fallback downloader, compatibility shim, or duplicate policy remains.
User Impact
Oversized skill downloads now fail before they can consume unbounded disk
space. Partial staging files are removed, and the installer returns the size
limit in its error.
Production delta: +60/-7, net +53. The growth establishes the download
security boundary at its lifecycle owner and a small internal test seam that
proves streamed overflow without allocating the production-sized limit. Tests
are counted separately.
Maintainer Decision
Accepted the documented 256 MiB compatibility boundary. It is deliberately generous for skill packages, closes the unbounded disk-write class, and returns an explicit operator-visible error.
Evidence
Validated exact head:
e3320ba98cfc6b3772162ecadb56c80c28850c4fSigned maintainer rebase onto
1f3d45b76f51298699423b8a3331b42b6d51b962preserved Andrii Furmanets co-author credit. Later
maindrift through72fd25d47d1d5ae772de8af052623cc869bf2af0had no touched-path overlap andproduced a clean merge tree, so the reviewed head was not churned again.
Post-rebase
node scripts/run-vitest.mjs src/skills/lifecycle/install-download.test.ts -- --reporter=verbosepassed 10/10 tests;git diff --checkpassed.Failure-first on current
main: both an advertised 268435457-byte responseand a headerless 268435463-byte stream returned
ok: true.node scripts/run-vitest.mjs src/skills/lifecycle/install-download.test.ts packages/media-core/src/content-length.test.ts -- --reporter=verbosepassed 25/25 tests.
A second focused owner run covering
src/skills/lifecycle/install-download.test.tsandsrc/skills/lifecycle/install.test.tspassed 16/16 tests.The streamed-overflow integration test uses a 7-byte partial chunk and a
2-byte overflow against an injected 8-byte limit. It asserts that
pipelinedestroys the still-open upstream stream, installs nothing, and removes the
partial staging file.
Direct
oxfmt, focusedoxlint,node scripts/docs-list.js, andgit diff --check: passed.Fresh exact-branch autoreview: no accepted or actionable findings; patch
correct at 0.99 confidence.
Real installer-boundary proof used a real loopback
node:httpserver and nativefetch/Response streaming while leaving production download, staging, copy,limit, and cleanup code unmodified:
Content-Length: 268435457failed withdownload too large: 268435457 bytes (limit: 268435456 bytes);response closed, no install occurred, and staging was empty.
then crossed the limit at 268435463 bytes and failed with
download too large: 268435463 bytes (limit: 268435456 bytes);the response closed, no install occurred, and cleanup removed every staging
entry.
The shared TUI PTY scheduler repair landed on
mainas17ef7771a66d21af51d26558a9a01ec7d01a227d. This branch includes thatrepair; fresh exact-head hosted CI and ClawSweeper review are running.
Punchcard-Session: cobalt-brook-meadow-m9