Skip to content

aggregator(forecast): resampling estimator for epic ETA (design §1) — zero-median bursty buckets return no_measurable_pace #5274

Closed

Description

@dezren39

aggregator(forecast): resampling estimator for epic ETA (design §1) — zero-median bursty buckets return no_measurable_pace

Found by Codex review round 4 on PR #5236 (finding comment 4463375210), dispositioned there as a follow-up because it is an estimator redesign, not a defect fix in that PR's scope.

Problem. deriveEpicEta in pm-stack/aggregator/src/forecast.ts derives P50/P80 from the median / lower-quartile weekly pace. When the four complete primary weeks are [0, 0, 0, 4] closures and work remains, the local evidence floor passes (4 completions, 4 weeks) but the median weekly bucket is zero, so the result is no_measurable_pace with no dates despite positive measured throughput. Batch-delivery scopes (sufficient evidence, bursty weeks) get no forecast.

Contract. The forecasting design (doc/2026-11-01T21-07-00Z_design_pm-stack_forecasting/2026-11-01T21-07-00Z_design_pm-stack_forecasting.md §1, line 36) specifies: "Estimator: resample complete weekly completion buckets (including observed zero weeks) to estimate a distribution for remaining units / weekly throughput. Publish P50 and a conservative P80 completion range… If no weekly pace is measured, emit 'no measurable pace'". The current median/lower-quartile implementation is a simplification that does not implement the resampling estimator.

Acceptance criteria.

  • Deterministic (seeded) resampling over the complete weekly completion buckets, zero weeks included, estimating the distribution of weeks-to-complete for the remaining units; P50 and conservative P80 derived from that distribution.
  • [0, 0, 0, 4] with remaining work returns a forecast with finite P50 <= P80 instead of no_measurable_pace.
  • A truly zero total pace (all buckets zero) still returns no_measurable_pace with no dates.
  • Pinned tests updated with rationale where behavior changes (notably "zero lower-quartile pace: P50 present, P80 explicitly unmeasurable" in pm-stack/aggregator/test/forecast-3982.test.ts); new tests cover the bursty case and determinism (same input → same output).
  • Decide and record whether the estimator change bumps FORECAST_MODEL_VERSION (forecast/v1).
  • Full aggregator suite green (bun test in pm-stack/aggregator).

Links: PR #5236 · issue #3982 · queue task 8962

Activity

  1. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  2. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 4, 2026
  3. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  4. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 4, 2026
  5. 33 remaining items

  6. added
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/queuedHas a queued task in the Supabase agent queue
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 5, 2026
  7. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. added 2 commits that reference this issue on Nov 5, 2026
  9. dezren39 commented on Nov 5, 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

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/enhancementpriority/normalOrdinary priority (the default)task/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