GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(pm-aggregator): C4.2 reset-duration prediction records (#13258 builder slice) by dezren39 · Pull Request #13352 · developing-today/code Conversation
|
|
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 50 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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 2741f3cb14
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (!Number.isFinite(o.resetsAt)) { | ||
| // A reading that reports no reset still observes the open | ||
| // period; it delimits nothing. | ||
| if (current !== null) current.lastTs = o.ts; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Avoid extending reset periods with post-reset null readings
When resetsAt disappears across a rollover, null readings after the old published reset unconditionally advance current.lastTs. When the next reset is eventually published, the midpoint calculation treats that publication delay as positive reset jitter, shifting subsequent reopening predictions late even if resets occurred exactly on schedule. The referenced accuracy harness handles this distinction in quota-forecast-accuracy.ts:259–267, where null readings at or beyond the prior reset start an unknown-reset period. Preserve that distinction here and avoid claiming measured jitter when the rollover cannot be bounded reliably.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
New pure module pm-stack/aggregator/src/quota-reset-duration.ts implementing the builder slice of the C4.2 reset-duration kind, per the C4 design (PR #13268, sections 1/4/7) and the prepared scope recorded on the issue by Lane WC. - ResetDurationRecord in the design's section-1 shape: kind reset_duration, subject pool+window, singular basis reset_cadence, methodology c4-meth:1, supersedes link. - Reopening range: anchored on the published resetsAt when one exists, ranged by the reset jitter observed over completed reset periods (realized resets estimated at the midpoint of the bracketing readings); with no published reset, projected one observed cadence interval past the last published reset. - earliest == latest refused: a degenerate spread widens to the observation resolution (half the median reading gap). - Honesty states with named reasons: no_basis (no snapshot history) and insufficient_history (no completed period, or the ranged reopening already in the past — stale inputs). - Rendered strings from the one shared section-4 formatter (renderPredictionRange in quota-downtime.ts), stored at issuance; ledger mirror rows under source quota-prediction. Tests: quota-reset-duration.test.ts, 13 tests — jitter-spread range construction from synthetic snapshot history, degenerate spread widening, subject selection (walled + near-wall only), both honesty states, stale-input guards, cadence projection, the section-4 duration and calendar rendering forms, and the ledger mirror.
2741f3c to
a0953e6
Compare
|
Fix-forward for the Codex P2 finding (null readings across a rollover), head now
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: a0953e6ef4
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| // Four completed periods (5h cadence), jitter +15/-15/+15/-15 | ||
| // minutes, current period published at +6h. | ||
| const JITTERED = history([-20, -15, -10, -5, 6], [15, -15, 15, -15], -22, -0.5); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Add generated invariant/model coverage for cadence predictions
The added tests use only fixed histories and hand-written expectations, although the new cadence segmentation and range construction have meaningful invariants and an explicit C4 specification. This violates the testing doctrine in AGENTS.md, which requires property-based coverage for invariants and model-based tests where a specification exists; naming the oracle does not satisfy those separate requirements. Add generated reset histories checked against an independent model, including observation-order independence, strictly ordered prediction bounds, and honesty states when no completed period is available.
AGENTS.md reference: AGENTS.md:L37-L39
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.