Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@SebTardif is attempting to deploy a commit to the OpenClaw Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
Codex review: needs real behavior proof before merge. Reviewed September 11, 2026, 10:08 AM ET / 14:08 UTC (Revision 75). ClawSweeper reviewWhat this changesThe PR checks multipart skill upload sizes before storage and deletes newly stored blobs when parsing or publication fails. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 8 items remain The leak remains on current main, and this PR addresses distinct, useful work. The previously reported post-commit deletion defect is still present, and the supplied proof uses mocked storage. Priority: P2 Review scores
Verification
How this fits togetherClawHub’s skill publishing API receives authenticated uploads, stores their files in Convex, and attaches them to a skill version. Security scans and download endpoints subsequently consume those stored files. flowchart TD
A[Authenticated multipart upload] --> B[Validate sizes and store files]
B --> C[Validate publish request]
C --> D[Commit skill version]
D --> E[Schedule security scans]
C --> F[Clean up unpublished files]
E --> G[Return publish result]
D --> H[Stored files for downloads]
Before merge
Findings
Agent review detailsSecurityNone. 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: Make blob ownership transfer explicit at version persistence, retaining committed files through later failures and documenting that invariant in specs. Do we have a high-confidence way to reproduce the issue? Yes, source inspection establishes the leak: a multipart file is stored before missing-slug validation throws, with no cleanup on current main. No live Convex reproduction was executed. Is this the best way to solve the issue? No, the parser cleanup is appropriate, but publication cleanup must stop at persistence rather than helper completion. Relying on direct-upload ticket expiry would not cover this multipart endpoint. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cbfee7343ddc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (74 earlier review cycles; latest 8 shown)
|
Multipart POST /api/v1/skills stored each uploaded file, then parsed the payload. An invalid body, a later oversized file, or a 400 after parse (license reject, owner resolution) left Convex blobs unreferenced. Match parseMultipartSkillScan: reject oversized parts before store, delete stored ids if store or parse fails, and delete them when the handler returns 400 after a successful parse. Replayed onto upstream/main d3bde70. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What Problem This Solves
Fixes an issue where authenticated
POST /api/v1/skillswithmultipart/form-dataleft Convex storage blobs behind after a failed publish. The handler stored each uploaded file, then validated the payload. An invalid body, a later file over 10MB, or a 400 after a successful parse (MIT-0 license refusal, owner resolution failure) never deleted those blobs. They were not attached to a skill version, so they stayed billed and unreferenced.Why This Change Was Made
Multipart publish now matches the existing skill-scan upload path. File sizes are checked before any
storage.store. If store or payload parse fails, stored ids are deleted. If parse succeeds and the handler still returns 400, those ids are deleted too. A successful publish keeps the blobs.User Impact
Failed CLI or API skill publishes no longer leave orphaned upload blobs in Convex storage. Successful publishes are unchanged.
Evidence
Live
bunon Darwin arm64, worktree/tmp/oc-pr-clawhub-F004. The script calls productionparseMultipartPublishwith a mockctx.storageand a multipart body that storesSKILL.mdthen fails schema validation (no slug). The old loop storesstorage:1and never deletes it. The patched function stores the same id and deletes it before rethrowing.The unpatched path leaves
storage:1withbefore_deleted=-. The patched path printsafter_deleted=storage:1.Real behavior proof
/tmp/oc-pr-clawhub-F004onfix/f004-publish-blob-cleanup. Proof imported productionparseMultipartPublishfromconvex/httpApiV1/shared.ts.bun /tmp/clawhub-f004-proof.mjs. The script posted a multipart payload withoutslugafter attachingSKILL.md, first through the old store-then-parse loop, then through productionparseMultipartPublish.after_stored=storage:1andafter_deleted=storage:1. Before the patch,before_stored=storage:1andbefore_deleted=-.Notes
Same cleanup contract as
parseMultipartSkillScanin PR #2479 and admin publisher logo updates inhandleAdminUpdatePublisherProfile. Multipart store-without-cleanup landed in PR #315 (2026-02-15, 195 days). License 400 after parse landed in PR #815.Allow edits from maintainers is enabled.
Tracker
Ref #3670
That issue stays open if this PR is closed without landing on main.