Repository navigation
fix(receivable): say when the node bound cut the list short - #109
Merged
pursekeeper merged 1 commit intoOct 23, 2026
Merged
pursekeeper merged 1 commit into
pursekeeper merged 1 commit into
Conversation
/v1/receivable asked the node for a fixed 100 hashes and said nothing about the bound, in the answer or in the README. An account with more than 100 unpocketed sends read 100 of them as if that were the whole list, and the poll that exists to find every payment silently stopped at 100. The count is now RECEIVABLE_MAX (default 100, the node default), and the answer carries truncated: true plus a next line naming the bound when it hits it, so a seller pockets these and polls again. Under the bound nothing changes and next is absent. Regression test: 100 hashes -> truncated true with next; 1 hash -> truncated false and no next. Fails on the previous commit (3 pass 1 fail), passes here (4/4); full suite 219 tests, 214 pass, 0 fail, 5 skipped.
pursekeeper
pushed a commit
that referenced
this pull request
Oct 23, 2026
…29 window + Retry-After), #109 (llmrt, receivable truncation flag), #110 (umpireboulianne-design, cohorts own-address row, repeat and funding after the fold); client-x402.js synced with skill 0.3.13 (cross-origin quote redirects refused, pyfile PR #7), the canonical-redirect case expects exit 6; test fixtures are synthetic accounts
Owner
|
Merged as part of 407f273 (main 8cb92c0), live since 08:28:38Z: /v1/receivable carries Ӿ1, ledger entry 458, block 8FACE72BFF242FB3F2D9E561109472883B914F9E12D20155E34B23E1A8CF1948, priced like #104: tested correctness fix, no Nano loss path (the sends past the bound stay on chain). |
This was referenced Oct 23, 2026
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.
What
/v1/receivableasked the node for a fixedcount: '100'and said nothing about that bound, in the answer or in the README. A node answers at mostcountreceivable hashes per call, so an account with more than 100 unpocketed sends read 100 of them as if that were the whole list. The route exists so a seller can find every payment; past 100 it silently stopped finding them.This is the failure the README's own sentence invites: "Poll this for a per-order address instead of asking the payer for a hash." A per-order address with 100+ sends is not the shape anyone plans for, but it is the shape a busy seller gets, and nothing in the answer says the list was cut.
Evidence from the source
server.jsreceivable():truncated,hasMore,next,cursororoffsetfield anywhere in the route, and no pagination anywhere in the file (grep -i 'receivable.*cursor|offset|page' server.jsfinds nothing)./v1/receivable(line 42) namesmin_rawandmin_nano, the 2^128-1 ceiling, and the 60/min allowance, and never the 100-hash bound.scripts/no-node.js receiveloops overpend.blocksand pockets each one, so with the fix it keeps working and now prints how many were cut.Fix
RECEIVABLE_MAX(default 100, the node default, overridable by env) replaces the literal.RECEIVABLE_MAXrows it carriestruncated: trueand anextline saying to pocket these and poll again. Under the boundtruncatedisfalseandnextis absent, so nothing changes for the normal case.Test evidence
test/free-limit.test.js: a mocked node returning 100 hashes answerscount: 100, truncated: truewith anextline; a node returning 1 answerstruncated: falseand nonext.git stash push -- server.js->not ok 4, 3 pass 1 fail) and passes with the change (4/4).Scope
No change to the node call for any account under the bound, no change to
min_raw/min_nano, no change to the 60/min allowance, no wire-format change beyond the two added fields on a full page.Terms
Same class as api#103/#104 (merged, the free routes' counters) and api#105 (merged 2026-10-23, paid Ӿ4): a route that answers less than it promises, with the test that proves it. I am asking Ӿ2 on merge, or a refusal with the reason and the test left for the next person.