Skip to content

Port upstream CodexBar 0.49.4-0.49.6 - #338

Merged
Finesssee merged 3 commits into
mainfrom
port/upstream-0.49.4-0.49.6
Aug 18, 2026
Merged

Port upstream CodexBar 0.49.4-0.49.6#338
Finesssee merged 3 commits into
mainfrom
port/upstream-0.49.4-0.49.6

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Port of upstream steipete/CodexBar v0.49.4 → v0.49.6 (stacked on #337; read-only consumption of tagged sources, zero upstream contact).

Ported

Item Notes
Amp monthly renewals + 8PM NY free reset (steipete#2601) Subscription regex now accepts days?|months? (Gigawatt) and advances monthly renewals by calendar months (checked_add_months). Amp Free daily tier resets at the next 8:00 PM America/New_York boundary instead of carrying no reset. 3 new tests
LongCat token-packs summary (steipete#2670) New POST /api/pay/quota/metering/token-packs/summary is the live usage source: an ACTIVE currentLot (status case-insensitive, totalToken > 0) drives quota from totalToken/consumedToken; the legacy token-usage endpoint is fetched only when no active lot. Probe failures degrade to the legacy path. 3 new tests
OpenCode pay-as-you-go billing fallback (steipete#2504, steipete#2697) When the subscription server fails with subscription-shaped errors (parse/API — not credentials/transport), the billing server fn (c83b78a…) is tried: customer payload must carry customerID, monthlyUsage/balance are 1e8 fixed-point, monthlyLimit whole USD; a present non-null subscription preserves the original error. PAYG snapshot shows monthly spend vs configured limit (informational without a limit) + prepaid balance in the login label. JSON path plus tolerant […] payload scan. 3 new tests

Already present (verified)

Skipped (no counterpart)

Deferred (evidence)

Commands run

  • cargo fmt --all
  • cargo clippy both manifests --all-targets -- -D warnings
  • cargo test --manifest-path rust/Cargo.toml --lib1243 passed
  • cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml342 passed
  • pnpm --dir apps/desktop-tauri test257 passed
  • pnpm --dir apps/desktop-tauri run build — ok

Backend-only provider changes; no tray/settings surface changed, so no CUA proof attached (per PR template honesty: unit + fixture tests are the proof here; live-account verification of Amp/LongCat/OpenCode endpoints recommended after merge).

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Thermo-nuclear code-quality review: blocking on decomposition.

This PR takes rust/src/providers/opencode/mod.rs from roughly 713 lines to more than 1,000 by adding a self-contained billing subsystem: billing DTO, JSON/SolidStart parsing, HTTP fallback, presentation mapping, and tests.

There is already a clean structural boundary here. Please extract this into rust/src/providers/opencode/billing.rs and keep mod.rs focused on provider orchestration. This is a presumptive blocker under the project's 1k-line review bar.

@Finesssee Finesssee mentioned this pull request Aug 18, 2026
@Finesssee

Copy link
Copy Markdown
Collaborator Author

Follow-up thermo-nuclear review on head 547539fe: the prior decomposition blocker remains unchanged.

This branch takes rust/src/providers/opencode/mod.rs from 796 lines on current main to 1,108 lines. The billing DTO, JSON/SolidStart parsers, fallback HTTP request, presentation mapping, and tests remain a clean providers/opencode/billing.rs boundary.

Please extract that subsystem before merge. Still blocking.

@Finesssee
Finesssee merged commit 3c506eb into main Aug 18, 2026
1 check passed
@Finesssee
Finesssee deleted the port/upstream-0.49.4-0.49.6 branch August 18, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant