fix: derive skill publish metadata from storage#2470
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Codex review: needs changes before merge. Reviewed June 17, 2026, 2:12 AM ET / 06:12 UTC. Summary Reproducibility: yes. source-reproducible: current main checks skill publish limits with caller-provided file.size, and the PR head downloads blobs before trusted stored-size rejection. I did not execute a live Convex publish in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Reject trusted _storage metadata violations before blob downloads, hash only accepted files, and validate the changed publish path against a real Convex runtime. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main checks skill publish limits with caller-provided file.size, and the PR head downloads blobs before trusted stored-size rejection. I did not execute a live Convex publish in this read-only review. Is this the best way to solve the issue? No as written. Deriving metadata from storage is the right layer, but the maintainable fix should check trusted _storage metadata before downloading blobs and include real Convex runtime validation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4860945f347e. Label changesLabel justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
There was a problem hiding this comment.
Pull request overview
Replaces caller-supplied skill publish metadata with values derived from stored blobs, ensuring size, contentType, and sha256 reflect the actual storage contents and that file/total size limits cannot be bypassed by lying inputs.
Changes:
- Extract a new
derivePublishFilesFromStoragehelper that loads each blob, validates content-type/size/total-size, and recomputes sha256. - Reorder
publishVersionForUserto apply the storage-derived metadata before downstream consumers (readme detection, quality checks, etc.). - Add unit tests that cover happy-path metadata derivation and oversized-stored-blob rejection when caller metadata understates the size.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| convex/lib/skillPublish.ts | Adds storage-driven metadata derivation, sha256 hashing, and rewires publish flow to use it. |
| convex/lib/skillPublish.test.ts | Adds regression tests for derivePublishFilesFromStorage, including oversized-blob rejection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
publishVersionForUser.Tests