Parse the new Amp <plan> Subscription CLI line format - #3057
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 7:37 PM ET / 23:37 UTC. ClawSweeper reviewWhat this changesThe PR extends Amp CLI usage parsing to recognize Regression provenancePossible regression — probable (failure trace; reviewed change). No predecessor PR is attributed. Merge readinessKeep this maintainer-authored PR open for normal merge review. The checked-out parser accepts both the current and legacy Amp subscription lines, and focused tests cover the reported output with no correctness finding; the remaining build/test jobs should complete before landing. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherCodexBar’s Amp provider runs the signed-in Amp CLI and parses its text into a usage snapshot. That snapshot supplies the CLI and menu-bar usage lanes, plan identity, reset date, and credits detail row. flowchart LR
A[Amp CLI output] --> B[Amp CLI probe]
B --> C[Amp usage parser]
C --> D[Subscription format match]
D --> E[Usage snapshot]
E --> F[CLI and menu-bar views]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the narrow dual-format parser after the current checks pass, preserving the legacy grammar until Amp’s CLI contract is stable. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible. The supplied current Amp CLI transcript is encoded as an exact parser test, and the PR patch shows the prior grammar only accepted the legacy prefix; this read-only review did not execute tests. Is this the best way to solve the issue? Yes. Matching the two known prefixes through one shared suffix is the narrowest compatibility-preserving repair and keeps the established legacy path covered. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8637c5d65b9a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Summary
Fixes #3050. Amp CLI 0.0.1786838506 changed its signed-in usage line from
Subscription <plan>: ...toAmp <plan> Subscription: ..., so the CLI source parsed "successfully" but dropped the monthly Other/Orb usage windows —codexbar usage --provider amp --source clireturnedprimary: null/secondary: nullwith only the Credits detail row.The parser now accepts both line shapes, keeps plan extraction (
Megawatt), preserves the existing monthly-reset representation forin 1 month, and leaves Individual credits as a details row.Test plan
make checkclean