Repository navigation
Neuralwatt's balance path was wrong, and now it is not - #33
Merged
Merged
Conversation
The manifest listed four candidate paths — $.balance_usd, $.quota.balance_usd, $.balance and $.credits_remaining. On a live account not one of them resolved. The real field is balance.credits_remaining_usd, and its name states the currency. What is worth keeping from how this failed. `$.balance` does exist in the response, but it names an *object*, and jpath.Number refuses anything that is not a number or a numeric string. So the run reported "the provider answered but no balance field matched" with exit code 1, rather than treating a map as money or falling through to a zero. Four wrong guesses shipped from the first commit, and the two designs that were supposed to contain that did: the figure could never enter the verified total, because undocumented figures never do, and the mismatch was visible instead of silent. The status stays undocumented, which is the part worth being precise about. Their documentation names /v1/quota and the word balance and not one field name — I checked the page again today. `official` means the provider documents the field, not that AIPocket managed to find it, so the reading is totalled separately even now that it works. One candidate only, deliberately. The same object carries total_credits_usd, credits_used_usd, legacy_credits_usd and new_credits_usd next to an accounting_method field, so the neighbours are not interchangeable with the remaining balance. A fallback would quietly report a different quantity if this field were renamed; a visible error is the better outcome, as this bug just demonstrated. The registry test gains neuralwatt as a case, with the field names captured from a live response and invented values, since only the shape matters. Its name and comment now say "the shape the provider actually returns" rather than "documented example", because for this one provider the shape is observation rather than documentation — which is exactly what its status records. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The path was confirmed against a live response; this is the other half, and the one CONTRIBUTING actually asks for before an inferred reading is trusted: the number was compared with what the provider's own console shows. They agreed. One wrinkle is worth recording. The portal rounds to two decimals for display where the API returns three, so the next person to check will see a difference in the last decimal and should not conclude the path names some neighbouring quantity. The table prints %.2f, so what it shows matches the portal exactly. The comparison is recorded; the figure is not. A balance written into a manifest is someone's money in a public git history, and the property being documented — that consoles round — needs no amount to state. CONTRIBUTING now says both: compare against the console and record the date, never the number. The status still does not move. Their documentation publishes no field names, so the figure remains outside the verified total; what changed is that the inferred total now has a checked number behind it for this provider rather than a guess. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
naturalmoods
force-pushed
the
neuralwatt-real-path
branch
from
August 18, 2026 17:39
167b102 to
9e9af76
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.
Second real-account check. The manifest listed four candidate paths —
$.balance_usd,$.quota.balance_usd,$.balance,$.credits_remaining— and on a live account not one resolved. The real field:Its name states the currency, which settles that question too.
How it failed is the interesting part
$.balancedoes exist in the response — but it names an object, andjpath.Numberrefuses anything that is not a number or a numeric string. So the run said "the provider answered but no balance field matched" and exited 1, rather than treating a map as money or falling through to a green0.00.Four wrong guesses shipped from the first commit. Both designs meant to contain that held: an
undocumentedfigure can never enter the verified total, and the mismatch was visible rather than silent.Still
undocumented, and that is the precise partI re-checked their docs page today: it names
/v1/quotaand the word balance, and not one field name.officialmeans the provider documents the field — not that AIPocket managed to find it. So the reading is totalled separately even now that it works. This is the distinction the whole three-totals design rests on, and it would have been easy to quietly promote it.One candidate only
The same object carries
total_credits_usd,credits_used_usd,legacy_credits_usdandnew_credits_usdbeside anaccounting_methodfield — so the neighbours are not interchangeable with the remaining balance. A fallback would quietly report a different quantity if this field were renamed. A visible error is better, as this bug just demonstrated.Test
neuralwatt joins the registry test that resolves every balance manifest against a real response shape — field names captured from a live response, values invented, because only the shape matters and nothing personal belongs in a fixture. Watched failing with one of the old guessed paths restored.
The test's name and message now say "the shape the provider actually returns" rather than "documented example": for this one provider the shape is observation, not documentation, which is what its status records.
Provider counts are unchanged (it stays
undocumented), so the README needs no edit — and this branch does not touch it, so it merges independently of #31.🤖 Generated with Claude Code