Skip to content

[comp] Production Deploy#3268

Merged
tofikwest merged 5 commits into
releasefrom
main
Jun 24, 2026
Merged

[comp] Production Deploy#3268
tofikwest merged 5 commits into
releasefrom
main

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 24, 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

Bundle integration-check failure notifications per organization to stop one-email-per-task spam. The scheduler now triggers a per-org runner that aggregates failures and sends a single digest.

  • Bug Fixes
    • Orchestrator groups tasks by org and triggers a single run-org-integration-checks per org.
    • Per-task worker no longer emails; it returns statusChangedToFailed, failedCount, and totalCount for aggregation.
    • Recipients = assignees ∪ exact-role admins/owners (token-matched), with org-scoped unsubscribe; email sending is best-effort and won’t fail the run.
    • Capped per-org runner concurrency and batch sizes; fixed maxDuration units (seconds).

Written for commit 2fcc5c5. Summary will update on new commits.

Review in cubic

github-actions Bot and others added 5 commits June 23, 2026 23:11
The daily integration-checks scheduler fans out one Trigger.dev run per
task, and each run emailed independently on transition into `failed`. An
org with N failing tasks therefore received N separate emails (times every
assignee + admin/owner) — noisy spam.

Add a per-org runner (run-org-integration-checks) that the orchestrator
dispatches once per org (fire-and-forget). It batchTriggerAndWaits that
org's per-task checks, collects the tasks that freshly transitioned to
failed, and sends ONE bundled email (AutomationBulkFailuresEmail) per
recipient. The per-task worker no longer emails — it returns
statusChangedToFailed/failedCount/totalCount so the runner can aggregate.

- Preserves "notify only on the transition into failed" (an already-failed
  task is not re-reported, matching prior behavior)
- Recipients unchanged: assignees of failed tasks UNION admins/owners, with
  the same org-scoped unsubscribe check
- Bundled email is best-effort: a DB/email blip is swallowed so it cannot
  fail the runner and trigger a wasteful re-run of the whole org's checks
- maxDuration on the new runner uses the correct seconds unit (60 * 60)
- 32 unit tests: groupTasksByOrg, collectFailedTasks, bundled-email
  recipients/unsubscribe/resilience, and per-org dispatch

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EejssC59aJJacLuZNVh5vm
…ole filter

Address cubic review on run-org-integration-checks recipient resolution by
aligning it with the canonical getOwnerAdminRecipients resolver:

- Match EXACT member-role tokens (split on comma + trim) instead of a substring
  `role.includes('admin'|'owner')`, so a custom role like "co-owner" or
  "billing-admin" can't be mis-authorized into the failure digest.
- Drop the `user.role != 'admin'` query filter (that's the better-auth PLATFORM
  role, not the org role); an org owner/admin is now notified regardless of
  platform role, matching the live notifyStatusChange/notifyBulkStatusChange.

Both patterns were copied verbatim from the old per-task email; this brings the
bundled path in line with the codebase's canonical resolver. Adds tests for
exact-token exclusion ("co-owner") and the unfiltered member query.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EejssC59aJJacLuZNVh5vm
fix(integration-checks): bundle per-task failure emails into one per org
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

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 Jun 24, 2026 3:22am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
app (staging) Skipped Skipped Jun 24, 2026 3:22am
portal (staging) Skipped Skipped Jun 24, 2026 3:22am

Request Review

@tofikwest tofikwest merged commit 733668e into release Jun 24, 2026
13 checks passed
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.91.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