fix(digest): inline compliance filter to avoid trigger.dev bundle fai…#2591
Merged
fix(digest): inline compliance filter to avoid trigger.dev bundle fai…#2591
Conversation
…lure The Trigger.dev deploy pipeline cannot resolve @trycompai/auth because its dist is not built during the CI deploy step. Remove the transitive dependency by inlining the compliance-obligation filter directly in the helpers file, keeping identical behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
1 issue found across 4 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/app/src/trigger/tasks/task/policy-acknowledgment-digest-helpers.ts">
<violation number="1" location="apps/app/src/trigger/tasks/task/policy-acknowledgment-digest-helpers.ts:8">
P2: Duplicating the canonical compliance-role filter and obligation map creates drift risk for digest recipient selection; this should be shared with the existing source of truth instead of manually synchronized.</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.
| @@ -4,6 +4,83 @@ | |||
| */ | |||
There was a problem hiding this comment.
P2: Duplicating the canonical compliance-role filter and obligation map creates drift risk for digest recipient selection; this should be shared with the existing source of truth instead of manually synchronized.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/app/src/trigger/tasks/task/policy-acknowledgment-digest-helpers.ts, line 8:
<comment>Duplicating the canonical compliance-role filter and obligation map creates drift risk for digest recipient selection; this should be shared with the existing source of truth instead of manually synchronized.</comment>
<file context>
@@ -4,6 +4,83 @@
import type { Departments, PolicyVisibility } from '@db';
+// Inlined from @trycompai/auth to avoid pulling that package into the Trigger.dev bundle.
+// Keep in sync with packages/auth/src/permissions.ts BUILT_IN_ROLE_OBLIGATIONS.
+const BUILT_IN_ROLE_OBLIGATIONS: Record<string, { compliance?: boolean }> = {
+ owner: { compliance: true },
</file context>
Contributor
|
🎉 This PR is included in version 3.23.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…lure
The Trigger.dev deploy pipeline cannot resolve @trycompai/auth because its dist is not built during the CI deploy step. Remove the transitive dependency by inlining the compliance-obligation filter directly in the helpers file, keeping identical behaviour.
What does this PR do?
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist
Summary by cubic
Inlined the compliance-role filter in the digest helpers to remove the transitive dependency on
@trycompai/auththat broke Trigger.dev bundling. Behavior is unchanged and deploys succeed again.filterComplianceMemberswith localfilterDigestMembersByCompliance.organizationRolelookup.Written for commit b1ac2a8. Summary will update on new commits.