Skip to content

fix(auction): release a sharded listing Hold when realm-core refuses it - #409

Merged
Mathih13 merged 4 commits into
mainfrom
fix/auction-release-listing-hold
Sep 3, 2026
Merged

Mathih13 merged 4 commits into
mainfrom
fix/auction-release-listing-hold

Conversation

@Mathih13

@Mathih13 Mathih13 commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

A sharded listing runs in phases. The seller Home Shard first moves the item and deposit into a Hold. The Gateway then asks Realm-core to commit the Auction. When Realm-core refused that commit, the Hold had no recovery path. Every retry replayed the same Hold and refused again, so the seller lost access to both values.

The abort path now preserves the same cross-database ordering as the successful path. realm_auction_refund_listing atomically writes the return Mail and a payload-matching operation receipt with auction_id == 0 on Realm-core. After that reducer completes, gw_auction_release_listing_hold deletes the Home-Shard Hold. Replays produce one Mail. Active-receipt lookup, listing replay, fencing, confirmation, and settlement all reject the zero-id receipt as an Auction.

The Gateway enters this path only after a Module Refusal proves that the Realm-core commit changed no state. A timeout, transport failure, or SDK failure keeps the Hold because the outcome is unknown. A failure after the refund commit also keeps the Hold, and the next attempt resumes from the same operation id.

No table or schema changed. The new Realm-core reducer binding matches the generated commit-listing binding shape, and a test pins that identity.

Review verification:

Written by Claude Fable 5.1 through Claude Code. Review fixes by GPT-5.6 through the Codex harness in T3 Code.

A sharded listing first moves the item and deposit into a source-shard
Hold, then asks realm-core to commit the Auction. When realm-core
refused the commit, nothing gave the Hold back: every retry replayed
the same Hold and refused again, and the seller lost the item and the
deposit.

The shard now has `gw_auction_release_listing_hold`. It mails the held
item and deposit back to the seller and deletes the Hold. A Hold that
already has a receipt is never released. The gateway calls it only on
a module Refusal with no realm receipt visible; a timeout or transport
failure keeps the Hold for the existing idempotent replay.

No schema change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Mathih13
Mathih13 merged commit 3d37be7 into main Sep 3, 2026
1 check passed
@Mathih13
Mathih13 deleted the fix/auction-release-listing-hold branch September 3, 2026 20:27
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