Repository navigation
proof(repro): #4674 fails without ACP unknown-usage enrichment (expected red) - #12
Open
LeoLin990405 wants to merge 3 commits into
Open
LeoLin990405 wants to merge 3 commits into
LeoLin990405 wants to merge 3 commits into
Conversation
The ACP `_x.ai/billing` credits payload can describe an active weekly period and a prepaid balance while omitting `creditUsagePercent` right after a period rollover. `GrokRPCClient.fetchBilling()` accepted that wallet-only snapshot, so `GrokStatusProbe.fetch()` treated billing as successful and the auto pipeline never reached the steipete#3261 web fallback; `toUsageSnapshot()` then had no primary window for the rest of the week. Reuse the existing bounded, same-account usage enrichment for ACP credits whose percentage is unknown: ask the grok.com bearer surface with the same auth-file token under the six-second budget and adopt only a wire-published percentage or a parser-validated implicit zero for an active period. The ACP period, plan, and prepaid balance stay authoritative, a failed or slow enrichment keeps the already-valid wallet-only billing, and missing or expired tokens never reach the network. Adds synthetic ACP regression coverage for the zero-usage week, enrichment unknown/failure/cancellation/timeout paths, credential guards, published-percent no-retry behavior, and unknown-usage preservation. Updates docs/grok.md and the 0.79.1 changelog. Refs steipete#4674
`CredentialsMode` is a parameter of an internal `@Test(arguments:)` entry point, so declaring the nested enum private fails the macOS test-target compile: "method must be declared private because its parameter uses a private type". Nesting it in the internal suite already keeps it test-target-local. Refs steipete#4674
…nt wiring Proof-only variant: keeps the fix commit's seam, helpers, tests, docs, and changelog (plus the test access-level fix), but removes the production call in `GrokStatusProbe.fetch()` that enriches ACP credits whose usage percentage is unknown. The focused `GrokACPUnknownUsageTests` regression is expected to fail on this tree, demonstrating that it is a failing-before-fix test. Refs steipete#4674 Do not merge.
LeoLin990405
force-pushed
the
proof/grok-4674-fix-reverted
branch
from
October 21, 2026 05:12
565a7f0 to
179adfe
Compare
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.
Fork-only proof for steipete#4679. Same head tree as the fix commit (928ffca), with only the ACP unknown-usage enrichment call in
GrokStatusProbe.fetch()reverted; seam, helpers, tests, docs, and changelog are unchanged. Expected:GrokACPUnknownUsageTestsfails (weekly ACP period with omitted percentage yields no primary window), demonstrating the regression test is failing-before-fix. Do not merge.