fix(lanes): render undeclared lanes at their detected stage, quiet tmux polling noise
A lane whose sessions never call `ccam stage` had no declaration at all, so its pipeline map stayed 100% pending even though detection was tracking real progress. inferredDisplayStage renders such a lane AT its last detection instead (display only — the DB's declared `stage` and detection-as-evidence rules are untouched). Also stops tmux's own "no session" stderr noise from spamming the journal on every poll.
This commit is contained in:
+7
-2
@@ -18,13 +18,18 @@ const { execFileSync } = require("node:child_process");
|
||||
|
||||
// Test seam: swap the exec implementation so unit tests never invoke a real
|
||||
// tmux binary. Mirrors run-spawner.js's __injectChildForTest/__reset style.
|
||||
let execImpl = (args) => execFileSync("tmux", args, { encoding: "utf8" });
|
||||
// stderr is ignored, not inherited: every caller already wraps these in
|
||||
// try/catch and treats failure as "no session" — piping tmux's own
|
||||
// "error connecting to ..." noise to the process's stderr just spams the
|
||||
// journal on every poll while no tmux server is running yet.
|
||||
const EXEC_OPTS = { encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] };
|
||||
let execImpl = (args) => execFileSync("tmux", args, EXEC_OPTS);
|
||||
|
||||
function __setExecImpl(fn) {
|
||||
execImpl = fn;
|
||||
}
|
||||
function __reset() {
|
||||
execImpl = (args) => execFileSync("tmux", args, { encoding: "utf8" });
|
||||
execImpl = (args) => execFileSync("tmux", args, EXEC_OPTS);
|
||||
}
|
||||
|
||||
function hasSession(name) {
|
||||
|
||||
Reference in New Issue
Block a user