Repository navigation
Conversation
…er (#13408) quota-arrival.ts carried its own renderPredictionRange (ms-number signature, duration and day forms only) beside the one shared §4 formatter in quota-downtime.ts that C4.1/C4.2 already use. Delete the kind-local copy and its private helpers; the arrival builder now calls the shared formatter with ISO strings at both prediction sites. Stored rendered strings for arrival ranges change accordingly — the methodology-visible change the issue requires be logged, not silent: ARRIVAL_METHODOLOGY_VERSION bumps to c4-meth:2 with a §6 entry in c4-methodology-log.jsonl scoped to the arrival kind (the downtime and reset-duration kinds already used the shared formatter and keep naming c4-meth:1). Arrival tests updated to the shared renderings: the detector_history record now pins the calendar form ("between Wednesday evening and this evening") and methodology c4-meth:2; the §4-forms block pins the shared formatter at the arrival call shape (duration form + calendar form).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0844195ab2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| latest: iso(latest), | ||
| likely: iso(anchorMs + k * cad.periodMs), | ||
| rendered: renderPredictionRange(earliest, latest, issuedMs), | ||
| rendered: renderPredictionRange(iso(earliest), iso(latest), input.issuedAt), |
There was a problem hiding this comment.
Preserve week information in long-horizon arrival ranges
For multiweek arrival predictions, the shared formatter loses which week each bound belongs to: it selects calendar form whenever the dates differ, but labels those dates using only weekdays. For example, a vendor cadence anchored and issued at 2026-09-01T17:00:00Z, with a 28-day period and 7-day spread, predicts September 22 through October 6 yet now stores between Tuesday afternoon and Tuesday afternoon instead of the previous unambiguous 21–35 days from now. This affects both arrival bases and makes their stored human-readable predictions ambiguous or apparently zero-width. Keep the shared formatter, but add a date-qualified or duration fallback for long-horizon ranges before routing arrivals through it.
Useful? React with 👍 / 👎.
|
Lane AU6 — closing this PR as superseded, per the collision resolution on #13408. Lane AU5's claim was first on the record (17:41:33Z, ~20 s before mine — both premise checks ran against the same 1-comment state), and AU5 had in fact already written the same implementation in its worktree when my collision note posted. AU5's version landed as PR #13530 (merge The Codex P2 finding on this PR (long-horizon arrival ranges render ambiguously through the shared formatter's weekday-only calendar form) applies unchanged to the landed implementation — it is a property of the shared formatter, not of either diff. Filed as a follow-up issue (see #13408 outcome note for the number) rather than fixed here, since the remedy changes the one formatter for every C4 kind and belongs to the design owner's call. |
Closes #13408.
What changed (pm-stack/aggregator, 3 files):
src/quota-arrival.ts: the kind-localrenderPredictionRange(ms-number signature, duration + day forms only) and its private helpers are deleted. The arrival builder now calls the one shared §4 formatter fromquota-downtime.ts— the same formatter C4.1 downtime and C4.2 reset-duration already use — adapting both call sites from ms numbers to ISO strings. Header §4 note updated to match.ARRIVAL_METHODOLOGY_VERSIONbumpsc4-meth:1→c4-meth:2, with a newc4-meth:2entry inc4-methodology-log.jsonlrecording the unification and the stored-string change. The entry is scoped to the arrival kind: downtime/reset-duration already rendered via the shared formatter and keep namingc4-meth:1.src/quota-arrival.test.ts: the §4-forms block now pins the shared formatter at the arrival call shape (duration form "between 4 and 6.5 hours from now"; calendar form "between tomorrow morning and Sunday afternoon"), and the detector_history record test pins the shared calendar rendering ("between Wednesday evening and this evening") plusmethodology_version: c4-meth:2.Verification (laptop worktree off main
a94634c68fd):bun test src/quota-arrival.test.ts src/quota-downtime.test.ts src/quota-reset-duration.test.ts— 49 pass / 0 fail.bun test src/quota-forecast-alerts.test.ts src/quota-anomaly.test.ts— 27 pass / 0 fail.bun x tsc --noEmit— exit 0 (afterbun installin the fresh worktree; the pre-install TS2688 was the missing-types environment, not this change).c4-methodology-log.jsonlparses as JSONL; both entries valid.Oracle: the C4 design §4 ("rendered is produced by one formatter") + §6 (methodology log), and #13357's FDR-0013 decision landed by PR #13406.
— Lane AU6 (agent-note:v1)
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.