Repository navigation
Closed
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)Package/app: aggregator (pm-stack in this repo)effort/sSmall: expected under 2 hours of workSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)Ordinary priority (the default)source/design-architectFiled by the repo design architect jobFiled by the repo design architect jobsource/pr-diff-reviewFiled by the pr-diff-review jobFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Description
Finding
PR #2149's Gmail charge producer turns two kinds of NOT-a-charge mail into charge candidates:
- Declined/failed purchase alerts — a subject like "Your $20.00 purchase at OpenAI was declined" passes the query and
isNotChargeSubject, the amount and merchant parse cleanly, and a payment that never occurred is recorded as a charge (Codex P2, comment 4409381650). - Outstanding invoices — a subject like "Your OpenAI invoice" with a body saying "Amount due $20.00 / Due Nov 1" is accepted; the body fallback extracts $20 with no evidence of payment, and when payment lands >3 days later the Plaid transaction is kept as a second charge (Codex P2, comment 4409467123).
Both merged unchanged and are still on main: isNotChargeSubject has no declined/failed pattern, and nothing requires payment evidence.
Evidence
- PR: feat(aggregator): wire charges auto-matcher into collector + Plaid/Gmail producer (#1057) #2149 (merged, 7d064e5, feat(usage-hub): v3 charges auto-matching — Plaid + Gmail alerts to services #1057)
- Current main:
pm-stack/aggregator/scripts/produce-charge-candidates.ts:148-157(isNotChargeSubject: cancellation/refund/payment-received/marketing only) and the body amount fallback at :208.
Why it matters
The producer's stated discipline is "never guessed at" — but declined and merely-due amounts are guesses that a charge occurred, and they flow into matched rows and the once-only attention strip as real spending.
Acceptance criteria
- Subjects/bodies indicating a declined or failed purchase produce no candidate (counted as skipped).
- An invoice whose only amount is an amount DUE (no paid/charged evidence) produces no candidate.
- Tests pin both shapes; genuine receipts/alerts still produce candidates.
Metadata
Metadata
Assignees
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)Package/app: aggregator (pm-stack in this repo)effort/sSmall: expected under 2 hours of workSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)Ordinary priority (the default)source/design-architectFiled by the repo design architect jobFiled by the repo design architect jobsource/pr-diff-reviewFiled by the pr-diff-review jobFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Activity
dezren39 commentedon Oct 31, 2026
agent-note:v1 — Agent: pr-diff-review-b; state: filed. Filed from PR diff review lane B (late-arriving Codex P2 evidence on the source PR, verified against current main ada2d88; see the issue body for PR, comment, and file:line evidence). Enqueued as a repo-task/v1 triage packet on repo-health-code-pilot.
38 remaining items
dezren39 commentedon Oct 31, 2026
🤖 Agent note · parked
dezren39 commentedon Oct 31, 2026
🤖 Agent note · picked up
Merge pull request #3193 from developing-today/queue/4577-3120-charge…
dezren39 commentedon Oct 31, 2026
🤖 Agent note · done