Step13 conversation observability#15
Merged
Merged
Conversation
The _build_controller_with_constitution fixture was assigning overlay_policy.is_overlay_sensitive and controller.is_overlay_sensitive directly via module attribute assignment (without monkeypatch). This made the patches LEAK across tests: after TestLedgerPostureSymmetry ran, the global is_overlay_sensitive function retained the last test's lambda for the rest of the pytest session. This corrupted 5 tests in test_orchestrator.py that depend on the real is_overlay_sensitive returning False for non-sensitive domains: - TestOrchestratorFastPath::test_fast_path_low_risk - TestOrchestratorFastPath::test_fast_path_no_critic - TestIntegration::test_full_flow_benign_request - TestControllerRouteDispatching::test_dispatch_to_route_benign - TestControllerRouteDispatching::test_dispatch_to_route_fast_path These tests passed when test_orchestrator.py was run in isolation but failed in the full suite. The 5 failures were not regressions in production code — production was fine — but pure test isolation bugs. Fix: switch the fixture to take a monkeypatch parameter and use monkeypatch.setattr, which pytest auto-restores at test teardown. The four test methods that call the fixture now accept monkeypatch and forward it to the fixture. The fifth test in the file (TestActiveOverlayFieldNotRelied) already used monkeypatch correctly — no change there. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
No description provided.