fix: support amp subscription usage - #2438
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb5f89b324
ℹ️ 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".
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 12:37 PM ET / 16:37 UTC. ClawSweeper reviewWhat this changesThe PR parses Amp subscription-plan CLI output and presents its Other and Orb usage pools with renewal timing across the menu bar, widget, CLI, dashboard, and quota warnings while retaining Amp Free and credit-balance behavior. Merge readinessKeep this PR open for normal maintainer review. The current rebased head addresses the earlier parser, presentation, dashboard, and quota-warning review concerns, and it includes credible real-account CLI proof; the remaining decision is whether the provider-specific dashboard window kinds and subscription-only pace behavior are acceptable compatibility changes. Priority: P2 Review scores
Verification
How this fits togetherCodexBar obtains Amp account usage from CLI, API, or web strategies and normalizes it into provider usage snapshots. Those snapshots feed labels, pacing, menu and widget metrics, CLI output, dashboard JSON, notifications, and quota-low hooks. flowchart LR
A[Amp CLI usage text] --> B[Amp usage parser]
B --> C[Normalized usage snapshot]
C --> D[Provider labels and pace rules]
D --> E[Menu, widget, and CLI output]
C --> F[Dashboard JSON]
C --> G[Quota warnings and hooks]
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Merge the focused parser and presentation support after confirming dashboard consumers accept the new provider-specific window kinds; retain generic Amp Free and credit-balance behavior unchanged. Do we have a high-confidence way to reproduce the issue? Yes. The linked report provides a concrete subscription CLI line and a fake-CLI reproduction of the current parser failure, while a real Megawatt account transcript confirms the proposed branch parses the same behavior after the fix. Is this the best way to solve the issue? Yes, with a final dashboard-contract check. Parsing the only currently available text output and normalizing it as two renewal windows is the narrowest maintainable path, while preserving the existing free-tier and credit paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 02b4ba278c81. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@diegomrv, could you help close the live-proof gate by running this PR from your Amp subscription setup and posting a redacted transcript? git fetch https://github.com/tylergibbs1/CodexBar.git agent/amp-subscription-parser
git worktree add /tmp/codexbar-amp-proof FETCH_HEAD
cd /tmp/codexbar-amp-proof
swift run CodexBarCLI usage --provider amp --source cli --no-colorPlease redact the account email and exact percentages if preferred; the important evidence is that the command succeeds and shows the Megawatt plan with I addressed the compatibility concern in |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68aab85d41
ℹ️ 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".
|
Confirmed working on my Megawatt subscription. 🎉 Built your branch ( git clone --branch agent/amp-subscription-parser https://github.com/tylergibbs1/CodexBar.git
cd CodexBar
swift run CodexBarCLI usage --provider amp --source cli --no-colorOutput (email + percentages redacted): Parses cleanly now. Plan name ( For reference, same account on 0.45.2 gave: Env: macOS 26.5.1 (Apple Silicon), Swift 6.3.3, amp CLI |
|
Live subscription proof is now available from the original reporter and linked in the PR body: #2438 (comment) @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
71e20e3 to
3050ef3
Compare
|
Rebased onto current Verification:
GitGuardian is running on the rebased head. The GitHub Actions CI run is currently |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3050ef3e6c
ℹ️ 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".
|
Merged after full verification. Amp subscription plans (e.g. Megawatt) now parse: the Other and Orb pools render as monthly-reset windows with plan labels preserved across menu, CLI, widget, and dashboard; Amp Free and credit-only behavior is unchanged by tests. Exact-head CI: all nine checks green (https://github.com/steipete/CodexBar/actions/runs/30329327706, shard 0 green on rerun after infra DNS timeouts). Review + autoreview clean. Thanks @tylergibbs1! |
|
Correction: the previous comment fired while the branch was being updated — the merge was blocked by our head-verification guard and has NOT happened yet. The new head (main catch-up + the Amp label fixes) is being re-reviewed and re-verified on CI now; #2435 has been reopened until this actually lands. Apologies for the noise. |
|
Now actually merged ✅ — final head |
summary
verification
swift test --filter AmpUsageParserTests(18 passed)swift test --filter ProviderPaceCapabilityTests(2 passed)swift test --filter UsageStoreCoverageTests(33 passed)swift test --filter CLIOutputTests(10 passed)swift test --filter DashboardSnapshotBuilderTests(10 passed)make checkmake testreaches unrelated existingSpendDashboardTokenProvenanceTestsfailuresThe compatibility coverage explicitly verifies that Amp Free keeps its
Amp Freelabel and receives no monthly pace, credit-only output keeps no rate windows or subscription labels, and only subscription sentinel windows opt into monthly pace.live subscription proof
Confirmed by the original reporter on a real Megawatt subscription account in a redacted branch-built CLI transcript. The run successfully parsed both monthly usage pools, showed their renewal timing, and preserved the Megawatt plan. The reporter tested on macOS 26.5.1 with Swift 6.3.3 and the current Amp CLI.
Fixes #2435