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: a future-dated gatherer read is 'fresh' forever until its date passes — quota-current freshness has no upper bound, so one skewed measuredAt pins a pool's windows for weeks · Issue #1541 · developing-today/code

aggregator: a future-dated gatherer read is 'fresh' forever until its date passes — quota-current freshness has no upper bound, so one skewed measuredAt pins a pool's windows for weeks #1541

New issue
Copy link
New issue
Copy link
Closed
#1733
Closed
aggregator: a future-dated gatherer read is 'fresh' forever until its date passes — quota-current freshness has no upper bound, so one skewed measuredAt pins a pool's windows for weeks#1541
#1733
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

aggregator: a future-dated gatherer read is 'fresh' forever until its date passes — quota-current freshness has no upper bound, so one skewed measuredAt pins a pool's windows for weeks

Summary

entryState in pm-stack/aggregator/src/quota-current.ts:56-61 decides whether
a gatherer entry may replace a pool's windows:

const t = Date.parse(entry.measuredAt);
return Number.isFinite(t) && nowMs - t <= QUOTA_CURRENT_FRESH_MS ? "ok" : "stale";

The check bounds only the past. A measuredAt in the future gives a negative
age, which is always <= QUOTA_CURRENT_FRESH_MS (20 min) — so a read stamped
an hour, a day, or a month ahead is classified "ok", replaces the pool's
windows in overlayQuotaCurrent, recomputes the pool state and the routing
choices (computeChoices), and keeps doing so on every render until 20
minutes after its future date arrives. The newest-entry sort in the overlay
(Date.parse(b.measuredAt) - Date.parse(a.measuredAt), quota-current.ts:139-141)
also makes a future-dated entry win over every genuinely fresh entry for the
same service.

Evidence (verified on main 3b55904, Bun 1.4.2, real quota-current.ts sha256 c528e1e3 on the laptop)

Probe drove the real overlayQuotaCurrent with a fixed now
(2026-10-27T07:00:00Z), one pool (weekly window at 68%), and one ok entry
carrying a 42% window:

measuredAt result
5m ago (control) state healthy, windows replaced (42), freshness ok
19m ago (control) healthy, windows replaced, freshness ok
21m ago (control) state stale, windows kept (68)
1h in the future healthy, windows replaced (42), freshness ok
30d in the future healthy, windows replaced (42), freshness ok

parseQuotaCurrent (quota-current.ts:41-52) validates only that
measuredAt is a string, so nothing upstream of entryState catches this
either. The existing tests (test/quota-current.test.ts) construct entries
only with past offsets (iso(msAgo)), so the future case is uncovered.

Why it matters

The module's own contract (header, quota-current.ts:7-19) is the dashboard's
data-honesty rule for the quota plane: a read past the freshness bound
"surfaces as the pool's state (error/stale, with the reason) — never as
zeros, and the pool's older windows are never silently presented as
current". A future stamp defeats that rule in the other direction: one
clock-skewed or mis-stamped gatherer write (the gatherer runs on a 15-minute
tick on another host) silently presents its numbers as the freshest truth
for as long as the skew lasts — a month in the verified case — and the
choices computed from those windows steer real session routing.

Acceptance criteria

  • An entry whose measuredAt is more than a small clock-skew tolerance in
    the future (tolerance pinned in triage; it should be minutes, not the
    unbounded current behaviour) is NOT classified fresh-ok: it surfaces as
    stale (or error) with the pool's older windows not replaced.
  • The fresh-ok precedence sort cannot let a future-dated entry outrank a
    genuinely fresh entry for the same service.
  • Regression tests in test/quota-current.test.ts for measuredAt at
    +1h and a far-future date, alongside the existing past-offset controls.
  • No change to the freshness bound or semantics for past-dated reads.

Notes

  • Deliberately not self-solved by the creator lane: the skew tolerance is a
    small policy choice for triage (the gatherer and aggregator run on
    different hosts, so zero tolerance could flap on real skew).
  • Sibling validator, different defect: aggregator: SnapshotStore accepts records it can never read back — non-finite estimate pairs and non-ISO timestamps pass validation, append reports success, and dedupe never sees them #1540 (snapshot store records) —
    same app, unrelated module and mechanism.

Activity

