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 — aggregator(snapshot-records): skip Codex used_percent outside finite [0,100] · Issue #3460 · developing-today/code

aggregator(snapshot-records): skip Codex used_percent outside finite [0,100] #3460

New issue
Copy link
New issue
Copy link
Closed
#4217
Closed
aggregator(snapshot-records): skip Codex used_percent outside finite [0,100]#3460
#4217
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientsource/queue-workerFiled or worked by the queue/worker pilottask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

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

Follow-up to #2568.

recordsFromProviderUsage in pm-stack/aggregator/src/snapshot-records.ts:296-313 checks only typeof used_percent === "number" before emitting a pct record. The append CLI filters records through isSnapshotRecord (append-usage-snapshots.ts:71), whose current guard rejects negative pct values (snapshots.ts:317-323) but accepts finite values above 100. A real-module probe on main 199d9f2e222c17826533dc3d9320aebd88aab533 confirmed: -20 is emitted but rejected by the store; 150 and 1e9 are emitted and accepted; 42 is emitted and accepted. The original #2568 report that negative values pass the current store gate is stale, but the upper-bound defect remains.

Goal

Skip an invalid Codex window rather than clamp or invent a value, while continuing to derive the session record and any other valid window.

Acceptance

  • recordsFromProviderUsage emits a Codex window only when used_percent is finite and in the inclusive range [0,100].
  • snapshot-writers.test.ts covers negative and >100 values, plus valid boundary/control values; an invalid window does not suppress the other valid window or the sessions record.
  • Existing bun test test/snapshot-writers.test.ts passes.

Scope

Writer-side recordsFromProviderUsage and its focused tests only. Do not change the general store gate, other snapshot writers, or rollup validation (#3365). No clamping.

Acceptance criteria

  • Snapshot records whose Codex used_percent is NaN, infinite, or outside [0,100] are skipped (with the existing drop accounting, if any) instead of being recorded.
  • In-range values, including exactly 0 and exactly 100, are recorded unchanged.
  • Tests cover below-range, above-range, and non-finite inputs alongside an in-range control.

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
    source/queue-workerFiled or worked by the queue/worker pilot
    priority/lowNice to have; do when convenient
    on Nov 1, 2026
  2. developing-today commented on Nov 1, 2026

    @developing-today
    developing-todayBot
    on Nov 1, 2026 – with developing.today
    Contributor
    More actions

    CODE-1325

  3. dezren39
    added
    effort/xsTrivial: expected under 30 minutes of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    status/triagedTriaged and routed (see agent note)
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  4. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · queued

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: ses_e5e698512fcffee2cHNEyF6r1J / queue task 5391
    • Found via: triage task 3819 on issue aggregator(snapshot-records): recordsFromProviderUsage never range-checks used_percent — a Codex window at -20% or 1e9% is appended as measured pct history against its own limit:100 #2568
    • Task: Add a finite [0,100] gate for Codex used_percent in recordsFromProviderUsage, with focused tests.
    • Expectation: effort/xs — invalid windows skipped independently; sessions, valid companion windows, and boundaries remain covered.
    • Links: aggregator(snapshot-records): recordsFromProviderUsage never range-checks used_percent — a Codex window at -20% or 1e9% is appended as measured pct history against its own limit:100 #2568
  5. github-actions
    assigned
    dezren39
    on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    Intake review

    Related: same drop-gate family as #2582 (shared [0,100] drop-gate pin, triage task 3837) and the charge-row gates in #3458 — worth the worker checking whether one shared guard now covers all three. No merged PR references this issue as of this run.

    Notes: the sibling triages pinned that out-of-shape rows must fail closed at the boundary rather than clamp — clamping a >100 reading to 100 would silently fabricate a full-quota signal. Risk: low.

    Suggested approach: apply the established finite-range guard at the snapshot-record boundary and mirror the sibling fix's test shape.

    🤖 Agent note · done

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-11-01T10:12Z
    • Found via: monitor reconciliation
    • Task: intake enrichment (protocol §5) — acceptance criteria appended, labels normalized, this review posted
    • Expectation: effort as labelled; done = acceptance criteria on the issue met by a fix PR
  7. dezren39
    added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 1, 2026
  8. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    Picked up: OpenChamber scheduled lane claimed queue task 5391 via atomic claim.

    • Agent: repo-worker-code
    • Session / ID: ses_e5e652821cfffeHDR1E7h0X4dt
    • Task: Validate Codex used_percent bounds in recordsFromProviderUsage and focused snapshot-writer tests.
    • Next: Revalidate issue and PR ownership before creating a worktree or editing.
  9. 3 remaining items

  10. dezren39
    added
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
  11. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    Parked: Queue task 5391 is parked for 20 minutes while PR checks run.

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • PR: fix(aggregator): validate Codex usage percentages #4217 is OPEN; its pm-aggregator tests check is still QUEUED.
    • Validation: local bun test test/snapshot-writers.test.ts passes (20 tests, 59 assertions); git diff --check passes. bun run typecheck is blocked because @types/bun is missing in this worktree.
    • Resume: After checks complete; verify PR and issue fresh, then merge only if checks pass and no ownership restriction applies.
    • Links: aggregator(snapshot-records): skip Codex used_percent outside finite [0,100] #3460 · PR fix(aggregator): validate Codex usage percentages #4217 · task 5391
  12. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 2, 2026
  13. dezren39
    closed this as completedin #4217on Nov 2, 2026
  14. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/triagedTriaged and routed (see agent note)
    on Nov 2, 2026
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/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientsource/queue-workerFiled or worked by the queue/worker pilottask/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.