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
Rules - Deleted personal rules are still applied to newly created expenses #82892
Version Number: v9.3.22-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:#82438 Email or phone of affected tester (no customers):applausetester+usggsga@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: iPhone 13 / iOS 18.7.1, Samsung Galaxy A52 / Android 14, Windows 11 / Chrome App Component: Workspace Settings
Action Performed:
Preconditions:
Add a custom category "Software" in a workspace
enable rule in more feature of the workspace
Steps:
Create workspace rule for "Amazon" → Category: "Office Supplies"
Create personal rule for "Amazon" → Category: "Software"
Create workspace rule for "Amazon" → Category: "Travel" (newer, should lose)
Create an expense to the workspace with merchant: "Amazon"
Verify personal rule wins → Category: "Software"
Delete personal rule
Create another expense to the workspace with merchant: "Amazon"
👋 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.
Classification: Backend bug / Pre-existing rules bug Causing PR: #82438 - "Enable merchant rules v2" by @luacmartins (High confidence) Related Issues: None found
Recommendation: NEEDS INVESTIGATION
PR #82438 only removed the isProduction feature flag check that was hiding the merchant rules feature. The PR did not modify any rules evaluation or deletion logic. The bug - where deleted personal expense rules continue to be applied to newly created expenses - suggests the issue lies in either:
Backend not properly processing the SetNameValuePair call that deletes personal rules (NVP_EXPENSE_RULES)
Backend evaluating rules from cached/stale data when applying them to new expenses
Pre-existing bug in the rules implementation that was hidden while the feature was behind a flag
This requires investigation by the backend team and/or @luacmartins to determine where the rule evaluation/deletion is failing.
Labels: Keep DeployBlockerCash - This is blocking the App deploy as it involves expense rule functionality in the frontend, even though the root cause may be backend-related.
After further analysis, I am NOT removing any deploy blocker labels at this time.
Reason: The root cause is unclear and requires investigation to determine whether the fix needs to happen in App (frontend) or backend.
Keep Both Labels:
DeployBlockerCash - Keep (App deploy blocked)
DeployBlocker - Keep if present (Backend deploy may also be blocked)
The bug involves the interaction between personal expense rules and merchant rules after enabling the merchant rules feature. Until we can confirm:
Whether the deletion is failing on the frontend or backend
Whether the rule evaluation is happening incorrectly in App or backend
Whether there is a conflict between the two rules systems
We should maintain the conservative approach and keep all deploy blocker labels in place. The PR author @luacmartins and backend team need to investigate before we can confidently determine the fix location and adjust labels accordingly.
Activity
melvin-bot commentedon Feb 19, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82438
melvin-bot commentedon Feb 19, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Feb 19, 2026
Triggered auto assignment to @heyjennahay (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.github-actions commentedon Feb 19, 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:
OSBotify commentedon Feb 19, 2026
🔍 Investigation Summary
Classification: Backend bug / Pre-existing rules bug
Causing PR: #82438 - "Enable merchant rules v2" by @luacmartins (High confidence)
Related Issues: None found
Recommendation: NEEDS INVESTIGATION
PR #82438 only removed the
isProductionfeature flag check that was hiding the merchant rules feature. The PR did not modify any rules evaluation or deletion logic. The bug - where deleted personal expense rules continue to be applied to newly created expenses - suggests the issue lies in either:SetNameValuePaircall that deletes personal rules (NVP_EXPENSE_RULES)This requires investigation by the backend team and/or @luacmartins to determine where the rule evaluation/deletion is failing.
Labels: Keep
DeployBlockerCash- This is blocking the App deploy as it involves expense rule functionality in the frontend, even though the root cause may be backend-related.📋 Detailed Analysis
Evidence
isProductioncheckCode Analysis
From
src/libs/actions/User.ts, thedeleteExpenseRulesfunction:pendingAction: DELETEon the rule optimisticallySetNameValuePairAPI with the filtered rules listThe deletion logic appears correct in the frontend. The issue must be either:
Root Cause
The root cause requires backend investigation to determine:
SetNameValuePairfor NVP_EXPENSE_RULES is properly deleting rules on the backendFiles Involved
/home/runner/_work/App/App/src/pages/workspace/rules/MerchantRulesSection.tsx(PR Enable merchant rules v2 #82438 changes)/home/runner/_work/App/App/src/libs/actions/User.ts(deleteExpenseRules function)/home/runner/_work/App/App/src/pages/settings/Rules/ExpenseRulesPage.tsx(personal rules UI)SetNameValuePairfor NVP_EXPENSE_RULESOSBotify commentedon Feb 19, 2026
🔍 Update: Label Decision
After further analysis, I am NOT removing any deploy blocker labels at this time.
Reason: The root cause is unclear and requires investigation to determine whether the fix needs to happen in App (frontend) or backend.
Keep Both Labels:
DeployBlockerCash- Keep (App deploy blocked)DeployBlocker- Keep if present (Backend deploy may also be blocked)The bug involves the interaction between personal expense rules and merchant rules after enabling the merchant rules feature. Until we can confirm:
We should maintain the conservative approach and keep all deploy blocker labels in place. The PR author @luacmartins and backend team need to investigate before we can confidently determine the fix location and adjust labels accordingly.
luacmartins commentedon Feb 19, 2026
I'm unable to reproduce this. I think this might be AgentZero auto-categorizing the expense since there's history for that merchant.