Per FR1 of test_sandbox_hardening_20260619 spec, all writes must be under
<project_root>/tests/. Tests that create an AppController + call init_state()
trigger session_logger.open_session() at src/session_logger.py:85 which
writes to paths.get_logs_dir() - by default logs/ at project root, outside
tests/. This was triggered by tests/test_context_composition_decoupled.py
and surfaced in the latest batched test run.
Add a function-scoped autouse fixture in tests/conftest.py that monkeypatches
src.paths.get_logs_dir to return a per-run tests/-allowed path. Per-run
subdirectory prevents log_registry.toml collisions across test runs.
Skips test_paths.py, test_test_sandbox.py, and test_app_controller_offloading.py
which directly assert on paths.get_logs_dir() behavior or set up their own
session via tmp_session_dir (overriding get_logs_dir at the module level
breaks those tests' assertions). No production code is modified.
- src/conductor_tech_lead.py:68 (G1, commit bbb3d597): 2-arg call, no callbacks
- src/orchestrator_pm.py:86 (G2, commit 7ea802ab): 3-arg call with enable_tools
- src/multi_agent_conductor.py:591 (G3, commit bdd46299): 8-arg call with 5 callbacks
(the hardest; per-ticket error handling routes the error to comms +
pushes a 'response' event with status='error' + marks ticket.status='error')
Verified: uv run rg 'ai_client\.send\(' src/ returns 0 hits in production code
(line 8 of conductor_tech_lead.py is a docstring mention only).
Pending: 7 test files broken by these production migrations need
send_result() mocks instead of send() mocks. These are scheduled in
Phase 2.12-2.18 (added in the plan update bb3b3056).
The main_context field in Project Settings was stored but never used.
Nothing reads it to inject into AI context. System Prompt in AI Settings
already serves this purpose.
Removed:
- app_controller.py: ui_project_main_context state variable and all refs
- gui_2.py: Main Context File UI section from Projects panel
- project_manager.py: main_context from default_project()
- project.toml, manual_slop.toml, gencpp_manual_slop_template.toml: main_context entries
- self.engine was a single ConductorEngine reference that got overwritten
when multiple tracks ran concurrently, orphaning the first track's engine
- Now uses self.engines: Dict[str, ConductorEngine] keyed by track.id
- Updated _spawn_worker, kill_worker, pause_mma, resume_mma, approve_ticket,
_load_active_tickets, and _update_ticket_depends_on to use engines.get(track_id)
Fixes concurrent MMA track execution bug where only one worker ever appeared.