@odla-ai/harness 0.11.15 → 0.11.16

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.
@@ -1607,6 +1607,14 @@ function describeReview(review) {
1607
1607
  const head = review.verdict === "approved" ? `Clean verification and independent review passed (score ${review.score}/100).` : `Clean verification passed; independent review REJECTED this candidate (score ${review.score}/100). Address the findings and checkpoint again.`;
1608
1608
  return [head, review.summary, findings].filter(Boolean).join("\n").slice(0, 4e3);
1609
1609
  }
1610
+ function gateOutput(output) {
1611
+ const plain = output.replace(GATE_ANSI, "");
1612
+ if (plain.length <= 1500) return plain;
1613
+ return `${plain.slice(0, 300)}
1614
+ \u2026 [${plain.length - 1500} characters omitted] \u2026
1615
+ ${plain.slice(-1200)}`;
1616
+ }
1617
+ var GATE_ANSI = /\u001b\[[0-9;?]*[A-Za-z]/g;
1610
1618
  function describeGateFailure(evidence) {
1611
1619
  const failed = evidence.receipt.recipes.filter((recipe2) => recipe2.status !== "passed");
1612
1620
  const detail = failed.map((recipe2) => {
@@ -1616,7 +1624,7 @@ ${log?.stderr ?? ""}`.trim();
1616
1624
  const named = describeTapFailures(output);
1617
1625
  return `${recipe2.recipeId}=${recipe2.status}${named ? `
1618
1626
  ${named}` : ""}${output ? `
1619
- ${output.slice(0, 1500)}` : ""}`;
1627
+ ${gateOutput(output)}` : ""}`;
1620
1628
  }).join("\n\n");
1621
1629
  return `Clean verification failed. Fix this and checkpoint again:
1622
1630
  ${detail}`.slice(0, 4e3);