Skip to content

[comp] Production Deploy#2610

Merged
Marfuen merged 4 commits intoreleasefrom
main
Apr 20, 2026
Merged

[comp] Production Deploy#2610
Marfuen merged 4 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 20, 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

Hardens the policy approval flow by clearing stale approvals, enforcing correct approver matching, and suppressing false “Pending approval” UI. Adds Vercel project scoping to App Availability and Monitoring checks with filter variables, evidence, empty-scope failure, and paginated project selection.

  • Bug Fixes

    • Backend: acceptChanges/denyChanges clear stale approverId when pendingVersionId is missing; acceptChanges errors with “Only the assigned approver…” on mismatched approver; approval sets publishedById (supports impersonation); denial restores draft or published based on history; version-delete helper also clears approverId.
    • Frontend: isPendingApproval is true only when both approverId and pendingVersionId are set; PolicyAlerts hides the notice for stale states.
    • Tests: Coverage for approve/deny flows, impersonation, stale approverId, and Vercel project filter/check behavior.
  • New Features

    • Vercel checks: Added project_filter_mode and filtered_projects; both App Availability and Monitoring checks honor include/exclude/all, emit a “Project filter applied” pass with evidence, and fail with remediation when the filter scopes to zero projects; skip the pass when no projects are returned.
    • Variables: filtered_projects now paginates /v9/projects to list all projects.

Written for commit 91c6deb. Summary will update on new commits.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

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

Project Deployment Actions Updated (UTC)
comp-framework-editor Canceled Canceled Apr 20, 2026 7:40pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
app (staging) Skipped Skipped Apr 20, 2026 7:40pm
portal (staging) Skipped Skipped Apr 20, 2026 7:40pm

Request Review

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

1 issue found across 7 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/api/src/policies/policies.service.ts">

<violation number="1" location="apps/api/src/policies/policies.service.ts:1032">
P2: The stale-state cleanup clears `approverId` without verifying the caller is the assigned approver. Any org member with policy permissions can clear someone else's approval assignment by calling this endpoint when the policy is in a stale state. Add a check that `dto.approverId === policy.approverId` before clearing.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread apps/api/src/policies/policies.service.ts
* feat(vercel): add project filter variables and parser helper

* feat(vercel): honour project filter in App Availability check

* fix(vercel): skip filter pass when project list is empty

* feat(vercel): honour project filter in Monitoring & Alerting check

* fix(vercel): use scoped project count in monitoring evidence

* fix(vercel): paginate project list + guard against empty filter scope

Addresses cubic PR feedback:
- /v9/projects is paginated; fetchOptions now loops using pagination.next
- checks now fail with actionable remediation when the configured filter
  resolves to zero projects (stale ids, exclude-all)

---------

Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Signed-off-by: Mariano Fuentes <marfuen98@gmail.com>
@vercel vercel Bot temporarily deployed to staging – portal April 20, 2026 19:35 Inactive
@vercel vercel Bot temporarily deployed to staging – app April 20, 2026 19:35 Inactive
@Marfuen Marfuen merged commit 03997d6 into release Apr 20, 2026
10 of 11 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.26.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@vercel vercel Bot temporarily deployed to Preview – comp-framework-editor April 20, 2026 19:40 Inactive
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Requires human review: This PR contains significant changes to core business logic (policy approval flow) and security-sensitive validation (approver matching/impersonation), requiring human review.

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