Skip to content

cow: adopt the Journal guard in the composable-cow keeper submit#631

Merged
mfw78 merged 1 commit into
dev/m1from
cow/609-adopt-guard
Jul 26, 2026
Merged

cow: adopt the Journal guard in the composable-cow keeper submit#631
mfw78 merged 1 commit into
dev/m1from
cow/609-adopt-guard

Conversation

@mfw78

@mfw78 mfw78 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What

Rewire composable-cow's submit_ready onto Journal::guard (#629): the six inline journal.mark/reserve/commit/release calls that carry the #572 reserve-before-effect ordering collapse into one guard call, with the venue outcome mapped to a Disposition (Accepted commits, requires-signing and known refusals release, an unknown outcome retains for reconcile). The Pending path stays outside via poll_once.

Why

This is the reference adoption of the durable-effect guard against the real keeper, and it validates the primitive: behaviour is identical, all 23 composable-cow run tests including w1/w2/w3 and anti_572 pass unchanged.

Honest scope: the diff is net +1 line, not a shrink. The guard absorbs the generic durable-effect ordering; the rest of submit_ready (intent build, the outcome-to-disposition mapping, the refusal clear, the retry ledger, tracing) is CoW-specific and irreducible. The value is that the exactly-once ordering is no longer inlined, so a second venue's keeper reuses it rather than re-deriving the #572-prone dance, not that this keeper got materially smaller.

Testing

nix develop --command just ci green (fmt, clippy -D warnings, doc, module wasms, full workspace test suite incl. the 23 composable-cow run tests under --all-features); just check-venue-agnostic and just check-cow-orderbook-only PASS. The four #572 reconcile tests were run by name and pass.

AI Assistance

Implemented with Claude Code.

Part of #609. Rebased onto dev/m1 now that #629 (the Journal::guard combinator) is merged; the diff is composable-cow only.

@mfw78
mfw78 force-pushed the cow/609-adopt-guard branch from d32567c to 8a87bb8 Compare July 25, 2026 12:36
Rewire submit_ready onto Journal::guard: the six inline journal.mark/reserve/commit/release calls that carry the #572 reserve-before-effect ordering fold into one guard call, with the venue outcome mapped to a Disposition (Accepted commits, requires-signing and known refusals release, an unknown outcome retains for reconcile). Behaviour is identical: all 23 composable-cow run tests including w1/w2/w3 and anti_572 pass unchanged. The remaining code is the CoW-specific outcome handling (refusal clear, retry ledger, tracing) that no primitive absorbs; the value is that the durable-effect ordering is no longer inlined, so a second venue's keeper reuses it rather than re-deriving it.

Part of #609. Stacks on the Journal::guard combinator (#629).
@mfw78
mfw78 force-pushed the cow/609-adopt-guard branch from 8a87bb8 to 8e67ebb Compare July 25, 2026 12:42
@mfw78
mfw78 merged commit e86a3d8 into dev/m1 Jul 26, 2026
7 checks passed
@mfw78
mfw78 deleted the cow/609-adopt-guard branch July 26, 2026 05:04
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