From f8ccab7c97c7372afbaff17f7d0349c88be88293 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sat, 10 Oct 2026 14:12:13 -0400 Subject: [PATCH] test(workflows): stop bundled workflows pushing last_run_at's row off the page The listing check now pages user workflows only. On a coarse clock the new workflow ties on created_at with the 43 bundled workflows, and the workflow_id tie-break usually put it past the first 10. --- .../services/workflow_records/test_workflow_last_run_at.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/app/services/workflow_records/test_workflow_last_run_at.py b/tests/app/services/workflow_records/test_workflow_last_run_at.py index 3f65bd72df5..1f806e65c37 100644 --- a/tests/app/services/workflow_records/test_workflow_last_run_at.py +++ b/tests/app/services/workflow_records/test_workflow_last_run_at.py @@ -42,10 +42,12 @@ def test_update_last_run_at_sets_timestamp(workflow_records: WorkflowRecordsStor fetched = workflow_records.get(created.workflow_id) assert fetched.last_run_at is not None + # Only user workflows: the bundled ones share its millisecond `created_at` on a coarse clock (Windows), and the + # `workflow_id` tie-break then pushes it off the page at random. listed = workflow_records.get_many( order_by=WorkflowRecordOrderBy.CreatedAt, direction=SQLiteDirection.Descending, - categories=None, + categories=[WorkflowCategory.User], page=0, per_page=10, )