feat([issue-3231]): route video renders per surface — videoGen.mode pin, per-target video defaults, Music Video render pins - #3237
Merged
Merged
Conversation
… per-target videoMode, Music Video image lane Phase 4 of the render-target defaults registry (#3231): - resolveVideoMode gains the pin ladder: request -> renderDefaults[target].videoMode -> settings.videoGen.mode -> local, each rung usability-gated. - The video route honors the pin when body.backend is absent, but only for grok-deliverable request shapes (local-only machinery stays local). - Creative-agent video enqueues consult the target/install pins; the target videoModel rides local resolutions. - Music Video: per-record imageMode/imageModelId pins (scene frames resolve through the music-video render target in prepareParams), and new projects seed videoSettings.backend from the ladder — the board sends an explicit backend per clip, so creation is where the pin can act. - Settings: Defaults tab gains the install video backend pin and per-surface video pins for music-video/creative-agent (backend only — grok video has no model knob); music-video leaves the parity test's unlisted set.
…g list, cheaper MV resolution, shared schema/normalizer copies - videoGen/modes.js owns the pin-rung enumeration (videoPinRungs + hasVideoPin); media.js gates on it instead of re-enumerating the ladder. - prepareParams skips the MV project fetch when an explicit mode wins anyway, and passes the plain EXTERNAL fallback (the resolver already walks the install default). - validation.js reuses emptyToNull and hoists one videoModePinSchema for both the per-target entry and settings.videoGen.mode. - Client gets the normalizeRenderPinValue mirror in imageGenBackends.js; ImageGenTab keeps the round-trip videoGen slice in a ref, not state. - grokDeliverable also keeps chunked renders local (chunks>1 was a day-one gap in the local-only machinery list).
…chor named-local-model requests local under a grok pin The install-wide grok video pin could hijack renders that never chose grok: the VideoGen page's local branch sent no backend field (the toggle showed Local while the render went to grok, discarding model/frames/fps), and a media requeue rebuilding a local render's config (modelId, no backend) lost its model the same way. The page now sends backend:'local' explicitly and the route treats a named modelId as local-anchoring machinery. Also pinned the videoGen sibling-key round-trip in the client suite (the server test alone could not see a dropped defaultModelId) and renamed the server test to what it actually proves.
Main's CI has been red since the Phase 2 parity test landed: it imported client/src/lib/imageGenBackends.js, whose top-level lucide-react import cannot resolve in the server job (client packages aren't installed there), and the unprotected-main auto-merges let the red slip through. The pure constants + helpers now live in a dependency-free imageGenModes.js leaf (re-exported flat by imageGenBackends so consumers keep one import site; namespace-exported in the lib barrel to avoid identifier collisions) and the parity test imports the leaf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 4 (final phase) of the render-target defaults registry: video renders now route through the same defaults system as images.
resolveVideoModepin ladder — request →renderDefaults[target].videoMode→ new install-widesettings.videoGen.mode→ local, every rung usability-gated (a disabled grok pin degrades instead of failing). The rung list is enumerated once (videoPinRungs+hasVideoPin) so consumers can't drift from the resolver.body.backendis absent and the request shape is grok-deliverable; local-only machinery (semantic modes, keyframes, audio, IC refs, extend, LoRAs, last frame, chunks, a named localmodelId) stays local rather than silently dropping inputs. The VideoGen page now sends its backend toggle explicitly so the pin can't reroute a Local render behind the UI.videoModelrides local resolutions. The byte-identical-when-auto contract holds viahasVideoPin.imageMode/imageModelIdpins (the shared universe/series/sprite field pair) resolved for scene-frame renders inprepareParamsthrough themusic-videorender target; aRecordRenderPinRowon the director board edits them. New projects seedvideoSettings.backendfrom the pin ladder (the board sends an explicit backend per clip, so creation is where the pin acts). The MV pins sync with the record likevideoSettingsalready does —sanitizeProjectForSyncspreads raw, so the fields are additive-safe with no schema bump.music-videoleaves the parity test's deliberately-unlisted set, emptying it.No migration needed (pins persist only when set) and no sync schema bump (additive fields on whole-record-LWW kinds).
Closes #3231
Test plan
resolveVideoModeladder precedence/normalization/usability gating; video-route pin behavior (install pin routes, explicit backend wins, local-only machinery and named local models anchor local, disabled pin degrades); creative-agent video pin ladder + targetvideoModel; MV create-time seeding (target pin, install pin, explicit win, degrade, settings-failure); MV record pin persistence + patch clear;prepareParamsMV resolution (record pin, target default, explicit-mode skip, missing project); settingsvideoGen/renderDefaults.videoModeslice validation.videoGensave wire body (siblingdefaultModelIdround-trip — invisible to the server suite).