@quikit/quikpilot-runner 9.3.0-rc.71 → 9.3.0-rc.72

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
@@ -172,6 +172,8 @@ wrong (a field that arrives from a database row or a request), so it only warns
172
172
 
173
173
  **9.3.0-rc.62 - an approved test that is reported again is refused with what to do (QUIKTR-1951).** When a person has approved a change to an existing test and the AI reports that test again before the final test run (a second row of a table test that still expects the old behaviour), the answer was only `already_decided`: "Do not report it again". It now also says what the AI can do: finish the code first, and if rows of that test still fail in the final test run, the fix step that follows may report the test once more (QUIKTR-1844). Nothing about WHEN a test can be reported changes, so a person is still asked only when there is evidence; a test a person judged right, or reported in another file, keeps the bare refusal exactly. A new log event `codegen.conflict_refused_approved` (phase only) counts how often it happens. No change to the contract with the AI service. The AI Runtime's QUIKTR-1952 (a hung OpenRouter call is cut at 150 s for QuikPilot calls, so the backup model answers inside the runner's turn limit) ships with this version and needs no runner setting.
174
174
 
175
+ **9.3.0-rc.72 - a stored value the code already has, marked `[Pn=exists]` by targeting, no longer stops the run; only a new stored value QuikPilot cannot add here does (QUIKTR-2326).** In the live trial of 8 Nov 2026 a feature's design listed a stored part for a value that is already in the code ("The existing deleted state on an expense"). Nothing needed building for it, so targeting left it unmarked, and the run stopped before any code with "This feature needs a stored value QuikPilot cannot add here": a false stop. With the AI Runtime change that ships alongside, targeting marks such a part `[P5=exists]` at the start of a plan step that uses it (lower case `exists`; only a stored part may carry it). Behind `QUIKPILOT_PARTS_CHECK=on`, the runner now reads that mark: a stored part marked `=exists` is not a stop, and it is left out of the parts the code phase's DONE and the last gate before the commit hold the change to, so neither asks for a value that is already there to be built. Everything else is what it was: a stored part marked plainly (`[P5]`) must be built like any part, even when it also carries `=exists`; a stored part with no mark at all still stops the run `needs_database_change` with the same sentence; a part of any other kind whose only mark is `=exists` counts as unmarked and stops the run `part_not_placed`; a mark with any other ending (`[P5=foo]`, `[P5=EXISTS]`) is no mark. The log names the stored parts taken as already there (`parts_check.after_targeting`: a count and the ids, plus `ignored` for an `=exists` mark on a part that is not stored), only when there is one; never a step's text. Switched off, nothing changes. New tests in `partsCheck.test.ts`, `run.parts.test.ts` (the F4 shape: a screen, two endpoints and the page's data marked plainly and the stored value `[P5=exists]` goes on to write the code and commit, in two phases and in one) and `codegenLoopParts.test.ts`; three mutations (`=exists` read as a plain mark, the stored-only rule dropped, the existing part kept in the code phase's parts) all turn tests red. Until the AI Runtime sends `[Pn=exists]`, the run is what it was in rc.71.
176
+
175
177
  **9.3.0-rc.71 - a feature's parts must each be built before a pull request, a feature needing a database change stops before any code, and the files left out of a pull request are named (QUIKTR-2325, QUIKTR-2326).** In Round B (8 Nov 2026) pull requests opened for features with only one layer built and said nothing was wrong: F4 built two inner functions and never the route or the page section, F7 a card nothing feeds data, F8 used a database field that does not exist. With the AI Runtime's design step asked for them, a feature design now lists its `parts` (`P1`..`P8`, each `endpoint`, `screen`, `data`, `stored` or `logic`, with a name and what it is for), and targeting marks the plan step that builds each one (`[P2] add the restore route`); a stored value whose definition is outside the folder the run may change is left unmarked. Behind `QUIKPILOT_PARTS_CHECK=on` (off by default, read once; `parts_check.on` in the log) the runner then: (1) sends targeting `partsCheck: true` with the design as it is, and only then: otherwise `design.parts` is taken out, so the request is byte for byte rc.70's; (2) after targeting and before any code, stops the run when a part has no marked step: a stored part as `needs_database_change` ("This feature needs a stored value QuikPilot cannot add here: <name> — <what>. Add the field and its migration first, or narrow the feature."), any other as `part_not_placed` ("No file was planned for a part of the feature: <id> <name> (<kind>). Nothing was written. Run it again, or narrow the feature."), reported like a refused plan (a failed run whose reason is that sentence; no code, no commit, no pull request); (3) at the code phase's DONE (two phases only), holds each part to a changed or created file among its marked files that is not a test, and an endpoint to a route line with its method (and its route, when the name gives one) in what that file added, read with the scope check's own route patterns. A part missing gets ONE send-back (rule `done_rule`, a sentence per part naming its planned files, its own counter, never on a final turn), then the attempt fails `part_missing`, and the run's reason starts "A part of the feature was not built:" with the parts and their files; (4) just before the commit, after every fix and the project's Format, holds the FINAL change to the same rule once more, read from the working tree against the checkout's commit (`git status`, then each part file's added lines; a new file's whole text; the loop's own test rule), which also covers a give-up whose change was kept, one phase and the per-file calls: a part missing fails the run with the same "A part of the feature was not built:" reason, no commit, no push, no pull request (`parts_check.final` in the log). The parts never reach the tests phase, the one amendment, a fix or the review fix, and are never sent to the code-writing AI; logs carry the word, counts and ids only (`codegen.parts_check`, `parts_check.stop`). Always on, reporting only: the note about files a scoped stage left out now names them (at most ten), "2 changed files outside apps/x were left out of the pull request (changed while the project's commands ran): a, b + 1 protected file."; a protected file (the project's denied paths, credential, secret-shaped, other-ecosystem lock and git files) is counted, never named. New tests in `partsCheck.test.ts`, `codegenLoopParts.test.ts`, `targeting.parts.test.ts`, `run.parts.test.ts`, `finalChange.test.ts` and `guardrail.test.ts`; ten mutations (no once-guard, the counter shared with the import check, no route check, parts sent to the tests phase, parts not taken out when off, no stored stop; and for the last gate: logged but not failed, only with one phase, on the switch alone, no test rule) all turn tests red. Needs the AI Runtime and QuikProjects of QUIKTR-2325 for parts to exist at all; with none, nothing changes.
176
178
 
177
179
  **9.3.0-rc.70 - the scope check no longer fails a run for a route the design did declare when a comment puts a colon straight after the route (QUIKTR-2077).** Run QUIKSPL-354 (6 Nov 2026, a Task on the QuikSplit pilot repo) failed at the scope check with "adds POST /api/groups/:id/expenses/:expenseId/restore:, not declared in the design's API changes", although the design listed exactly that route. The route pattern lets `:` into every segment so that `:id` parameters match, and that also let a colon that only ended the route in a comment join the path, so `.../restore:` did not match the declared `.../restore`. Now a route read from the added code has trailing colons removed before it is compared (and before it is shown in the failure message). Nothing else changes: an undeclared route still fails, with or without a colon after it; comment lines are still read (the original QUIKTR-1081 incident was a documenting comment); parameter routes ending in `:name` are untouched. Four new tests in `scopeCheck.test.ts`; three mutations (no strip, strip a trailing `:name` too, skip comment lines) all turn tests red.
package/dist/index.js CHANGED
@@ -47443,7 +47443,7 @@ var MAX_PARTS = 8;
47443
47443
  var MAX_NAME_CHARS3 = 150;
47444
47444
  var MAX_WHAT_CHARS = 300;
47445
47445
  var PART_ID_RE = /^P\d+$/;
47446
- var MARKER_RE = /\[(P\d+)\]/g;
47446
+ var MARKER_RE = /\[(P\d+)(?:=(exists))?\]/g;
47447
47447
  function isRecord3(x) {
47448
47448
  return typeof x === "object" && x !== null && !Array.isArray(x);
47449
47449
  }
@@ -47472,19 +47472,35 @@ function designForTargeting(design, on) {
47472
47472
  void _parts;
47473
47473
  return { design: rest, partsCheck: false };
47474
47474
  }
47475
- function markedParts(targets) {
47476
- const marked = /* @__PURE__ */ new Map();
47475
+ function readMarks(targets) {
47476
+ const placed = /* @__PURE__ */ new Map();
47477
+ const exists = /* @__PURE__ */ new Set();
47477
47478
  for (const t of targets) {
47478
47479
  for (const step of t.planStepsImplemented ?? []) {
47479
47480
  if (typeof step !== "string") continue;
47480
47481
  for (const m of step.matchAll(MARKER_RE)) {
47481
- const paths = marked.get(m[1]) ?? [];
47482
+ if (m[2] === "exists") {
47483
+ exists.add(m[1]);
47484
+ continue;
47485
+ }
47486
+ const paths = placed.get(m[1]) ?? [];
47482
47487
  if (!paths.includes(t.path)) paths.push(t.path);
47483
- marked.set(m[1], paths);
47488
+ placed.set(m[1], paths);
47484
47489
  }
47485
47490
  }
47486
47491
  }
47487
- return marked;
47492
+ return { placed, exists };
47493
+ }
47494
+ function takenAsExisting(part, marks) {
47495
+ return part.kind === "stored" && marks.exists.has(part.id) && !marks.placed.has(part.id);
47496
+ }
47497
+ function existsMarked(parts2, targets) {
47498
+ const marks = readMarks(targets);
47499
+ const onlyExists = parts2.filter((p) => marks.exists.has(p.id) && !marks.placed.has(p.id));
47500
+ return {
47501
+ existing: onlyExists.filter((p) => takenAsExisting(p, marks)).map((p) => p.id),
47502
+ ignored: onlyExists.filter((p) => !takenAsExisting(p, marks)).map((p) => p.id)
47503
+ };
47488
47504
  }
47489
47505
  function words(text3) {
47490
47506
  return text3.trim().replace(/\s+/g, " ").replace(/[\s.;:,]+$/, "");
@@ -47502,8 +47518,8 @@ function notPlacedSentence(parts2) {
47502
47518
  }
47503
47519
  function afterTargeting(parts2, targets) {
47504
47520
  if (parts2.length === 0) return null;
47505
- const marked = markedParts(targets);
47506
- const unplaced = parts2.filter((p) => !marked.has(p.id));
47521
+ const marks = readMarks(targets);
47522
+ const unplaced = parts2.filter((p) => !marks.placed.has(p.id) && !takenAsExisting(p, marks));
47507
47523
  if (unplaced.length === 0) return null;
47508
47524
  const stored = unplaced.filter((p) => p.kind === "stored");
47509
47525
  if (stored.length > 0) return { reason: "needs_database_change", ids: stored.map((p) => p.id), sentence: storedSentence(stored) };
@@ -47520,8 +47536,8 @@ var PartsStopError = class extends Error {
47520
47536
  }
47521
47537
  };
47522
47538
  function partsForCode(parts2, targets) {
47523
- const marked = markedParts(targets);
47524
- return parts2.map((p) => ({ id: p.id, kind: p.kind, name: p.name, paths: marked.get(p.id) ?? [] }));
47539
+ const marks = readMarks(targets);
47540
+ return parts2.filter((p) => !takenAsExisting(p, marks)).map((p) => ({ id: p.id, kind: p.kind, name: p.name, paths: marks.placed.get(p.id) ?? [] }));
47525
47541
  }
47526
47542
  function methodOf(name2) {
47527
47543
  const m = ROUTE_METHOD_RE.exec(name2);
@@ -51985,7 +52001,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
51985
52001
  var REPORT_COPY = "final-test-report.xml";
51986
52002
  var MAX_REPORT_BYTES = 5 * 1024 * 1024;
51987
52003
  var MAX_FILES = 200;
51988
- var RUNNER_VERSION = true ? "9.3.0-rc.71" : "dev";
52004
+ var RUNNER_VERSION = true ? "9.3.0-rc.72" : "dev";
51989
52005
  function safeDestination(base, repoPath) {
51990
52006
  if (!repoPath || (0, import_node_path26.isAbsolute)(repoPath)) return null;
51991
52007
  const destination = (0, import_node_path26.resolve)(base, repoPath);
@@ -52849,6 +52865,19 @@ async function run2(env2) {
52849
52865
  `QuikPilot's generated plan gives two files identical instructions \u2014 ${describeOverlapWarnings(blockingOverlaps).join("; ")}`
52850
52866
  );
52851
52867
  }
52868
+ if (designParts.length > 0) {
52869
+ const exists = existsMarked(designParts, targeting.targets);
52870
+ if (exists.existing.length > 0 || exists.ignored.length > 0) {
52871
+ console.log(
52872
+ JSON.stringify({
52873
+ event: "parts_check.after_targeting",
52874
+ existing: exists.existing.length,
52875
+ ids: exists.existing,
52876
+ ...exists.ignored.length > 0 ? { ignored: exists.ignored } : {}
52877
+ })
52878
+ );
52879
+ }
52880
+ }
52852
52881
  const partsStop = afterTargeting(designParts, targeting.targets);
52853
52882
  if (partsStop) {
52854
52883
  console.log(JSON.stringify({ event: "parts_check.stop", reason: partsStop.reason, ids: partsStop.ids }));