menubar: linear pace on Codex quota windows — deficit/reserve, projection, run-out ETA#728
Open
avs-io wants to merge 1 commit into
Open
menubar: linear pace on Codex quota windows — deficit/reserve, projection, run-out ETA#728avs-io wants to merge 1 commit into
avs-io wants to merge 1 commit into
Conversation
avs-io
marked this pull request as ready for review
July 17, 2026 19:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of #726 (Part 2 of epic #725), as green-lit in the issue thread.
What changed
Codex Plan-tab quota windows stop passing
projection: niland get a pace caption under the bar, via the existingWindowProjection/ProjectionCaptionplumbing:QuotaPace(new, pure): whole-window linear pace from(usedPercent, resetsAt, limitWindowSeconds, now). ProducesdeltaPercent(used − expected; deficit/reserve), the linearprojectedPercentat reset, and — only when the projection overflows and the window is longer than 6h — ahitsLimitAtETA.compactcaption mode.WindowProjectiongrows two defaulted fields (deltaPercent,compact) and the existing caption path is byte-for-byte the same when they're absent.How tested
swift buildclean via local swift.org 6.3.3 toolchain.QuotaPaceTests(8 tests): on-pace midpoint, deficit-overflow ETA landing at exactly 4.375d elapsed and strictly before the reset, reserve, 5h-window ETA suppression with deficit retained, early-window silence, all skew guards, exhausted/over-100 silence, zero-usage reserve.mac/Testssuite), so CI is the XCTest gate. The identical 13 assertions were run through a standalone script under the same toolchain: 13/13 pass.Phase 2 (historical forecast + risk %) stays out of this PR per the issue's phasing; the evidence-gate validation requirement from the epic is noted for when it starts.