The session did the task and stopped on make verify-device. The cause was not the server: run-plan.sh and the device tests both read BOXMAKER_MODEL, and the run's value (OpenCode's provider-prefixed id) reached llama-server as the model name. With it unset, verify-device passes 6 of 6. The copied files are identical to the plan's, and the gate prints gate: ok, 936 tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
41 lines
1.3 KiB
Rust
41 lines
1.3 KiB
Rust
//! Starting `memoryd` for the device tests, with the repository's starter `soul.md`: `loopd`
|
|
//! starts no session without the memory block. Do not edit.
|
|
|
|
use std::path::Path;
|
|
use std::process::{Child, Command};
|
|
use std::thread;
|
|
use std::time::Duration;
|
|
|
|
/// Write `memoryd.toml` into `home`, start `memoryd serve`, and wait for its `loopd` socket.
|
|
pub fn start(home: &Path) -> Child {
|
|
let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../..");
|
|
let config = home.join("memoryd.toml");
|
|
std::fs::write(
|
|
&config,
|
|
format!(
|
|
"[paths]\nhome = \"{}\"\n[memory]\nsoul_starter = \"{}\"\n",
|
|
home.display(),
|
|
root.join("config/soul.md").display()
|
|
),
|
|
)
|
|
.unwrap();
|
|
let socket = home.join("run").join("loop-memory").join("memory.sock");
|
|
let _ = std::fs::remove_file(&socket);
|
|
let bin = std::env::var("BOXMAKER_MEMORYD").expect("BOXMAKER_MEMORYD is not set");
|
|
let mut child = Command::new(bin)
|
|
.arg("serve")
|
|
.arg("--config")
|
|
.arg(&config)
|
|
.spawn()
|
|
.expect("cannot start memoryd");
|
|
for _ in 0..600 {
|
|
if socket.exists() {
|
|
return child;
|
|
}
|
|
thread::sleep(Duration::from_millis(100));
|
|
}
|
|
let _ = child.kill();
|
|
let _ = child.wait();
|
|
panic!("memoryd did not come up within 60 s");
|
|
}
|