Skip to content

GAM-3: let Video Creator file renders with their origin - #37

Merged
davior merged 1 commit into
mainfrom
claude/funny-knuth-en5fly
Oct 16, 2026
Merged

davior merged 1 commit into
mainfrom
claude/funny-knuth-en5fly

Conversation

@davior

@davior davior commented Oct 16, 2026

Copy link
Copy Markdown
Owner

GAM-3 from gvc's plan of attack. GVC's "Save to GAM" (M2b) files a finished render into the user's library, labelled as a Video Creator export and linked back to the project it came from.

Change

  • POST /api/assets takes three optional form fields:
    • source;
    • origin_project_id;
    • origin_reference_id (the GVC render).
  • gvc_export is the only source a client may claim. ai_generated, clip, url and sub_video describe files GAM made itself. A client able to set them could pass an upload off as, for example, a generation that the regenerate button then tries to rerun. Anything else gets 400 invalid_source.
  • An origin without source=gvc_export gets 400 origin_without_source.
  • Migration:
    • two nullable columns on asset, origin_project_id (indexed) and origin_reference_id;
    • no foreign keys, since both ids live in another app's database;
    • the downgrade uses the same PRAGMA foreign_keys handling as a8e1c0f4d2b6.
  • API and frontend:
    • AssetRead returns both fields, and the frontend type has them;
    • the existing "Video Creator" filter now has something to match.
  • Transcription stays on for exports. Being able to search a render by what its narration says is the point of filing it.
  • An upload without the new fields behaves exactly as before.

Tests

  • Backend pytest -q: 1258 passed. New tests cover:

    • an export stored with its origin and found by the source filter;
    • an ordinary upload with no origin;
    • each reserved source refused, with nothing stored;
    • an origin without the source refused.

    The existing migration tests cover upgrade and downgrade on head.

  • Frontend: npm test (393) and npm run build pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_016fiRJAt34ag62iPiuMkNhm


Generated by Claude Code

POST /api/assets takes optional source, origin_project_id and
origin_reference_id form fields. gvc_export is the only source a client
may claim; the others are GAM's own statements about files it made. An
origin without that source is refused. Two nullable columns on asset,
origin_project_id indexed, returned on AssetRead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016fiRJAt34ag62iPiuMkNhm
@davior
davior marked this pull request as ready for review October 16, 2026 07:52
@davior
davior merged commit 9230e97 into main Oct 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants