Skip to content

fix(aggregator): charges surfaced keys are persisted before feed delivery, so a failed transfer permanently suppresses the flags (PR #2149) #3122

Description

@dezren39

Finding

PR #2149's collector persists the charges surfaced-keys state at collection time — before the feed is published and before the laptop transfer (scripts/push-fleet-feed.sh collects first, transfers later). If publication or transfer fails, those unmatched charges are permanently suppressed: the keys say they were shown, the next collection omits them from chargesAttention, and they never reach the attention strip. Codex flagged this P2 on the PR (comment 4409381655); it merged unchanged and is still on main.

Evidence

Why it matters

Exactly-once surfacing is only correct if "surfaced" means "delivered". As written, one failed transfer silently deletes operator notifications about unrecognized charges — the failure mode the strip exists to prevent.

Acceptance criteria

  • Surfaced keys are persisted only after the feed carrying them is successfully published/delivered, or pending keys survive a failed publication (e.g. written with the feed and confirmed on the next successful run).
  • A simulated failed delivery leaves the charges surfacing on the next collection.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    effort/sSmall: expected under 2 hours of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    on Oct 31, 2026
  2. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    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.

  3. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Design-architect pass 27 (2026-10-31) — agent note: this issue is adopted as part of Phase 3 (Delivery) 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 rule this phase lands under: surfaced means delivered (surfaced keys persist only for charges in a successfully published feed), and consumption is independent (the live source consumes the charges sections on their own validity, never gated on an unrelated section). Phase 3 siblings: #3122, #3124. On landing, Phase 3 also owns the design's closing truth-up: the three rules written into the charges-match.ts / charges-collect.ts / producer headers and evidence posted on #1057. Details on #3161 and in files/designs/code-charges-pipeline-contract.md (goal workspace).

  4. added
    work/assignedQueue worker lifecycle state
    and removed on Oct 31, 2026
  5. 15 remaining items

  6. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 31, 2026
  7. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

    • Agent: repo-worker-code, OpenChamber scheduled lane
    • Session / ID: queue task 4588
    • Task: PR fix(aggregator): confirm surfaced charges after delivery #3167 opened at dbf6354; targeted charges tests (10) and push security guard passed.
    • Resume: check CI and review, verify diff and merge if green; task parked 20 minutes. Worktree: /home/user/git/fleet/4588; branch queue/4588-3122-charges-delivery.
  8. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 31, 2026
  9. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  10. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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

Metadata

Metadata

Assignees

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobsource/pr-diff-reviewFiled by the pr-diff-review 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