Skip to content

feat!: absorb the gateway's breaking batch - #23

Merged
pviti merged 1 commit into
mainfrom
feature/absorb-gateway-batch
Aug 25, 2026
Merged

feat!: absorb the gateway's breaking batch#23
pviti merged 1 commit into
mainfrom
feature/absorb-gateway-batch

Conversation

@pviti

@pviti pviti commented Aug 25, 2026

Copy link
Copy Markdown
Member

Closes #21.

The error shape (gateway#252): a body is exactly code/title/detail, with status, message and Grape's error deleted rather than dual-sent — so both fallback chains had later terms that cannot arrive.

Also: SIWE binding hints (#216), escrow_stranded/escrow_returnable_at (#233), and expired in the README's status list — documented as not terminal, since release still works from it.

One spec asserted the opposite of the new behaviour (that an older gateway's aliases still surfaced). It now pins what matters instead: a body carrying only the deleted keys yields no code, because a silent "" would be branched on as a real condition.

166 examples green, rubocop clean. Group C of #21 stands, with the topics exception recorded in a comment there and already landed via #22.

🤖 Generated with Claude Code

Closes #21.

THE ERROR SHAPE (gateway #252). A body is exactly code/title/detail: `status`,
`message` and Grape's `error` were DELETED rather than dual-sent, so
`body[:code] || body[:error] || body[:status]` and its detail twin were chains whose
later terms cannot arrive. Each collapses to the one field the gateway sends; the bare
HTTP status stays as the last resort for a body with no text at all.

SIWE hints for the four binding failures split out of signer_mismatch (#216), plus
sessions_revoked. None names the server's expectation — that endpoint is
unauthenticated, so echoing the allow-list or the expected chain id would make each
hint a probe.

`escrow_stranded` / `escrow_returnable_at` on the payment (#233): the window after a
partial capture where neither void nor release can return the remaining escrow.

`expired` documented in the README status list, with the part that matters: it is NOT
terminal. Release still works from it, so code that treats it as closed leaves the
buyer's funds in escrow.

Four specs changed rather than deleted. One asserted the OPPOSITE of the new
behaviour — that an older gateway's aliases still surfaced — and now pins what
actually matters: a body carrying only the deleted keys must yield NO code, because a
silent "" would be branched on as if it were a real condition.

166 examples green, rubocop clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pviti
pviti marked this pull request as ready for review August 25, 2026 17:47
@pviti
pviti merged commit 1335972 into main Aug 25, 2026
1 check passed
@pviti
pviti deleted the feature/absorb-gateway-batch branch August 25, 2026 17:47
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.

Absorb the gateway's breaking API batch (error shape, status vocabulary, webhook topics, cursor pagination)

1 participant