Watch
0
0
Fork
You've already forked hyperhive
0

write the review-classifier fake agent scripts from a child process

This commit is contained in:
atlas 2026-10-28 11:29:35 +01:00 • committed by mara
commit 41f832458e

View file

@ -274,8 +274,6 @@ impl Sink for FinalText {
#[cfg(test)]
mod tests {
use std::os::unix::fs::PermissionsExt as _;
use swarm_wire::review_classifier::Prices;
use super::*;
@ -347,12 +345,10 @@ done
fn acp(dir: &Path) -> (Acp<Arc<Costs>>, Arc<Costs>) {
let script = dir.join("agent.sh");
let log = dir.join("log");
std::fs::write(
crate::test_script::write_executable(
&script,
AGENT.replacen("log=\"$1\"", &format!("log='{}'", log.display()), 1),
)
.expect("written");
std::fs::set_permissions(&script, std::fs::Permissions::from_mode(0o755)).expect("chmod");
&AGENT.replacen("log=\"$1\"", &format!("log='{}'", log.display()), 1),
);
let costs = Arc::new(Costs::default());
let acp = Acp {
program: PathBuf::from("/nix/store/x-opencode/bin/opencode"),