test(issue-57): the audit log follows a moved registry
New file tests/test_issue57_logs_follow_registry.py: the resolver (L1),
registry.py (L2), the wrapper's submit/wait/logs (L3), publish_event.py
(L4), control_plane.from_env, worktree_prepare, status.sh, the comment-5
disk fallback, and the invariant that an explicit DELEGATE_JOB_LOGS_DIR
still wins. Every test ends by asserting the workspace's own
.mam/delegate_job_logs was never created.
Two existing tests gain monkeypatch.delenv("MAM_JOBS_DIR"): conftest's
autouse _isolate_mam_state_dirs gives every test a MAM_JOBS_DIR, and under
the sibling rule the WORKSPACE_ROOT/cwd fallbacks they assert would
otherwise resolve next to that registry. The order they assert (explicit
root, workspace, cwd) is unchanged.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
a159a790df
commit
813cfd38d1
3 files changed
+226
No files matched your search
@@ -57,6 +57,9 @@ def test_registry_dir_falls_back_to_cwd_relative(monkeypatch, tmp_path):
|
||||
|
||||
|
||||
def test_logs_dir_follows_the_same_order(monkeypatch, tmp_path):
|
||||
# Issue #57: the audit log follows the registry; conftest's MAM_JOBS_DIR
|
||||
# would otherwise decide the fallback this test asserts.
|
||||
monkeypatch.delenv("MAM_JOBS_DIR", raising=False)
|
||||
monkeypatch.setenv("DELEGATE_JOB_LOGS_DIR", str(tmp_path / "logs"))
|
||||
monkeypatch.setenv("WORKSPACE_ROOT", str(tmp_path))
|
||||
assert mqtt_common.get_logs_dir() == str(tmp_path / "logs")
|
||||
|
||||
Reference in new issue
Block a user