Next
  1. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-595

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (new-issue-creator-code-b)
    • Session / ID: new-issue-creator-code-b run 2026-10-27 19:38 CDT (2026-10-28T00:52Z)
    • Found via: filed this run
    • Task: Triage the quota-current freshness check: entryState bounds only past age, so a future-dated measuredAt is fresh-ok indefinitely, replaces pool windows, and outranks genuinely fresh entries in the precedence sort.
    • Expectation: effort/s — done when future-dated entries beyond a pinned skew tolerance surface as stale/error without replacing windows, with regression tests at +1h and far-future; past-offset behaviour unchanged.
    • Links: evidence probe (real overlayQuotaCurrent, quota-current.ts sha256 c528e1e3, Bun 1.4.2 on the laptop) in the goal hidden_files probe-2026-10-27-laneB-snapshots/ (probe2-quota-future.ts + out2.log); queue packet packet-1541.json (repo-health-code-pilot, triage)
  4. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 28, 2026
  6. 46 remaining items

  7. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane C shift
    • Session / ID: queue task 1811
    • Found via: queue claim (resume — laptop SSH recovered)
    • Task: Implemented the aggregator: a future-dated gatherer read is 'fresh' forever until its date passes — quota-current freshness has no upper bound, so one skewed measuredAt pins a pool's windows for weeks #1541 fix on the laptop and opened PR aggregator: future-dated quota-current entries beyond 60s skew classify stale (#1541) #1733 (queue/1811-1541-quota-future-skew @ d76bd3c): QUOTA_CURRENT_FUTURE_SKEW_MS = 60_000 in quota-current.ts entryState + 3 regression tests (+1h/+30d stale, within-tolerance fresh, same-service outranking). Laptop: quota-current tests 13/13 pass, biome clean; full aggregator suite 318 pass with only the pre-existing aggregator: actions.test.ts fails on main — applied snooze never lands in the Snoozed strip ('Snoozed by you (1)' missing) #1682 failure. PR CI checks are stuck pending in the runner queue (0 failures) past the 5-minute poll window.
    • Expectation: parked 20 min per CI rule — resume: merge PR aggregator: future-dated quota-current entries beyond 60s skew classify stale (#1541) #1733 when CI is green, then complete task 1811 as fixed_merged.
    • Links: PR aggregator: future-dated quota-current entries beyond 60s skew classify stale (#1541) #1733
  8. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Oct 28, 2026
  9. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane D
    • Session / ID: queue task 1811, Lane D shift 2026-10-28 12:14 CDT
    • Found via: queue claim (resume from parked awaiting_ci checkpoint)
    • Task: Resume PR aggregator: future-dated quota-current entries beyond 60s skew classify stale (#1541) #1733 for aggregator: a future-dated gatherer read is 'fresh' forever until its date passes — quota-current freshness has no upper bound, so one skewed measuredAt pins a pool's windows for weeks #1541 — verify CI fresh, merge if green under standing criteria, close out task.
    • Expectation: effort/s; done = PR merged (or re-parked if CI still pending) and task 1811 in a verified terminal state.
    • Links: PR aggregator: future-dated quota-current entries beyond 60s skew classify stale (#1541) #1733 · branch queue/1811-1541-quota-future-skew @ d76bd3c
  10. dezren39
    removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    status:in-review
    on Oct 28, 2026
  11. dezren39
    added a commit that references this issue on Oct 28, 2026

    aggregator: future-dated quota-current entries beyond 60s skew classi…

    7b87168
  12. dezren39
    closed this as completedin #1733on Oct 28, 2026
  13. developing-today
    added
    status:done
    on Oct 28, 2026
  14. dezren39
    removed
    status:done
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 28, 2026
  15. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), Lane D
    • Session / ID: queue task 1811, Lane D shift 2026-10-28 12:14 CDT (resume of the parked awaiting-CI task)
    • Found via: queue claim
    • Task: PR aggregator: future-dated quota-current entries beyond 60s skew classify stale (#1541) #1733 merged — QUOTA_CURRENT_FUTURE_SKEW_MS = 60_000 in entryState (pm-stack/aggregator/src/quota-current.ts): ok entries dated >60s in the future classify stale, do not replace windows, and cannot outrank genuinely fresh entries; +1h/+30d/+30s-control/same-service regression tests included.
    • Expectation: done = PR merged and issue closed — met. Merge sha 7b87168.
    • Links: PR aggregator: future-dated quota-current entries beyond 60s skew classify stale (#1541) #1733 (MERGED) · CI: nix flake evaluation + treefmt SUCCESS; laptop quota-current tests 13/13 (full suite 318 pass / 1 pre-existing aggregator: actions.test.ts fails on main — applied snooze never lands in the Snoozed strip ('Snoozed by you (1)' missing) #1682 fail, unrelated). Note: the Auto Assign workflow run remained queued (runner-queue infra) — not a code check and not a required check on main.
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)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

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.