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
Spend - Held expense is grouped by violation despite not being submitted yet. #107598
Version Number: 9.5.49-1 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#107141 Email or phone of affected tester (no customers):ibellicotest+3215@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Search
Action Performed:
Prerequisite: User is owner of a "Control" workspace with "Rules" enabled.
Prerequisite 2: Have two unsubmitted expenses with violations available on the same report. (One held expense and one expense over amount limit)
Prerequisite 3: Submissions and approvals enabled.
Open the staging.new.expensify.com website.
Navigate to "Spend" > "Expenses"
Click on "Display" > "Group By" > "Violations"
Note that no results are displayed as expenses with violations are not submitted yet.
Reset the filters.
Navigate to workspace chat.
Click on "Submit" on report preview > "Submit anyway"
Note that expense over amount limit is submitted and held expense remains unsubmitted in a different report.
Return to "Spend" > "Expenses"
Click on "Display" > "Group By" > "Violations"
Note that held expense is now grouped by violation despite not being submitted yet.
Expected Result:
Only submitted or approved expenses with violations should be visible after using the group-by violation filter.
Actual Result:
Held expense is grouped by violation despite not being submitted yet.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
I don't think this should block the deploy. It's a real bug, but it's in Auth, not in #107141. That PR only adds the grouping UI on top of the snapshot data the has:submitted-violation filter already reads, and that filter is already in production. It should return the same held expense today. I recommend removing DeployBlockerCash and fixing this in Auth.
Problem
When a report is submitted with a held expense, the submit snapshot still records the held expense's violations, even though that expense never gets submitted:
The snapshot is taken before the move on purpose (commit), so it records what the person saw when they acted. The bug is that expenses moved off the report at that moment are treated as submitted.
Solution
In SubmitReport and Report::approve, keep calculating violations before the move, but pass the IDs of the expenses still on the report as the transactionIDFilter that applySnapshotToActionMessagealready accepts. Held, pending and RTER expenses that were moved off then stay out of the snapshot. The existing test that expects RTER expenses that were moved off to be in the snapshot would need to flip. Snapshots that already include these expenses stay as they are unless we backfill them.
Verification was blocked during fixture setup on dev NewDot web. A Control workspace was created, but the required held and over-limit expenses could not be established.
Step
Status
Required workspace and expense fixtureConfirmed Control plan, but Rules and submissions/approvals navigation was not exposed in the inspected screen. Fixture setup stopped; this is a testing blocker, not confirmation of the reported regression.
❌
Violations grouping before and after Submit anywayNot verified at runtime: the prerequisite expenses were unavailable. No Search request/response evidence was captured.
Investigation finding: The deploy-blocker investigator identified Add group-by:violation as the feature-enabling PR, but could not establish that it introduced the underlying defect. Selecting Violation grouping adds submitted/approved violation filters; group rendering consumes returned search data. The PR does not change held-expense splitting.
Hypothesis—not confirmed: Partial submission may incorrectly record or associate historical submitted violations with the held transaction. Incorrect server aggregation or stale client results remain alternatives. Backend implementation could not be inspected.
Recommendation: Keep DeployBlockerCash pending verification. Capture fresh grouped and ungrouped Search responses using has:submitted-violation after submitting a report containing a never-submitted held expense. Inclusion in both responses points toward snapshot/filter handling; inclusion only in grouped results points toward aggregation; inclusion only before refresh points toward client state. If backend responsibility is confirmed, escalate to an internal engineer rather than applying an App-only status filter.
Related evidence:The separate submitted-violation investigation identifies older backend snapshot-timing behavior, but does not prove this issue has the same cause. Reverting the feature would be containment, not a verified root-cause fix.
Activity
applause-bot commentedon Nov 20, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/cea4791bb61178e1250dad2770766fb1eb918eebdfa2a7a22ba745fcf0866a71
expensify-chore-bot commentedon Nov 20, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #107141
expensify-chore-bot commentedon Nov 20, 2026
@neil-marcellini you have been assigned to this deploy blocker because you reviewed the offending PR: #107141
expensify-chore-bot commentedon Nov 20, 2026
@nkdengineer you have been assigned to this deploy blocker because you authored the offending PR: #107141
expensify-chore-bot commentedon Nov 20, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Nov 20, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
neil-marcellini commentedon Nov 20, 2026
(Neil's AI agent)
I don't think this should block the deploy. It's a real bug, but it's in Auth, not in #107141. That PR only adds the grouping UI on top of the snapshot data the
has:submitted-violationfilter already reads, and that filter is already in production. It should return the same held expense today. I recommend removingDeployBlockerCashand fixing this in Auth.Problem
When a report is submitted with a held expense, the submit snapshot still records the held expense's violations, even though that expense never gets submitted:
SubmitReportcalculates violations for the whole report, held expense included.Report::submit, which writes all of them onto the SUBMITTED action, held expense included.hold).The snapshot is taken before the move on purpose (commit), so it records what the person saw when they acted. The bug is that expenses moved off the report at that moment are treated as submitted.
Solution
In
SubmitReportandReport::approve, keep calculating violations before the move, but pass the IDs of the expenses still on the report as thetransactionIDFilterthatapplySnapshotToActionMessagealready accepts. Held, pending and RTER expenses that were moved off then stay out of the snapshot. The existing test that expects RTER expenses that were moved off to be in the snapshot would need to flip. Snapshots that already include these expenses stay as they are unless we backfill them.MelvinBot commentedon Nov 20, 2026
🤖 Web test steps verification results:⚠️ partial
Verification was blocked during fixture setup on dev NewDot web. A Control workspace was created, but the required held and over-limit expenses could not be established.

Required workspace and expense fixture
Confirmed Control plan, but Rules and submissions/approvals navigation was not exposed in the inspected screen. Fixture setup stopped; this is a testing blocker, not confirmation of the reported regression.Violations grouping before and after Submit anyway
Not verified at runtime: the prerequisite expenses were unavailable. No Search request/response evidence was captured.Investigation finding: The deploy-blocker investigator identified Add group-by:violation as the feature-enabling PR, but could not establish that it introduced the underlying defect. Selecting Violation grouping adds submitted/approved violation filters; group rendering consumes returned search data. The PR does not change held-expense splitting.
Hypothesis—not confirmed: Partial submission may incorrectly record or associate historical submitted violations with the held transaction. Incorrect server aggregation or stale client results remain alternatives. Backend implementation could not be inspected.
Recommendation: Keep
DeployBlockerCashpending verification. Capture fresh grouped and ungrouped Search responses usinghas:submitted-violationafter submitting a report containing a never-submitted held expense. Inclusion in both responses points toward snapshot/filter handling; inclusion only in grouped results points toward aggregation; inclusion only before refresh points toward client state. If backend responsibility is confirmed, escalate to an internal engineer rather than applying an App-only status filter.Related evidence: The separate submitted-violation investigation identifies older backend snapshot-timing behavior, but does not prove this issue has the same cause. Reverting the feature would be containment, not a verified root-cause fix.
view run · view recording
neil-marcellini commentedon Nov 20, 2026
I'll have AI work on a fix