[BTAPI-54] Vendor auto-tag engine: apply tag at ingest #86

Merged
chris merged 5 commits from feature/BTAPI-54 into main 2026-08-31 15:23:00 -06:00
Owner

Ticket

BTAPI-54 Vendor auto-tag engine: apply the tag the user would have applied, at ingest

Summary

  • Adds server/lib/auto-tag/: a static rule table (Tier A budgeted/dance/health only) + an applyAutoTag helper, matching merchant description substrings against historical tagging patterns.
  • Wires both ingestion paths — the Tangerine mail parser and the Wealthsimple sync — to auto-tag a transaction before insert, never overriding an existing tag.
  • Auto-tagging is silent with respect to notifications: every ingested transaction still triggers the standard new-transaction push exactly as before, regardless of whether a rule matched (corrected per explicit user feedback — the ticket's original text proposed suppressing the push for auto-applied budgeted; the user asked to keep being notified of every transaction, so that suppression was implemented and then removed in this PR's history).
  • Scope deliberately excludes Tier A's groceries/personal rules, all of Tier B, and any historical backfill — those, along with closing BTAPI-53 as superseded, are left for a follow-up ticket per the scope decision made during planning.

Follow-ups (not in this PR)

  • Tier A groceries/personal rules and all of Tier B rules (deferred, larger blast radius / lower confidence).
  • Backfill of historical untagged transactions matching a rule (would require recomputing closed-week balance snapshots).
  • Closing BTAPI-53 as superseded — manual ticket-management action.
## Ticket [BTAPI-54](http://192.168.2.100:7123/home/browse/BTAPI-54/) Vendor auto-tag engine: apply the tag the user would have applied, at ingest ## Summary - Adds `server/lib/auto-tag/`: a static rule table (Tier A `budgeted`/`dance`/`health` only) + an `applyAutoTag` helper, matching merchant description substrings against historical tagging patterns. - Wires both ingestion paths — the Tangerine mail parser and the Wealthsimple sync — to auto-tag a transaction before insert, never overriding an existing tag. - Auto-tagging is silent with respect to notifications: every ingested transaction still triggers the standard new-transaction push exactly as before, regardless of whether a rule matched (corrected per explicit user feedback — the ticket's original text proposed suppressing the push for auto-applied `budgeted`; the user asked to keep being notified of every transaction, so that suppression was implemented and then removed in this PR's history). - Scope deliberately excludes Tier A's `groceries`/`personal` rules, all of Tier B, and any historical backfill — those, along with closing BTAPI-53 as superseded, are left for a follow-up ticket per the scope decision made during planning. ## Follow-ups (not in this PR) - Tier A `groceries`/`personal` rules and all of Tier B rules (deferred, larger blast radius / lower confidence). - Backfill of historical untagged transactions matching a rule (would require recomputing closed-week balance snapshots). - Closing BTAPI-53 as superseded — manual ticket-management action.
[BTAPI-54] Remove notification suppression for auto-tagged transactions.
All checks were successful
server / check (pull_request) Successful in 33s
plane-sync / sync (pull_request) Successful in 1s
ecf11aab29
chris merged commit ddf0211fb8 into main 2026-08-31 15:23:00 -06:00
chris deleted branch feature/BTAPI-54 2026-08-31 15:23:00 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chris/budget-tracker!86
No description provided.