feat: Task 1D — engineConfig singleton + mediaAsset + automatedVideo v2#665
Merged
codercatdev merged 3 commits intodevfrom Mar 14, 2026
Merged
feat: Task 1D — engineConfig singleton + mediaAsset + automatedVideo v2#665codercatdev merged 3 commits intodevfrom
codercatdev merged 3 commits intodevfrom
Conversation
…+ config module rewrite Consolidates 6 config singletons + dashboardSettings into single engineConfig. Adds mediaAsset schema for shared image assets with source tracking. Updates automatedVideo with v2 status flow (12 states), quality gate, shorts, thumbnails, social posts, workflowId, r2Prefix. Rewrites lib/config.ts for single-document fetch.
…emove old singletons Co-authored-by: content <content@miriad.systems>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
…wrappers 1. Add legacy v1 status values to automatedVideo options list so existing production documents display correctly in Studio (script_ready, audio_gen, video_gen, rendering, uploading, flagged, infographics_generating, enriching) 2. Add comments on audioUrl/videoUrl/shortUrl explaining string type is intentional — R2/CDN paths may include query params that Sanity url validator rejects 3. Replace misleading getConfig alias with real wrapper functions that accept and ignore the old table name parameter. Also adds getConfigValue wrapper. Both marked for removal in Task 1F. Co-authored-by: content <content@miriad.systems>
This was referenced Mar 14, 2026
codercatdev
added a commit
that referenced
this pull request
Mar 14, 2026
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.
Task 1D: engineConfig singleton + schema updates
Consolidates all pipeline configuration into a single
engineConfigSanity singleton and updates schemas for v2.Changes
New files:
sanity/schemas/singletons/engineConfig.ts(698 lines) — Single singleton replacing 6 config singletons + dashboardSettingssanity/schemas/documents/mediaAsset.ts(93 lines) — Shared image asset with source/attribution/license trackinglib/types/engine-config.ts(79 lines) — TypeScript interface for engineConfigUpdated files:
sanity/schemas/documents/automatedVideo.ts(705 lines) — v2 status flow, quality gate, shorts, thumbnails, social posts, workflowId, r2Prefixlib/config.ts(63 lines) — Simplified config module for single-document fetchsanity.config.ts— Register engineConfig + mediaAsset, remove 7 old singleton registrationsengineConfig Fieldsets (9 groups)
automatedVideo v2 Status Flow
draft → researching → research_complete → generating_media → generating_audio → assembling_video → quality_gate → pending_review → approved → publishing → published(+ rejected, archived)New v2 Fields on automatedVideo
qualityScore,qualityIssues— AI critic outputreviewedAt,reviewedBy— review gate trackingmediaAssets— references to mediaAsset documentsshorts[]— generated short clips with title, scene range, URLsthumbnailHorizontal,thumbnailVertical— generated thumbnailsblogPostId— link to generated blog postsocialPosts[]— distribution tracking per platformworkflowId— CF Workflow instance IDr2Prefix— R2 storage prefixBreaking Changes
lib/config.tsAPI changed:getEngineConfig()replacesgetConfig('table_name'). Backward compat aliasgetConfigexported but signature differs.lib/configand will need updating. These are v1 cron routes being replaced by CF Workflow (Task 1F cleanup).pipelineConfig,contentConfig, etc.) are NOT deleted from disk — just unregistered from sanity.config.ts. Delete in Task 1F after v2 proven.Design Decisions
process.env— only tweakable config in engineConfigdeprecatedoptiontargetVideoDurationSecbumped 90→180,sceneCountMin3→8,sceneCountMax5→15 for longer videosqualityThresholdbumped 50→75 for v2 quality gateDepends On
Nothing — no dependencies.
Unblocks