feat(cow-venue): dry-run flag on the orderbook adapter - #667
Open
mfw78 wants to merge 1 commit into
Open
Conversation
A dry-run adapter suppresses order posts and status reads while keeping every local gate: bodies still assemble and validate, the signed path records a synthetic acceptance under the locally derived orderUid, the pre-sign path returns the live-shaped RequiresSigning with locally derived calldata, and each suppression is logged with the would-be orderUid through a stderr-backed tracing sink. The flag defaults off and is present in every adapter manifest. Closes #664
mfw78
marked this pull request as ready for review
August 4, 2026 02:23
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
Adds
dry-runto the cow-venue adapter[config](strict"true"/"false", default off, present as an explicitdry-run = "false"inmodule.toml,module.sepolia.toml, andmodule.load.toml).In
crates/cow-venue/src/adapter.rs,submit_withassembles and validates the order exactly as live (InvalidBodyrefusals still refuse) and suppresses only the POST: the signed path returnsSubmitOutcome::Acceptedwith the locally derived orderUid, and the pre-sign path returns the live-shapedRequiresSigningwithsetPreSignaturecalldata derived from that uid, so the keeper journal disposition (commit vs release plus unsigned report) matches production on both flows.status_withshort-circuits toOpenunder the flag, so synthetic receipts never drive orderbook reads. Each suppressed post logs the would-be orderUid:CowAdapter::initinstalls a stderr-backed tracing sink, since the venue world has no logging capability and guest stderr is the channel the supervisor captures and tags. Quotes still go live, and the manifest comment says so.Why
Closes #664: shadow soak against mainnet must exercise the true path, poll through verdict through journal reserve and commit, with zero external effects. Journal rows identical in shape to live mode validate dedup and expiry behaviour on real traffic before real orders are at stake. The manifest comment records the operational caveat that a committed dry-run marker suppresses the same body's later live submit, so leaving dry-run needs a fresh journal store. The shadow-soak evidence run for #65 is an ops action that follows separately.
Testing
Gates (all via
nix develop -c, from the worktree, package-scoped per the train's light-CI rule):cargo fmt --check -p cow-venue: clean.cargo clippy -p cow-venue --all-targets --features adapter: clean.cargo nextest run -p cow-venue --features cow-venue/adapter: 73 passed, 1 skipped (was 68; new: strict parse with default-off, dry-run signed submit asserting zero HTTP requests plus the local uid plus the captured log line, dry-run pre-sign asserting zero requests andRequiresSigning, dry-run refusal of a body the live path rejects, dry-run status reportingOpenwithout polling).cargo nextest run -p cow-venue(bare): 16 passed.AI Assistance: Claude Fable used for the implementation and repair via a structured workflow; Claude Opus used for the red-team review (17 findings deduplicated to 9, all fixed after verification, including the venue world's structural inability to log via the host facade and the pre-sign journal-disposition mismatch).