@quikit/quikpilot-runner 9.3.0-rc.95 → 9.3.0-rc.96

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/README.md CHANGED
@@ -194,6 +194,15 @@ wrong (a field that arrives from a database row or a request), so it only warns
194
194
 
195
195
  **9.3.0-rc.81 (also) - pytest and go test reports place their tests on files (QUIKTR-2465 item 3).** The Python and Go trial repositories' reports placed no test on a file, so the test-file list was empty and the AI Runtime's early check was off. pytest tests are placed by the longest dotted prefix that is a `.py` file of the listing; Go tests by go.mod's module and the one `_test.go` file of the package's folder that declares the function. Real reports: sqlparse 454 tests on 9 files, decimal 145 tests on 3 files, 0 unmapped each. A report that places none of its tests says so in the run's notes. JavaScript reports are unchanged.
196
196
 
197
+ **9.3.0-rc.96 - a bug that does not reproduce on the code before any change ends as its own outcome, not a generic failure (QUIKTR-2794).** On UAT (17 Nov) a bug whose fix was already merged was given to QuikPilot again. In the tests phase both case tests passed on the untouched code (75/75), the red check sent the DONE back, and the AI gave up. The run ended as a generic `cannot_complete`, and the run page had no advice. A tests-phase give-up now ends `not_reproduced` only on the runner's own evidence, never the AI's words. All of these must hold:
198
+ - the AI was told its tests pass and still gave up (or the attempt before ended so);
199
+ - each bug case's test sits in a changed file the hand-over check accepts and was seen PASSING BY NAME among the tests the baseline did not have, in a whole run that finished and shows nothing new failing (tests already failing before are ignored);
200
+ - only real test files changed;
201
+ - not the last turn;
202
+ - not a feature request (`notReproducedOn`: a missing request kind counts as a bug, as before).
203
+
204
+ The new check is asked before "gave up but red", which takes any failing test as the bug shown. The second attempt still runs, told a fixed runner sentence. The step ends `not_reproduced` when it ends the same way, or as a plain tests-phase give-up whose runs saw nothing new fail. The record then carries `notReproduced: { commit, automationIds, passed, failed, testFiles }`: ids, counts and paths, never a test name; `commit` is read once after checkout. The reason starts "QuikPilot could not reproduce the problem:". The callback status stays `failed` and the exit code stays 1: QuikProjects gives the run its own status from the record, and an older QuikProjects strips the field and shows a failed run. `QUIKPILOT_NOT_REPRODUCED=off` (QuikProjects: `not_reproduced` in QUIKPILOT_RUNNER_OFF) switches it off. New: `src/notReproduced.ts`; `RunTestsTool.newPassingOf` (runner only, never sent).
205
+
197
206
  **9.3.0-rc.95 - the code-writing loop stops asking for the same lines again and again (QUIKTR-2791).** On UAT (17 Nov) a run asked for the same 12 lines of one test file ten times in twelve turns, in both attempts, used all 20 turns of its tests phase twice and wrote nothing; the same request had passed minutes earlier. Counted range by range from the job log (the runner's own re-read counter misses a re-read after a different window), 58 reads: 18 first sight, 17 repeats of text still whole in front of the AI, 23 re-reads of text the three-turn rule had already shrunk away, with no request above 37,587 of 90,000 tokens. The "no progress" guard (three turns in a row of nothing new, then the next turn is the last) counted none of the 40 turns because every turn also held one read of another window, so "every result is a repeat" was never true. Three changes, harness version only. (1) A read that adds no line the AI cannot already see (its lines are all still whole in the conversation, after the file's last edit; an outline covers no lines) counts as nothing new, so a turn that pairs a repeat with such a read counts for the guard. (2) From the second repeat of the same look (read_file, grep, list_files, find_definition, show_changes) the answer keeps its earlier text and status `duplicate` and says plainly to use it, edit, or finish with cannot_complete; the first repeat reads as before. (3) Old looks are no longer shrunk by age while every request stays under the soft target (40,000 tokens, or the first request plus 20,000); once one passes it, shrinking is on as before. New log lines: `codegen.no_new_info` per turn and `repeatsOfSameRange` in `codegen.reread_summary`. Replaying the recorded calls, the guard fires after turn 12 of the failed run's first attempt (it never fires on the passing run); the second attempt's repeats are spread out, so there only (2) and (3) change what the AI sees. Not measured live yet. New: `src/noProgress.ts`; `limits.shrinkAfterTokens` is for tests.
