Support monthly Amp subscriptions and 8 PM EDT free tier reset - #2601
Conversation
- Parse 'resets upon renewal in N months' in addition to days - Compute subscription reset date using Calendar month addition - Set Amp Free 'resets daily' countdown to next 8:00 PM EDT - Preserve Amp Free as an extraRateWindow alongside subscription pools - Update tests for month-based renewal and 8 PM EDT reset
|
Codex review: needs real behavior proof before merge. Reviewed August 14, 2026, 3:13 AM ET / 07:13 UTC. ClawSweeper reviewWhat this changesThe PR parses Amp subscription renewals expressed in months, calculates explicit daily Amp Free resets in New York time, and shows Amp Free beside subscription usage pools. Merge readiness⛔ Blocked until stronger real behavior proof is added - 2 items remain Keep open: the latest head resolves the prior menu-presentation blocker and has no confirmed code defect, but the supplied dashboard screenshot does not prove the after-fix CLI parse or CodexBar display. Priority: P2 Review scores
Verification
How this fits togetherCodexBar obtains Amp usage from its CLI, API, or web fallback and translates the returned text into usage windows. Those windows feed the provider card and status menu that users consult for remaining quota and reset times. flowchart LR
A[Amp CLI or API output] --> B[Usage parser]
B --> C[Amp usage snapshot]
C --> D[Provider presentation]
D --> E[Provider card]
D --> F[Status menu]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Add redacted evidence from a real monthly Amp account: the relevant Do we have a high-confidence way to reproduce the issue? Yes: current main’s subscription regex accepts only day units, so a real Is this the best way to solve the issue? Yes: the head preserves day handling while adding calendar-month handling and sends the retained free-tier window through existing provider-card and status-menu seams. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 40723c8274f6. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (21 earlier review cycles; latest 8 shown)
|
…s-monthly-and-free-tier-edt-reset # Conflicts: # Sources/CodexBarCore/Providers/Amp/AmpUsageSnapshot.swift # Tests/CodexBarTests/UsageStoreCoverageTests.swift
…s-monthly-and-free-tier-edt-reset
Summary
Amp launched monthly subscriptions (Megawatt/Gigawatt) that report two independently-metered usage pools — "other usage" and "orb usage" — alongside the existing Amp Free daily tier, individual credits, and workspace balances. The
amp usageCLI now outputs renewal periods in months (e.g.resets upon renewal in 1 month), which the previous parser silently ignored.This PR:
days?|months?, and a newsubscriptionResetDate(value:unit:now:)helper computes the reset date usingCalendar.date(byAdding: .month, ...)for months.(resets daily)was actually present. Bare percentage output remains parseable but does not receive an inferred reset label or timestamp.extraRateWindowsentry so it renders as a third usage row next to "Other usage" and "Orb usage".Real behavior proof
The Amp dashboard shows that Amp Free resets daily at 8:00 PM EDT:
Changed files
Sources/CodexBarCore/Providers/Amp/AmpUsageParser.swift— month unit parsing and explicit daily-reset signal parsingSources/CodexBarCore/Providers/Amp/AmpUsageSnapshot.swift— 8 PM EDT reset andextraRateWindowsAmp Free laneTests/CodexBarTests/AmpUsageParserTests.swift— month-based subscription, explicit daily reset, and ambiguous percentage regression coverageTests/CodexBarTests/UsageStoreCoverageTests.swift— subscription menu-model coverage including the Amp Free windowTest plan
swift test --filter AmpUsageParserTests— 20 Amp parser tests passmake check— zero format/lint violationsmake test— all 794 selections pass across 67 groups