doc-detective 4.26.0 → 4.26.2

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.
@@ -610,8 +610,23 @@ async function main() {
610
610
  };
611
611
  process.on('SIGTERM', onPreSpawnSigterm);
612
612
 
613
- // Step 1: fetch spec.
614
- const { canceled, spec } = await fetchSpec(apiBase, runId, token);
613
+ // Step 1: fetch spec. See ADR 01045 — an uncaught failure here used
614
+ // to crash silently, leaving Sweep A's generic 'cold_start_exceeded'
615
+ // as the only signal.
616
+ let canceled, spec;
617
+ try {
618
+ ({ canceled, spec } = await fetchSpec(apiBase, runId, token));
619
+ } catch (e) {
620
+ localLog('error', 'spec fetch failed', { err: String(e) });
621
+ // Best-effort (see postFinalize) — surfaces the real cause instead
622
+ // of disappearing into Sweep A's generic reap message.
623
+ await postFinalize(apiBase, runId, token, {
624
+ status: 'failed',
625
+ exit_code: 1,
626
+ summary: { reason: 'spec_fetch_failed', error: String(e) }
627
+ });
628
+ return 1;
629
+ }
615
630
  if (canceled) {
616
631
  localLog('info', 'run canceled before spec fetch (410); exiting cleanly');
617
632
  // Nothing to finalize — the row is already terminal on the server.