Skip to content

[HOTFIX] Update pending workflows counting for latest submissions#47

Merged
kkartunov merged 1 commit into
masterfrom
hotfix-pending-workflows-count
Jun 10, 2026
Merged

[HOTFIX] Update pending workflows counting for latest submissions#47
kkartunov merged 1 commit into
masterfrom
hotfix-pending-workflows-count

Conversation

@vas3a

@vas3a vas3a commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

This pull request enhances the logic for counting in-progress AI workflow runs by ensuring that only the latest submissions per participant are considered. This improves the accuracy of workflow run metrics and ensures that outdated or superseded submissions do not affect the count. Additionally, the changes include thorough unit tests to validate the new logic and improved logging for better traceability.

Enhancements to in-progress AI workflow run counting:

  • Updated the SQL query in ReviewService.getInProgressAiWorkflowRunCount to use a common table expression (WITH latest_submissions AS (...)) that selects only the latest submission per participant, ensuring that the count reflects only the most recent submissions.
  • Modified the logging details in the same method to include a new property, latestSubmissionsOnly: true, indicating that only the latest submissions are considered in the count.

Testing improvements:

  • Added a unit test in review.service.spec.ts to verify that getInProgressAiWorkflowRunCount accurately counts only in-progress AI workflow runs for the latest submissions and checks that the generated SQL query contains the expected logic.

@vas3a vas3a requested review from jmgasper and kkartunov June 10, 2026 07:58
@kkartunov kkartunov merged commit 3069f35 into master Jun 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants