Skip to content

C4 shared formatter: long-horizon ranges lose week information (weekday-only calendar form) #13536

Open

Description

@dezren39

Found by Codex review on PR #13529 (the duplicate of the #13408 landing, PR #13530): the shared §4 formatter (renderPredictionRange in pm-stack/aggregator/src/quota-downtime.ts) loses week information in long-horizon ranges.

The formatter selects the calendar form whenever earliest/latest fall on different Chicago days, and its dayparts name only the weekday ("Tuesday afternoon"). That is unambiguous for the downtime kind's short windows, but arrival predictions (C4.4, quota-arrival.ts) routinely span weeks. Codex's example: a vendor cadence anchored and issued at 2026-09-01T17:00:00Z with a 28-day period and 7-day spread predicts Sep 22 → Oct 6, and the stored rendered is now between Tuesday afternoon and Tuesday afternoon — where the pre-unification arrival renderer emitted an unambiguous days-from-now string (21–35 days). Both arrival bases are affected; the stored string is what the scorer and the C6 pages show, so the ambiguity is user-visible and permanent for those records.

This is a property of the shared formatter, not of the arrival adoption itself: #13408 prescribed the unification (landed as PR #13530, methodology c4-meth:2). The fix belongs in the one formatter so every kind benefits — candidate shapes for the design owner (#9572): prefer a days form when the span exceeds a week, add week context to the calendar form for far bounds, or name the month/day for bounds more than N days out. Any change to stored renderings is methodology-visible (§6 log entry + version bump, per the #13408 precedent).

Filed by Lane AU6 from the Codex P2 finding on PR #13529; the landed implementation is PR #13530 (merge 074d39603ac7).

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions