@quikit/quikpilot-runner 9.3.0-rc.87 → 9.3.0-rc.88

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,8 @@ 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.88 - a test report the repository keeps in git is never sent, deleted or dropped from the pull request (QUIKTR-2705, RN-03).** After a run the runner sent every JUnit-shaped XML file in the checkout to QuikTest and then deleted them all, tracked files included, with no freshness filter; `git add -A` then staged the deletions, so the pull request deleted a repository's own report fixtures (up to 500 files), and the results held tests that never ran. When there was nowhere to send to, or the upload failed, nothing was deleted and the run's own report could be committed. (1) Only the run's own reports are sent: JUnit reports git does not track (`git ls-files`), written at or after the final test run's start (`freshSinceMs`, the gate's start, passed from verifyChange to run); the failed-run copy is read the same way. (2) Every untracked report is deleted right after the upload whatever it did (`removeRunReports`), before anything is staged; a tracked one is never touched. Outside a git repository nothing is tracked; when git fails any other way every report is taken as tracked, so nothing is sent or deleted. (3) The AI never deletes a file, so a staged deletion of a tracked file was made by a command: `checkGuardrail` unstages it (the file stays as it is on disk), and the run's notes name up to ten (`commit.deletions_left_out`, count only). New tests in `quiktestTrackedReports.test.ts` (real git: tracked fixtures, an old and a fresh report, three upload outcomes, a broken index, a command's deletion), `run.test.ts` and `verifyChange.test.ts`; 7 of 7 mutations turn tests red.
198
+
197
199
  **9.3.0-rc.87 - no repository git hook ever runs, and git never gets the runner's whole environment (QUIKTR-2704, RN-01).** Git runs a repository's own hooks (pre-commit, commit-msg, pre-push, post-checkout, reference-transaction ...) and hands each its whole environment; on push that environment held the token that can write to the customer's repository, and a hook is just a file in the repository (`npm install` installs husky's, and the AI could edit one). (1) Every git command the runner starts carries `-c core.hooksPath=<a folder that is never created>`, so git finds no hook: not on commit, push, checkout, nor on the ref update of a test-change proposal (`gitSafety.ts`). (2) Git gets `commandEnv`'s allow-list plus its own `GIT_*` settings, and the push alone adds its token header; the OIDC request token, the ambient job token and the runner's own addresses stay out. (3) `.husky/**`, `.githooks/**` and `lefthook*.yml` join the files the AI never sees, edits or commits (`genericDenies.ts` `HOOK_FILES`). A repository whose hooks format or lint on commit no longer runs them through QuikPilot; the runner runs the project's own format and lint commands itself. New tests in `gitHooksOff.test.ts` (real git: before the change all seven hooks ran, now none) and `gitSafety.test.ts`; 7 of 7 mutations turn tests red.
198
200
 
199
201
  **9.3.0-rc.86 - the AI service's privacy filter never reaches a file, and `internal_error` names its cause (QUIKTR-2644).** In QTGO-28 (12 Nov 2026) the AI Runtime's answer filter turned the test value `0.04978706837` in a code answer into `0.[ACCOUNT_REDACTED]`, the runner wrote it into an approved test change, and the run failed although the AI was right; the code attempt after it ended `internal_error` and the log said nothing more. The AI Runtime now leaves the code steps' answers alone (its own half of the ticket); the runner adds its own net. (1) A placeholder of the filter (`[ACCOUNT_REDACTED]`, `[AADHAAR_REDACTED]`, `[CARD_REDACTED]`, `[PAN_REDACTED]`, `[PHONE_REDACTED]`) that the AI's text ADDS is never written: `edit_file` (`replace` against `find`) and `write_file` (against the AI's own earlier write of that new file) answer `refused` with reason `redacted_text` and one fixed sentence; `report_test_conflict` is rejected with the new closed word `redacted_text` (`replace` against `find`, `caseValueTo` against `caseValueFrom`); the single-file path refuses it like a truncated rewrite. A placeholder already in a file is kept and the file can still be edited. (2) When a loop ends `internal_error`, `codegen.phase_end`, `codegen.attempt_end`, `investigate.loop_failed`, `targeting.loop_fallback` and `targeting.map_failed` carry `cause` (the error's class name, shape-checked, else `other`; `none` when nothing was thrown) and, for a Node system error, `causeCode` (`ENOENT`); never the message. What QuikProjects records is unchanged. New tests in `redactionGuard2644.test.ts`; switching the guards and the cause off turns 5 of 12 red.
package/dist/index.js CHANGED
@@ -16872,7 +16872,7 @@ var require_sourcemap_codec_umd = __commonJS2({
16872
16872
  intToChar[i3] = c;
16873
16873
  charToInt[c] = i3;
16874
16874
  }
16875
- function decodeInteger(reader, relative11) {
16875
+ function decodeInteger(reader, relative12) {
16876
16876
  let value = 0;
16877
16877
  let shift = 0;
16878
16878
  let integer = 0;
@@ -16887,10 +16887,10 @@ var require_sourcemap_codec_umd = __commonJS2({
16887
16887
  if (shouldNegate) {
16888
16888
  value = -2147483648 | -value;
16889
16889
  }
16890
- return relative11 + value;
16890
+ return relative12 + value;
16891
16891
  }
16892
- function encodeInteger(builder, num2, relative11) {
16893
- let delta = num2 - relative11;
16892
+ function encodeInteger(builder, num2, relative12) {
16893
+ let delta = num2 - relative12;
16894
16894
  delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
16895
16895
  do {
16896
16896
  let clamped = delta & 31;
@@ -29103,6 +29103,18 @@ function listFiles(pathspec) {
29103
29103
  const out2 = (0, import_node_child_process.execFileSync)("git", [...NO_HOOKS_ARGS, "ls-files", "-z", "--", pathspec], { encoding: "utf8", maxBuffer: LIST_MAX_BUFFER_BYTES, env: gitEnv() });
29104
29104
  return out2.split("\0").filter(Boolean);
29105
29105
  }
29106
+ function stagedDeletions() {
29107
+ const out2 = (0, import_node_child_process.execFileSync)("git", [...NO_HOOKS_ARGS, "diff", "--cached", "--name-only", "-z", "--no-renames", "--diff-filter=D"], {
29108
+ encoding: "utf8",
29109
+ maxBuffer: LIST_MAX_BUFFER_BYTES,
29110
+ env: gitEnv()
29111
+ });
29112
+ return out2.split("\0").filter(Boolean);
29113
+ }
29114
+ function unstage(paths) {
29115
+ if (paths.length === 0) return;
29116
+ (0, import_node_child_process.execFileSync)("git", [...NO_HOOKS_ARGS, "restore", "--staged", "--", ...paths], { encoding: "utf8", env: gitEnv() });
29117
+ }
29106
29118
  function hasStagedChanges() {
29107
29119
  try {
29108
29120
  (0, import_node_child_process.execFileSync)("git", [...NO_HOOKS_ARGS, "diff", "--cached", "--quiet"], { env: gitEnv() });
@@ -37528,8 +37540,8 @@ function resolveImport(fromPath, specifier, listing, mapSpecifier) {
37528
37540
  }
37529
37541
  if (/^(?:@\/|~\/|#|\$|\/)/.test(specifier)) return { kind: "unresolved", reason: "alias" };
37530
37542
  const clean = specifier.replace(/[?#].*$/, "");
37531
- const relative11 = clean === "." || clean === ".." || clean.startsWith("./") || clean.startsWith("../");
37532
- if (!relative11) return { kind: "external" };
37543
+ const relative12 = clean === "." || clean === ".." || clean.startsWith("./") || clean.startsWith("../");
37544
+ if (!relative12) return { kind: "external" };
37533
37545
  const base = import_node_path4.posix.normalize(import_node_path4.posix.join(import_node_path4.posix.dirname(fromPath), clean));
37534
37546
  if (base === ".." || base.startsWith("../") || import_node_path4.posix.isAbsolute(base)) return { kind: "unresolved", reason: "not found" };
37535
37547
  return probeBase(base, listing);
@@ -40468,11 +40480,12 @@ var import_node_module = require("node:module");
40468
40480
  var import_node_path12 = require("node:path");
40469
40481
 
40470
40482
  // src/baselineCheck.ts
40471
- var import_node_child_process6 = require("node:child_process");
40483
+ var import_node_child_process7 = require("node:child_process");
40472
40484
  var import_node_fs8 = require("node:fs");
40473
40485
  var import_node_path11 = require("node:path");
40474
40486
 
40475
40487
  // src/quiktest.ts
40488
+ var import_node_child_process6 = require("node:child_process");
40476
40489
  var import_node_fs6 = require("node:fs");
40477
40490
  var import_node_path10 = require("node:path");
40478
40491
  var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git"]);
@@ -40538,6 +40551,34 @@ function findJUnitReports(cwd = process.cwd(), opts = {}) {
40538
40551
  const named2 = (p) => /^junit.*\.xml$/i.test(p.split(/[\\/]/).pop() ?? "") ? 0 : 1;
40539
40552
  return found.sort((a, b) => named2(a) - named2(b) || a.localeCompare(b));
40540
40553
  }
40554
+ function trackedPaths(paths, cwd = process.cwd()) {
40555
+ if (paths.length === 0) return /* @__PURE__ */ new Set();
40556
+ try {
40557
+ const rel = paths.map((p) => (0, import_node_path10.relative)(cwd, p).replace(/\\/g, "/"));
40558
+ const out2 = (0, import_node_child_process6.execFileSync)("git", [...NO_HOOKS_ARGS, "ls-files", "-z", "--", ...rel], {
40559
+ cwd,
40560
+ encoding: "utf8",
40561
+ env: gitEnv(),
40562
+ maxBuffer: 16 * 1024 * 1024,
40563
+ stdio: ["ignore", "pipe", "pipe"]
40564
+ });
40565
+ const tracked = new Set(out2.split("\0").filter(Boolean));
40566
+ return new Set(paths.filter((_, i3) => tracked.has(rel[i3])));
40567
+ } catch (err2) {
40568
+ const said = String(err2.stderr ?? "");
40569
+ return /not a git repository/i.test(said) ? /* @__PURE__ */ new Set() : new Set(paths);
40570
+ }
40571
+ }
40572
+ function runReports(cwd = process.cwd(), opts = {}) {
40573
+ const found = findJUnitReports(cwd, opts);
40574
+ const tracked = trackedPaths(found, cwd);
40575
+ return found.filter((p) => !tracked.has(p));
40576
+ }
40577
+ function removeRunReports(cwd = process.cwd()) {
40578
+ const reports = runReports(cwd);
40579
+ for (const report of reports) (0, import_node_fs6.rmSync)(report, { force: true });
40580
+ return reports.length;
40581
+ }
40541
40582
  function mergeJUnitReports(texts) {
40542
40583
  if (texts.length === 1) return texts[0];
40543
40584
  const inner = texts.map((t) => {
@@ -40587,9 +40628,9 @@ function firstXmlIn(dir, namePattern) {
40587
40628
  const match = entries.find((e) => namePattern.test(e));
40588
40629
  return match ? (0, import_node_path10.join)(dir, match) : null;
40589
40630
  }
40590
- function readTestReportBytes(cwd = process.cwd()) {
40631
+ function readTestReportBytes(cwd = process.cwd(), opts = {}) {
40591
40632
  try {
40592
- const reports = findJUnitReports(cwd);
40633
+ const reports = runReports(cwd, opts);
40593
40634
  if (reports.length === 0) return null;
40594
40635
  if (reports.length === 1) return (0, import_node_fs6.readFileSync)(reports[0]);
40595
40636
  return Buffer.from(mergeJUnitReports(reports.map((r) => (0, import_node_fs6.readFileSync)(r, "utf8"))), "utf8");
@@ -40609,12 +40650,12 @@ function describeUnmatchedAutomationIds(unmatched) {
40609
40650
  return `${unmatched.length} generated test result(s) did not match any test case: ${named2} \u2014 check the automationId format.`;
40610
40651
  }
40611
40652
  async function reportToQuikTest(params) {
40612
- const { resultsUrl, runToken, githubServerUrl, githubRepository, githubRunId, generatedFiles, cwd } = params;
40653
+ const { resultsUrl, runToken, githubServerUrl, githubRepository, githubRunId, generatedFiles, cwd, freshSinceMs } = params;
40613
40654
  if (!resultsUrl) {
40614
40655
  console.log("packet.quikTest is null \u2014 this run has no QuikTest run to report into.");
40615
40656
  return null;
40616
40657
  }
40617
- const reports = findJUnitReports(cwd);
40658
+ const reports = runReports(cwd, { freshSinceMs });
40618
40659
  if (reports.length === 0) {
40619
40660
  console.warn("::warning::QuikPilot found no JUnit report \u2014 no results reported to QuikTest.");
40620
40661
  return null;
@@ -40635,7 +40676,6 @@ async function reportToQuikTest(params) {
40635
40676
  if (!res.ok) {
40636
40677
  throw new Error(`QuikTest report POST failed: ${res.status} ${res.statusText}`);
40637
40678
  }
40638
- for (const report of reports) (0, import_node_fs6.rmSync)(report, { force: true });
40639
40679
  let unmatched = [];
40640
40680
  try {
40641
40681
  const json = await res.json();
@@ -41110,7 +41150,7 @@ function restore(written) {
41110
41150
  }
41111
41151
  function untrackedFiles(cwd) {
41112
41152
  try {
41113
- const out2 = (0, import_node_child_process6.execFileSync)("git", [...NO_HOOKS_ARGS, "ls-files", "--others", "--exclude-standard", "-z"], {
41153
+ const out2 = (0, import_node_child_process7.execFileSync)("git", [...NO_HOOKS_ARGS, "ls-files", "--others", "--exclude-standard", "-z"], {
41114
41154
  env: gitEnv(),
41115
41155
  cwd,
41116
41156
  encoding: "utf8",
@@ -42323,19 +42363,19 @@ var import_node_crypto4 = require("node:crypto");
42323
42363
  var import_node_path19 = require("node:path");
42324
42364
 
42325
42365
  // src/overlayOnDisk.ts
42326
- var import_node_child_process8 = require("node:child_process");
42366
+ var import_node_child_process9 = require("node:child_process");
42327
42367
  var import_node_fs13 = require("node:fs");
42328
42368
  var import_node_path17 = require("node:path");
42329
42369
 
42330
42370
  // src/treeFingerprint.ts
42331
42371
  var import_node_crypto2 = require("node:crypto");
42332
- var import_node_child_process7 = require("node:child_process");
42372
+ var import_node_child_process8 = require("node:child_process");
42333
42373
  var import_node_fs12 = require("node:fs");
42334
42374
  var import_node_path16 = require("node:path");
42335
42375
  var MAX_HASHED_BYTES = 8 * 1024 * 1024;
42336
42376
  function defaultGitStatus(root) {
42337
42377
  try {
42338
- return (0, import_node_child_process7.execFileSync)("git", [...NO_HOOKS_ARGS, "status", "--porcelain=v1", "-z", "--untracked-files=all"], {
42378
+ return (0, import_node_child_process8.execFileSync)("git", [...NO_HOOKS_ARGS, "status", "--porcelain=v1", "-z", "--untracked-files=all"], {
42339
42379
  env: gitEnv(),
42340
42380
  cwd: root,
42341
42381
  encoding: "utf8",
@@ -42509,7 +42549,7 @@ function applyOverlay(root, files) {
42509
42549
  return { restore: restore2 };
42510
42550
  }
42511
42551
  function git2(root, args2) {
42512
- (0, import_node_child_process8.execFileSync)("git", [...NO_HOOKS_ARGS, ...args2], { env: gitEnv(), cwd: root, stdio: ["ignore", "ignore", "ignore"] });
42552
+ (0, import_node_child_process9.execFileSync)("git", [...NO_HOOKS_ARGS, ...args2], { env: gitEnv(), cwd: root, stdio: ["ignore", "ignore", "ignore"] });
42513
42553
  }
42514
42554
  function cleanUpAfterRun(root, beforePaths, afterStatus) {
42515
42555
  for (const token of afterStatus) {
@@ -48337,7 +48377,7 @@ var TargetingHttpError = class extends Error {
48337
48377
  };
48338
48378
 
48339
48379
  // src/dataPathCheck.ts
48340
- var import_node_child_process9 = require("node:child_process");
48380
+ var import_node_child_process10 = require("node:child_process");
48341
48381
  var import_node_fs17 = require("node:fs");
48342
48382
  var import_node_path21 = require("node:path");
48343
48383
 
@@ -48484,7 +48524,7 @@ function addressMatches(route, call) {
48484
48524
  }
48485
48525
  var git3 = (cwd, args2) => {
48486
48526
  try {
48487
- return (0, import_node_child_process9.execFileSync)("git", [...NO_HOOKS_ARGS, ...args2], { env: gitEnv(), cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: GIT_TIMEOUT_MS2, maxBuffer: GIT_MAX_BUFFER3 });
48527
+ return (0, import_node_child_process10.execFileSync)("git", [...NO_HOOKS_ARGS, ...args2], { env: gitEnv(), cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: GIT_TIMEOUT_MS2, maxBuffer: GIT_MAX_BUFFER3 });
48488
48528
  } catch {
48489
48529
  return "";
48490
48530
  }
@@ -51578,7 +51618,7 @@ function pythonImports(file, text3, ix) {
51578
51618
  const lookup = (dotted) => {
51579
51619
  for (const hit of ix.pyModules.get(dotted) ?? []) if (hit !== file) out2.add(hit);
51580
51620
  };
51581
- const relative11 = (dots, rest) => {
51621
+ const relative12 = (dots, rest) => {
51582
51622
  let base = dirOf(file);
51583
51623
  for (let i3 = 1; i3 < dots; i3++) base = dirOf(base);
51584
51624
  const joined = rest ? import_node_path22.posix.join(base, rest.replace(/\./g, "/")) : base;
@@ -51591,8 +51631,8 @@ function pythonImports(file, text3, ix) {
51591
51631
  const mod = from[2];
51592
51632
  const names = from[3].replace(/[()\\]/g, "").split(",").map((s) => s.trim().split(/\s+as\s+/)[0].trim()).filter((s) => /^\w+$/.test(s));
51593
51633
  if (dots > 0) {
51594
- for (const p of relative11(dots, mod)) out2.add(p);
51595
- for (const n of names) for (const p of relative11(dots, mod ? `${mod}.${n}` : n)) out2.add(p);
51634
+ for (const p of relative12(dots, mod)) out2.add(p);
51635
+ for (const n of names) for (const p of relative12(dots, mod ? `${mod}.${n}` : n)) out2.add(p);
51596
51636
  } else {
51597
51637
  lookup(mod);
51598
51638
  for (const n of names) lookup(`${mod}.${n}`);
@@ -52867,7 +52907,7 @@ async function runVerifyAndFix(p) {
52867
52907
  }
52868
52908
 
52869
52909
  // src/hunkCheck.ts
52870
- var import_node_child_process10 = require("node:child_process");
52910
+ var import_node_child_process11 = require("node:child_process");
52871
52911
  var import_node_fs21 = require("node:fs");
52872
52912
  var import_node_path24 = require("node:path");
52873
52913
  var MAX_REPORTED_HUNKS = 20;
@@ -52896,7 +52936,7 @@ function collectHunkCheckFiles(results, root, readHead = readCommittedText) {
52896
52936
  }
52897
52937
  function readCommittedText(root, path) {
52898
52938
  try {
52899
- return (0, import_node_child_process10.execFileSync)("git", [...NO_HOOKS_ARGS, "show", `HEAD:${path}`], { env: gitEnv(), cwd: root, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], maxBuffer: 8 * 1024 * 1024 });
52939
+ return (0, import_node_child_process11.execFileSync)("git", [...NO_HOOKS_ARGS, "show", `HEAD:${path}`], { env: gitEnv(), cwd: root, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], maxBuffer: 8 * 1024 * 1024 });
52900
52940
  } catch {
52901
52941
  return null;
52902
52942
  }
@@ -53384,7 +53424,7 @@ function exitCodeFailedMessage() {
53384
53424
  var EXIT_CODE_ONLY_NOTE = "The change was checked by the Test command's result only: it passed before and after the change, but no test report was found, so QuikPilot could not see individual tests or confirm that its new tests ran.";
53385
53425
 
53386
53426
  // src/existingRoutes.ts
53387
- var import_node_child_process11 = require("node:child_process");
53427
+ var import_node_child_process12 = require("node:child_process");
53388
53428
  var GREP_TIMEOUT_MS = 1e4;
53389
53429
  var MAX_HIT_LINES = 400;
53390
53430
  var MAX_OUTPUT_BYTES = 4e6;
@@ -53399,7 +53439,7 @@ function routeAlreadyNamed(cwd, mention) {
53399
53439
  const wanted = normalizePath(mention.path);
53400
53440
  let out2;
53401
53441
  try {
53402
- out2 = (0, import_node_child_process11.execFileSync)("git", [...NO_HOOKS_ARGS, "grep", "-I", "-n", "-F", "-e", anchor], {
53442
+ out2 = (0, import_node_child_process12.execFileSync)("git", [...NO_HOOKS_ARGS, "grep", "-I", "-n", "-F", "-e", anchor], {
53403
53443
  env: gitEnv(),
53404
53444
  cwd,
53405
53445
  encoding: "utf8",
@@ -53696,7 +53736,7 @@ function describeVanishedTests(vanished) {
53696
53736
  var import_node_path26 = require("node:path");
53697
53737
 
53698
53738
  // src/packageUse.ts
53699
- var import_node_child_process12 = require("node:child_process");
53739
+ var import_node_child_process13 = require("node:child_process");
53700
53740
  var PACKAGE_NAME = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/;
53701
53741
  var FILE_TYPES = ["*.ts", "*.tsx", "*.js", "*.jsx", "*.mjs", "*.cjs", "*.mts", "*.cts"];
53702
53742
  var GREP_TIMEOUT_MS2 = 1e4;
@@ -53708,7 +53748,7 @@ function packageImportedInWorkspace(pkg, root, cwd = process.cwd()) {
53708
53748
  if (!PACKAGE_NAME.test(pkg)) return false;
53709
53749
  const pathspecs = FILE_TYPES.map((type) => root ? `:(glob)${root}/**/${type}` : `:(glob)**/${type}`);
53710
53750
  try {
53711
- (0, import_node_child_process12.execFileSync)("git", [...NO_HOOKS_ARGS, "grep", "-q", "-E", "-e", importPattern(pkg), "--", ...pathspecs], {
53751
+ (0, import_node_child_process13.execFileSync)("git", [...NO_HOOKS_ARGS, "grep", "-q", "-E", "-e", importPattern(pkg), "--", ...pathspecs], {
53712
53752
  env: gitEnv(),
53713
53753
  cwd,
53714
53754
  stdio: "ignore",
@@ -53852,7 +53892,8 @@ async function verifyChange(ctx, results, undoable) {
53852
53892
  return fail(new Error(gateTimeoutMessage(limit, ctx.baselineMs)));
53853
53893
  }
53854
53894
  timing("gate", gateStartedAt, packet.commands.test);
53855
- outputs.finalTestReport = readTestReportBytes();
53895
+ outputs.finalTestStartedAt = gateStartedAt;
53896
+ outputs.finalTestReport = readTestReportBytes(void 0, { freshSinceMs: gateStartedAt });
53856
53897
  outputs.testCount = after.results?.size;
53857
53898
  outputs.vanishedTests = findVanishedTests(baseline, after, ctx.ignoreVanished) ?? void 0;
53858
53899
  if (outputs.vanishedTests) {
@@ -53911,16 +53952,19 @@ async function verifyChange(ctx, results, undoable) {
53911
53952
  var MAX_LEFT_OUT_NAMES2 = 10;
53912
53953
  function checkGuardrail(deniedPaths, writeRoot = "") {
53913
53954
  addAll(writeRoot || void 0);
53955
+ const deleted = stagedDeletions();
53956
+ unstage(deleted);
53957
+ const deletionsLeftOut = { count: deleted.length, names: deleted.filter((p) => matchesDeniedPath(p, readDenied(deniedPaths)) === null).slice(0, MAX_LEFT_OUT_NAMES2) };
53914
53958
  const violations = deniedPaths.flatMap((pattern) => diffCachedNamesMatching(pattern));
53915
53959
  if (violations.length > 0) {
53916
53960
  throw new Error(`QuikPilot touched denied paths:
53917
53961
  ${violations.join("\n")}`);
53918
53962
  }
53919
- if (!writeRoot) return { leftOut: 0, names: [], hidden: 0 };
53963
+ if (!writeRoot) return { leftOut: 0, names: [], hidden: 0, deletionsLeftOut };
53920
53964
  const outside = changedOutside(writeRoot);
53921
53965
  const protectedPatterns = readDenied(deniedPaths);
53922
53966
  const nameable = outside.filter((path) => matchesDeniedPath(path, protectedPatterns) === null);
53923
- return { leftOut: outside.length, names: nameable.slice(0, MAX_LEFT_OUT_NAMES2), hidden: outside.length - nameable.length };
53967
+ return { leftOut: outside.length, names: nameable.slice(0, MAX_LEFT_OUT_NAMES2), hidden: outside.length - nameable.length, deletionsLeftOut };
53924
53968
  }
53925
53969
 
53926
53970
  // src/run.ts
@@ -54491,14 +54535,14 @@ function writePhase0Marker(runId) {
54491
54535
  }
54492
54536
 
54493
54537
  // src/failureArtifact.ts
54494
- var import_node_child_process13 = require("node:child_process");
54538
+ var import_node_child_process14 = require("node:child_process");
54495
54539
  var import_node_fs26 = require("node:fs");
54496
54540
  var import_node_path29 = require("node:path");
54497
54541
  var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
54498
54542
  var REPORT_COPY = "final-test-report.xml";
54499
54543
  var MAX_REPORT_BYTES = 5 * 1024 * 1024;
54500
54544
  var MAX_FILES = 200;
54501
- var RUNNER_VERSION = true ? "9.3.0-rc.87" : "dev";
54545
+ var RUNNER_VERSION = true ? "9.3.0-rc.88" : "dev";
54502
54546
  function safeDestination(base, repoPath) {
54503
54547
  if (!repoPath || (0, import_node_path29.isAbsolute)(repoPath)) return null;
54504
54548
  const destination = (0, import_node_path29.resolve)(base, repoPath);
@@ -54508,7 +54552,7 @@ function safeDestination(base, repoPath) {
54508
54552
  }
54509
54553
  var BUNDLE_FILE = "quikpilot-change.bundle";
54510
54554
  function keepCommitBundle(repo, folder, branch) {
54511
- const git4 = (args2) => (0, import_node_child_process13.execFileSync)("git", [...NO_HOOKS_ARGS, ...args2], { env: gitEnv(), cwd: repo, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }).trim();
54555
+ const git4 = (args2) => (0, import_node_child_process14.execFileSync)("git", [...NO_HOOKS_ARGS, ...args2], { env: gitEnv(), cwd: repo, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }).trim();
54512
54556
  try {
54513
54557
  if (git4(["rev-parse", "--abbrev-ref", "HEAD"]) !== branch) return null;
54514
54558
  if (git4(["diff", "--name-only", "HEAD~1", "HEAD"]) === "") return null;
@@ -54580,11 +54624,11 @@ function writeFailureArtifact(input) {
54580
54624
  }
54581
54625
 
54582
54626
  // src/finalChange.ts
54583
- var import_node_child_process14 = require("node:child_process");
54627
+ var import_node_child_process15 = require("node:child_process");
54584
54628
  var import_node_fs27 = require("node:fs");
54585
54629
  var import_node_path30 = require("node:path");
54586
54630
  function statusPaths(root) {
54587
- const status = (0, import_node_child_process14.execFileSync)("git", [...NO_HOOKS_ARGS, "status", "--porcelain", "-z", "--untracked-files=all", "--no-renames"], {
54631
+ const status = (0, import_node_child_process15.execFileSync)("git", [...NO_HOOKS_ARGS, "status", "--porcelain", "-z", "--untracked-files=all", "--no-renames"], {
54588
54632
  env: gitEnv(),
54589
54633
  cwd: root,
54590
54634
  encoding: "utf8",
@@ -54616,7 +54660,7 @@ function allChangesAgainstBase(root) {
54616
54660
  }
54617
54661
 
54618
54662
  // src/nameEvidence.ts
54619
- var import_node_child_process15 = require("node:child_process");
54663
+ var import_node_child_process16 = require("node:child_process");
54620
54664
  var import_node_fs28 = require("node:fs");
54621
54665
  var import_node_path31 = require("node:path");
54622
54666
 
@@ -54683,7 +54727,7 @@ var escapeRegExp5 = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
54683
54727
  function filesNaming(word, ev, readable, denied) {
54684
54728
  let out2;
54685
54729
  try {
54686
- out2 = (0, import_node_child_process15.execFileSync)("git", [...NO_HOOKS_ARGS, "grep", "-l", "-I", "-w", "-F", "-e", word], {
54730
+ out2 = (0, import_node_child_process16.execFileSync)("git", [...NO_HOOKS_ARGS, "grep", "-l", "-I", "-w", "-F", "-e", word], {
54687
54731
  env: gitEnv(),
54688
54732
  cwd: ev.cwd,
54689
54733
  encoding: "utf8",
@@ -54729,24 +54773,24 @@ var slashes = (p) => p.replace(/\\/g, "/");
54729
54773
  var withoutDotSlash = (p) => p.replace(/^(\.\/)+/, "");
54730
54774
  function relativeToRepository(raw, cwd) {
54731
54775
  const path = withoutDotSlash(slashes(raw.trim()));
54732
- let relative11 = path;
54776
+ let relative12 = path;
54733
54777
  if (path.startsWith("/") || DRIVE_RE.test(path)) {
54734
54778
  const root = slashes(cwd).replace(/\/+$/, "");
54735
54779
  const windows = DRIVE_RE.test(path) || DRIVE_RE.test(root);
54736
54780
  const a = windows ? path.toLowerCase() : path;
54737
54781
  const b = windows ? root.toLowerCase() : root;
54738
54782
  if (!a.startsWith(`${b}/`)) return null;
54739
- relative11 = path.slice(root.length + 1);
54783
+ relative12 = path.slice(root.length + 1);
54740
54784
  }
54741
- return relative11;
54785
+ return relative12;
54742
54786
  }
54743
54787
  function inListing(raw, listing, cwd, workspaceRoot) {
54744
- const relative11 = relativeToRepository(raw, cwd);
54745
- if (relative11 === null) return null;
54746
- if (listing.has(relative11)) return relative11;
54788
+ const relative12 = relativeToRepository(raw, cwd);
54789
+ if (relative12 === null) return null;
54790
+ if (listing.has(relative12)) return relative12;
54747
54791
  if (workspaceRoot) {
54748
54792
  const root = slashes(workspaceRoot).replace(/\/+$/, "");
54749
- const joined = `${root}/${relative11}`;
54793
+ const joined = `${root}/${relative12}`;
54750
54794
  if (listing.has(joined)) return joined;
54751
54795
  }
54752
54796
  return null;
@@ -55436,6 +55480,12 @@ function leftOutNote(root, out2) {
55436
55480
  const head = `${out2.leftOut} changed file${out2.leftOut === 1 ? "" : "s"} outside ${root} ${out2.leftOut === 1 ? "was" : "were"} left out of the pull request`;
55437
55481
  return `${head} (changed while the project's commands ran): ${listed}.`;
55438
55482
  }
55483
+ function deletionsLeftOutNote(out2) {
55484
+ const more = Math.max(0, out2.count - out2.names.length);
55485
+ const listed = out2.names.length > 0 ? `${out2.names.join(", ")}${more > 0 ? ` and ${more} more` : ""}` : `${out2.count} not named`;
55486
+ const one = out2.count === 1;
55487
+ return `${out2.count} file${one ? "" : "s"} in the repository that a command deleted during the run ${one ? "was" : "were"} left out of the pull request (${one ? "it is" : "they are"} not deleted): ${listed}.`;
55488
+ }
55439
55489
  async function run2(env2) {
55440
55490
  const runStartedAt = Date.now();
55441
55491
  let hardFailure = false;
@@ -55455,6 +55505,7 @@ async function run2(env2) {
55455
55505
  let generatedFilePaths = [];
55456
55506
  let generatedResults = [];
55457
55507
  let finalTestReport = null;
55508
+ let finalTestStartedAt;
55458
55509
  let targetingResult;
55459
55510
  let baselineFindings;
55460
55511
  let vanishedTests;
@@ -55884,6 +55935,7 @@ async function run2(env2) {
55884
55935
  unsuppliedInputs = final.outputs.unsuppliedInputs;
55885
55936
  generatedFilePaths = final.outputs.generatedFilePaths;
55886
55937
  finalTestReport = final.outputs.finalTestReport;
55938
+ finalTestStartedAt = final.outputs.finalTestStartedAt;
55887
55939
  vanishedTests = final.outputs.vanishedTests;
55888
55940
  if (fixed2.heal && codegenMode === "loop-tests") codegenOut.loop = mergeHealRecord(codegenOut.loop, fixed2.heal, healCalls);
55889
55941
  if (!final.ok) {
@@ -55994,8 +56046,11 @@ async function run2(env2) {
55994
56046
  githubServerUrl: env2.githubServerUrl,
55995
56047
  githubRepository: env2.githubRepository,
55996
56048
  githubRunId: env2.githubRunId,
55997
- generatedFiles: generatedFilePaths
56049
+ generatedFiles: generatedFilePaths,
56050
+ freshSinceMs: finalTestStartedAt
55998
56051
  });
56052
+ const removedReports = removeRunReports();
56053
+ if (removedReports > 0) console.log(JSON.stringify({ event: "quiktest.reports_removed", count: removedReports }));
55999
56054
  const unmatchedWarning = quikTestReport ? describeUnmatchedAutomationIds(quikTestReport.unmatched) : null;
56000
56055
  if (unmatchedWarning) {
56001
56056
  warnings.push(unmatchedWarning);
@@ -56022,6 +56077,10 @@ async function run2(env2) {
56022
56077
  warnings.push(leftOutNote(scopeRoot, guarded));
56023
56078
  console.log(JSON.stringify({ event: "scope.left_out", count: guarded.leftOut, ...guarded.hidden > 0 ? { hidden: guarded.hidden } : {} }));
56024
56079
  }
56080
+ if (guarded?.deletionsLeftOut && guarded.deletionsLeftOut.count > 0) {
56081
+ warnings.push(deletionsLeftOutNote(guarded.deletionsLeftOut));
56082
+ console.log(JSON.stringify({ event: "commit.deletions_left_out", count: guarded.deletionsLeftOut.count }));
56083
+ }
56025
56084
  const installationToken = await exchangeForInstallationToken(
56026
56085
  env2.installationTokenUrl,
56027
56086
  runToken