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 Preflight path policy — New Generated tool contracts — Reviewed by Cursor Bugbot for commit 3e1bdbc. 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 |
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.
477ab00 to
caa454a
Compare
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.
Resolve uploads through the current chat, enforce workspace ownership, and reuse the existing URL or buffered sandbox mount path so function_execute and run_code can process uploaded files directly.
81891df to
3bf10de
Compare
Regenerate the Sim catalog and runtime schemas from the finalized Mothership contract so canonical upload support and bounded media file declarations stay aligned across repositories.
3bf10de to
bb60a56
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
There are 5 total unresolved issues (including 3 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bb60a56. Configure here.
- Reject chat uploads that belong to another workspace - Add regression coverage for media upload ownership

Summary
Chat uploads can now be passed directly to media tools and to
function_execute/run_code; callers no longer need to materialize an upload intofiles/before using it. Explicit input and output declarations are validated before provider or FFmpeg work begins, and chat uploads are rejected if they do not belong to the active workspace.Generated image, video, audio, and FFmpeg outputs keep their automatic
files/...destinations whenoutputsis omitted. When an explicit destination is supplied, it must be a writablefiles/...path; create-mode writes retain automatic parent-folder creation.Related: https://github.com/simstudioai/mothership/pull/352
Type of Change
Testing
uploads/workspace boundary, explicit-output preflight ordering, and automatic-output fallbacks.Checklist
Screenshots/Videos
Not applicable; this is server-side file resolution, validation, and sandbox-mounting behavior.