Skip to content

[comp] Production Deploy#2687

Merged
Marfuen merged 3 commits intoreleasefrom
main
Apr 28, 2026
Merged

[comp] Production Deploy#2687
Marfuen merged 3 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 28, 2026

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

Fixes framework sync drift by reconciling edges against the target manifest, and stops auto-linking new task/policy templates so they start unlinked. Prevents duplicates and keeps undo safe; linking is explicit via POST /:id/control-templates/:ctId.

  • Bug Fixes

    • RequirementMap: read active + archived rows; create missing edges or unarchive archived ones; archive only edges dropped by diff; ignore cross-framework requirement IDs.
    • Control–Policy/Task: pre-check junction tables and add only missing edges via idempotent inserts; remove edges only if dropped by diff; record undo only for edges created by this sync.
    • ControlDocumentType: create missing rows from the target manifest; removals stay diff-based to avoid deleting shared rows.
    • Framework editor create: drop frameworkId from POST /policy-template and POST /task-template; services ignore stray frameworkId and never auto-link to all controls; frontend stops appending ?frameworkId=....
  • Tests

    • Drift and idempotency tests for RequirementMap, Control–Policy, ControlDocumentType; ensure no duplicate edges and that undo payloads don’t claim pre-existing links.
    • Regression tests for TaskTemplateService and PolicyTemplateService to verify no control auto-linking on create, even when frameworkId is passed.

Written for commit b58c4d3. Summary will update on new commits. Review in cubic

github-actions Bot and others added 2 commits April 28, 2026 14:37
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

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

Project Deployment Actions Updated (UTC)
comp-framework-editor (staging) Ready Ready Preview, Comment Apr 28, 2026 6:37pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
app (staging) Skipped Skipped Apr 28, 2026 6:37pm
portal (staging) Skipped Skipped Apr 28, 2026 6:37pm

Request Review

…ll framework controls (#2686)

When CX created a new task or policy template from a framework's editor
view, the create endpoint queried every control template attached to
that framework and connected the new primitive to all of them. CX
rarely wants the new template on every control — it forced manual
cleanup after every create.

Make all primitives consistent: a fresh create produces an unlinked row
regardless of which framework page the user happened to be on. Linking
to specific controls happens explicitly via the dedicated link
endpoints (POST /:id/control-templates/:ctId), which already existed.

  - task-template.service.ts: drop frameworkId param + the findMany
    + connect logic
  - policy-template.service.ts: same
  - task-template.controller.ts, policy-template.controller.ts: drop
    the @query('frameworkId') from the POST handler
  - frontend (useTaskChangeTracking, CreatePolicyDialog): stop appending
    ?frameworkId=... to the POST URL

Control template and requirement creates were already correct (no
auto-linking) — this brings task and policy templates in line.

New regression tests on TaskTemplateService and PolicyTemplateService
mirror the existing CS-271 guard on ControlTemplateService: even if a
stray frameworkId is passed, the service must not query for or attach
controls. Verified red without the fix, green with it.

Co-authored-by: Mariano <marfuen98@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel vercel Bot temporarily deployed to staging – portal April 28, 2026 18:36 Inactive
@vercel vercel Bot temporarily deployed to staging – app April 28, 2026 18:36 Inactive
@Marfuen Marfuen merged commit ef45926 into release Apr 28, 2026
9 of 10 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.34.1 🎉

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