aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sessions.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-15 15:38:57 +0100
committersalmonik <salmonik@tuta.io>2026-11-15 15:38:57 +0100
commitc7afd1ea752aeff0310ac7c6b78d091ac360c760 (patch)
tree461f22fc3633ea1ea0e23ccbf330d7a55a92bea8 /tests/sessions.rs
parent0.4.1 + 0.4.2: abort integrity, stream completeness, tool-call indexing (diff)
downloadagent686-c7afd1ea752aeff0310ac7c6b78d091ac360c760.tar.gz
agent686-c7afd1ea752aeff0310ac7c6b78d091ac360c760.zip
0.4.3: kill process groups, bound bash output, keep the key out of tool env
- setsid-style process group kill on timeout and on Ctrl-C - 64 MiB RLIMIT_FSIZE so a runaway command cannot fill /tmp - OPENCODE_API_KEY removed from child environment - sessions 0600/0700, history 0600 and trimmed
Diffstat (limited to '')
-rw-r--r--tests/sessions.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/sessions.rs b/tests/sessions.rs
index 8d17fc5..b445242 100644
--- a/tests/sessions.rs
+++ b/tests/sessions.rs
@@ -35,6 +35,12 @@ fn sessions_create_list_and_replay() {
35 ) 35 )
36 .unwrap(); 36 .unwrap();
37 37
38 {
39 use std::os::unix::fs::PermissionsExt;
40 let mode = fs::metadata(alpha.path()).unwrap().permissions().mode() & 0o777;
41 assert_eq!(mode, 0o600, "sessions must not be group/world readable");
42 }
43
38 assert!(session::exists("alpha")); 44 assert!(session::exists("alpha"));
39 assert!(!session::exists("nope")); 45 assert!(!session::exists("nope"));
40 46