Skip to content

keeper: sweep-driven reconcile for stranded submit reservations - #586

Merged
mfw78 merged 1 commit into
dev/m1from
sdk/573-sweep-reserve-reconcile
Jul 24, 2026
Merged

keeper: sweep-driven reconcile for stranded submit reservations#586
mfw78 merged 1 commit into
dev/m1from
sdk/573-sweep-reserve-reconcile

Conversation

@mfw78

@mfw78 mfw78 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

Adds sweep-driven reconcile for stranded submit reservations to the keeper: a new reconcile entry point walks Journal::pending, resolves each RESERVED-but-not-COMMITTED marker against the venue idempotency-key contract, and commits or releases based on the answer. Exposes a ReconcileReport and DEFAULT_RECONCILE_BUDGET, and re-exports pending() as an operator enumerate surface for poisoned or quarantined modules.

Why

A reserve marker left by an accepted-but-commit-faulted submit is indistinguishable, without asking the venue, from one left by a crash or deadline-cancel mid-submit. Skipping it silently drops an order with no venue backstop; blindly resubmitting risks a duplicate. Neither is safe without a venue round-trip, so resolution belongs in the sweep, keyed on the reservation, not in a post-submit release call that no crash, trap, or OutOfFuel path ever reaches.

Testing

cargo fmt --all -- --check; cargo clippy --workspace --all-targets --all-features --locked -D warnings; cargo build --release --target wasm32-wasip2 --locked for all 16 guest modules plus a separate cow-venue adapter build (17 wasm artifacts, matching the expected count); cargo nextest run --workspace --all-features --no-fail-fast --locked; cargo test --doc --workspace --all-features --locked; RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked; scripts/check-venue-agnostic.sh; scripts/check-cow-orderbook-only.sh. All green, no stale-symbol matches.

AI Assistance

Implemented with Claude Code.

Closes #573

@mfw78
mfw78 merged commit 605361a into dev/m1 Jul 24, 2026
7 checks passed
@mfw78
mfw78 deleted the sdk/573-sweep-reserve-reconcile branch July 24, 2026 12:45
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