feat(testing): add replay backed provider support for DSL runs#1581
Open
AdityaShome wants to merge 20 commits intomofa-org:mainfrom
Open
feat(testing): add replay backed provider support for DSL runs#1581AdityaShome wants to merge 20 commits intomofa-org:mainfrom
AdityaShome wants to merge 20 commits intomofa-org:mainfrom
Conversation
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.
Summary
This PR is rebased on #1566, #1558, #1556, #1555 and #1447 adds replay backed provider support for DSL test runs.
The core change is that
mofa test-dslcan now:This closes the replay part of the DSL / runner / artifact / replay loop.
Context
Previous work established:
mofa test-dslWhat was still missing was a provider path that could:
This PR adds that missing layer.
What Changed
Files Changed
Main Files
tests/src/live_llm.rsOpenAiCompatProvidertests/src/replay.rsRecordingLLMProviderReplayLLMProvidertests/src/dsl.rstests/src/agent_runner.rscrates/mofa-cli/tests/test_dsl_integration_tests.rsSupporting Files
crates/mofa-cli/Cargo.toml: Added the testing crate dependency needed for replay-backed DSL executiontests/Cargo.toml: Added dependencies required for live-provider requests and replay supporttests/src/lib.rs: Exported the new replay/live-provider pieces from the testing cratetests/tests/dsl_tests.rs: Added DSL tests covering live-provider and replay behaviortests/examples/simple_agent_tape.toml: Added a replay-only DSL case that reads a recorded tapetests/examples/simple_agent_llama_record.toml: Added a hosted llama recording example through the OpenAI-compatible pathtests/examples/record_case_gpt_oss_120b.toml: Added a GPT-OSS 120B recording example through the same pathtests/fixtures/simple_agent_recorded.tape.json: Added a recorded tape fixture used by replay flowsExecution Flow
Record a live run:
Replay a recorded run:
Screenshot
Tests
cargo test -p mofa-testing --test dsl_testscargo test -p mofa-cli --test test_dsl_integration_teststests/examples/simple_agent_tape.tomlNotes