cow: adopt the Journal guard in the composable-cow keeper submit#631
Merged
Conversation
mfw78
force-pushed
the
cow/609-adopt-guard
branch
from
July 25, 2026 12:36
d32567c to
8a87bb8
Compare
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
force-pushed
the
cow/609-adopt-guard
branch
from
July 25, 2026 12:42
8a87bb8 to
8e67ebb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Rewire
composable-cow'ssubmit_readyontoJournal::guard(#629): the six inlinejournal.mark/reserve/commit/releasecalls that carry the #572 reserve-before-effect ordering collapse into oneguardcall, with the venue outcome mapped to aDisposition(Accepted commits, requires-signing and known refusals release, an unknown outcome retains for reconcile). The Pending path stays outside viapoll_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-cowrun tests includingw1/w2/w3andanti_572pass 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 cigreen (fmt, clippy-D warnings, doc, module wasms, full workspace test suite incl. the 23composable-cowrun tests under--all-features);just check-venue-agnosticandjust check-cow-orderbook-onlyPASS. 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::guardcombinator) is merged; the diff is composable-cow only.