@ikunin/sprintpilot 2.2.20 → 2.2.21

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.
@@ -353,22 +353,33 @@ function verifyDevRed(state, out, ctx) {
353
353
 
354
354
  function verifyDevGreen(state, out, ctx) {
355
355
  const issues = [];
356
+ let runnerTestsRun = null;
356
357
  if (ctx.runner) {
357
358
  const result = ctx.runner({ phase: 'green', files: out.test_files || [] });
358
359
  if (!result || typeof result.exit_code !== 'number') {
359
360
  issues.push('runner did not report exit_code');
360
361
  } else if (result.exit_code !== 0) {
361
362
  issues.push(`tests still failing on GREEN: exit ${result.exit_code}`);
362
- } else if (typeof result.tests_run === 'number' && typeof out.tests_run === 'number') {
363
- if (result.tests_run !== out.tests_run) {
364
- issues.push(
365
- `LLM reported ${out.tests_run} tests run but runner reported ${result.tests_run}`,
366
- );
363
+ } else {
364
+ if (typeof result.tests_run === 'number') runnerTestsRun = result.tests_run;
365
+ if (typeof result.tests_run === 'number' && typeof out.tests_run === 'number') {
366
+ if (result.tests_run !== out.tests_run) {
367
+ issues.push(
368
+ `LLM reported ${out.tests_run} tests run but runner reported ${result.tests_run}`,
369
+ );
370
+ }
367
371
  }
368
372
  }
369
373
  }
374
+ // If the LLM omitted tests_run but the runner reported a positive
375
+ // count, accept the runner's number (same pattern as test_files
376
+ // auto-detect). A non-runner setup still requires the LLM to report.
370
377
  if (typeof out.tests_run !== 'number' || out.tests_run <= 0) {
371
- issues.push('tests_run must be a positive number (per AGENTS.md test-result format)');
378
+ if (typeof runnerTestsRun === 'number' && runnerTestsRun > 0) {
379
+ // Recovered — don't push the "must be a positive number" issue.
380
+ } else {
381
+ issues.push('tests_run must be a positive number (per AGENTS.md test-result format)');
382
+ }
372
383
  }
373
384
  return { ok: issues.length === 0, issues };
374
385
  }
@@ -449,6 +460,7 @@ function verifyPatchApply(state, out, _ctx) {
449
460
 
450
461
  function verifyPatchRetest(state, out, ctx) {
451
462
  const issues = [];
463
+ let runnerTestsRun = null;
452
464
  if (ctx.runner) {
453
465
  const result = ctx.runner({
454
466
  phase: 'rereview',
@@ -458,10 +470,16 @@ function verifyPatchRetest(state, out, ctx) {
458
470
  issues.push('runner did not report exit_code');
459
471
  } else if (result.exit_code !== 0) {
460
472
  issues.push(`tests failed after patch: exit ${result.exit_code}`);
473
+ } else if (typeof result.tests_run === 'number') {
474
+ runnerTestsRun = result.tests_run;
461
475
  }
462
476
  }
477
+ // Same auto-recovery as verifyDevGreen: accept the runner's count when
478
+ // the LLM omits tests_run.
463
479
  if (typeof out.tests_run !== 'number' || out.tests_run <= 0) {
464
- issues.push('tests_run must be a positive number');
480
+ if (!(typeof runnerTestsRun === 'number' && runnerTestsRun > 0)) {
481
+ issues.push('tests_run must be a positive number');
482
+ }
465
483
  }
466
484
  return { ok: issues.length === 0, issues };
467
485
  }
@@ -1,6 +1,6 @@
1
1
  addon:
2
2
  name: sprintpilot
3
- version: 2.2.20
3
+ version: 2.2.21
4
4
  description: Sprintpilot — autopilot and multi-agent addon for BMad Method (git workflow, parallel agents, autonomous story execution)
5
5
  bmad_compatibility: ">=6.2.0"
6
6
  modules:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikunin/sprintpilot",
3
- "version": "2.2.20",
3
+ "version": "2.2.21",
4
4
  "description": "Sprintpilot — autopilot and multi-agent addon for BMad Method v6: git workflow, parallel agents, autonomous story execution",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {