Private
Public Access
fix(test_sandbox): redirect session logs to tests/artifacts via autouse fixture
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.
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
view_presets = []
|
||||
|
||||
[project]
|
||||
name = "project"
|
||||
git_dir = ""
|
||||
system_prompt = ""
|
||||
execution_mode = "native"
|
||||
word_wrap = true
|
||||
auto_scroll_comms = true
|
||||
auto_scroll_tool_calls = true
|
||||
|
||||
[output]
|
||||
output_dir = "./md_gen"
|
||||
@@ -52,8 +57,47 @@ set_file_slice = false
|
||||
py_update_definition = false
|
||||
py_set_signature = false
|
||||
py_set_var_declaration = false
|
||||
edit_file = true
|
||||
py_remove_def = true
|
||||
py_add_def = true
|
||||
py_move_def = true
|
||||
py_region_wrap = true
|
||||
ts_c_get_skeleton = true
|
||||
ts_cpp_get_skeleton = true
|
||||
ts_c_get_code_outline = true
|
||||
ts_cpp_get_code_outline = true
|
||||
ts_c_get_definition = true
|
||||
ts_cpp_get_definition = true
|
||||
ts_c_get_signature = true
|
||||
ts_cpp_get_signature = true
|
||||
ts_c_update_definition = true
|
||||
ts_cpp_update_definition = true
|
||||
derive_code_path = true
|
||||
bd_create = true
|
||||
bd_update = true
|
||||
bd_list = true
|
||||
bd_ready = true
|
||||
|
||||
[mma]
|
||||
epic = ""
|
||||
active_track_id = ""
|
||||
tracks = []
|
||||
|
||||
[mma.tier_models."Tier 1"]
|
||||
model = "gemini-3.1-pro-preview"
|
||||
provider = "gemini"
|
||||
|
||||
[mma.tier_models."Tier 2"]
|
||||
model = "gemini-3-flash-preview"
|
||||
provider = "gemini"
|
||||
|
||||
[mma.tier_models."Tier 3"]
|
||||
model = "gemini-2.5-flash-lite"
|
||||
provider = "gemini"
|
||||
|
||||
[mma.tier_models."Tier 4"]
|
||||
model = "gemini-2.5-flash-lite"
|
||||
provider = "gemini"
|
||||
|
||||
[conductor]
|
||||
dir = "conductor"
|
||||
|
||||
Reference in New Issue
Block a user