198
207
 
199
208
  **9.3.0-rc.94 - the two reports back to QuikProjects are tried again after any connection failure that brought no answer, and a lost report names its cause (QUIKTR-2790).** On UAT (17 Nov) the early look finished its work and its one report failed with a connection error that was not ECONNRESET or ETIMEDOUT (about 10.5 s later: most likely a connect timeout); it was not tried again, the log said only `report_failed`, and the run went on without the look. The look's report and the run's final report now try again after any fetch that threw with no HTTP answer (a connect timeout, a closed socket, DNS, a refused connection), with the same waits and the same bytes each time; a refusal (4xx), an invalid URL, a certificate problem and the runner's own 60 s limit for a try stay final. Every lost look now logs `report_failed` with the cause: the last HTTP status, or a closed word (an error code or an error name; never the message, the URL, the token or the body). The AI calls keep their old two-code retry on purpose: a repeated AI call that reached the AI service is paid twice. No change to the work packet, the contract or the site.
package/dist/index.js CHANGED
@@ -40712,6 +40712,8 @@ var REASON_WORDS = {
40712
40712
  contract_rejected: "the AI service did not accept the request (it may be switched off)",
40713
40713
  test_case_disagree: "its code and its own test for an approved case still disagreed after one correction of the test",
40714
40714
  no_test_shows_bug: "none of its tests failed on the code before the change, so none of them showed the bug",
40715
+ // QUIKTR-2794: the tests for every bug case passed on the code before any change, and the runner saw them pass.
40716
+ not_reproduced: "the tests it wrote for every case passed on the code before any change, so the problem did not show",
40715
40717
  semantic_mismatch: "the AI service and the runner disagreed about the request",
40716
40718
  http_error: "the AI service returned an error",
40717
40719
  transport: "the AI service could not be reached",
@@ -40758,6 +40760,7 @@ function attemptInWords(a, fallback) {
40758
40760
  const words2 = a?.afterRecovery ? `${reasonInWords(a?.reason ?? fallback)}, a second time in a row, even after the AI was asked to take a smaller step` : reasonInWords(a?.reason ?? fallback);
40759
40761
  return a?.runtimeCode && a.runtimeCode !== "other" ? `${words2} (error code ${a.runtimeCode})` : words2;
40760
40762
  }
40763
+ var NOT_REPRODUCED_MESSAGE = "QuikPilot could not reproduce the problem: the tests it wrote for the approved cases pass on the code before any change, so there was nothing to fix. Nothing was written. If the problem still happens, start a new run and add an example that fails: the exact inputs, what you saw and what you expected.";
40761
40764
  function exhaustedMessage(attempts, stop2, unreportable) {
40762
40765
  const first = attempts[0];
40763
40766
  const second = attempts[1];
@@ -40767,6 +40770,7 @@ function exhaustedMessage(attempts, stop2, unreportable) {
40767
40770
  const more = unreportable.length > 1 ? `, and ${unreportable.length - 1} more like it` : "";
40768
40771
  return `QuikPilot could not write the change: an existing test in ${blocking.path} (line ${blocking.line}) expects what approved case ${blocking.caseId} calls wrong${more}. It is written once and run for many rows, so QuikPilot cannot propose a change to it for you to approve. Change that test by hand, or correct the case if the test is right, then run QuikPilot again. Nothing was written.`;
40769
40772
  }
40773
+ if (stop2 === "not_reproduced") return NOT_REPRODUCED_MESSAGE;
40770
40774
  if (stop2 === "failed" && attempts.length === 1 && first?.reason === "test_case_disagree") {
40771
40775
  return "QuikPilot could not write the change: its code and its own test for an approved case still disagreed after one correction of the test, so no pull request was opened. Look at that case's expected result: it may be unclear, or conflict with what the code already does.";
40772
40776
  }
@@ -43339,6 +43343,7 @@ var MIN_TEST_LIMIT_MS = 12e4;
43339
43343
  var MAX_TEST_LIMIT_MS = 6e5;
43340
43344
  var DEFAULT_TEST_LIMIT_MS = 3e5;
43341
43345
  var MAX_LISTED_TESTS = 20;
43346
+ var MAX_NEW_PASSING = 200;
43342
43347
  var MAX_TEST_NAME_CHARS = 200;
43343
43348
  var MAX_MESSAGE_CHARS = 120;
43344
43349
  var MAX_WHOLE_MESSAGE_CHARS = 1e3;
@@ -43524,6 +43529,11 @@ var RunTestsTool = class {
43524
43529
  /** QUIKTR-1604: the overlay version each file was last run on, so the same file on the same change is not run twice. */
43525
43530
  lastFileVersion = /* @__PURE__ */ new Map();
43526
43531
  entries = [];
43532
+ /**
43533
+ * QUIKTR-2794: per call, the ids (`classname::name`) of the tests the report shows PASSING that the baseline did not have: tests this attempt
43534
+ * wrote. RUNNER ONLY: never in the answer, so never sent to the AI Runtime nor recorded. Empty without a baseline (nothing to tell them apart by).
43535
+ */
43536
+ newPassing = /* @__PURE__ */ new Map();
43527
43537
  maxRuns;
43528
43538
  maxFileRuns;
43529
43539
  /**
@@ -43555,6 +43565,10 @@ var RunTestsTool = class {
43555
43565
  record() {
43556
43566
  return this.entries.map((e) => ({ ...e }));
43557
43567
  }
43568
+ /** QUIKTR-2794: the new tests a call's run saw passing (see `newPassing`); undefined for a call that gave no report. Runner only. */
43569
+ newPassingOf(callId) {
43570
+ return this.newPassing.get(callId);
43571
+ }
43558
43572
  answer(id, status, parts2 = {}) {
43559
43573
  const harness = this.deps.harness === true;
43560
43574
  const failedSentence = parts2.ownOnly === true ? harness ? HARNESS_TESTS_FAILED_NO_OLD_TEST_BROKE : TESTS_FAILED_NO_OLD_TEST_BROKE : parts2.clean === true ? TESTS_FAILED_ONLY_OLD : null;
@@ -43748,6 +43762,11 @@ var RunTestsTool = class {
43748
43762
  }
43749
43763
  });
43750
43764
  const { failingKey, messageCount, comparable } = answer;
43765
+ const before = baseline?.snapshot.results;
43766
+ this.newPassing.set(
43767
+ callId,
43768
+ before ? [...ran.snapshot.results.entries()].filter(([id, passedNow]) => passedNow && !before.has(id)).map(([id]) => id).slice(0, MAX_NEW_PASSING) : []
43769
+ );
43751
43770
  const output = scope ? { ...answer.output, scope } : answer.output;
43752
43771
  const { passed, failed } = output;
43753
43772
  const cleanOld = comparable && output.regressions === 0 && output.newFailures === 0 && output.alreadyFailing > 0 && failed > 0;
@@ -49443,6 +49462,20 @@ function turnAddsNothing(results, addedNothing) {
49443
49462
  return results.every((r) => NOTHING_NEW.has(r.status) || addedNothing.has(r.id));
49444
49463
  }
49445
49464
 
49465
+ // src/notReproduced.ts
49466
+ function notReproducedOn(env2, requestKind) {
49467
+ if (env2.QUIKPILOT_NOT_REPRODUCED?.trim().toLowerCase() === "off") return false;
49468
+ return !isFeatureKind(requestKind);
49469
+ }
49470
+ var MAX_TOLD_CHARS = 300;
49471
+ function notReproducedSentence(e) {
49472
+ const named2 = e.automationIds.slice(0, 4).map((id) => `[${id}]`).join(", ");
49473
+ const more = e.automationIds.length > 4 ? ` and ${e.automationIds.length - 4} more` : "";
49474
+ const one = e.automationIds.length === 1;
49475
+ const counts = e.failed > 0 ? `${e.passed} passed, ${e.failed} already failing before` : `${e.passed} passed`;
49476
+ return `The tests you wrote for ${named2}${more} ${one ? "passes" : "pass"} on the code before any change (${counts}), so the problem did not show. If a case describes the problem, make its test fail for the reason the case gives; if it still passes, keep the case id in its name and say so.`.slice(0, MAX_TOLD_CHARS);
49477
+ }
49478
+
49446
49479
  // src/workingFiles.ts
49447
49480
  var KEEP_WORKING_FILES_ENV = "QUIKPILOT_KEEP_WORKING_FILES";
49448
49481
  var MAX_WORKING_PATHS = 3;
@@ -50271,6 +50304,15 @@ var CodegenLoopFailure = class extends Error {
50271
50304
  criteriaKey;
50272
50305
  /** QUIKTR-2468: the refusal came on a later turn, not the loop's first request: about that request, never the version. */
50273
50306
  late;
50307
+ /** QUIKTR-2794 (`not_reproduced` only): the attempt's evidence, without the commit (the step adds it). Counts, ids and paths only. */
50308
+ notReproduced;
50309
+ /** QUIKTR-2794: the phase the loop was in when it ended (set by the loop's catch). */
50310
+ phase;
50311
+ /**
50312
+ * QUIKTR-2794: some test run of this attempt showed a test failing that had not failed before any change (a new failure, a regression, or a
50313
+ * failed run of one file): evidence AGAINST "it does not reproduce". Set by the loop's catch.
50314
+ */
50315
+ sawNewFailure;
50274
50316
  constructor(reason, runtimeCode, cause, detail, told) {
50275
50317
  super(`pilot.codegen loop failed: ${reason}${runtimeCode ? ` (${runtimeCode})` : ""}`);
50276
50318
  this.name = "CodegenLoopFailure";
@@ -50301,6 +50343,7 @@ function withUnreportable(stop2, tests) {
50301
50343
  return carried;
50302
50344
  }
50303
50345
  var MAX_RED_REFUSALS = 1;
50346
+ var MAX_NOT_REPRODUCED_FILES = 20;
50304
50347
  var MAX_SUMMARY_CHARS = 300;
50305
50348
  var READ_TOOLS = /* @__PURE__ */ new Set(["list_files", "read_file", "grep", "find_definition", "show_changes"]);
50306
50349
  var WRITE_TOOLS = /* @__PURE__ */ new Set(["edit_file", "write_file"]);
@@ -50745,6 +50788,23 @@ async function runCodegenLoop(args2, deps) {
50745
50788
  }
50746
50789
  return null;
50747
50790
  };
50791
+ const isRealTest = (path) => looksLikeTest(path) || args2.protectedTestPaths.includes(path);
50792
+ const notReproducedEvidence = (turn, isFinal) => {
50793
+ if (args2.notReproduced !== true || !harness || args2.phase !== "tests" || isFinal) return null;
50794
+ const ids = args2.redCheckIds ?? [];
50795
+ if (ids.length === 0) return null;
50796
+ if (redRefusals < 1 && args2.previousAttempt?.endedWith !== "not_reproduced") return null;
50797
+ if (handOverRefusal(turn, true) !== null) return null;
50798
+ const changed = overlay.changedPaths();
50799
+ if (!changed.every(isRealTest)) return null;
50800
+ const answer = freshTestAnswer();
50801
+ if (!answer || answer.timedOut || answer.total <= 0 || answer.regressions > 0 || answer.newFailures > 0) return null;
50802
+ const run3 = currentRedRuns().filter((r) => r.file === void 0 && r.answer === answer).at(-1);
50803
+ const seen = run3?.newPassing;
50804
+ if (!seen || !ids.every((id) => seen.some((name2) => idCoversCase(name2, id)))) return null;
50805
+ if (anyOwnTestFails()) return null;
50806
+ return { automationIds: [...ids], passed: answer.passed, failed: answer.failed, testFiles: changed.slice(0, MAX_NOT_REPRODUCED_FILES) };
50807
+ };
50748
50808
  const featureEvidence = async (reuse) => {
50749
50809
  if (!featureOn || !conflictTool) return;
50750
50810
  const all = conflictTool.recorded();
@@ -50963,6 +51023,14 @@ async function runCodegenLoop(args2, deps) {
50963
51023
  continue;
50964
51024
  }
50965
51025
  if (unexplained.length > 0) log({ event: "codegen.give_up_check", turn, outcome: "gave_up_again", tests: unexplained.length });
51026
+ const notShown = notReproducedEvidence(turn, isFinal);
51027
+ if (notShown) {
51028
+ log({ event: "codegen.red_check", turn, outcome: "not_reproduced", cases: notShown.automationIds.length, files: notShown.testFiles.length });
51029
+ const sentence = notReproducedSentence(notShown);
51030
+ const failure = new CodegenLoopFailure("not_reproduced", void 0, void 0, sentence, sentence);
51031
+ failure.notReproduced = notShown;
51032
+ throw failure;
51033
+ }
50966
51034
  const last = lastTestAnswer;
50967
51035
  const redLeft = harness && args2.phase === "tests" ? redProblem() : null;
50968
51036
  if (harness && args2.phase === "tests" && currentRedRuns().some((r) => r.failing.length > 0) && handOverRefusal(turn, true) === null && (redLeft === null || redLeft.kind === "passing")) {
@@ -51305,7 +51373,15 @@ async function runCodegenLoop(args2, deps) {
51305
51373
  }
51306
51374
  if (call.name === RUN_TESTS_TOOL && isTestAnswer(result.output) && result.status !== "duplicate") {
51307
51375
  const file = result.output.scope === "file" && isPlainObject(call.args) && typeof call.args.file === "string" ? call.args.file : void 0;
51308
- redRuns.push({ version: versionOfFiles(filesOnDisk()), ...file ? { file } : {}, failing: result.output.failingTests, truncated: result.output.truncated, answer: result.output });
51376
+ const newPassing = tests?.newPassingOf(call.id);
51377
+ redRuns.push({
51378
+ version: versionOfFiles(filesOnDisk()),
51379
+ ...file ? { file } : {},
51380
+ failing: result.output.failingTests,
51381
+ truncated: result.output.truncated,
51382
+ answer: result.output,
51383
+ ...newPassing ? { newPassing } : {}
51384
+ });
51309
51385
  } else if (call.name === RUN_TESTS_TOOL && result.status === "no_report" && result.reason === "test_command_failed" && isPlainObject(call.args) && typeof call.args.file === "string") {
51310
51386
  redRuns.push({ version: versionOfFiles(filesOnDisk()), file: call.args.file, failing: [], truncated: false, fileFailed: true });
51311
51387
  }
@@ -51379,6 +51455,8 @@ async function runCodegenLoop(args2, deps) {
51379
51455
  if (lastTestAnswer) failure.lastTestAnswer ??= lastTestAnswer;
51380
51456
  failure.steps ??= sentSteps();
51381
51457
  if (unreportable.length > 0 && failure.reason !== "test_conflict_unreportable") failure = unreportableFailure(unreportable, failure);
51458
+ if (args2.phase) failure.phase ??= args2.phase;
51459
+ failure.sawNewFailure ??= redRuns.some((r) => r.fileFailed === true || r.answer !== void 0 && !r.answer.timedOut && (r.answer.newFailures > 0 || r.answer.regressions > 0));
51382
51460
  throw failure;
51383
51461
  }
51384
51462
  }
@@ -51714,6 +51792,23 @@ function gateOf(g) {
51714
51792
  alreadyFailing: gateCount(x.alreadyFailing)
51715
51793
  };
51716
51794
  }
51795
+ var MAX_NOT_REPRODUCED_IDS = 200;
51796
+ var MAX_NOT_REPRODUCED_FILES2 = 20;
51797
+ var COMMIT_SHAPE = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/;
51798
+ var ID_SHAPE = /^[A-Za-z0-9][A-Za-z0-9._-]{0,59}$/;
51799
+ function clampNotReproduced(x) {
51800
+ if (!x) return void 0;
51801
+ const automationIds = [...new Set(x.automationIds.filter((id) => typeof id === "string" && ID_SHAPE.test(id)))].slice(0, MAX_NOT_REPRODUCED_IDS);
51802
+ if (automationIds.length === 0) return void 0;
51803
+ const testFiles = x.testFiles.filter((p) => typeof p === "string" && p.length > 0 && p.length <= 300).slice(0, MAX_NOT_REPRODUCED_FILES2);
51804
+ return {
51805
+ ...typeof x.commit === "string" && COMMIT_SHAPE.test(x.commit) ? { commit: x.commit } : {},
51806
+ automationIds,
51807
+ passed: whole3(x.passed),
51808
+ failed: whole3(x.failed),
51809
+ testFiles
51810
+ };
51811
+ }
51717
51812
  function whole3(n) {
51718
51813
  return typeof n === "number" && Number.isInteger(n) && n >= 0 ? n : 0;
51719
51814
  }
@@ -51860,6 +51955,7 @@ function buildCodegenLoopRecord(loop) {
51860
51955
  ...attempts.length > 0 ? { attempts } : {},
51861
51956
  ...phases.length > 0 ? { phases } : {},
51862
51957
  ...healed ? { heal: healed } : {},
51958
+ ...clampNotReproduced(loop.notReproduced) ? { notReproduced: clampNotReproduced(loop.notReproduced) } : {},
51863
51959
  reasoning,
51864
51960
  ...cut2 ? { truncated: true } : {}
51865
51961
  };
@@ -52635,9 +52731,17 @@ function buildCodegenLoopArgs(p, context = collectLoopContext({
52635
52731
  // QUIKTR-2445: the harness only (the loop decides where the key is in effect).
52636
52732
  ...p.mode === "loop-tests" && p.tests && p.harness !== false && p.databaseChange && p.databaseChange.length > 0 ? { databaseChange: { parts: p.databaseChange, ...p.databaseNames ? { names: p.databaseNames } : {} } } : {},
52637
52733
  // An approved test change stands whatever version the AI Runtime speaks: a person decided it.
52638
- ...p.approved && p.approved.length > 0 ? { approved: p.approved.map((r) => ({ targetPath: r.targetPath, newContent: r.newContent })) } : {}
52734
+ ...p.approved && p.approved.length > 0 ? { approved: p.approved.map((r) => ({ targetPath: r.targetPath, newContent: r.newContent })) } : {},
52735
+ // QUIKTR-2794: the harness only (the loop asks it in the tests phase alone). Never on the wire.
52736
+ ...p.mode === "loop-tests" && p.tests && p.harness !== false && p.notReproduced === true ? { notReproduced: true } : {}
52639
52737
  };
52640
52738
  }
52739
+ function notReproducedRun(f1, f2) {
52740
+ if (f1.reason !== "not_reproduced" || !f1.notReproduced) return null;
52741
+ if (f2.reason === "not_reproduced" && f2.notReproduced) return f2.notReproduced;
52742
+ const quiet = f2.phase === "tests" && (f2.reason === "cannot_complete" || f2.reason === "no_test_shows_bug") && f2.sawNewFailure !== true;
52743
+ return quiet ? f1.notReproduced : null;
52744
+ }
52641
52745
  var NO_SUMMARY = {
52642
52746
  turns: 0,
52643
52747
  toolCalls: 0,
@@ -52677,8 +52781,9 @@ function keptAttempt(n, summary) {
52677
52781
  }
52678
52782
  var keptWarning = (n) => `The ${n === 1 ? "first" : "second"} attempt said it could not finish, but its change passed every check the AI is held to apart from the project's tests, so QuikPilot kept it and let the checks decide.`;
52679
52783
  var failedAttempt = failedAttemptRecord;
52680
- function lose(p, summary, attempts, stop2, unreportable, failures = []) {
52681
- p.out.loop = buildCodegenLoopRecord({ ...summary ?? NO_SUMMARY, stopReason: stop2, attempts });
52784
+ function lose(p, summary, attempts, stop2, unreportable, failures = [], notReproduced) {
52785
+ const evidence = notReproduced ? { notReproduced: { ...p.baseCommit ? { commit: p.baseCommit } : {}, ...notReproduced } } : {};
52786
+ p.out.loop = buildCodegenLoopRecord({ ...summary ?? NO_SUMMARY, stopReason: stop2, attempts, ...evidence });
52682
52787
  const partsMissing = [...failures].reverse().find((f) => f.reason === "part_missing")?.detail;
52683
52788
  return new CodegenAttemptsExhausted(attempts, stop2, unreportable, partsMissing);
52684
52789
  }
@@ -52944,6 +53049,8 @@ async function runCodegenStep(p) {
52944
53049
  }
52945
53050
  const f2 = second.failure;
52946
53051
  log({ event: "codegen.attempt_end", attempt: 2, outcome: "failed", reason: f2.reason, ...internalCause(f2), ...f2.afterRecovery ? { afterRecovery: true } : {}, turns: f2.summary?.turns ?? 0, toolCalls: f2.summary?.toolCalls ?? 0, durationMs: secondMs });
53052
+ const notShown = notReproducedRun(f1, f2);
53053
+ if (notShown) throw lose(p, f2.summary, [firstRecord, failedAttempt(2, f2)], "not_reproduced", void 0, [f1, f2], notShown);
52947
53054
  throw lose(p, f2.summary, [firstRecord, failedAttempt(2, f2)], f2.reason === "out_of_time" ? "out_of_time" : "failed", f2.unreportable, [f1, f2]);
52948
53055
  }
52949
53056
 
@@ -54973,6 +55080,8 @@ var RUNNER_SWITCHES = {
54973
55080
  QUIKPILOT_RELATED_TESTS: ["off"],
54974
55081
  QUIKPILOT_MAP: ["off"],
54975
55082
  QUIKPILOT_TOOLS2: ["off"],
55083
+ // QUIKTR-2794: a tests-phase give-up whose tests all passed on the untouched code ends `not_reproduced` (QuikProjects: `not_reproduced`).
55084
+ QUIKPILOT_NOT_REPRODUCED: ["off"],
54976
55085
  QUIKPILOT_TEST_RULES: ["js"],
54977
55086
  QUIKPILOT_TEST_LOCATE: ["js"],
54978
55087
  QUIKPILOT_ROW_NAMES: ["js"],
@@ -55009,7 +55118,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
55009
55118
  var REPORT_COPY = "final-test-report.xml";
55010
55119
  var MAX_REPORT_BYTES = 5 * 1024 * 1024;
55011
55120
  var MAX_FILES = 200;
55012
- var RUNNER_VERSION = true ? "9.3.0-rc.95" : "dev";
55121
+ var RUNNER_VERSION = true ? "9.3.0-rc.96" : "dev";
55013
55122
  function safeDestination(base, repoPath) {
55014
55123
  if (!repoPath || (0, import_node_path27.isAbsolute)(repoPath)) return null;
55015
55124
  const destination = (0, import_node_path27.resolve)(base, repoPath);
@@ -55996,6 +56105,7 @@ async function runUnderGuard(env2, guard) {
55996
56105
  let conflictStop;
55997
56106
  let testConflicts;
55998
56107
  let approvedApplied;
56108
+ let baseCommit;
55999
56109
  let databaseChange;
56000
56110
  const contextLog = [];
56001
56111
  const codegenOut = {};
@@ -56063,6 +56173,12 @@ async function runUnderGuard(env2, guard) {
56063
56173
  if (why) throw new Error(`QuikProjects sent a ${label} name git cannot use safely (${why}), so QuikPilot did not start. Nothing was changed.`);
56064
56174
  }
56065
56175
  checkoutTargetBranch(packet.targetBranch);
56176
+ try {
56177
+ const head = headCommit().trim();
56178
+ if (/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/.test(head)) baseCommit = head;
56179
+ } catch {
56180
+ baseCommit = void 0;
56181
+ }
56066
56182
  const writeRoot = normaliseWorkspaceRoot(packet.workspaceRoot);
56067
56183
  scopeRoot = writeRoot;
56068
56184
  const workspaceListing = listWorkspaceFiles(writeRoot === "" ? null : writeRoot);
@@ -56304,6 +56420,10 @@ async function runUnderGuard(env2, guard) {
56304
56420
  ...conflictsOn && packet.fixFirst === true && process.env.QUIKPILOT_FIX_FIRST?.trim().toLowerCase() !== "off" ? { fixFirst: true } : {},
56305
56421
  // QUIKTR-2442: a feature run may propose add-only set-up for an existing test its change breaks.
56306
56422
  ...featureUpdates ? { featureTestUpdates: true } : {},
56423
+ // QUIKTR-2794: a bug whose tests pass on the untouched code ends `not_reproduced`; `QUIKPILOT_NOT_REPRODUCED=off` (QuikProjects: `not_reproduced`
56424
+ // in QUIKPILOT_RUNNER_OFF) switches it off, no release.
56425
+ ...notReproducedOn(process.env, packet.requestKind) ? { notReproduced: true } : {},
56426
+ ...baseCommit ? { baseCommit } : {},
56307
56427
  // QUIKTR-2509: the approved criteria in the person's words, when QuikProjects sent them (its switch QUIKPILOT_TICKET_HINTS).
56308
56428
  ...criteriaWording ? { criteriaWording } : {},
56309
56429
  ...approved && approved.files.length > 0 ? { approved: approved.files } : {},