amsd-pipeline-shared 0.5.27 → 0.5.28

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.
@@ -77,7 +77,10 @@ function classify({ profile, portRoot, res, crash, aborted, since, signatures, e
77
77
  if (isExternal(text)) return no('external', 'the failure names the machine, the network, the model service or a kill — not the code');
78
78
  if (sig.generalRefusal.test(text) || profile.classify.refusals.some((r) => r.test(text))) return no('refusal', 'the pipeline stopped on purpose');
79
79
  const site = (crash.frames || []).find((f) => f && typeof f.file === 'string' && !sig.internalFrame.test(f.file)) || null;
80
- if (!site) return no('outside-port', 'no frame of the stack is in any file');
80
+ // under "all-but-refusals" a crash whose stack names no file (every frame the runtime's own — live run 13, node's rimraf) is still a failed
81
+ // leg the doctor takes; its agent finds the layer
82
+ if (!site) return takesMost ? { call: true, kind: 'crash', layer: 'undecided', why: `${crash.name}: ${String(crash.message).slice(0, 160)} — no frame of the stack is in a file${crash.step ? ` (step: ${crash.step})` : ''}` }
83
+ : no('outside-port', 'no frame of the stack is in any file');
81
84
  const rel = path.relative(portRoot || '', site.file);
82
85
  const parts = rel.split(path.sep);
83
86
  const inPort = !!portRoot && !rel.startsWith('..') && !path.isAbsolute(rel) && profile.scope.repairDirs.includes(parts[0]) && !parts.includes(sig.dependencyDir);
@@ -55,6 +55,9 @@ function die(e) {
55
55
  function install(opts) {
56
56
  if (!opts || !opts.runDir || !opts.file) throw new Error('crash record: install needs { runDir, file } — the file name is the pipeline\'s (profile crash.file), never a default');
57
57
  runDir = opts.runDir; fileName = opts.file;
58
+ // THE WHOLE STACK: V8 keeps ten frames, and a throw from deep inside a library (node's rimraf, live run 13) lost the frame of the code
59
+ // that called it — the one the doctor locates the defect by
60
+ Error.stackTraceLimit = Infinity;
58
61
  process.on('uncaughtException', die);
59
62
  process.on('unhandledRejection', (r) => die(r));
60
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amsd-pipeline-shared",
3
- "version": "0.5.27",
3
+ "version": "0.5.28",
4
4
  "description": "The AMSD pipeline's shared components, one source for the bash pipeline and its Claude workflows: the model-call gateway (llm-handler.sh — retry, ladder, self-heal, cost) and the libraries it runs.",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {