Skip to content

fix(integration-test): execute price level venues directly - #1639

Open
zach030 wants to merge 1 commit into
mainfrom
fix/itest-price-level-direct-venues
Open

zach030 wants to merge 1 commit into
mainfrom
fix/itest-price-level-direct-venues

Conversation

@zach030

@zach030 zach030 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Problem

PriceLevelStreamBuilder emits every venue under fallback:{pamm} by default (since 7738c60), and FallbackSwap::from_user_data requires user_data naming a fallback pool. The itest builds swaps through tycho_test::execution::encoding::create_solution, which never sets user_data, so every price level swap failed with Fallback swaps require user_data naming the fallback protocol (~1,500 WARNs per 15 minutes on Ethereum). tycho_integration_simulation_execution_*_total stayed empty for every fallback:* venue.

Change

  • price_level_stream_processor.rs: build the stream with .without_fallback_router(). Venues are served as pricelevelstream:* and execute on the venue itself through the pricelevelstream executor. A swap without its venue's oracle overrides hits the venue's freshness guard (StaleUpdate, FeedStalled for Metric) and is recorded as a stale quote; price_level_oracle_override_misses/unserved count those swaps per venue.
  • main.rs: pamm_venue reads only the pricelevelstream: family; the record_oracle_override_misses doc no longer describes a fallback-pool fill.
  • CLAUDE.md: describe the direct execution path.

Testing

  • cargo nextest run -p tycho-integration-test: 36 passed
  • cargo clippy -p tycho-integration-test --all-targets --all-features -- -D warnings: clean
  • With the same builder change applied locally against dev Tycho, Metric executed 104 swaps with oracle overrides and 0 reverts.

🤖 Generated with Claude Code

The price level stream emits venues under `fallback:{pamm}` by default,
and the fallback encoder requires `user_data` naming a fallback pool,
which the itest never sets, so every price level swap failed to encode.

Run the stream with `without_fallback_router()` so venues execute as
`pricelevelstream:*` on the venue itself. A swap missing its oracle
overrides now hits the venue's freshness guard and counts as a stale
quote, alongside the override miss/unserved counters. `pamm_venue` no
longer reads the `fallback:` family.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant