revert: remove Docker workarounds now that container is fixed

Reverts workarounds added by the 361 agent when the hardened Docker
container broke the test suite:

- gates.rs: restore tempfile::tempdir() (was changed to tempdir_in
  CARGO_MANIFEST_DIR to avoid noexec /tmp; noexec is now removed)
- pool/mod.rs: restore ps -p <pid> check in process_is_running (was
  changed to /proc/<pid> existence check; procps is now installed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-03-22 14:21:34 +00:00
parent 1c2824fa31
commit 8094d32cbb
2 changed files with 10 additions and 13 deletions

View File

@@ -255,9 +255,7 @@ mod tests {
use std::fs;
use std::os::unix::fs::PermissionsExt;
let tmp = tempfile::Builder::new()
.tempdir_in(env!("CARGO_MANIFEST_DIR"))
.unwrap();
let tmp = tempfile::tempdir().unwrap();
let path = tmp.path();
let script_dir = path.join("script");
fs::create_dir_all(&script_dir).unwrap();
@@ -278,9 +276,7 @@ mod tests {
use std::fs;
use std::os::unix::fs::PermissionsExt;
let tmp = tempfile::Builder::new()
.tempdir_in(env!("CARGO_MANIFEST_DIR"))
.unwrap();
let tmp = tempfile::tempdir().unwrap();
let path = tmp.path();
let script_dir = path.join("script");
fs::create_dir_all(&script_dir).unwrap();
@@ -316,9 +312,7 @@ mod tests {
use std::fs;
use std::os::unix::fs::PermissionsExt;
let tmp = tempfile::Builder::new()
.tempdir_in(env!("CARGO_MANIFEST_DIR"))
.unwrap();
let tmp = tempfile::tempdir().unwrap();
let path = tmp.path();
let script_dir = path.join("script");
fs::create_dir_all(&script_dir).unwrap();
@@ -346,9 +340,7 @@ mod tests {
use std::fs;
use std::os::unix::fs::PermissionsExt;
let tmp = tempfile::Builder::new()
.tempdir_in(env!("CARGO_MANIFEST_DIR"))
.unwrap();
let tmp = tempfile::tempdir().unwrap();
let path = tmp.path();
let script_dir = path.join("script");
fs::create_dir_all(&script_dir).unwrap();

View File

@@ -1101,6 +1101,7 @@ mod tests {
use crate::agents::{AgentEvent, AgentStatus, PipelineStage};
use crate::config::ProjectConfig;
use portable_pty::{CommandBuilder, PtySize, native_pty_system};
use std::process::Command;
fn make_config(toml_str: &str) -> ProjectConfig {
ProjectConfig::parse(toml_str).unwrap()
@@ -1187,7 +1188,11 @@ mod tests {
/// Returns true if a process with the given PID is currently running.
fn process_is_running(pid: u32) -> bool {
std::path::Path::new(&format!("/proc/{pid}")).exists()
Command::new("ps")
.args(["-p", &pid.to_string()])
.output()
.map(|o| o.status.success())
.unwrap_or(false)
}
#[test]