You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-06-25] Investigate workflow job failing on main: test / test (job 6) #93818
🐛 Error Message:
warning: [git-mirror] Skipping cache commit: Found 2 failed/cancelled steps
warning: [git-mirror] - Step: unknown (failed)
failure: Process completed with exit code 1.
⚠️Action Required⚠️:
🛠️ A recent merge appears to have caused a failure in the job named test / test (job 6).
🔍 This issue has been automatically created and labeled with Workflow Failure for investigation.
Root Cause: This is a flaky test, not a real regression from PR #93163. That PR only touched src/hooks/useSearchBulkActions.ts (2 lines), which has nothing to do with the failing test tests/unit/selectors/PolicyTest.ts. The merge just happened to be the main run where the random seed tripped the flake.
RED_BRICK_ROAD_PENDING_ACTION has 3 values — ADD, DELETE, UPDATE — so roughly 1 in 3 runspolicy1 gets pendingAction: 'delete'. The selector counts active as !isPendingDeletePolicy(policy) (Policy.ts:38), so a randomly-deleted policy1 drops active from the expected 1 to 0 — exactly the failure (Expected active: 1, Received active: 0).
Recommended Fix: In PolicyTest.ts, explicitly pin pendingAction for any policy that must be counted as active, so the factory's random value can't make it pending-deletion. Two tests are affected:
counts only paid policies owned by the user → same flake risk (expects active: 2 with two random-pendingAction policies); pin pendingAction: null on the policies expected to be active.
Investigation details
Failing job: test / test (job 6). Result: Test Suites: 1 failed, Tests: 1 failed. Only PolicyTest.ts failed; typecheck and lint passed.
PR Fix unreported expense export payload #93163 diff = src/hooks/useSearchBulkActions.ts only. No overlap with the selector or the policy test factory → rules out a causal regression.
The factory has assigned a random pendingAction for a while; this test is simply a pre-existing flake that surfaces ~1/3 of the time. Re-running the job would likely pass, which is why this reads as a non-deterministic failure rather than a deploy blocker.
Next Steps for Contributor+ team: To accept:@MelvinBot implement this to create a draft PR pinning pendingAction in the two affected tests. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
I checked this against PR #93163. The merged diff only changes src/hooks/useSearchBulkActions.ts for the unreported expense export payload.
The failing post-merge job is tests/unit/selectors/PolicyTest.ts, specifically createOwnedPaidPoliciesCountsSelector, expecting {total: 2, active: 1} but receiving {total: 2, active: 0}. That policy selector path is unrelated to the export payload change.
Also, the PR’s own pre-merge test (job 6) passed and PolicyTest.ts passed in that run. This looks like an unrelated main/post-merge failure rather than a regression from #93163.
🤖 Draft PR created: #93823
Please mark it as "Ready for review" when it is ready for review.
⚠️ Note: I couldn't run the jest/npm test suite locally (the runner is blocked in my sandbox), so please rely on the CI test check to confirm the fix. The change is deterministic and test-only.
changed the title [-]Investigate workflow job failing on main: test / test (job 6)[/-][+][Due for payment 2026-06-25] Investigate workflow job failing on main: test / test (job 6)[/+]on Jun 18, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.14-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
Gonals commentedon Jun 17, 2026
@MelvinBot investigate
MelvinBot commentedon Jun 17, 2026
Issue Analysis
Root Cause: This is a flaky test, not a real regression from PR #93163. That PR only touched
src/hooks/useSearchBulkActions.ts(2 lines), which has nothing to do with the failing testtests/unit/selectors/PolicyTest.ts. The merge just happened to be themainrun where the random seed tripped the flake.The test
createOwnedPaidPoliciesCountsSelector › excludes policies pending deletion from active count but includes them in totalbuildspolicy1withcreateRandomPolicy(...)and expects it to be counted as active. But the factory assigns a randompendingAction(policies.ts:32):RED_BRICK_ROAD_PENDING_ACTIONhas 3 values —ADD,DELETE,UPDATE— so roughly 1 in 3 runspolicy1getspendingAction: 'delete'. The selector countsactiveas!isPendingDeletePolicy(policy)(Policy.ts:38), so a randomly-deletedpolicy1dropsactivefrom the expected1to0— exactly the failure (Expected active: 1, Received active: 0).Recommended Fix: In
PolicyTest.ts, explicitly pinpendingActionfor any policy that must be counted as active, so the factory's random value can't make it pending-deletion. Two tests are affected:excludes policies pending deletion...→ setpolicy1'spendingAction: null.counts only paid policies owned by the user→ same flake risk (expectsactive: 2with two random-pendingAction policies); pinpendingAction: nullon the policies expected to be active.Investigation details
Test Suites: 1 failed,Tests: 1 failed. OnlyPolicyTest.tsfailed; typecheck and lint passed.src/hooks/useSearchBulkActions.tsonly. No overlap with the selector or the policy test factory → rules out a causal regression.pendingActionfor a while; this test is simply a pre-existing flake that surfaces ~1/3 of the time. Re-running the job would likely pass, which is why this reads as a non-deterministic failure rather than a deploy blocker.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement thisto create a draft PR pinningpendingActionin the two affected tests.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
KJ21-ENG commentedon Jun 17, 2026
I checked this against PR #93163. The merged diff only changes
src/hooks/useSearchBulkActions.tsfor the unreported expense export payload.The failing post-merge job is
tests/unit/selectors/PolicyTest.ts, specificallycreateOwnedPaidPoliciesCountsSelector, expecting{total: 2, active: 1}but receiving{total: 2, active: 0}. That policy selector path is unrelated to the export payload change.Also, the PR’s own pre-merge
test (job 6)passed andPolicyTest.tspassed in that run. This looks like an unrelated main/post-merge failure rather than a regression from #93163.Gonals commentedon Jun 17, 2026
@MelvinBot implement this
MelvinBot commentedon Jun 17, 2026
🤖 Draft PR created: #93823
Please mark it as "Ready for review" when it is ready for review.
testcheck to confirm the fix. The change is deterministic and test-only.Gonals commentedon Jun 17, 2026
Fixed. Should be good now
[-]Investigate workflow job failing on main: test / test (job 6)[/-][+][Due for payment 2026-06-25] Investigate workflow job failing on main: test / test (job 6)[/+]melvin-bot commentedon Jun 18, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 18, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.14-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-06-25. 🎊