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 — pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them · Issue #4942 · developing-today/code

pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942

New issue
Copy link
New issue
Copy link
Closed
#4976
Closed
pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them#4942
#4976
Copy link
Assignees
dezren39
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 3, 2026
Issue body actions

pm-stack(aggregator): applyCloudflareExport accepts negative used values — the Supabase overlay refuses them

Evidence

pm-stack/aggregator/src/saas-extract.ts, applyCloudflareExport (line ~831): the export-metric filter accepts any finite used:

.filter((m) => m && typeof m.id === "string" && typeof m.used === "number" && Number.isFinite(m.used))

The sibling overlay in the same file, applySupabaseExport (lines ~941-947), explicitly drops negative measurements:

!(typeof m.used === "number" && m.used < 0) &&
!(typeof m.limit === "number" && m.limit < 0),

and the Supabase billing gate in the same function also requires billedUsd >= 0 (line ~982). The Cloudflare path has no equivalent guard, so a negative used from the file-export document is copied onto the card and its percent is derived from it (line ~843: percent: ... Math.round((live.used / m.limit) * 1000) / 10), and the card is stamped sourceClass = "api" — presented as live measured data.

Verified this run (laptop bun probe at origin/main 115fe4f)

Fresh, in-cycle Cloudflare export doc with workers-requests: used = -500 (control kv-reads: used = 1420):

workers-requests used= -500 percent= -0
kv-reads used= 1420 percent= 0
sourceClass= api

The negative measurement is stored on the service card. With a larger magnitude (e.g. used = -5,000,000 against the 10M limit) the derived percent is -50 — a negative usage percentage rendered as measured fact.

Why it matters

The export document is produced by an external collector writing a file; a buggy or drifted collector value flows straight through this overlay onto the usage card as authoritative "live" data. The Supabase overlay in the same file already encodes the house rule — negative usage/limit measurements are not measurements and are dropped, keeping the tracker prose fallback. The Cloudflare overlay is the inconsistent half of the pair.

Acceptance criteria

  • applyCloudflareExport drops export metrics with used < 0 (mirroring applySupabaseExport's filter), so the affected metric keeps its prose/null state instead of a negative measured value.
  • A regression test in pm-stack/aggregator/test/cloudflare-export.test.ts: a fresh doc carrying a negative used leaves that metric unchanged (and does not set a negative percent), while other valid metrics in the same doc still overlay.
  • Existing cloudflare-export and saas test suites pass.

Activity

Next
  1. dezren39
    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
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/lowNice to have; do when convenient
    queue/queuedHas a queued queue task
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 3, 2026
  2. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · state: filed

    • Agent: new-issue-creator job (lane B, new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b run 2026-11-03 07:50 CST
    • Found via: filed this run
    • Task: applyCloudflareExport (saas-extract.ts) accepts negative used from the Cloudflare export doc and stores it on the card with a derived negative percent, while sibling applySupabaseExport in the same file explicitly drops negative used/limit metrics. Verified by laptop bun probe at origin/main 115fe4f: used=-500 stored, percent=-0, card stamped sourceClass=api.
    • Expectation: effort s — mirror the Supabase filter (drop used<0 metrics) + regression test in cloudflare-export.test.ts; done when negative metrics keep prose fallback and suites pass.
    • Links: queue packet packet-4942-fix.json (repo-health-code-pilot)
  3. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 3, 2026
  4. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-k
    • Session / ID: task 8048
    • Found via: queue claim
    • Task: task 8048 (small_fix for issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942, drop negative used metrics in applyCloudflareExport) assigned execution_lane=opencode — handing off to the opencode claimant; I am not working it directly.
    • Expectation: claimant launches the bound opencode session and drives task 8048 to a terminal state. Fresh check: issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 is OPEN with no hard-stop labels (no held / user/owned / do-not-merge / do-not-auto-edit).
    • Links: issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942
  5. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: opencode-claimant
    • Task: repo-health-code-pilot task 8048, issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942
    • Session / ID: ses_e5e5e14fb8bffeiIS7fJHjbq5Q
    • Worker: repo-worker-code (bound worker uses this id for all queue helper verbs)
    • Route: opencode-route/workhorse, agent build
    • State: claimed task bound at launch; OpenCode worker prompt admitted.
  6. 6 remaining items

  7. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue 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 Nov 3, 2026
  8. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-k
    • Session / ID: task 8048
    • Found via: queue claim
    • Task: task 8048 for issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 (re-handoff; earlier handoff leases expired without a terminal state) assigned to execution lane opencode; handed off to the opencode claimant — this lane does not work it directly. Verified fresh: issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 OPEN, no hard-stop labels; stale queue/parked and status/parked labels replaced with queue/claimed and status/in-progress at claim.
    • Expectation: claimant launches the bound opencode session for task 8048, which drives issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 to a terminal state.
    • Links: issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942
  9. github-actions
    assigned
    dezren39
    on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-a
    • Session / ID: task 8048
    • Found via: queue claim
    • Task: small_fix for issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 assigned to the opencode execution lane; handing off to the laptop claimant, which launches the bound opencode session.
    • Expectation: done = issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 resolved/triaged per its acceptance criteria by the bound session.
    • Links: n/a yet
  11. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-d
    • Session / ID: task 8048
    • Found via: queue claim
    • Task: Fix issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 (drop negative used metrics in applyCloudflareExport) — execution lane assigned opencode; handed off to the laptop claimant (opencode-claimant), which launches the bound opencode session to drive task 8048 to its terminal state.
    • Revalidated this claim (fresh, 2026-11-04T00:47Z): issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 OPEN, no hard-stop labels; claim labels already in sync.
  12. dezren39
    closed this as completedin 59c03caon Nov 4, 2026
  13. dezren39
    added a commit that references this issue on Nov 4, 2026

    Merge pull request #4976 from developing-today/queue/8048-4942-cf-neg…

    ef55926
  14. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Task / lane: 8048 / 335a5d1f-bfc1-4831-99ea-850c8939a727
    • Revalidation: issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 is CLOSED; bound PR fix(pm-stack/aggregator): drop negative Cloudflare export metrics (#4942) #4976 is MERGED at ef55926. No implementation was needed on this claim.
  15. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
  16. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Task: 8048 completed as already_done.
    • Evidence: issue pm-stack(aggregator): applyCloudflareExport accepts negative used values — Supabase overlay refuses them #4942 is CLOSED; PR fix(pm-stack/aggregator): drop negative Cloudflare export metrics (#4942) #4976 is MERGED (CodeRabbit CI passed), merge SHA ef55926de2c3481591ad69c6a576bd504a792204.
    • Bookkeeping: sandbox backlog and sweep log deferred to fleet reconciliation.
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/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/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

    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.