-
Notifications
You must be signed in to change notification settings - Fork 9
feat(ENG-5578): add integration tests with recorded market replay #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tvinagre
wants to merge
45
commits into
main
Choose a base branch
from
tl/ENG-5578-integration-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
bdba9b1
fix: make graph construction and SPFA relaxation deterministic
tvinagre d001d5b
chore: add .worktrees/ to gitignore for worktree isolation
tvinagre 1beda3d
feat: add RecordedUpdate and MarketRecording serialization types
tvinagre c176b02
feat: implement recording I/O with serde_json + zstd
tvinagre 6869368
fix: add doc comments and workspace-manage tempfile dev-dependency
tvinagre 3ab44ad
feat: add integration test harness with Update message replay
tvinagre 9c7a35b
fix: address code quality review findings in test harness
tvinagre b7dbeb2
feat: add record-market tool skeleton
tvinagre acdac2d
test: add solution availability and quality integration tests
tvinagre 1dc992f
test: add solve time integration tests (criterion 2)
tvinagre ecd1de9
test: add derived data integration tests (criterion 3)
tvinagre 4175f45
feat: add BLESS_GOLDEN workflow for golden output regeneration
tvinagre 5913cbd
chore: set up Git LFS for integration test fixture files
tvinagre d643ebf
ci: add integration tests to CI and nightly Tycho canary
tvinagre 4e1784b
feat: implement record-market tool and load_test_scenarios
tvinagre 10059a7
fix: recorder improvements from live Tycho testing
tvinagre 897d168
fix: resolve worker readiness race and serialization in replay pipeline
tvinagre 1381959
refactor: address review feedback on recording tool and integration t…
tvinagre e06e8b8
refactor: address second round of review feedback
tvinagre 490d7e0
refactor: replace derived data threshold tests with exact golden asse…
tvinagre 9c8b711
style: apply nightly fmt formatting
tvinagre 8c6dd60
fix: resolve rebase conflicts with main
tvinagre 362b4d1
fix: resolve rebase conflicts with origin/main
tvinagre 945d622
refactor: restructure integration test infrastructure per PR review
tvinagre 5b2b531
test: regenerate fixtures with 60s recording
tvinagre 3590c1c
fix: address PR review — top-level imports, warn on fallbacks, fix re…
tvinagre d0367e7
refactor: feature-gate from_recording, fix canary, improve test preci…
tvinagre 68fbdb6
fix: address review findings — remove duplicates, harden CI and test …
tvinagre db00f2a
revert: restore fixtures/integration/ pending decision on removal
tvinagre 0dc02a1
refactor: move MarketEvent import to feature-gated top-level
tvinagre 5c23d27
fix: remove stale fixtures/integration/ and rename golden to expected
tvinagre ccd2c40
fix: add test-fixtures and record-market stubs to Dockerfile
tvinagre 31a1be5
fix: handle EIP1559 gas price in recorder
tvinagre bbfe41c
fix: regenerate fixtures from live Tycho, widen quality threshold
tvinagre d7f02d5
fix: restore 1% quality threshold and add expected output regeneration
tvinagre 46c0019
fix: require tycho-simulation >=0.275.0 for Update serde support
tvinagre c9ce8de
Merge remote-tracking branch 'origin/main' into tl/ENG-5578-integrati…
tvinagre 8bcbbd4
test: regenerate expected outputs after merging main
tvinagre 1f15706
docs: document record-market, test fixtures, and integration tests
tvinagre 831b5e2
style: apply rustfmt and remove duplicate cfg attribute
tvinagre 295e866
fix: unify expected-output block number, clarify canary purpose
tvinagre ed9823b
Merge remote-tracking branch 'origin/main' into tl/ENG-5578-integrati…
tvinagre 78761e0
feat: make record-market and replay pipeline chain-agnostic
tvinagre 6550e8d
Merge remote-tracking branch 'origin/main' into tl/ENG-5578-integrati…
tvinagre 0920c90
fix: sync Cargo.lock with 0.78.1 workspace version bump
tvinagre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Track compressed market recordings with Git LFS to keep the repo lightweight. | ||
| # These fixtures are multi-MB zstd-compressed JSON files used by integration tests. | ||
| fynd-core/tests/fixtures/*.json.zst filter=lfs diff=lfs merge=lfs -text |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Nightly Canary | ||
|
|
||
| # Records fresh live Tycho data and regenerates expected outputs from that same | ||
| # recording before running the integration tests. The baselines are therefore | ||
| # self-referential: this canary detects Tycho data-format changes, decode | ||
| # failures, and replay-pipeline crashes — NOT solver quality regressions. | ||
| # Quality is guarded by the committed baseline in the PR-triggered | ||
| # integration_tests job in ci.yaml. | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 6 * * *' # Daily at 06:00 UTC | ||
| workflow_dispatch: # Allow manual trigger | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| RUSTFLAGS: "-D warnings" | ||
|
|
||
| jobs: | ||
| live-canary: | ||
| name: Live Tycho Canary | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Setup toolchain | ||
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1 | ||
| with: | ||
| toolchain: stable | ||
| - name: Setup Rust Cache | ||
| uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | ||
| with: | ||
| cache-on-failure: true | ||
| - name: Install latest nextest release | ||
| uses: taiki-e/install-action@2b15ad09ca0f06a76791407e35ab20f0b712d615 # nextest | ||
|
|
||
| - name: Record fresh market state | ||
| run: | | ||
| cargo run -p record-market -- \ | ||
| --tycho-url "$TYCHO_URL" \ | ||
| --rpc-url "$RPC_URL" \ | ||
| --tycho-api-key "$TYCHO_API_KEY" \ | ||
| --duration-secs 120 \ | ||
| --output-dir fynd-core/tests/fixtures | ||
| env: | ||
| TYCHO_URL: ${{ secrets.TYCHO_URL }} | ||
| RPC_URL: ${{ secrets.RPC_URL }} | ||
| TYCHO_API_KEY: ${{ secrets.TYCHO_API_KEY }} | ||
|
|
||
| - name: Run solver against live market | ||
| run: | | ||
| cargo nextest run -p fynd-core --features test-utils --test integration | ||
|
|
||
| - name: Notify on failure | ||
| if: failure() | ||
| env: | ||
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| run: | | ||
| echo "::error::Nightly canary failed — Tycho data format may have changed or the replay pipeline crashed" | ||
| if [ -z "$SLACK_WEBHOOK_URL" ]; then | ||
| echo "::warning::SLACK_WEBHOOK_URL secret not set; skipping Slack notification" | ||
| exit 0 | ||
| fi | ||
| curl -sf -X POST -H 'Content-type: application/json' \ | ||
| --data "{\"text\":\":red_circle: Nightly canary failed — Tycho data format may have changed or the replay pipeline crashed. <${RUN_URL}|View run>\"}" \ | ||
| "$SLACK_WEBHOOK_URL" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.