docs(cli): document wallet-free conditional calls#76
Conversation
GPT review — changes requestedReviewed head [P2] The call-flow diagram classifies every initial 2xx response as free. With an authenticated session, the CLI sends the bearer token on the initial request. A paid route can consume bonus credits and return 2xx immediately with Please change the branch to say that an initial 2xx is returned directly and must be classified by The wallet-free |
With an authenticated session, bonus credits can cover a paid route's first request, so a direct 2xx is free OR credit — the flow diagram and all three guides now say to read h402.paidBy, and the docs regression rejects the 2xx-equals-free phrasing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review follow-upAddressed the GPT finding in commit The call-flow diagram branch now reads Verification: |
…e-calls Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Final reviewVerdict: REJECT — open-PR batch integration blocker Reviewed head The updated call-flow wording correctly classifies an initial 2xx through However, this open-PR batch should apply #75 first. Merging this PR after reviewed #75 reproduces conflicts in:
Choosing either side would drop accepted documentation behavior or regression coverage. Please update this branch after #75 lands (or merge #75 into it now), combine both sets of guidance, preserve both test blocks, and rerun the focused call/help/docs tests plus typecheck/lint/build on the combined tree. Verification performed:
No additional wallet-free call contract blocker was found at this head; batch integration is the blocking issue. |
Review triageThe original A local merge-tree simulation confirms that #75 and this PR both touch Marking this PR No source change was made during this triage. |
Summary
h402 call ai/newsexample and distinguish wallet creation from optional bonus-credit authenticationledgerEntryId,paymentTransaction, andsignedAmountconditionsValidation
A clean-HOME staging
h402 call ai/newscompleted withh402.paidBy: "free"and noledgerEntryId. It did not resolve a wallet, sign a payment, spend funds, or call production.Verification
npm run test -w @h402/cli -- tests/cli-help.test.ts tests/docs.test.ts tests/call-free-route.test.tsh402 --help,h402 call --help,h402 wallet create --help, andh402 auth --helpgit diff --checknpm run typechecknpm run lintnpm testnpm run buildnpm run verify:packnpm run smoke:packCloses #70