Repository navigation
fix(harness): apply an edited max_turns, require everything=true to drop every scenario, and import fi.simulate on the callback adapter's main thread - #128
Merged
Conversation
KarthikAvinashFI
marked this pull request as ready for review
October 9, 2026 04:42
hadarishav
approved these changes
Oct 13, 2026
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.
Part of TH-8142.
Why
max_turnswas accepted by the platform editor but chat runs ignored it, because only background noise and persona fields were overlaid onto the scenario a run plays.drop_scenario('*')and replace a whole suite with what came after it.Plugins must be registered on the main thread: the callback adapter importedfi.simulateon a request thread, and with livekit installed that import registers plugins, which livekit allows only on the main thread. Voice agents do not use this adapter.What changed
max_turnsis now one of the editable fields applied to the scenario a run plays.everything=true; without it the tool refuses and says so. After an explicit drop-all, the tool says the emptied suite is not saved until a scenario is submitted, and the write-scenarios skill text matches.fi.simulateat module level, so it runs on the main thread at process start.Tests
tests/harness/test_scenario_edits.py: an editedmax_turnsreaches the scenario.max_turns8 and edited to 3, the chat runner's scenario reads 3 on this branch and 8 ondev.tests/test_harness.py: drop-all is refused withouteverything=trueand accepted with it.tests/harness/test_callback_http_adapter.py: runs the adapter as a bundle does and sends one request; fails before the fix when livekit is installed, passes after.tests/harness+tests/test_harness.py: the same failures as ondev(database-backed and prompt-budget tests), nothing new.