Skip to content

[Due for payment 2026-10-30] [Rules Engine Release 1] [App] Migrate the frontend to support the new rules engine for Merchant Rules #100300

Closed
3 of 3 issues completed

Description

@JS00001

We're in the process of migrating all of our rules into one place, with one format. Lets start by migrating merchant rules to use these new data formats and APIs

We will implement all of the sub-issues to this issue, in the order that they are listed

Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. self-assigned this
    on Sep 3, 2026
  2. changed the title [-]Migrate the frontend to support the new rules engine for Merchant Rules[/-] [+][Rules Engine Release 1] Migrate the frontend to support the new rules engine for Merchant Rules[/+] on Sep 3, 2026
  3. Krishna2323 commented on Sep 3, 2026

    @Krishna2323
    Contributor

    @JS00001 a few things aren't clear to me before I can start:

    1. Do category tax defaults migrate too? They're in policy.rules.expenseRules, but they have a CreateTransaction trigger and a Set action, so they match your definition of an Expense Default Rule. This also affects #99420.

    2. Will the backend keep writing policy.rules.codingRules during the switch? If old rules get backfilled while codingRules stays populated, every rule will show up twice. Is this a hard cutover, or will both paths coexist during the beta? Also do we even have beta for this? 😅

    3. Leaf nodes use op, while the branch uses operator. Our ASTNode uses operator everywhere. Is this a typo, or is this format different from search's AST?

    4. notContains isn't in CONST.SEARCH.SYNTAX_OPERATORS. Is it being added, or should this be neq?

    5. There's no UpdateRule. Is editing a rule just SetRule with the same ruleID?

    6. right is an array, but our filter has right as a string. Does an array mean multiple values OR'd together, and can a merchant have more than one?

    7. The actions list skips comment (Description) and vendorID. Both have live UI pages today. Are they being dropped, or just left out of the example?

  4. JS00001 commented on Sep 3, 2026

    @JS00001
    ContributorAuthor
    1. Do category tax defaults migrate too? They're in policy.rules.expenseRules, but they have a CreateTransaction trigger and a Set action, so they match your definition of an Expense Default Rule. This also affects Add category tax defaults to Expense defaults #99420.

    Lets keep this out of scope to start with, while we get the FE working. But then yes, eventually they will be migrated to the new format

    1. Will the backend keep writing policy.rules.codingRules during the switch? If old rules get backfilled while codingRules stays populated, every rule will show up twice. Is this a hard cutover, or will both paths coexist during the beta? Also do we even have beta for this? 😅

    No, we will not be writing to codingRules anymore. We are doing the inverse. Currently, every call to SetPolicyCodingRule is writing to the new rules format as well as the legacy one.

    1. Leaf nodes use op, while the branch uses operator. Our ASTNode uses operator everywhere. Is this a typo, or is this format different from search's AST?

    Sorry, I'm used to using op haha, its operator, updated

    1. notContains isn't in CONST.SEARCH.SYNTAX_OPERATORS. Is it being added, or should this be neq?

    This is a new operator. We don't use it in the FE, but we support it now. We support neq and notContains

    1. There's no UpdateRule. Is editing a rule just SetRule with the same ruleID?

    Yes, use SetRule for this

    1. right is an array, but our filter has right as a string. Does an array mean multiple values OR'd together, and can a merchant have more than one?

    Yes, an array is an OR, the value of filters can be an array or a string (or a number for other filters), either of them works

    1. The actions list skips comment (Description) and vendorID. Both have live UI pages today. Are they being dropped, or just left out of the example?

    Sorry, comment is also a valid property. We don't support vendorID yet because thats still in progress, we will support that before this feature goes live, so lets add vendorID here as well

  5. Krishna2323 commented on Sep 7, 2026

    @Krishna2323
    Contributor

    @JS00001 @luacmartins who’ll review the PR? I’m going to open it for review shortly.

    Edit: PR is ready for review!

  6. added
    ReviewingHas a PR in review
    and removed on Sep 8, 2026
  7. JS00001 commented on Sep 9, 2026

    @JS00001
    ContributorAuthor

    @Krishna2323 Can we modify the PR slightly? After discussing w/ Carlos & Carlos, here's the approach that we want to take on the FE to prevent regressions

    1. Support GetRules, and make merchant rules read from the rules_ collection. We should not use SetRule or DeleteRule yet. This is because SetPolicyCodingRule writes to the new rules storage, but SetRule does not write backwards. This could lead to older clients not seeing rules that were created via SetRule
    2. Once the PR above is merged, we will bump the minimum version of clients, so that every user is reading from the rules_ collection
    3. We now use the SetRule command instead of SetPolicyCodingRule
  8. JS00001 commented on Sep 23, 2026

    @JS00001
    ContributorAuthor

    @Krishna2323 would you be able to branch off of your above PR to get started on 3. We now use the SetRule command instead of SetPolicyCodingRule while the PR above is in review?

  9. Krishna2323 commented on Sep 23, 2026

    @Krishna2323
    Contributor

    Yes, I’ll start that shortly after resolving the comments on the current PR.

  10. 19 remaining items

  11. JS00001 commented on Oct 7, 2026

    @JS00001
    ContributorAuthor

    We are done with these sub-issues for now, I left the two FE issues open for payment, moving onto release 2 now

  12. jponikarchuk commented on Oct 9, 2026

    @jponikarchuk

    Deploy Blocker #103555 was identified to be related to the PR #102106 that attempted to fix this issue.

  13. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  14. changed the title [-][Due for payment 2026-10-12] [Rules Engine Release 1] [App] Migrate the frontend to support the new rules engine for Merchant Rules[/-] [+][Due for payment 2026-10-16] [Rules Engine Release 1] [App] Migrate the frontend to support the new rules engine for Merchant Rules[/+] on Oct 9, 2026
  15. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    @Krishna2323 / @situchan

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.6-6 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-10-16. 🎊

  16. changed the title [-][Due for payment 2026-10-16] [Rules Engine Release 1] [App] Migrate the frontend to support the new rules engine for Merchant Rules[/-] [+][Due for payment 2026-10-30] [Rules Engine Release 1] [App] Migrate the frontend to support the new rules engine for Merchant Rules[/+] on Oct 23, 2026
  17. melvin-bot commented on Oct 23, 2026

    @melvin-bot

    @Krishna2323 / @situchan

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.18-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-10-30. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions