@quikit/quikpilot-runner 9.3.0-rc.73 → 9.3.0-rc.75

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,8 +172,12 @@ 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.73 - an endpoint part no longer needs a route line in the added code; every part of a feature counts as built when a file planned for it changed (QUIKTR-2325).** In the live trial of 8 Nov 2026 (run QUIKSPL-370) the AI built every layer of a feature: a new POST restore route in `src/server.js` and a "Recently deleted" section in `public/index.html`. The run still failed in both attempts with "P3 Expense restore action (endpoint, no route added in src/ledger.js, src/server.js)", because an endpoint part also needed a route line in what its planned file added. That rule refused correct changes: the part's name gave no method or route (the request never named one), QuikSplit writes a route over two lines (`match("api/groups/:id/expenses/:itemId/restore", parts)`, then `method === "POST"` on the next line), and a change to an EXISTING endpoint (a filter added, a field added to its answer) adds no route line at all. Now every part, endpoints included, counts as built when one of the files targeting marked for it (`[Pn]`) was changed or created and is not a test file; targeting sees the code and ties each endpoint part to its file. The same rule holds at the code phase's DONE and at the last gate before the commit. A part none of whose planned files changed still gets the one send-back, which says none of its planned files was changed and names them, and then fails the run `part_missing` ("A part of the feature was not built: P1 … (endpoint, planned in …)."); a changed test file still builds no part. The last gate now reads only which planned files changed (`git status`), not their added lines, and the scope check's route helpers are private again, as in rc.70. Removed tests that asserted the route-line rule; new tests in `partsCheck.test.ts`, `codegenLoopParts.test.ts`, `run.parts.test.ts` and `finalChange.test.ts` (QuikSplit's two-line route, an existing Next.js handler changed in place, a name with no method or route, a change that only took lines out, and the trial's F4 shape passing DONE and the last gate) all fail on rc.72. Two mutations (a route requirement put back for endpoints; a test file counted as building a part) turn tests red. Switched off (`QUIKPILOT_PARTS_CHECK` not `on`), nothing changes.
176
-
175
+ **9.3.0-rc.75 - a part of a feature planned only in test files counts as built when one of them changed (QUIKTR-2325).** In the live trial of 9 Nov 2026 (F5, run cmw8rufpl0002hmgg02h2zkh7, "Show 20 expenses per page by default instead of 10.") the design listed "Existing default page size test" as a part, targeting planned it in the only file it could (`src/history.test.js`), and the person approved changing that test at the test decision. Both attempts still failed `part_missing` ("P4 Existing default page size test (logic, planned in src/history.test.js)"), because since rc.71 a changed test file never builds a part, so a part planned only in tests could never pass. Now a part whose planned files are all tests (the loop's own test rule) is built when one of them changed or was created; a part with any other planned file still needs one of those changed, and a test file alone still never builds it. The same rule holds at the code phase's DONE and at the last gate before the commit. The AI Runtime is told in the same release not to list a test or a test update as a part. New tests in `partsCheck.test.ts` (the F5 shape fails on rc.74; a test-only part none of whose files changed; a part planned in a source file and a test, only the test changed); two mutations (the rule removed; any planned test file counted) turn tests red. Switched off (`QUIKPILOT_PARTS_CHECK` not `on`), nothing changes.
176
+
177
+ **9.3.0-rc.74 - a line that calls an endpoint is no longer read by the scope check as a new route (found in the QUIKTR-2325 trial).** In the live trial of 8 Nov 2026 (F4, run cmw7okqnl0002d4d1hco1nqey) the AI built every part of the feature and 74/74 tests passed, then the run failed "public/index.html adds POST /api/groups, not declared in the design's API changes": the page's new Restore button calls the new endpoint with `fetch(`/api/groups/${groupId}/expenses/${expenseId}/restore`, { method: "POST" })`, and the scope check (QUIKTR-1081), which reads any added line naming a method and a path as a route being added, took that call for one. The design had named the endpoint in words only, so nothing matched it. A call uses a route, it cannot add one, so a line that calls an endpoint is now passed over: any `...fetch(` (fetch, useFetch, $fetch), axios, jQuery's ajax/get/post, XMLHttpRequest and its `open("POST", ...)`, an `http.` client call (Node, Angular's HttpClient, Go's Get/Post/NewRequest), Python's requests and httpx, Java's `HttpRequest.newBuilder`, and curl. A route defined on a server is still held to the design as before (`app.post(...)`, `router.post(...)`, `@app.route(..., methods=["POST"])`, `mux.HandleFunc("POST /...")`, `req.method === "POST"`, and the documenting comment of the original incident), and a file that both calls one route and defines an undeclared one still fails, naming only the defined one. New tests in `scopeCheck.test.ts` (the F4 line, thirteen client calls, six server definitions, and the mixed file) fail on rc.73 where they should; two mutations (the rule removed; any `.post(` counted as a call, which swallows Express and router routes) turn tests red. Not behind a switch: it changes only which added lines the existing scope check reads.
178
+
179
+ **9.3.0-rc.73 - an endpoint part no longer needs a route line in the added code; every part of a feature counts as built when a file planned for it changed (QUIKTR-2325).** In the live trial of 8 Nov 2026 (run QUIKSPL-370) the AI built every layer of a feature: a new POST restore route in `src/server.js` and a "Recently deleted" section in `public/index.html`. The run still failed in both attempts with "P3 Expense restore action (endpoint, no route added in src/ledger.js, src/server.js)", because an endpoint part also needed a route line in what its planned file added. That rule refused correct changes: the part's name gave no method or route (the request never named one), QuikSplit writes a route over two lines (`match("api/groups/:id/expenses/:itemId/restore", parts)`, then `method === "POST"` on the next line), and a change to an EXISTING endpoint (a filter added, a field added to its answer) adds no route line at all. Now every part, endpoints included, counts as built when one of the files targeting marked for it (`[Pn]`) was changed or created and is not a test file; targeting sees the code and ties each endpoint part to its file. The same rule holds at the code phase's DONE and at the last gate before the commit. A part none of whose planned files changed still gets the one send-back, which says none of its planned files was changed and names them, and then fails the run `part_missing` ("A part of the feature was not built: P1 … (endpoint, planned in …)."); a changed test file still builds no part. The last gate now reads only which planned files changed (`git status`), not their added lines, and the scope check's route helpers are private again, as in rc.70. Removed tests that asserted the route-line rule; new tests in `partsCheck.test.ts`, `codegenLoopParts.test.ts`, `run.parts.test.ts` and `finalChange.test.ts` (QuikSplit's two-line route, an existing Next.js handler changed in place, a name with no method or route, a change that only took lines out, and the trial's F4 shape passing DONE and the last gate) all fail on rc.72. Two mutations (a route requirement put back for endpoints; a test file counted as building a part) turn tests red. Switched off (`QUIKPILOT_PARTS_CHECK` not `on`), nothing changes.
180
+
177
181
  **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.
178
182
 
179
183
  **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 (the route-line rule was dropped in rc.73). 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, no longer read since rc.73; 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.
package/dist/index.js CHANGED
@@ -47475,7 +47475,11 @@ function partsForCode(parts2, targets) {
47475
47475
  }
47476
47476
  function missingAtDone(parts2, changed, isTest) {
47477
47477
  const changedSet = new Set(changed);
47478
- return parts2.filter((part) => !part.paths.some((p) => changedSet.has(p) && !isTest(p))).map((part) => ({ part, why: "unchanged" }));
47478
+ const built = (part) => {
47479
+ const onlyTests = part.paths.length > 0 && part.paths.every(isTest);
47480
+ return part.paths.some((p) => changedSet.has(p) && (onlyTests || !isTest(p)));
47481
+ };
47482
+ return parts2.filter((part) => !built(part)).map((part) => ({ part, why: "unchanged" }));
47479
47483
  }
47480
47484
  var PARTS_MESSAGE = "Your answer was sent back: the approved design lists parts this feature needs, and your change does not build each one yet. Each sentence names a part and the files the plan chose for it. This check is made once.";
47481
47485
  function withFiles(build, paths) {
@@ -50318,13 +50322,14 @@ var import_node_fs19 = require("node:fs");
50318
50322
  var ROUTE_METHOD_RE = /\b(GET|POST|PUT|PATCH|DELETE)\b/i;
50319
50323
  var ROUTE_PATH_RE = /\/[A-Za-z0-9_\-{}[\]]+(?:\/[A-Za-z0-9_\-:{}[\]]+)+/;
50320
50324
  var ROUTE_EXPORT_RE = /\bexport\s+(?:async\s+)?function\s+(GET|POST|PUT|PATCH|DELETE)\s*\(/;
50325
+ var CALL_LINE_RE = /fetch\s*\(|\baxios\b|(?:\$|\bjQuery)\.(?:ajax|get|post|getJSON)\s*\(|\bXMLHttpRequest\b|\.open\(\s*["'`](?:GET|POST|PUT|PATCH|DELETE)["'`]|\bhttp\.(?:get|post|put|patch|delete|head|request|postform|newrequest|newrequestwithcontext)\s*\(|\b(?:requests|httpx)\.(?:get|post|put|patch|delete|head|request)\s*\(|\bHttpRequest\.newBuilder\b|\bcurl\b/i;
50321
50326
  var NO_PATH = "(this file's route)";
50322
50327
  function detectMentions(text3) {
50323
50328
  const found = [];
50324
50329
  for (const line of text3.split("\n")) {
50325
50330
  const methodMatch = ROUTE_METHOD_RE.exec(line);
50326
50331
  const pathMatch = ROUTE_PATH_RE.exec(line);
50327
- if (methodMatch && pathMatch) {
50332
+ if (methodMatch && pathMatch && !CALL_LINE_RE.test(line)) {
50328
50333
  found.push({ method: methodMatch[1].toUpperCase(), path: pathMatch[0].replace(/:+$/, "") });
50329
50334
  }
50330
50335
  const exportMatch = ROUTE_EXPORT_RE.exec(line);
@@ -51952,7 +51957,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
51952
51957
  var REPORT_COPY = "final-test-report.xml";
51953
51958
  var MAX_REPORT_BYTES = 5 * 1024 * 1024;
51954
51959
  var MAX_FILES = 200;
51955
- var RUNNER_VERSION = true ? "9.3.0-rc.73" : "dev";
51960
+ var RUNNER_VERSION = true ? "9.3.0-rc.75" : "dev";
51956
51961
  function safeDestination(base, repoPath) {
51957
51962
  if (!repoPath || (0, import_node_path26.isAbsolute)(repoPath)) return null;
51958
51963
  const destination = (0, import_node_path26.resolve)(base, repoPath);