Skip to content

pm-stack(aggregator): #4942 fix never landed — PR #5256 closed unmerged, applyCloudflareExport still accepts negative used on main #5285

Closed as duplicate

Description

@dezren39

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 — in applyCloudflareExport, the metrics filter is still finite-only:
    .filter((m) => m && typeof m.id === "string" && typeof m.used === "number" && Number.isFinite(m.used))
    The sibling applySupabaseExport in the same file drops used < 0 / limit < 0 metrics.
  • Laptop bun probe at origin/main 85c0e0b (probe test mirroring test/cloudflare-export.test.ts's freshDoc): a fresh Cloudflare export doc with workers-requests used: -500 overlays as-is — stored used = -500, derived percent = -0, note stamped Live via cloudflare-graphql-analytics, card sourceClass = "api". Control metric kv-reads used: 1420 overlays normally.
  • The fix exists but is stranded: commit 59c03cad6 ("fix(pm-stack/aggregator): drop negative Cloudflare export metrics", Closes #4942) is present only on branch queue/8048-4942-cf-negative-used; git merge-base --is-ancestor 59c03cad6 origin/main fails — 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.ts on 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

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    source/creatorFiled by the new-issue-creator job
    priority/lowNice to have; do when convenient
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 4, 2026
  2. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  3. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (duplicate)

  4. added and removed on Nov 4, 2026
  5. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  6. dezren39 commented on Nov 4, 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

No one assigned

    Labels

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)meta/duplicateDuplicate of another issuepriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus/duplicateAlready tracked elsewheretask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions