Skip to content

feat(usage-hub): v3 charges auto-matching — Plaid + Gmail alerts to services #1057

Closed

Description

@dezren39

Part of epic #1047. Hub design §2.4 / §5 v3.

Charges-strip auto-matching: today the hub's "charges this period" strip is hand-fed evidence. Automate it:

  • Match Plaid transactions (linked accounts: Royal Credit Union; Citi is NOT linked — that gap is tracked in the account campaign, do not work around it) and Gmail receipt/card alerts to hub services, one row per charge with its source labelled (Plaid vs Gmail alert).
  • Unmatched charges that look like SaaS/AI vendors surface in the attention strip for manual classification, once, not repeatedly.
  • Full balances/debt stay in the finance tooling; the hub links out, per design §2.4.
    Acceptance: strip populates from the daily morning-readout Plaid read + Gmail alerts with no manual copying; a charge is never double-counted across sources.

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

    • Agent: queue worker (repo-worker-code), lane C shift
    • Session / ID: queue task 2325 (triage)
    • Found via: queue claim · repo-health-code-pilot
    • Task: Triage verdict — CONFIRMED feasible, all inputs live (verified 2026-10-29):
    • Plaid: connector status = connected, 4 linked institutions; transactions-get reads an inclusive date range. The Citi gap stands exactly as filed (account campaign owns it; this work does not work around it).
    • Gmail: connector status = connected; search/read reaches receipt/card alert mail.
    • Hub side: pm-stack/aggregator already serves the /quota charges evidence strip (/api/quota.json extended with charges) and already accepts Muse-side poster feeds for external data — the matcher plugs into the daily collector flow, it does not need a new hub surface.
    • Pinned for the fix: one row per charge with source labelled (Plaid vs Gmail alert); cross-source dedupe on amount + normalized merchant + date window, Plaid as source of record on a tie; unmatched SaaS/AI-looking charges surface in the attention strip once (persisted state, never repeatedly); no balances/debt in the hub (links out, design §2.4).
    • Expectation: small_fix enqueued (dedupe repo-health:v1:fix:developing-today/code:issue:1057; packet hidden_files/packet-2325-fix.json). Issue stays open for that task.
  3. added
    queue/queuedHas a queued task in the Supabase agent queue
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  4. 95 remaining items

  5. added a commit that references this issue on Oct 30, 2026
  6. added
    effort/mMedium: expected under 1 day of work
    mode/onlineFully doable remotely: design, config, code, cloud
    on Nov 1, 2026
  7. added
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 30 (priority/none). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (closed with evidence)

    Triage verdict: DONE — closing (the issue was left open after the final done note)

    The last note here (2026-10-29T09:20Z, "done") recorded the acceptance step verified live, but the issue was never re-closed after the 2026-10-29T05:45Z reopen (timeline checked fresh — no close event after the reopen). Re-verified today, 2026-11-03:

    Implementation on main (1e3763faf4)

    Live acceptance, checked this run — GET https://amd-6.raptor-pumpkinseed.ts.net/api/quota.json returns a charges array containing auto rows in the matcher's own source format, including two dated today: 2026-11-03 OpenCode $10 (Gmail alert) and 2026-11-03 Command Code $1.36 (Gmail alert), matched to service labels. No duplicate of either is present from the hand-fed set, so the no-double-count merge is holding in the published feed. Unmatched SaaS/AI items are in the attention strip (5 items, persisted-state behaviour unchanged).

    Not in scope / not touched: the Citi link gap (account campaign), balances/debt (finance tooling). Charge identity/lifecycle as a contract is a separate design tracked in #3161 — not a regression here.

    Closing as complete.

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

Metadata

Metadata

Assignees

Labels

effort/mMedium: expected under 1 day of workmeta/follow-upFollow-up spun out of earlier workmode/onlineFully doable remotely: design, config, code, cloudqueue/queuedHas a queued task in the Supabase agent queuesource/creatorFiled by the new-issue-creator jobstatus/needs-triageNot yet triaged; needs a first looktask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions