@ikunin/sprintpilot 2.2.20 → 2.2.22
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
|
|
363
|
-
if (result.tests_run
|
|
364
|
-
|
|
365
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
}
|
|
@@ -548,10 +566,26 @@ function verifyRetrospective(state, _out, ctx) {
|
|
|
548
566
|
|
|
549
567
|
function verifyNanoQuickDev(state, out, ctx) {
|
|
550
568
|
const issues = [];
|
|
569
|
+
// tests_run: accept the runner's count if the LLM omitted it (same
|
|
570
|
+
// pattern as verifyDevGreen). Nano flow can also have ctx.runner.
|
|
571
|
+
let runnerTestsRun = null;
|
|
572
|
+
if (ctx.runner) {
|
|
573
|
+
const result = ctx.runner({ phase: 'quick', files: out.test_files || [] });
|
|
574
|
+
if (result && typeof result.tests_run === 'number') runnerTestsRun = result.tests_run;
|
|
575
|
+
}
|
|
551
576
|
if (typeof out.tests_run !== 'number' || out.tests_run <= 0) {
|
|
552
|
-
|
|
577
|
+
if (!(typeof runnerTestsRun === 'number' && runnerTestsRun > 0)) {
|
|
578
|
+
issues.push('tests_run must be a positive number');
|
|
579
|
+
}
|
|
553
580
|
}
|
|
554
581
|
if (typeof out.tests_failed !== 'number') {
|
|
582
|
+
// tests_failed missing: if LLM signaled success AND runner exit_code
|
|
583
|
+
// was 0 OR all tests passed (out.tests_run > 0 with no failure
|
|
584
|
+
// indicator), default to 0. Otherwise reject.
|
|
585
|
+
// Conservative: only auto-fill 0 when we have positive evidence of
|
|
586
|
+
// no failures (LLM count present and matches success status).
|
|
587
|
+
// Keeping the strict check by default — tests_failed is a key
|
|
588
|
+
// signal the verifier uses for nano escalation.
|
|
555
589
|
issues.push('tests_failed required (number; 0 for clean)');
|
|
556
590
|
}
|
|
557
591
|
if (!out.commit_sha) issues.push('commit_sha required');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikunin/sprintpilot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.22",
|
|
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": {
|