@volter/supercode-orchestrator 0.5.33 → 0.5.34

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.
package/bin/runtime.mjs CHANGED
@@ -674,6 +674,15 @@ async function main() {
674
674
  return;
675
675
  }
676
676
  const root = resolve(args.root ?? defaultRoot());
677
+ // `SUPERCODE_BOARD_DISPATCHER=serve`: whoever started this daemon also runs `workflow serve` on the home, the board's
678
+ // one dispatcher, so this daemon runs no dispatch round (board.mjs). It is this process's alone: the sessions it
679
+ // launches do not inherit it. Any other value is refused before this daemon takes its lease or a lock.
680
+ const boardDispatcher = process.env.SUPERCODE_BOARD_DISPATCHER || null;
681
+ delete process.env.SUPERCODE_BOARD_DISPATCHER;
682
+ if (boardDispatcher !== null && boardDispatcher !== 'serve') {
683
+ say('error', { root, message: `SUPERCODE_BOARD_DISPATCHER is \`${boardDispatcher}\`: the one value it takes is \`serve\` (a \`workflow serve\` beside this daemon dispatches the board); unset, the board workflow's dispatch.serve decides` });
684
+ process.exit(2);
685
+ }
677
686
  let crashed = false;
678
687
  let gatewayLock = null;
679
688
  if (!args.once) {
@@ -746,11 +755,6 @@ async function main() {
746
755
  // binary that spawned this daemon, so the worker doors it opens are that
747
756
  // build's, not whatever `supercode` a PATH lookup happens to find.
748
757
  const client = new SupercodeHarnessClient(process.env.SUPERCODE_BIN ? { command: process.env.SUPERCODE_BIN } : {});
749
- // `SUPERCODE_BOARD_DISPATCHER=serve`: whoever started this daemon also runs `workflow serve` on the home, the board's
750
- // one dispatcher, so this daemon runs no dispatch round (board.mjs). It is this process's alone: the sessions it
751
- // launches do not inherit it.
752
- const boardDispatcher = process.env.SUPERCODE_BOARD_DISPATCHER || null;
753
- delete process.env.SUPERCODE_BOARD_DISPATCHER;
754
758
  const orchestrator = new Orchestrator({
755
759
  boardDispatcher,
756
760
  executeJob: args.executorUrl ? httpJobExecutor({ url: args.executorUrl, tokenFile: args.executorTokenFile, root }) : null,
package/board/cli.mjs CHANGED
@@ -1444,6 +1444,8 @@ async function serve(root, args = {}) {
1444
1444
  const stuck = {};
1445
1445
  const warned = {};
1446
1446
  let pausedSaid = false;
1447
+ // a board whose cards name an assignee that is no profile of this home is said once, until it has none
1448
+ const laneSaid = new Set();
1447
1449
  let wakeReason = null;
1448
1450
  try {
1449
1451
  while (!stopped) {
@@ -1498,6 +1500,8 @@ async function serve(root, args = {}) {
1498
1500
  stuck[r.board] = r.ready_waiting && !r.started.length && !r.paused ? (stuck[r.board] || Date.now()) : 0;
1499
1501
  if (stuck[r.board] && Date.now() - stuck[r.board] >= interval * 6000 && Date.now() - (warned[r.board] ?? 0) >= 300_000) { log(`board ${r.board} stuck: ${r.ready_waiting} ready card(s) and nothing started for ${Math.floor((Date.now() - stuck[r.board]) / 1000)}s; \`supercode workflow diagnostics\``); warned[r.board] = Date.now(); }
1500
1502
  for (const [t, why] of r.queued) log(` ${t} waits: ${why}`);
1503
+ if (r.nonspawnable?.length && !laneSaid.has(r.board)) { laneSaid.add(r.board); log(`board ${r.board}: ${r.nonspawnable.length} card(s) name an assignee that is no profile of this home, and wait`); }
1504
+ if (!r.nonspawnable?.length) laneSaid.delete(r.board);
1501
1505
  for (const [t, why] of r.failed) log(` ${t} did not start: ${why}`);
1502
1506
  for (const [t, why] of r.unsettled ?? []) log(` ${t} could not be read: ${why}`);
1503
1507
  for (const [t, s, m] of r.started) log(` ${t} started ${s} (${m})`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-orchestrator",
3
- "version": "0.5.33",
3
+ "version": "0.5.34",
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": {