You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(aggregator): live source consumes auto-matched charges only inside the saas gate, so a quota-view failure hides them all (PR #2149) #3124
PR #2149's collector publishes auto-matched charges/chargesAttention independently of the quota-view prose, but the live source consumes them only inside if (feed?.saas && feed.saas.length). When the quota-view file is unreadable the collector still runs the matcher and publishes valid charge evidence, yet liveSource().usage() falls into its fallback path and ignores it — every automatically collected charge disappears from the hub exactly when the prose source is broken. Codex flagged this P2 on the PR (comment 4409467134); it merged unchanged and is still on main. (Distinct from #2439/#2445: those are about isFleetFeed validation of these fields, not the saas gate.)
Current main: pm-stack/aggregator/src/sources/live.ts:869 — the saas gate; the chargeFlags mapping sits inside it at :888.
Why it matters
The auto-matcher was built to free the charges view from hand-fed prose; gating its consumption on that same prose source reintroduces the single point of failure it removed.
Acceptance criteria
usage() consumes feed charges/chargesAttention even when feed.saas is absent/empty (services fall back as today; charges do not vanish).
A test with a feed carrying charges but no saas shows the charges and unmatched-charge flags.
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.
🤖 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).
Verdict: CONFIRMED on current main47214f1cf277a0e8ae4bc08102d9f136a26b8703 — verified by direct read of pm-stack/aggregator/src/sources/live.ts this run:
:869 — if (feed?.saas && feed.saas.length) { is the only place the feed's charge data is consumed.
:880 — charges: feed.charges ?? [] sits inside that gate.
:888 — the chargeFlags mapping over feed.chargesAttention also sits inside it.
Fix shape (pinned for the follow-up task): hoist the feed-charge consumption out of the saas gate — compute feed.charges + the chargesAttention flags once, before the branch, and use them in every return path (feed-saas path unchanged; quota-view fallback path prefers/merges the feed charges and appends the flags; fixtures fallback keeps feed charges when a feed exists). Services/payg/subscriptions fallback behaviour stays exactly as today.
Acceptance test: a feed carrying charges/chargesAttention but no saas (aggregator test suite, e.g. alongside pm-stack/aggregator/test/charges-*.test.ts / feed tests) shows the charges rows and the unmatched-charge attention flags in usage() output; existing saas-path behaviour unchanged.
Dedupe: no open PR references #3124 (searched this run); the only matching PR is the merged origin #2149. A small_fix follow-up task is being enqueued from this triage.
Session / ID: queue task 4544 — completing as triaged
Found via: queue claim
Task: Triage complete: finding CONFIRMED on main 47214f1 (see findings note above). Follow-up fix task 4590 enqueued (small_fix, dedupe repo-health:v1:fix:…:3124) and already claimed by a fellow lane, so this issue's queue/claimed / work/assigned / status/in-progress labels stay — they now mirror task 4590's live claim, not this triage.
Expectation: fix lands via task 4590's PR; issue closes via that PR
Fixed and merged via PR #3171 (merge commit 3bf8700).
usage() now computes the feed's charges + unmatched-charge flags once, before the branch, and every return path consumes them: feed-saas path unchanged; quota-view fallback merges feed charges ahead of prose-extracted ones via the existing charge-level mergeChargeRows (automatic evidence wins — a Codex P2 on the first cut caught that full-row-identity dedupe would double-display a charge recorded in both places; fixed in 4ea1b99, replied on the thread, fresh Codex round on that head completed with no findings); fixtures fallback keeps feed charges + flags when a feed exists.
Tests on the laptop (bun test in pm-stack/aggregator): new test/charges-feed-gate.test.ts 4/4 (both fallback tests fail on pre-fix code; the both-records dedupe test covers the Codex scenario); targeted suites 54/54; full suite 710 pass / 7 fail — the 7 are pre-existing PAGES-manifest assertions (#1134/#1135, aa-explorer, attention controls) reproduced on pristine main, untouched by this diff. No substantive Actions workflow triggers for this path.
Queue task 4590 completed as fixed_merged by lane C.
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.
dezren39 commentedon Oct 31, 2026
🤖 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).
dezren39 commentedon Oct 31, 2026
🤖 Agent note · picked up
dezren39 commentedon Oct 31, 2026
🤖 Agent note · triage findings (queue task 4544, lane D)
Verdict: CONFIRMED on current main
47214f1cf277a0e8ae4bc08102d9f136a26b8703— verified by direct read ofpm-stack/aggregator/src/sources/live.tsthis run::869—if (feed?.saas && feed.saas.length) {is the only place the feed's charge data is consumed.:880—charges: feed.charges ?? []sits inside that gate.:888— thechargeFlagsmapping overfeed.chargesAttentionalso sits inside it.extractCharges(doc, registryText)from prose and never touchesfeed.charges/feed.chargesAttention; if the quota view is unreadable it falls through to fixtures — so a feed carrying valid charge evidence but no/emptysaasloses every auto-matched charge, exactly as filed. This is distinct from aggregator(feed): isFleetFeed never checks chargesAttention — one malformed entry crashes usage() and takes down /quota + the quota JSON twins #2439/aggregator(feed): isFleetFeed never checks charges — one malformed row crashes /quota, a non-array object silently empties the charges strip #2445/aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451 (isFleetFeed validation of the same fields), which remain separate.Fix shape (pinned for the follow-up task): hoist the feed-charge consumption out of the saas gate — compute
feed.charges+ thechargesAttentionflags once, before the branch, and use them in every return path (feed-saas path unchanged; quota-view fallback path prefers/merges the feed charges and appends the flags; fixtures fallback keeps feed charges when a feed exists). Services/payg/subscriptions fallback behaviour stays exactly as today.Acceptance test: a feed carrying
charges/chargesAttentionbut nosaas(aggregator test suite, e.g. alongsidepm-stack/aggregator/test/charges-*.test.ts/ feed tests) shows the charges rows and the unmatched-charge attention flags inusage()output; existing saas-path behaviour unchanged.Dedupe: no open PR references #3124 (searched this run); the only matching PR is the merged origin #2149. A
small_fixfollow-up task is being enqueued from this triage.dezren39 commentedon Oct 31, 2026
🤖 Agent note · picked up
dezren39 commentedon Oct 31, 2026
🤖 Agent note · done (triage)
triagedsmall_fix, dedupe repo-health:v1:fix:…:3124) and already claimed by a fellow lane, so this issue'squeue/claimed/work/assigned/status/in-progresslabels stay — they now mirror task 4590's live claim, not this triage.fix(aggregator): reuse mergeChargeRows for the fallback charge merge (#…
Merge pull request #3171 from developing-today/queue/4590-3124-saas-g…
dezren39 commentedon Oct 31, 2026
Fixed and merged via PR #3171 (merge commit 3bf8700).
usage()now computes the feed's charges + unmatched-charge flags once, before the branch, and every return path consumes them: feed-saas path unchanged; quota-view fallback merges feed charges ahead of prose-extracted ones via the existing charge-levelmergeChargeRows(automatic evidence wins — a Codex P2 on the first cut caught that full-row-identity dedupe would double-display a charge recorded in both places; fixed in 4ea1b99, replied on the thread, fresh Codex round on that head completed with no findings); fixtures fallback keeps feed charges + flags when a feed exists.Tests on the laptop (
bun testin pm-stack/aggregator): newtest/charges-feed-gate.test.ts4/4 (both fallback tests fail on pre-fix code; the both-records dedupe test covers the Codex scenario); targeted suites 54/54; full suite 710 pass / 7 fail — the 7 are pre-existing PAGES-manifest assertions (#1134/#1135, aa-explorer, attention controls) reproduced on pristine main, untouched by this diff. No substantive Actions workflow triggers for this path.Queue task 4590 completed as fixed_merged by lane C.