GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — aggregator(charges-collect): sameCharge drops hand-fed rows on substring containment — a Meta row vanishes against METAMUCIL, an AI row against RAILWAY · Issue #3049 · developing-today/code

aggregator(charges-collect): sameCharge drops hand-fed rows on substring containment — a Meta row vanishes against METAMUCIL, an AI row against RAILWAY #3049

New issue
Copy link
New issue
Copy link
Closed
#4307
Closed
aggregator(charges-collect): sameCharge drops hand-fed rows on substring containment — a Meta row vanishes against METAMUCIL, an AI row against RAILWAY#3049
#4307
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 31, 2026
Issue body actions

Summary

sameCharge in pm-stack/aggregator/src/charges-collect.ts decides that a hand-fed charges row duplicates an auto-matched row when their squashed normalized labels merely contain one another — no token boundary and no minimum length (charges-collect.ts:74-80). mergeChargeRows (:89-92) then silently drops the hand-fed row. With equal amounts and dates within the 3-day dedupe window, unrelated charges eat hand-fed rows:

  • a hand-fed Meta row is dropped because an auto row labelled METAMUCIL exists ("METAMUCIL" contains "META");
  • a hand-fed AI row is dropped because an auto row labelled RAILWAY exists ("RAILWAY" contains "AI").

Evidence (verified this run, main 0f84fe08; laptop probe ~/git/fleet/probe-2026-10-31-laneB-charges/probe2.ts importing the shipped file — charges-collect.ts md5 246eca2b01496bf280146a2e506785d7 identical in the sandbox and laptop clones)

  • Case A: auto [{2026-10-06, "METAMUCIL", $20}] + hand-fed [{2026-10-05, "Meta", $20}] → merged output is only the METAMUCIL row; the Meta row is gone.
  • Case B: auto [{2026-10-05, "RAILWAY", $10}] + hand-fed [{2026-10-05, "AI", $10}] → merged output is only the RAILWAY row.
  • Control (documented intent, must keep working): auto "METAPAY" + hand-fed "Meta PAYG spill", same amount/day → one row, the auto row (charges-collect.ts:68-73 names this pair as the reason for squash containment).

Why it matters

The merge's stated rule is conservative — "a hand-fed row is only dropped when an auto row plausibly IS that charge" (charges-collect.ts:70-73) — but substring containment with no floor is not conservative: short hand-fed labels (Meta, AI, any 2–4 letter service shorthand) are substrings of unrelated merchant names, so real hand-fed charges vanish from the feed with no trace. The feed is financial evidence (#1057); a silently missing row is the same failure family as #2130's under-count, by the opposite door.

Distinct from #3048 (same run): that issue is classification in charges-match.ts (matchService/isSaasLooking). This one is the hand-fed/auto merge in charges-collect.ts. Also distinct from #2194, which reaches sameCharge only via impossible calendar dates (NaN window); here the dates are valid and the containment alone drops the row.

Acceptance criteria

  • sameCharge no longer treats substring containment inside a longer token as a match: the Meta/METAMUCIL and AI/RAILWAY pairs above both keep their hand-fed rows.
  • The documented intended pair still merges: hand-fed Meta PAYG spill against auto METAPAY (same amount, within window) drops the hand-fed row.
  • New tests in pm-stack/aggregator/test/charges-collect.test.ts cover both false-merge pairs and the intended pair; all existing charges-collect and charges-match tests pass.

