Skip to content

Neuralwatt's balance path was wrong, and now it is not - #33

Merged
naturalmoods merged 2 commits into
mainfrom
neuralwatt-real-path
Aug 18, 2026
Merged

naturalmoods merged 2 commits into
mainfrom
neuralwatt-real-path

Conversation

@naturalmoods

Copy link
Copy Markdown
Owner

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:

amounts:
  - path: $.balance.credits_remaining_usd
    currency: USD

Its name states the currency, which settles that question too.

How it failed is the interesting part

$.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 said "the provider answered but no balance field matched" and exited 1, rather than treating a map as money or falling through to a green 0.00.

Four wrong guesses shipped from the first commit. Both designs meant to contain that held: an undocumented figure can never enter the verified total, and the mismatch was visible rather than silent.

Still undocumented, and that is the precise part

I re-checked their docs page today: it names /v1/quota and the word balance, and not one field name. 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. 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_usd and new_credits_usd beside 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 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

naturalmoods and others added 2 commits August 18, 2026 17:14
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
naturalmoods merged commit ee99140 into main Aug 18, 2026
5 checks passed
@naturalmoods
naturalmoods deleted the neuralwatt-real-path branch August 18, 2026 17:46
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