@quikit/quikpilot-runner 9.3.0-rc.77 → 9.3.0-rc.79
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 +4 -0
- package/dist/index.js +36 -15
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -182,6 +182,10 @@ wrong (a field that arrives from a database row or a request), so it only warns
|
|
|
182
182
|
|
|
183
183
|
**9.3.0-rc.77 also - the tables a proposed migration names are looked for in the files the run could read, and the first note that names one nothing shows is sent back (QUIKTR-2448).** In the live trial of 9 Nov 2026 (F8, QTRIA-54) the draft pull request's SQL read `ALTER TABLE "app_quiktrack"."QptIssueComment"`; the model lives in `app_quikprojects` (renamed on 23 Sep 2026), the AI never opened the schema, and `schemaFileSeen` came out true because an empty schema-file name counted as seen. `migrationNames.ts` reads the existing tables a SQL migration names (`ALTER TABLE`, `CREATE INDEX ... ON`, `REFERENCES`, `INSERT INTO`; a table the same migration creates is left out; comments are ignored; a migration in an ORM's own language, such as Django's operations or Rails' `add_column`, names none and gets no check). `nameEvidence.ts` looks for each in tracked files the run could read (the read listing, not a read-denied path, not documentation: `.md`, `.mdx`, `.txt`, `.rst`, `.adoc`, `.doc`, `.docx`, not the run's own note): a bare table by its name as a whole word, a schema-qualified one by the schema and the table together in one file. `DatabaseChangeNote` takes an optional checker: the first `write_file` of the note that names a table nothing shows is answered `bad_args` with the names (identifiers only, two shown, within 300 characters) and is not recorded; the next write is recorded whatever it names, with the names still not found as `unchecked`. `finalDatabaseChange` sends them as the callback's `namesUnchecked` (at most 8, left out when none) and `schemaFileSeen` is false when no schema file is named. `run.ts` builds the checker from the read listing and the denied paths. A checker that fails says nothing. QuikProjects words the unchecked names on the draft pull request and must ship before this runner (its callback schema is strict). New tests: `migrationNames.test.ts`, `nameEvidence.test.ts` (the F8 repository in miniature: the right schema in the schema file, the old one only in a document and in a migration the space denies), the note and the report in `databaseChange.test.ts`, and four end-to-end scenarios on real git repositories (`codegenStep.databaseChange.test.ts`). Seventeen mutations turn tests red (documentation counted, read-denied files counted, a qualified name found by its table alone, the read listing ignored, the run's own note counted, a table the migration creates asked about, statements in comments read, the first write never or always sent back, the names not kept, an empty schema-file name seen, a failing checker breaking the note, the checker dropped by the step or the loop).
|
|
184
184
|
|
|
185
|
+
**9.3.0-rc.78 - a part of the design whose name or description is a little too long is cut, not a reason to drop every part (QUIKTR-2449).** In the live trial of 9 Nov 2026 (F8, QTRIA-56, "Let people pin a comment so it stays at the top of the thread") one part's description was 354 characters and the runner accepts 300. `partsFromDesign` returned NO parts for the whole list when any part failed a check, so `parts_check.on` said `parts: 0`: no parts check, no `storedProposals`, no database change proposed, and the pull request opened as a normal pull request with code written for a column that does not exist. The 150 and 300 limits are only words in the AI Runtime's design form, and the site passes the design through untouched, so the model can exceed them. Now `partsFromDesignCut` (and `partsFromDesign`, which wraps it) cuts a name over 150 and a `what` over 300 characters to the limit (never between the two halves of a character) and keeps every part; `designForTargeting` sends targeting the parts as the runner reads them (a cut design with every other key of the design and of each part kept, or the very same design object when nothing was cut); `parts_check.on` carries `cut: <parts that had a field cut>` only when something was cut. A design that is broken in any other way (an id not shaped `P<n>`, an unknown kind, a repeated id, an empty name, a `what` that is not text, more than eight parts, an entry that is not an object) still gives no parts, as before. Switched off, a bug run, a design with no parts, and a design that fits: every request, log line and callback is what it was. New tests in `partsCheck.test.ts` and `run.parts.test.ts` (the two rows that pinned "a long name or description gives no parts" moved into the new cases); ten mutations turn tests red.
|
|
186
|
+
|
|
187
|
+
**9.3.0-rc.79 - plain SQL files are no evidence for the table names of a proposed database change (QUIKTR-2450).** In the live rerun of 9 Nov 2026 (F8, QTRIA-57, rc.78) the draft pull request's SQL read `ALTER TABLE app_quiktrack."QtIssueComment"`: the schema (`app_quikprojects`) and the table (`QptIssueComment`) are both different, and the name check of rc.77 (QUIKTR-2448) said `namesUnchecked: 0`. The repository still holds an old dump (`packages/database/scripts/qt-schema.sql`, `CREATE TABLE app_quiktrack."QtIssueComment"`) and a manual check script that name exactly that pair; they are neither documentation nor read-denied, so the pair "appeared together in one readable file". `nameEvidence.ts` now counts a file as evidence only if it is not documentation and not a SQL file (`.sql`, `.dump`, `.psql`, `.ddl`, any letter case, wherever it sits): dumps, history and checks live there as often as the live schema, while the model definition (Prisma, a Python, Go or Ruby model, a JSON or YAML schema) and the application code say what the product uses now. A name found only in SQL files is reported as not checked: the AI is sent back once and the pull request says so. Run on the real trial repository, both statements of the two F8 runs are now flagged and the right one (`app_quikprojects."QptIssueComment"`) passes. Known cost: a repository whose only schema is plain SQL migrations gets the "could not check" sentence on every database proposal (one send-back, then a warning); a person checks the names, as the pull request already asks. Switched off, a bug run, and every other path: unchanged. New tests in `nameEvidence.test.ts` (the F8 repository in miniature, every SQL kind and case, the other languages' models, a bare table); six mutations turn tests red.
|
|
188
|
+
|
|
185
189
|
**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.
|
|
186
190
|
|
|
187
191
|
**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.
|
package/dist/index.js
CHANGED
|
@@ -48877,26 +48877,45 @@ var MARKER_RE = /\[(P\d+)(?:=(exists|proposed))?\]/g;
|
|
|
48877
48877
|
function isRecord4(x) {
|
|
48878
48878
|
return typeof x === "object" && x !== null && !Array.isArray(x);
|
|
48879
48879
|
}
|
|
48880
|
-
function
|
|
48881
|
-
if (
|
|
48880
|
+
function cutTo(text3, max) {
|
|
48881
|
+
if (text3.length <= max) return text3;
|
|
48882
|
+
const last = text3.charCodeAt(max - 1);
|
|
48883
|
+
const end = last >= 55296 && last <= 56319 ? max - 1 : max;
|
|
48884
|
+
return text3.slice(0, end);
|
|
48885
|
+
}
|
|
48886
|
+
function partsFromDesignCut(design) {
|
|
48887
|
+
const none = { parts: [], cut: 0 };
|
|
48888
|
+
if (!isRecord4(design) || !Array.isArray(design.parts)) return none;
|
|
48882
48889
|
const raw = design.parts;
|
|
48883
|
-
if (raw.length === 0 || raw.length > MAX_PARTS) return
|
|
48890
|
+
if (raw.length === 0 || raw.length > MAX_PARTS) return none;
|
|
48884
48891
|
const out2 = [];
|
|
48885
48892
|
const ids = /* @__PURE__ */ new Set();
|
|
48893
|
+
let cut2 = 0;
|
|
48886
48894
|
for (const p of raw) {
|
|
48887
|
-
if (!isRecord4(p)) return
|
|
48895
|
+
if (!isRecord4(p)) return none;
|
|
48888
48896
|
const { id, kind, name: name2, what } = p;
|
|
48889
|
-
if (typeof id !== "string" || !PART_ID_RE.test(id) || ids.has(id)) return
|
|
48890
|
-
if (typeof kind !== "string" || !PART_KINDS.includes(kind)) return
|
|
48891
|
-
if (typeof name2 !== "string" || name2.trim() === ""
|
|
48892
|
-
if (typeof what !== "string"
|
|
48897
|
+
if (typeof id !== "string" || !PART_ID_RE.test(id) || ids.has(id)) return none;
|
|
48898
|
+
if (typeof kind !== "string" || !PART_KINDS.includes(kind)) return none;
|
|
48899
|
+
if (typeof name2 !== "string" || name2.trim() === "") return none;
|
|
48900
|
+
if (typeof what !== "string") return none;
|
|
48901
|
+
const shortName = cutTo(name2, MAX_NAME_CHARS3);
|
|
48902
|
+
const shortWhat = cutTo(what, MAX_WHAT_CHARS);
|
|
48903
|
+
if (shortName !== name2 || shortWhat !== what) cut2 += 1;
|
|
48893
48904
|
ids.add(id);
|
|
48894
|
-
out2.push({ id, kind, name:
|
|
48905
|
+
out2.push({ id, kind, name: shortName, what: shortWhat });
|
|
48895
48906
|
}
|
|
48896
|
-
return out2;
|
|
48907
|
+
return { parts: out2, cut: cut2 };
|
|
48897
48908
|
}
|
|
48898
48909
|
function designForTargeting(design, on) {
|
|
48899
|
-
if (on
|
|
48910
|
+
if (on) {
|
|
48911
|
+
const read = partsFromDesignCut(design);
|
|
48912
|
+
if (read.parts.length > 0) {
|
|
48913
|
+
if (read.cut === 0) return { design, partsCheck: true };
|
|
48914
|
+
const raw = design.parts;
|
|
48915
|
+
const parts2 = raw.map((p, i3) => ({ ...p, name: read.parts[i3].name, what: read.parts[i3].what }));
|
|
48916
|
+
return { design: { ...design, parts: parts2 }, partsCheck: true };
|
|
48917
|
+
}
|
|
48918
|
+
}
|
|
48900
48919
|
if (!design || !Object.prototype.hasOwnProperty.call(design, "parts")) return { design, partsCheck: false };
|
|
48901
48920
|
const { parts: _parts, ...rest } = design;
|
|
48902
48921
|
void _parts;
|
|
@@ -53732,7 +53751,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
|
|
|
53732
53751
|
var REPORT_COPY = "final-test-report.xml";
|
|
53733
53752
|
var MAX_REPORT_BYTES = 5 * 1024 * 1024;
|
|
53734
53753
|
var MAX_FILES = 200;
|
|
53735
|
-
var RUNNER_VERSION = true ? "9.3.0-rc.
|
|
53754
|
+
var RUNNER_VERSION = true ? "9.3.0-rc.79" : "dev";
|
|
53736
53755
|
function safeDestination(base, repoPath) {
|
|
53737
53756
|
if (!repoPath || (0, import_node_path27.isAbsolute)(repoPath)) return null;
|
|
53738
53757
|
const destination = (0, import_node_path27.resolve)(base, repoPath);
|
|
@@ -53900,6 +53919,7 @@ var GREP_TIMEOUT_MS3 = 1e4;
|
|
|
53900
53919
|
var MAX_FILES2 = 200;
|
|
53901
53920
|
var MAX_FILE_BYTES2 = 2e6;
|
|
53902
53921
|
var DOC_FILE = /\.(?:md|mdx|markdown|txt|rst|adoc|docx?)$/i;
|
|
53922
|
+
var SQL_FILE = /\.(?:sql|dump|psql|ddl)$/i;
|
|
53903
53923
|
var escapeRegExp5 = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
53904
53924
|
function filesNaming(word, ev, readable, denied) {
|
|
53905
53925
|
let out2;
|
|
@@ -53914,7 +53934,7 @@ function filesNaming(word, ev, readable, denied) {
|
|
|
53914
53934
|
} catch {
|
|
53915
53935
|
return [];
|
|
53916
53936
|
}
|
|
53917
|
-
return out2.split("\n").filter((f) => f !== "" && f !== DATABASE_CHANGE_PATH && !DOC_FILE.test(f) && (readable === null || readable.has(f)) && matchesDeniedPath(f, denied) === null).slice(0, MAX_FILES2);
|
|
53937
|
+
return out2.split("\n").filter((f) => f !== "" && f !== DATABASE_CHANGE_PATH && !DOC_FILE.test(f) && !SQL_FILE.test(f) && (readable === null || readable.has(f)) && matchesDeniedPath(f, denied) === null).slice(0, MAX_FILES2);
|
|
53918
53938
|
}
|
|
53919
53939
|
function fileHasWord(cwd, file, word) {
|
|
53920
53940
|
try {
|
|
@@ -54600,8 +54620,9 @@ async function run2(env2) {
|
|
|
54600
54620
|
}
|
|
54601
54621
|
const outOfScope = (packet.outOfScope ?? []).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
54602
54622
|
const partsOn = partsCheckOn();
|
|
54603
|
-
const
|
|
54604
|
-
|
|
54623
|
+
const designRead = partsOn ? partsFromDesignCut(packet.design) : { parts: [], cut: 0 };
|
|
54624
|
+
const designParts = designRead.parts;
|
|
54625
|
+
if (partsOn) console.log(JSON.stringify({ event: "parts_check.on", parts: designParts.length, ...designRead.cut > 0 ? { cut: designRead.cut } : {} }));
|
|
54605
54626
|
const featureSwitch = featureTestUpdatesOn();
|
|
54606
54627
|
const setupStartedAt = Date.now();
|
|
54607
54628
|
runCommand(packet.commands.setup, "Setup");
|