@volter/supercode-orchestrator 0.5.118 → 0.5.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -966,7 +966,10 @@ export async function startCard(board, id, { roles = ['manager'], lanes, setting
966
966
  // The programs a harness pane runs in its foreground: Claude Code's, Codex's, and node (the daemon's Codex pane host,
967
967
  // a harness installed through npm). A pane running one of these runs a harness session, read or not.
968
968
  const HARNESS_COMMANDS = new Set(['claude', 'claude.exe', 'codex', 'codex.exe', 'node']);
969
- async function turnAtClose(session, pane = null) {
969
+ /** A board launch never bound to a session (no session id read for it) whose launch window has passed. */
970
+ export const unboundLaunch = (session, launchWindow, at = now()) => Boolean(session?.launch_key && !session.session_id && launchWindow
971
+ && Number(session.launched_at) > 0 && at - Number(session.launched_at) >= launchWindow);
972
+ async function turnAtClose(session, pane = null, { launchWindow = null } = {}) {
970
973
  const machine = session.machine ?? localMachine();
971
974
  let activity;
972
975
  if (pane?.pid) {
@@ -977,6 +980,10 @@ async function turnAtClose(session, pane = null) {
977
980
  // No session read under the pane is no absence (a registry it could not read, another config home, a failed process
978
981
  // read): the pane's own foreground program says whether a harness runs there. Only a pane running none is closed.
979
982
  if (!activity) {
983
+ // A pane the board launched whose session no reading ever found (the fleet's never bound it, and none runs under
984
+ // its process now) past the launch window holds a harness that never started a session: nothing is cut by its
985
+ // close. Waiting on it kept t_7ec85b6b's Codex pane on aarons-mac-mini, stuck before its first turn, open for 15 h.
986
+ if (unboundLaunch(session, launchWindow)) return null;
980
987
  const command = String(pane.command ?? '').split(/[\\/]/).pop().toLowerCase();
981
988
  return command && !HARNESS_COMMANDS.has(command) ? null : `pane ${session.pane} runs ${command || 'a program it does not name'}, whose session could not be read`;
982
989
  }
@@ -1108,7 +1115,7 @@ export async function closeRequested(board, report, { taskId = null, caller = nu
1108
1115
  if (protectedNow) throw new Error(`close deferred: pane ${session.pane} is owned by an unended run`);
1109
1116
  // An ended run's session is closed only between its turns, read last, after the claim and the pane list (a pane
1110
1117
  // already gone is settled above with no reading; t_f34710bc's coder was cut mid-proof at 15:01:13Z, 2026-10-04).
1111
- if (row.ended_at) { const inTurn = await turnAtClose(session, observed.live.get(session.pane)); if (inTurn) throw new Error(`close deferred: ${inTurn}`); }
1118
+ if (row.ended_at) { const inTurn = await turnAtClose(session, observed.live.get(session.pane), { launchWindow: boardSettings(workflowFor(board.root).params).launchWindow }); if (inTurn) throw new Error(`close deferred: ${inTurn}`); }
1112
1119
  await stopSession(board, session); observed.live.delete(session.pane);
1113
1120
  }
1114
1121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-orchestrator",
3
- "version": "0.5.118",
3
+ "version": "0.5.119",
4
4
  "type": "module",
5
5
  "description": "The orchestrator runtime over the Volter Harness ontology: one typed operational model whose folder is its serialization, read and written through the harness orchestration doors (docs/ORCHESTRATOR-IR.md)",
6
6
  "exports": {