Skip to content

feat(cms): add staging collection seed import#542

Draft
lumberman wants to merge 6 commits intomainfrom
feat/514-staging-collection-seed-import
Draft

feat(cms): add staging collection seed import#542
lumberman wants to merge 6 commits intomainfrom
feat/514-staging-collection-seed-import

Conversation

@lumberman
Copy link
Copy Markdown
Collaborator

Summary

  • hardens the limited gateway-sync import path so a clean local import of collection 7_0-nfs01 publishes the parent video, its 3 children, and related child content in dependency order
  • changes gateway sync to fail on publish-stage failures instead of reporting false success
  • updates the local testing and bug docs to separate the verified clean-import path from the still-open warm-rerun investigation

Resolves #514

Work Loop

  • ce:plan done
  • ce:work done
  • ce:review done
  • ce:compound done

Notes

  • Plan: docs/plans/2026-03-25-001-fix-cms-gateway-sync-video-child-publishing-plan.md
  • Solutions docs:
    • docs/solutions/cms/gateway-sync-local-testing.md
    • docs/solutions/cms/gateway-sync-limited-import-testing-bugs.md
  • Verified in the active Codex worktree:
    • clean DB import of 7_0-nfs01 succeeds and publishes supporting child content
    • pnpm --filter cms typecheck passes
    • pnpm --filter cms build passes
  • Known limitation: warm rerun on an already-populated DB is still failing on Strapi v5 relation/update behavior and remains open; this PR is left as draft so that state is explicit

Post-Deploy Monitoring & Validation

  • What to monitor/search
    • Logs: [gateway-sync] Published grouped by type during a limited import
    • Logs: [gateway-sync] Sync failed and [publishDrafts] warnings for relation-heavy child content
  • Expected healthy behavior
    • clean import of a limited collection publishes video, video-subtitle, video-variant, bible-citation, and video-study-question
    • sync status reports failure if any required publish stage fails
  • Failure signal(s) / rollback trigger
    • any limited import that ends with child content still draft-only
    • any publish-stage warning for required content types
  • Validation window & owner
    • window: next staging/local seed import of 7_0-nfs01
    • owner: operator running the import

lumberman and others added 6 commits March 23, 2026 17:36
Extend the gateway-sync trigger to accept optional collectionIds,
videoIds, and dryRun parameters for staging/local seed imports.

Collection IDs (coverage-style top-level video IDs) are resolved to
their child video IDs automatically. Limited imports are additive —
no soft-delete of unseen content. A dry-run mode returns the resolved
mapping without writing data.

Gated behind GATEWAY_SYNC_ENABLE_LIMITED_IMPORT=true env var to
prevent accidental production use.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- fix: null-guard Apollo data in sync-keywords to handle gateway errors gracefully
- fix: batch SELECTED_VIDEOS_QUERY in 10-ID chunks to avoid gateway complexity limit
- fix: include parent collection video in resolvedVideoIds alongside children
- docs: add local testing runbook and bug report with verified fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Stage gateway-sync publishing and relation handling for clean imports of collection 7_0-nfs01, and update docs to keep warm rerun behavior marked as unresolved.
@railway-app
Copy link
Copy Markdown

railway-app bot commented Mar 26, 2026

🚅 Deployed to the forge-pr-542 environment in forge

Service Status Web Updated (UTC)
@forge/cms ✅ Success (View Logs) Mar 26, 2026 at 12:36 am
2 services not affected by this PR
  • @forge/web
  • @forge/manager

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.

feat(cms): add staging collection seed import

1 participant