@nathapp/nax 0.70.7 → 0.70.8

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.
Files changed (2) hide show
  1. package/dist/nax.js +50 -7
  2. package/package.json +1 -1
package/dist/nax.js CHANGED
@@ -24693,7 +24693,7 @@ function parsePytestOutput(output) {
24693
24693
  const failures = [];
24694
24694
  for (const line of output.split(`
24695
24695
  `)) {
24696
- const m = line.match(/^FAILED\s+(\S+)(?:\s+-\s+(.*))?$/);
24696
+ const m = line.match(/^(?:\S+:\s+)?FAILED\s+(\S+)(?:\s+-\s+(.*))?$/);
24697
24697
  if (m) {
24698
24698
  const [, location, reason] = m;
24699
24699
  const parts = location.split("::");
@@ -24705,6 +24705,28 @@ function parsePytestOutput(output) {
24705
24705
  });
24706
24706
  }
24707
24707
  }
24708
+ const PLACEHOLDER_REASON = "Collection/import error";
24709
+ const errorByFile = new Map;
24710
+ for (const line of output.split(`
24711
+ `)) {
24712
+ const collecting = line.match(/^(?:\S+:\s+)?_*\s*ERROR\s+collecting\s+(\S+\.\w+)/);
24713
+ const summary = line.match(/^(?:\S+:\s+)?ERROR\s+(\S+\.\w+(?:::\S+)?)\s+-\s+(.*)/);
24714
+ const location = collecting?.[1] ?? summary?.[1];
24715
+ if (!location)
24716
+ continue;
24717
+ const reason = summary?.[2]?.trim();
24718
+ const file3 = location.split("::")[0] ?? location;
24719
+ const existing = errorByFile.get(file3);
24720
+ if (existing && existing.error !== PLACEHOLDER_REASON)
24721
+ continue;
24722
+ errorByFile.set(file3, {
24723
+ file: file3,
24724
+ testName: `collection error: ${file3}`,
24725
+ error: reason || PLACEHOLDER_REASON,
24726
+ stackTrace: []
24727
+ });
24728
+ }
24729
+ failures.push(...errorByFile.values());
24708
24730
  const verboseStacks = parsePytestVerboseStacks(output);
24709
24731
  for (const failure of failures) {
24710
24732
  const leafName = failure.testName.split(" > ").pop() ?? failure.testName;
@@ -24808,6 +24830,10 @@ function parseCommonOutput(output) {
24808
24830
  failed = Number.parseInt(failMatches[failMatches.length - 1][1], 10);
24809
24831
  }
24810
24832
  }
24833
+ const errorMatches = Array.from(output.matchAll(/(\d+)\s+errors?\b(?=[^\n]*\bin\s+[\d.]+\s*s\b)/gi));
24834
+ if (errorMatches.length > 0) {
24835
+ failed += Number.parseInt(errorMatches[errorMatches.length - 1][1], 10);
24836
+ }
24811
24837
  return { passed, failed, failures: [] };
24812
24838
  }
24813
24839
  function formatFailureSummary(failures, maxChars = 2000) {
@@ -61164,7 +61190,7 @@ var package_default;
61164
61190
  var init_package = __esm(() => {
61165
61191
  package_default = {
61166
61192
  name: "@nathapp/nax",
61167
- version: "0.70.7",
61193
+ version: "0.70.8",
61168
61194
  description: "AI Coding Agent Orchestrator \u2014 loops until done",
61169
61195
  type: "module",
61170
61196
  bin: {
@@ -61264,8 +61290,8 @@ var init_version = __esm(() => {
61264
61290
  NAX_VERSION = package_default.version;
61265
61291
  NAX_COMMIT = (() => {
61266
61292
  try {
61267
- if (/^[0-9a-f]{6,10}$/.test("20a6d5ac"))
61268
- return "20a6d5ac";
61293
+ if (/^[0-9a-f]{6,10}$/.test("54e59fa6"))
61294
+ return "54e59fa6";
61269
61295
  } catch {}
61270
61296
  try {
61271
61297
  const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
@@ -62228,6 +62254,23 @@ var init_verification = __esm(() => {
62228
62254
  });
62229
62255
 
62230
62256
  // src/execution/lifecycle/run-regression.ts
62257
+ function buildRegressionFindings(summary, rawOutput) {
62258
+ const structured = testSummaryToFindings(summary);
62259
+ if (structured.length > 0)
62260
+ return structured;
62261
+ return [
62262
+ {
62263
+ source: "test-runner",
62264
+ severity: "error",
62265
+ category: "failed-test",
62266
+ rule: "regression-suite",
62267
+ message: `Full test suite is failing but no individual test failures could be parsed from the output. Diagnose and fix the underlying failure. Raw test output:
62268
+
62269
+ ${rawOutput.slice(0, SYNTHETIC_FINDING_OUTPUT_LIMIT)}`,
62270
+ fixTarget: "source"
62271
+ }
62272
+ ];
62273
+ }
62231
62274
  async function findResponsibleStory(testFile, workdir, passedStories) {
62232
62275
  const logger = getSafeLogger();
62233
62276
  for (let i = passedStories.length - 1;i >= 0; i--) {
@@ -62439,7 +62482,7 @@ async function runDeferredRegression(options) {
62439
62482
  maxRectificationAttempts
62440
62483
  });
62441
62484
  const storyStartMs = Date.now();
62442
- const initialFindings = testSummaryToFindings(_regressionDeps.parseTestOutput(currentTestOutput));
62485
+ const initialFindings = buildRegressionFindings(_regressionDeps.parseTestOutput(currentTestOutput), currentTestOutput);
62443
62486
  const packageView = runtime.packages.repo();
62444
62487
  const cycleCtx = {
62445
62488
  runtime,
@@ -62460,7 +62503,7 @@ async function runDeferredRegression(options) {
62460
62503
  if (verification.success)
62461
62504
  return [];
62462
62505
  if (verification.output)
62463
- return testSummaryToFindings(_regressionDeps.parseTestOutput(verification.output));
62506
+ return buildRegressionFindings(_regressionDeps.parseTestOutput(verification.output), verification.output);
62464
62507
  return initialFindings;
62465
62508
  }
62466
62509
  };
@@ -62534,7 +62577,7 @@ async function runDeferredRegression(options) {
62534
62577
  storyOutcomes: storyOutcomeAccum
62535
62578
  };
62536
62579
  }
62537
- var _regressionDeps;
62580
+ var SYNTHETIC_FINDING_OUTPUT_LIMIT = 2000, _regressionDeps;
62538
62581
  var init_run_regression = __esm(() => {
62539
62582
  init_findings();
62540
62583
  init_logger2();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nathapp/nax",
3
- "version": "0.70.7",
3
+ "version": "0.70.8",
4
4
  "description": "AI Coding Agent Orchestrator — loops until done",
5
5
  "type": "module",
6
6
  "bin": {