diff --git a/plugins/openclaw/cli.ts b/plugins/openclaw/cli.ts index 28e6bf8..8ec8284 100644 --- a/plugins/openclaw/cli.ts +++ b/plugins/openclaw/cli.ts @@ -86,9 +86,9 @@ export async function runZkr( child.stdout.on("data", (chunk: Buffer) => capture(output.stdout, chunk)); child.stderr.on("data", (chunk: Buffer) => capture(output.stderr, chunk)); - child.stdin.on("error", () => { - // Ignore EPIPE errors which occur when the child process closes its stdin before we finish writing - }); + const ignoreStreamError = () => {}; + child.stdout.on("error", ignoreStreamError); + child.stderr.on("error", ignoreStreamError); child.on("error", () => { fail(false); }); diff --git a/src/self_improve.rs b/src/self_improve.rs index 8c2b1f5..911f324 100644 --- a/src/self_improve.rs +++ b/src/self_improve.rs @@ -164,6 +164,19 @@ mod tests { assert!(augmented.contains("isolate IO in tests")); } + #[test] + fn augment_with_no_lessons_returns_base() { + let tmp = tempfile::tempdir().unwrap(); + let db = MemoryDb::open(tmp.path().join("memory.db")).unwrap(); + let (tenant_id, person_id) = test_ids(); + let improve = SelfImprove::new(db, tenant_id, person_id); + + let augmented = improve + .augment("testing", "You are a helpful agent.") + .unwrap(); + assert_eq!(augmented, "You are a helpful agent."); + } + #[test] fn deduplicates_lessons_across_queries() { let tmp = tempfile::tempdir().unwrap();