Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/duplicateDuplicate of another issueDuplicate of another issuepriority/lowNice to have; do when convenientNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobstatus/duplicateAlready tracked elsewhereAlready tracked elsewheretask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Description
pm-stack(aggregator): #4942 fix never landed — PR #5256 closed unmerged, applyCloudflareExport still accepts negative used on main
Summary
Issue #4942 (applyCloudflareExport accepts negative used) is CLOSED, but the bug is still live on main. Its fix was written and then lost: the implementing PR was closed without merging, and no equivalent change ever reached main.
Evidence (verified this run, 2026-11-03, at origin/main 85c0e0b)
pm-stack/aggregator/src/saas-extract.ts— inapplyCloudflareExport, the metrics filter is still finite-only:
.filter((m) => m && typeof m.id === "string" && typeof m.used === "number" && Number.isFinite(m.used))
The siblingapplySupabaseExportin the same file dropsused < 0/limit < 0metrics.- Laptop bun probe at origin/main 85c0e0b (probe test mirroring
test/cloudflare-export.test.ts's freshDoc): a fresh Cloudflare export doc withworkers-requests used: -500overlays as-is — storedused = -500, derivedpercent = -0, note stampedLive via cloudflare-graphql-analytics, cardsourceClass = "api". Control metrickv-reads used: 1420overlays normally. - The fix exists but is stranded: commit
59c03cad6("fix(pm-stack/aggregator): drop negative Cloudflare export metrics",Closes #4942) is present only on branchqueue/8048-4942-cf-negative-used;git merge-base --is-ancestor 59c03cad6 origin/mainfails — it is NOT in main. - PR main-broken: developing-today/code nix ci @421250e — basic: proxy port fallbacks #5256 from that branch is CLOSED with
mergedAt: null(never merged), yet issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 was closed at 2026-11-03T22:57Z.test/cloudflare-export.test.tson main has no negative-used regression test.
Why it matters
A broken/negative Cloudflare export measurement is stamped onto the live card as measured API data with a negative percent, instead of keeping the metric's prose/null fallback — the exact harm #4942 described. The closure of #4942 also makes the fleet believe this is handled, so nobody re-checks it.
Acceptance criteria
- Land the negative-metric guard in
applyCloudflareExport(the stranded commit59c03cad6onqueue/8048-4942-cf-negative-usedcan be cherry-picked, or the one-filter change re-implemented): metrics withused < 0are dropped from the overlay, matchingapplySupabaseExport. - The regression test from that commit (negative
workers-requestskeeps its fallback while a valid metric in the same doc still overlays) is present intest/cloudflare-export.test.tsand passes. - Re-run the probe above against the fixed tree:
workers-requestskeeps its prose/null used value and noLive vianote;kv-readsstill overlays. - Cross-link pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 and PR main-broken: developing-today/code nix ci @421250e — basic: proxy port fallbacks #5256 in the fixing PR so the lost-fix path is traceable.
Metadata
Metadata
Assignees
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/duplicateDuplicate of another issueDuplicate of another issuepriority/lowNice to have; do when convenientNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobstatus/duplicateAlready tracked elsewhereAlready tracked elsewheretask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
dezren39 commentedon Nov 4, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 4, 2026
🤖 Agent note · done (duplicate)
dezren39 commentedon Nov 4, 2026
🤖 Agent note · picked up
dezren39 commentedon Nov 4, 2026
🤖 Agent note · done
m.used >= 0in applyCloudflareExport) and issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 closed by the merge. Packet defects corrected on the way: the stranded PR was fix(pm-stack/aggregator): drop negative Cloudflare export metrics (#4942) #4976, not main-broken: developing-today/code nix ci @421250e — basic: proxy port fallbacks #5256, and pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 was open, not closed.