test(droid): enforce POSIX fixture permissions

This commit is contained in:
ZacharyZhang-NY committed 2026-07-21 01:41:46 -04:00
1 parent 909f3dd106
commit dce7d1288a
2 files changed
+12 -4

No files matched your search

+10 -4
View File
@@ -225,10 +225,16 @@ def test_guard_blocks_and_audit_preserves_native_payload(
guard = managed_handler(hooks, "PreToolUse", "guard.py")
audit = managed_handler(hooks, "PostToolUse", "hook.py")
assert guard is not None and audit is not None
write_json(fixture.agent_dir / "status-cache.json", {
"status": "frozen",
"cached_at": time.time(),
})
status_cache_path = fixture.agent_dir / "status-cache.json"
write_json(
status_cache_path,
{
"status": "frozen",
"cached_at": time.time(),
},
)
if os.name != "nt":
status_cache_path.chmod(0o600)
pre_payload = {
"session_id": "session-1",
"transcript_path": str(fixture.home_dir / "transcript.jsonl"),
+2
View File
@@ -229,6 +229,8 @@ def test_cli_preflight_blocks_disabled_hooks_before_runtime_creation(
VALID_PRIVATE_KEY,
encoding="utf-8",
)
if os.name != "nt":
key_path.chmod(0o600)
environment = {
**os.environ,
"HOME": str(home_dir),