fix(media): validate upload paths before generation#5615
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview
Reviewed by Cursor Bugbot for commit 7c321ca. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR tightens media tool path handling for generated outputs and uploaded inputs. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(media): preflight all writable outpu..." | Re-trigger Greptile |
Allow media tools to consume chat-scoped uploads directly while keeping outputs under files/. Fail malformed or unresolved declarations before provider work and regenerate the Mothership-derived tool schemas.
6bccb71 to
9c234ad
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7c321ca. Configure here.
Summary
Media generation now accepts chat-scoped
uploads/...paths as inputs, keeps outputs restricted tofiles/..., and reports invalid or missing paths before starting provider work. Previously, an uploaded reference could be silently dropped and leave the user with a generic generated subject.The shared path boundary applies consistently to image, video, audio, and FFmpeg tools. Image generation also lets reference-loading failures reach the caller instead of catching and skipping them locally.
Related: https://github.com/simstudioai/mothership/pull/352
Type of Change
Testing
bun run scripts/sync-tool-catalog.ts --check --input=../mothership/copilot/contracts/tool-catalog-v1.jsonapps/sim/providers/meta/index.ts:122.Reviewers should focus on the input/output path boundary and the guarantee that validation occurs before paid Gemini, Fal, or FFmpeg work begins.
Checklist
Screenshots/Videos
Not applicable; this is server-side validation and generated tool-contract behavior.