Skip to content

Bound chain-transfer retries and validate refund addresses - #388

Merged
ctfbruce merged 16 commits into
mainfrom
fix/sui-testnet-readiness
Oct 5, 2026
Merged

ctfbruce merged 16 commits into
mainfrom
fix/sui-testnet-readiness

Conversation

@ctfbruce

@ctfbruce ctfbruce commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

An unresolved chain transfer is now resubmitted automatically only during the first hour after reservation. Afterward, reconciliation still checks its digest, preserves the reserved balance and explains when later payouts remain blocked. A retry refused before broadcast no longer treats an earlier uncertain attempt as unpaid.

USDC payment intents reject an invalid refund address before any intent or order is written. Existing orders with an unusable address instead record one failed refund and the amount still owed, without repeated chain calls. TEST behavior is unchanged. No database migration is required.

Validation: SQL binding generation; affected payments, Sui, API and database tests with race detection; vet; dispatcher build. New regressions cover the retry bound, late confirmation, retained balances, invalid-address rejection and legacy owed refunds. Live Sui testnet acceptance is in progress and is not claimed by these fixture checks.

Based on the payment changes in #383; merge after that dependency. Failed refunds continue to require operator handling. The one-hour limit is an application recovery policy, not Sui transaction expiry.

Addresses #385 and #386.

TheodorAdrienIsaak Mattli added 12 commits October 2, 2026 15:29
Add a rehearsal of the composed chain settlement path on real SQLite
through the real payment handler and the scripted chain: a paid run
credited and paid out exactly once with duplicate and mismatching
receipts recorded; a lost response resolved by a verified lookup
without a second broadcast; the dispatcher stopped after reserving a
transfer and before submitting it, resubmitting the stored bytes once
with the same digest; stopped after submitting and before recording,
resolved after restart with one transfer in total; a failed refund
never sent again while an owed one is sent once from its reserved row;
the settlement pass delivering a credit once after the inline attempt
failed, with duplicate terminal reports ignored; every drill repeated
with the database closed and reopened after each step; and disabled
mode refusing every chain action, including for leftover chain orders,
while TEST flows are unchanged. Each drill asserts the exact rows of
the payment tables and the backend call counts. No wallet, network or
chain endpoint is involved.

GitHub issue #87.
Bring the branch up to date with main after the account recovery change. The
schema policy keeps both raised minima: dispatcher 20 from the account
recovery migration and executor 7 from the operator disposition migration.
Both require the explicit stopped-service database upgrade.

GitHub issue #168.
Bring the payout and refund branch at its corrected head under the
rehearsal drills, so that they run against the lifecycle as it will
merge: the refund outcome returned to callers, bounded reconciliation
lookups and the adapter's id validation.

GitHub issue #87.
The refund of an unadmitted intent now reports what became of the
money besides its error, so the drills read that outcome: nothing
transferred when chain payments are disabled, failed after a refund
that was not broadcast, and sent once the next refund is confirmed.

GitHub issue #87.
Stop automatic resubmission after one hour while preserving uncertain
transfers and reserved balances for reconciliation. Reject invalid USDC
refund addresses before creating an intent and record unusable legacy
refunds as failed transfers whose amounts remain owed.

GitHub issues #385 and #386.
Include launcher preflight support for recoverable SQLite journals so an interrupted local dispatcher can reach daemon recovery, together with the current runtime, deployment, monitoring and SDK updates.

GitHub issues #385 and #386.
Exercise settlement rehearsals alongside the current payment lifecycle, quote pricing, allowances and operator documentation.

GitHub issue #87.
Preserve dispatcher schema 23 alongside executor schema 7 and keep the configuration guide aligned with both schema boundaries.

GitHub issue #168.
Combine retained work archiving and settlement rehearsals with validated refund addresses and bounded transfer recovery, preserving dispatcher schema 23 and executor schema 7.

GitHub issues #168, #385 and #386.
@ctfbruce
ctfbruce changed the base branch from docs/payments-operator-profile to fix/retained-work-disposition October 5, 2026 14:20
@ctfbruce
ctfbruce marked this pull request as ready for review October 5, 2026 14:20
@ctfbruce
ctfbruce marked this pull request as draft October 5, 2026 14:32
@ctfbruce
ctfbruce changed the base branch from fix/retained-work-disposition to main October 5, 2026 14:32
Ask operators to verify endpoint and payment kit properties during their deployment rehearsal while retaining the documented recovery limits.

GitHub issue #87.
@ctfbruce
ctfbruce marked this pull request as ready for review October 5, 2026 14:47
@ctfbruce
ctfbruce marked this pull request as draft October 5, 2026 14:57
TheodorAdrienIsaak Mattli added 3 commits October 5, 2026 17:19
Keep the chain settlement rehearsal with the corrected TCP and UDP two-port test fixtures.

GitHub issues #87 and #389.
Keep retained work disposition and its schema boundaries together with the corrected distinct-port test fixtures.

GitHub issues #168 and #389.
Preserve payment readiness and retained work integration while carrying the corrected TCP and UDP distinct-port fixtures.

GitHub issues #385, #386 and #389.
@ctfbruce
ctfbruce marked this pull request as ready for review October 5, 2026 15:34
@ctfbruce ctfbruce added the Ready to merge Reviewed and CI passed; merge in dependency order after required approval. label Oct 5, 2026
@ctfbruce
ctfbruce merged commit 05a535d into main Oct 5, 2026
16 of 32 checks passed
@vincent10400094
vincent10400094 deleted the fix/sui-testnet-readiness branch October 8, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge Reviewed and CI passed; merge in dependency order after required approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant