Skip to content

cow-venue: type the retry classifier boundary with OrderbookApiErrorType - #594

Merged
mfw78 merged 1 commit into
dev/m1from
cow/496-typed-classifier
Jul 25, 2026
Merged

cow-venue: type the retry classifier boundary with OrderbookApiErrorType#594
mfw78 merged 1 commit into
dev/m1from
cow/496-typed-classifier

Conversation

@mfw78

@mfw78 mfw78 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

The retry classifier boundary becomes typed. classify and is_already_submitted now take cowprotocol::OrderbookApiErrorType instead of &str, and the adapter passes api.error_kind() instead of &api.error_type. The Unknown(_) variant is handled explicitly at the call site (an unlisted wire errorType is by definition permanent, so it drops).

Why

OrderbookApiErrorType already exists (with an Unknown(String) fallback) and the crate's parity test already trusts it, but the hot path stayed stringly, so a call site could pass an arbitrary or misspelt &str with no compile-time signal. The generated table may stay string-backed internally (matched via as_str()), but nothing untyped now crosses the classifier boundary.

Testing

Full battery on the pinned 1.94 toolchain, all green:

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

AI Assistance

Implemented with Claude Code.

Closes #496

@mfw78
mfw78 merged commit fe741ae into dev/m1 Jul 25, 2026
7 checks passed
@mfw78
mfw78 deleted the cow/496-typed-classifier branch July 25, 2026 01:21
mfw78 added a commit that referenced this pull request Jul 27, 2026
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