Related: #1057 (feature), #3048 (classification substring matching in charges-match), #2130 (dedupe collapse), #2194 (impossible dates in this file), #1047 (epic).

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    effort/xsTrivial: expected under 30 minutes of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    on Oct 31, 2026
  2. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane B, new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b, run 2026-10-31 07:20 CDT
    • Found via: filed this run
    • Task: Filed after verifying sameCharge substring containment in pm-stack/aggregator/src/charges-collect.ts against the shipped module (laptop probe, file md5 identical across clones): hand-fed Meta row dropped against an auto METAMUCIL row, hand-fed AI row dropped against RAILWAY; the documented Meta PAYG spill / METAPAY control still merges.
    • Expectation: effort/xs triage — confirm on current main and route a boundary-aware fix with the regression tests the issue names.
    • Links: probe ~/git/fleet/probe-2026-10-31-laneB-charges/ (laptop); sibling aggregator(charges-match): service and SaaS-marker matching is substring-only — METAMUCIL and METAL ROOFING classify as Meta charges #3048 (charges-match classification), aggregator(charges-collect): parseChargeCandidates accepts impossible calendar dates — dedupe breaks and hand-fed rows are silently dropped #2194 (impossible dates, distinct mechanism)
  3. github-actions
    assigned
    dezren39
    on Oct 31, 2026
  4. dezren39
    added a parent issue on Oct 31, 2026
    • Design: a charge is evidence — one identity and lifecycle contract for the charges pipeline #3161
  5. dezren39
    added
    source/design-architectFiled by the repo design architect job
    on Oct 31, 2026
  6. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Design-architect pass 27 (2026-10-31) — agent note: this issue is adopted as part of Phase 1 (Identity) of design #3161 ("a charge is evidence"). Triage: do NOT re-file, re-scope or split it — record the phase structure instead. The design records the shared identity rule this phase lands under: same charge only when provenance differs (cross-source for candidate dedupe; hand-fed vs auto for the merge), amounts equal, dates within the existing 3-day window, merchant identity at token boundaries (exact normalized equality for dedupe; token-boundary containment for the hand-fed merge, preserving the documented METAPAY / "Meta PAYG spill" pair), an empty normalized merchant never matches, and conflicting known payment methods veto the merge. Phase 1 siblings: #2130, #3049, #3123. Details on #3161 and in files/designs/code-charges-pipeline-contract.md (goal workspace).

  7. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 1, 2026
  8. 9 remaining items

  9. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: OpenChamber scheduled lane
    • Session / ID: ses_e5e68a94807ffecyu5sO2KE80s
    • Task: repo-health-code-pilot fix(mcpx): point doctor slow-remote imports at the in-repo module path #4450
    • Outcome: Triaged aggregator(charges-collect): sameCharge drops hand-fed rows on substring containment — a Meta row vanishes against METAMUCIL, an AI row against RAILWAY #3049 on current main and handed the focused boundary-aware fix to queued task id(directory): validate friend-request IDs before persistence and preserve legacy removals #5624. The issue remains open; no implementation or PR was opened in this triage pass.
    • Verification: Current-main reproducer confirms both false merges; existing charges-collect and charges-match tests pass (21/21).
  10. dezren39
    added
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  11. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: OpenCode session ses_e5e648356c9ffeNBdFMCAFchFL · queue task 5624
    • Task: Fix false hand-fed/auto charge dedupes at substring boundaries while preserving Meta PAYG spill / METAPAY dedupe.
    • Fresh state: aggregator(charges-collect): sameCharge drops hand-fed rows on substring containment — a Meta row vanishes against METAMUCIL, an AI row against RAILWAY #3049 is OPEN; no hard-stop labels. Fresh open-PR search for 3049 returned no PR. Design Design: a charge is evidence — one identity and lifecycle contract for the charges pipeline #3161 remains OPEN; prior triage already confirmed this task as its Phase 1 sibling fix, with aggregator(charges-match): service and SaaS-marker matching is substring-only — METAMUCIL and METAL ROOFING classify as Meta charges #3048/aggregator(charges-collect): parseChargeCandidates accepts impossible calendar dates — dedupe breaks and hand-fed rows are silently dropped #2194 separate.
    • Next: Sync local main, create task worktree, implement scoped matching/tests, and verify targeted Bun tests.
  12. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    agent-note:v1 — resumed
    Agent: repo-worker-code (openchamber scheduled lane)
    Task: repo-health-code-pilot task 5624 (small_fix, priority 50, attempt 2)
    Started: 2026-11-02T09:49Z
    State found: #3049 remains open with queue/claimed, status/in-progress, and work/assigned labels; no open PR mentioning #3049 was found. Existing task progress records the implementation and targeted tests already passing in /home/user/git/fleet/5624.
    Plan: inspect the saved branch/worktree, verify the implementation and tests fresh, then open the canonical PR and complete as soon as the result is verified.

  13. dezren39
    added a commit that references this issue on Nov 2, 2026

    fix(aggregator): compare charge labels at token boundaries (#3049)

    3ead49a
  14. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    agent-note:v1 — done (handed off to PR)
    Agent: repo-worker-code (openchamber scheduled lane)
    Task: repo-health-code-pilot task 5624 (small_fix, priority 50, attempt 2)
    Result: PR #4307 opened at 3ead49a; issue remains open until merge.
    Verification: bun test test/charges-collect.test.ts test/charges-match.test.ts — 27 pass, 0 fail; git diff --check clean. PR checks were pending at handoff; no CI wait performed.
    Labels: removed status/in-progress, queue/claimed, and work/assigned. Sandbox backlog/sweep bookkeeping deferred to fleet reconciliation per scheduled-lane protocol.

  15. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
  16. dezren39
    added a commit that references this issue on Nov 2, 2026

    Merge pull request #4307 from developing-today/queue/5624-3049-charge…

    1077bb3
  17. dezren39
    closed this as completedin #4307on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobtask/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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.