Skip to content

venue: type the venue-error surface with invalid-receipt and receipt-mismatch - #597

Merged
mfw78 merged 1 commit into
dev/m1from
cow/591-typed-venue-error
Jul 25, 2026
Merged

venue: type the venue-error surface with invalid-receipt and receipt-mismatch#597
mfw78 merged 1 commit into
dev/m1from
cow/591-typed-venue-error

Conversation

@mfw78

@mfw78 mfw78 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What

Give the venue-error WIT surface two additive, venue-neutral variants for the representable adapter-detected conditions that #589 and #590 had shoved into invalid-body strings: invalid-receipt (an empty or structurally-invalid receipt) and receipt-mismatch (a venue-returned identifier that disagrees with the locally derived one). Both are threaded through the bindgen VenueError, the owned VenueFault mirror, the faults.rs conversions and the host-side display, and the adapter call sites (#590 empty-receipt guard, #589 uid-drift refusal, plus the 56-byte-uid parse) move off invalid-body onto them. invalid-body and denied stay as the escape hatch for custom or unrepresentable errors.

Why

A caller could not branch on these conditions without parsing a message. They are venue-neutral and finite, so they deserve typed variants; the open-ended venue-reported cases keep the stringly escape hatch. This is the sanctioned additive edit to the frozen videre:types venue-error (no version bump, kept extensible per nullislabs/videre-nexum-module#22), landed in the monorepo before the carve so it is a cheap in-tree fold rather than a post-cleave cross-repo ripple.

Testing

Full battery on the pinned 1.94 toolchain, all green:

  • nix develop --command just ci (fmt, clippy -D warnings, doc, module wasms incl. the cow-venue adapter, cargo test --workspace --all-features)
  • nix develop --command just check-venue-agnostic
  • nix develop --command just check-cow-orderbook-only

AI Assistance

Implemented with Claude Code.

Closes #591

…mismatch

The venue-error WIT variant gains two additive, venue-neutral cases for the representable adapter-detected conditions that #589 and #590 had shoved into invalid-body strings: invalid-receipt for an empty or structurally-invalid receipt, and receipt-mismatch for a venue-returned identifier that disagrees with the locally derived one. Both are threaded through the bindgen VenueError, the owned VenueFault mirror and the faults.rs conversions, and the two adapter call sites move off invalid-body onto them so a caller can branch without parsing a message. invalid-body and denied stay as the escape hatch for custom or unrepresentable errors.

The change is a purely additive edit to videre:types with no version bump, kept extensible per the pre-cleave freeze policy, so it lands cheaply in the monorepo before the carve.

Closes #591
@mfw78
mfw78 merged commit 2e5aef5 into dev/m1 Jul 25, 2026
7 checks passed
@mfw78
mfw78 deleted the cow/591-typed-venue-error branch July 25, 2026 06:06
mfw78 added a commit that referenced this pull request Jul 27, 2026
…mismatch (#597)

The venue-error WIT variant gains two additive, venue-neutral cases for the representable adapter-detected conditions that #589 and #590 had shoved into invalid-body strings: invalid-receipt for an empty or structurally-invalid receipt, and receipt-mismatch for a venue-returned identifier that disagrees with the locally derived one. Both are threaded through the bindgen VenueError, the owned VenueFault mirror and the faults.rs conversions, and the two adapter call sites move off invalid-body onto them so a caller can branch without parsing a message. invalid-body and denied stay as the escape hatch for custom or unrepresentable errors.

The change is a purely additive edit to videre:types with no version bump, kept extensible per the pre-cleave freeze policy, so it lands cheaply in the monorepo before the carve.

Closes #591
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