{"record":{"id":"1180767707da3fd1","repo":"Hmbown/CodeWhale","slug":"125","errorCode":"125","errorMessage":"lane child stdout was not piped","messagePattern":"lane child stdout was not piped","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/lane/src/runtime.rs","lineNumber":481,"sourceCode":"        Vec::new()\n    };\n\n    let mut child_command = Command::new(&command[0]);\n    child_command.args(&command[1..]);\n    child_command.envs(environment);\n    child_command.stdout(Stdio::piped()).stderr(Stdio::piped());\n    let mut child = match child_command.spawn() {\n        Ok(child) => child,\n        Err(error) => {\n            return fail(\n                anyhow::Error::from(error).context(format!(\"spawn lane child command {command:?}\")),\n                127,\n            );\n        }\n    };\n    let stdout = match child.stdout.take() {\n        Some(stdout) => stdout,\n        None => return fail(anyhow::anyhow!(\"lane child stdout was not piped\"), 125),\n    };\n    let stderr = match child.stderr.take() {\n        Some(stderr) => stderr,\n        None => return fail(anyhow::anyhow!(\"lane child stderr was not piped\"), 125),\n    };\n    let stdout_log = log_path.clone();\n    let stderr_log = log_path.clone();\n    let stdout_thread = thread::spawn(move || stream_child_output(stdout, stdout_log, \"stdout\"));\n    let stderr_thread = thread::spawn(move || stream_child_output(stderr, stderr_log, \"stderr\"));\n\n    let status = match child.wait() {\n        Ok(status) => status,\n        Err(error) => {\n            return fail(\n                anyhow::Error::from(error).context(format!(\"wait for lane child {command:?}\")),\n                LANE_PROXY_FAILURE_EXIT_CODE,\n            );\n        }","sourceCodeStart":463,"sourceCodeEnd":499,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/lane/src/runtime.rs#L463-L499","documentation":"After spawning the lane child process, run_lane_log_proxy must take ownership of the child's piped stdout to frame and log it. If child.stdout is None, the child was spawned without Stdio::piped() for stdout, so the proxy cannot perform its log-proxy contract; it fails with exit code 125 and writes the failure receipt rather than silently dropping output.","triggerScenarios":"run_lane_log_proxy spawns the command and the resulting Child has stdout == None — the spawn used inherited or null stdout (Stdio::inherit()/null()) instead of piped, so child.stdout.take() returns None.","commonSituations":"A refactor or configuration path changed the spawn's Stdio setup for stdout; a test helper spawns with inherited stdio; the child command was constructed by shared code that pipes only stderr.","solutions":["Ensure the child is spawned with .stdout(Stdio::piped()) so the proxy can capture and frame output.","Check the spawn code path that builds this Command — both stdout and stderr must be piped for the log proxy.","If using a shared spawn helper, verify it configures piped stdio and is not configured with inherit/null for this lane.","Re-run the lane after fixing the spawn; the exit receipt should record success instead of code 125."],"exampleFix":"// before\nlet child = cmd.spawn()?; // stdout inherited\n// after\nlet child = cmd\n    .stdout(Stdio::piped())\n    .stderr(Stdio::piped())\n    .spawn()?;","handlingStrategy":"validation","validationCode":"// Ensure the spawn pipes both streams before handing the child to the proxy\nlet mut cmd = build_command();\ncmd.stdout(std::process::Stdio::piped())\n   .stderr(std::process::Stdio::piped());\nlet child = cmd.spawn()?;\ndebug_assert!(child.stdout.is_some(), \"lane child stdout must be piped\");","typeGuard":"fn child_streams_piped(child: &std::process::Child) -> bool {\n    child.stdout.is_some() && child.stderr.is_some()\n}","tryCatchPattern":"match run_lane_log_proxy(...) {\n    Ok(code) if code == 125 => {\n        eprintln!(\"child stdio was not piped; fix spawn to use Stdio::piped()\");\n    }\n    other => {/* handle normally */},\n}","preventionTips":["Configure Stdio::piped() for both stdout and stderr in whatever helper spawns lane children.","Add a spawn-helper test asserting child.stdout/stderr are Some after spawn.","Do not reuse Commands configured with inherit/null stdio for the log proxy path."],"tags":["lane","process-spawn","stdio","pipe"],"backgroundTag":"internal-invariant-violation","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}