Skip to content

feat(ACI): Make rule stats and group history endpoints backwards compatible#110282

Open
ceorourke wants to merge 1 commit intomasterfrom
ceorourke/ISWF-2190
Open

feat(ACI): Make rule stats and group history endpoints backwards compatible#110282
ceorourke wants to merge 1 commit intomasterfrom
ceorourke/ISWF-2190

Conversation

@ceorourke
Copy link
Member

Update the ProjectRuleStatsIndexEndpoint and ProjectRuleGroupHistoryIndexEndpoint to accept a workflow ID. Thankfully we already had the functions they call updated to use workflows so this wasn't too large of a change.

@ceorourke ceorourke requested a review from a team as a code owner March 10, 2026 00:43
@linear-code
Copy link

linear-code bot commented Mar 10, 2026

@ceorourke ceorourke requested review from a team and kcons March 10, 2026 00:43
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 10, 2026
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

group=self.group,
date_added=before_now(hours=i + 1),
event_id=f"workflow2_event_{i}",
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Test never persists workflow2 records to database

Medium Severity

The workflow2 entries are created using the bare WorkflowFireHistory(...) constructor instead of WorkflowFireHistory.objects.create(...), so they're never persisted to the database. The comment says "make a couple in a different workflow to ensure we're not mixing them up," but since nothing is saved, the subsequent filter(workflow=workflow2) query returns an empty queryset and the update loop is a no-op. This test can't actually catch a query that accidentally includes other workflows' data.

Fix in Cursor Fix in Web

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

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant