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-03-23] Investigate workflow job failing on main: test / test (job 2) #84930
🐛 Error Message:
warning: Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@8ade135, SimenB/github-actions-cpu-cores@31e91de. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
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 2).
🔍 This issue has been automatically created and labeled with Workflow Failure for investigation.
@MelvinBot please look into this issue, as well as #84929 and #84928. Some of these problems may be general, fixed on main and this could just be leftover from not merging recently. If not, please determine a fix
Summary: All three workflow failures (#84928 typecheck, #84929 ESLint, #84930 test) share the same root cause: PR #83424 introduced a reference to an undeclared variable allReportsViolations in ReportUtils.ts. This is NOT fixed on main — it is the current HEAD.
Root Cause: The hasVisibleReportFieldViolations function added in PR #83424 references allReportsViolations on line 13076 of ReportUtils.ts, but this variable was never declared or connected to Onyx. The author likely intended to either add a module-level Onyx subscription (like the existing allReports pattern) or accept it as a function parameter, but neither was done.
Recommended Fix: Add reportViolations as a parameter to hasVisibleReportFieldViolations and pipe the data through from the Onyx derived config:
src/libs/ReportUtils.ts — Change the function signature to accept report violations and remove the undeclared variable reference:
// Line 13067: Add parameterfunctionhasVisibleReportFieldViolations(report: OnyxEntry<Report>,policy: OnyxEntry<Policy>,reportViolations?: OnyxEntry<ReportViolations>): boolean{// Line 13076: Remove this line entirely (the parameter replaces it)// const reportViolations = allReportsViolations?.[`${ONYXKEYS.COLLECTION.REPORT_VIOLATIONS}${report.reportID}`];
src/libs/actions/OnyxDerived/configs/reportAttributes.ts — Add the Onyx dependency and pass violations to the function:
// Add to dependencies array (after ONYXKEYS.COLLECTION.REPORT_METADATA):ONYXKEYS.COLLECTION.REPORT_VIOLATIONS,// Add to destructured compute parameters:[reports,preferredLocale,transactionViolations,reportActions,reportNameValuePairs,transactions,personalDetails,session,policies,policyTags,reportViolations],// Line 206: Pass violations to the functionconsthasFieldViolations=hasVisibleReportFieldViolations(report,policy,reportViolations?.[`${ONYXKEYS.COLLECTION.REPORT_VIOLATIONS}${report.reportID}`]);
Detailed Investigation
Root Cause Analysis
PR #83424 ("fix: GBR appears when there is report field error") added a new function hasVisibleReportFieldViolations at src/libs/ReportUtils.ts:13067. This function checks whether a report has any visible report field violations that should trigger a red brick road indicator.
On line 13076, the function tries to access report violations data:
However, allReportsViolations is never declared anywhere in the file. Similar variables like allReports (line 1098) and allReportsDraft (line 1073) are declared as module-level variables with Onyx connections, but no such declaration exists for allReportsViolations.
Evidence Chain
reportAttributes.ts:206 calls hasVisibleReportFieldViolations(report, policy) — no violations data passed
ReportUtils.ts:13076 tries to access allReportsViolations — variable doesn't exist
TypeScript error → ESLint cascading errors → test compilation failure
Relevant Code
src/libs/ReportUtils.ts:13067-13091 — The broken function
src/libs/actions/OnyxDerived/configs/reportAttributes.ts:206 — The call site
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Investigate workflow job failing on main: test / test (job 2)[/-][+][Due for payment 2026-03-23] Investigate workflow job failing on main: test / test (job 2)[/+]on Mar 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.37-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
dangrous commentedon Mar 11, 2026
@MelvinBot please look into this issue, as well as #84929 and #84928. Some of these problems may be general, fixed on
mainand this could just be leftover from not merging recently. If not, please determine a fixMelvinBot commentedon Mar 11, 2026
🔍 Issue Analysis
Summary: All three workflow failures (#84928 typecheck, #84929 ESLint, #84930 test) share the same root cause: PR #83424 introduced a reference to an undeclared variable
allReportsViolationsinReportUtils.ts. This is NOT fixed on main — it is the current HEAD.Root Cause: The
hasVisibleReportFieldViolationsfunction added in PR #83424 referencesallReportsViolationson line 13076 of ReportUtils.ts, but this variable was never declared or connected to Onyx. The author likely intended to either add a module-level Onyx subscription (like the existingallReportspattern) or accept it as a function parameter, but neither was done.Cascading effect:
Cannot find name 'allReportsViolations'— TypeScript can't find the variableerrortype, causingUnsafe argument of type error typed assigned to a parameter of type OnyxEntry<ReportViolations>when passed togetFieldViolationRecommended Fix: Add
reportViolationsas a parameter tohasVisibleReportFieldViolationsand pipe the data through from the Onyx derived config:src/libs/ReportUtils.ts— Change the function signature to accept report violations and remove the undeclared variable reference:src/libs/actions/OnyxDerived/configs/reportAttributes.ts— Add the Onyx dependency and pass violations to the function:Detailed Investigation
Root Cause Analysis
PR #83424 ("fix: GBR appears when there is report field error") added a new function
hasVisibleReportFieldViolationsatsrc/libs/ReportUtils.ts:13067. This function checks whether a report has any visible report field violations that should trigger a red brick road indicator.On line 13076, the function tries to access report violations data:
However,
allReportsViolationsis never declared anywhere in the file. Similar variables likeallReports(line 1098) andallReportsDraft(line 1073) are declared as module-level variables with Onyx connections, but no such declaration exists forallReportsViolations.Evidence Chain
reportAttributes.ts:206callshasVisibleReportFieldViolations(report, policy)— no violations data passedReportUtils.ts:13076tries to accessallReportsViolations— variable doesn't existRelevant Code
src/libs/ReportUtils.ts:13067-13091— The broken functionsrc/libs/actions/OnyxDerived/configs/reportAttributes.ts:63-75— Dependencies missingREPORT_VIOLATIONSsrc/libs/actions/OnyxDerived/configs/reportAttributes.ts:206— The call siteNext Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.dangrous commentedon Mar 11, 2026
please implement @MelvinBot
MelvinBot commentedon Mar 11, 2026
🤖 Draft PR created: #84952
Please mark it as "Ready for review" when it is ready for review.
ShridharGoel commentedon Mar 11, 2026
@dangrous Can you assign me here since I'm reviewing the PR based on auto-assignment?
[-]Investigate workflow job failing on main: test / test (job 2)[/-][+][Due for payment 2026-03-23] Investigate workflow job failing on main: test / test (job 2)[/+]melvin-bot commentedon Mar 16, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".1 remaining item
melvin-bot commentedon Mar 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.37-10 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-03-23. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 16, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)dangrous commentedon Mar 18, 2026
Does this need payment here? I think we can handle on the other issue, right?
ShridharGoel commentedon Mar 18, 2026
@dangrous Payment for C+ review of #84952 would be handled here, right?
dangrous commentedon Mar 19, 2026
Oh yep, I think that's right. We ended up reverting and reissuing the original PR, but only after that PR update.
melvin-bot commentedon Mar 23, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Mar 23, 2026
Payment Summary
Contributor+: @ShridharGoel due $125 via NewDot
@ShridharGoel didn't see any tests so made $125. Commented if ya disagree
JmillsExpensify commentedon Apr 6, 2026
$125 approved for @ShridharGoel