Skip to content

fix(eval): restore adapter_path after evaluate_all_stages iteration#12

Merged
sacredvoid merged 1 commit into
mainfrom
fix/eval-config-mutation
Mar 26, 2026
Merged

fix(eval): restore adapter_path after evaluate_all_stages iteration#12
sacredvoid merged 1 commit into
mainfrom
fix/eval-config-mutation

Conversation

@sacredvoid

Copy link
Copy Markdown
Owner

Summary

  • Saves and restores config.adapter_path in a try/finally block within evaluate_all_stages
  • Previously, the method left adapter_path pointing to the last adapter after the loop, causing surprising side effects

Fixes #11

Test plan

  • New test: test_evaluate_all_stages_restores_config verifies original value is preserved
  • All 149 tests pass

evaluate_all_stages mutated self.config.adapter_path during the loop,
leaving it pointing to the last adapter after completion. Now saves
and restores the original value in a try/finally block.

Fixes #11
@sacredvoid sacredvoid merged commit b4d9fcc into main Mar 26, 2026
@sacredvoid sacredvoid deleted the fix/eval-config-mutation branch March 26, 2026 00:29
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.

Bug: evaluate_all_stages mutates shared config.adapter_path during iteration

1 participant