Skip to content

[comp] Production Deploy#2989

Merged
tofikwest merged 4 commits into
releasefrom
main
Jun 2, 2026
Merged

[comp] Production Deploy#2989
tofikwest merged 4 commits into
releasefrom
main

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Prevents org setup from failing when a published framework version points to deleted editor templates by reconciling manifest IDs with live tables and pruning dead references before inserts. Applies to both apps/api and apps/app, with tests covering stale-reference cases and the all-live path.

  • Bug Fixes
    • Drop missing control/policy/task/requirement IDs by checking live frameworkEditor* tables, avoiding P2003 FK errors (e.g., Task_taskTemplateId_fkey).
    • Resolve task automationStatus from live rows.
    • Remove dead requirement IDs from groupedRelations to prevent RequirementMap_requirementId_fkey failures.
    • Log pruned IDs for visibility.

Written for commit 113c239. Summary will update on new commits.

Review in cubic

github-actions Bot and others added 4 commits June 1, 2026 19:52
…tion

Org creation reads controls/policies/tasks/requirements from each
framework's pinned FrameworkVersion.manifest (a frozen snapshot), then
creates org rows whose template FKs point at the LIVE framework-editor
tables. When a template is hard-deleted from the editor after a version
is published, the manifest still references the dead id, so the insert
fails with a P2003 foreign-key violation and onboarding aborts.

This surfaced as Task_taskTemplateId_fkey for any org selecting PCI DSS:
its only published version (1.0.0) references two task templates
("Attestation of Compliance", "Self-Assessment Questionnaires") that were
later deleted from the editor.

loadFrameworkSources now reconciles manifest-sourced ids against the live
editor tables and prunes any whose row no longer exists, before they reach
createMany. Covers controls, policies, tasks AND requirements — the first
three are already tolerated by the downstream instance-map guards, but
RequirementMap.requirementId has no such guard, so dead requirement ids are
filtered out of groupedRelations explicitly. A console.warn logs what was
pruned so stale manifests are observable.

Applied to both independent loader copies (app cannot import from api).

Tests: new load-framework-sources specs (vitest + jest) covering each
dead-ref case and the all-live passthrough/automationStatus path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nifest-fk

fix(frameworks): prune deleted editor templates during org initialization
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Jun 2, 2026 2:23pm
comp-framework-editor (staging) Ready Ready Preview, Comment Jun 2, 2026 2:23pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal (staging) Skipped Skipped Jun 2, 2026 2:23pm

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@tofikwest tofikwest merged commit 699a759 into release Jun 2, 2026
14 checks passed
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.66.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants