skalpel 4.0.47 → 4.0.49

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/catches.mjs CHANGED
@@ -164,14 +164,17 @@ function indexResults(entries) {
164
164
  // An UNANCHORED full-body scan would misread an unrelated "exit code N" the command itself printed — a
165
165
  // grep/cat of source, a pasted CI log like "##[error]Process completed with exit code 123." — and cry wolf
166
166
  // on a genuinely-passing proof. Anchoring to the first line reads the real outcome and nothing else.
167
- function exitCodeFromText(text) {
167
+ // EXPORTED (additive; logic byte-unchanged) so the OFFLINE efficacy eval (`skalpel eval`,
168
+ // efficacy-eval.mjs) reuses the EXACT recorded-result → verdict path this scanner uses — one verdict
169
+ // source, so the eval's confirmed-lie set can never drift from what `skalpel catches` reports.
170
+ export function exitCodeFromText(text) {
168
171
  const firstLine = String(text || "").split("\n", 1)[0];
169
172
  const m = firstLine.match(/^\s*exit(?:ed)?(?:\s+with)?\s+(?:code|status)\s+(\d{1,3})\b/i);
170
173
  if (!m) return null;
171
174
  const n = Number.parseInt(m[1], 10);
172
175
  return Number.isFinite(n) ? n : null;
173
176
  }
174
- function classifyRecorded({ isError, exitCode, text }) {
177
+ export function classifyRecorded({ isError, exitCode, text }) {
175
178
  const ev = String(text || "");
176
179
  // Prefer the structured exit code (Codex); else recover a real code from the text (Claude). This makes
177
180
  // the numeric-exit-code branch reachable for Claude, so 127/126 route to HARNESS_ERROR (no cry-wolf) and