@quikit/quikpilot-runner 9.3.0-rc.49 → 9.3.0-rc.50
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 +2 -0
- package/dist/index.js +18 -7
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -164,6 +164,8 @@ wrong (a field that arrives from a database row or a request), so it only warns
|
|
|
164
164
|
|
|
165
165
|
**9.3.0-rc.46 — the existing tests to read first include the ones that reach the code through one file in between (QUIKTR-1845).** On the live bug-6 run (QTRIA-17) the design changed `lib/services/issueFilters.ts`, and the two tests that assert the bug import `app/api/issues/route.ts`, which imports it, so the list of existing tests the AI reads before writing (`testsToCheck`, rc.44) was empty. When fewer than 3 test files are found by name or a direct import, the runner now takes one more step: of the files the tests import (code, not a test, not under a denied path; the 150 most shared first) it keeps the ones that import a changed file, and adds the tests that import them, after the others and up to 10 in all. A file in between imported by more than 12 tests only brings the tests named after it (a route by its folder) or after the changed file. Paths only, as before. With 3 or more found the list is exactly as in rc.45. Also in rc.46: everything in rc.45. Nothing else changes.
|
|
166
166
|
|
|
167
|
+
**9.3.0-rc.50 - the code-writing tool loop is the default on every repository, with a per-project switch (QUIKTR-1888).** Until now a run wrote code through the tool loop (look around, write tests first, run the project's tests, link tests to cases, stop to ask when an existing test pins the bug) only for very large repositories (map mode) or where someone had edited the workflow file by hand; every ordinary repository ran the old way, one AI call per file and no test run, so none of what was built since (tests first, case links, the stop about existing tests) reached it. Now the runner's own default is the loop with tests for writing code (`loop-tests`) and the read-only loop for finding the files (`loop`). Precedence, first known word wins: the run packet's per-project setting (new optional `codegenMode` / `targetingMode`, sent by QuikProjects from the switch "Write code with tools and run my tests"), then the environment variables `QUIKPILOT_CODEGEN_MODE` / `QUIKPILOT_TARGETING_MODE` in the workflow (an override a repository can keep), then the default. `single` turns the loop off. A packet without the fields (an older QuikProjects) gets the default. Large repositories still force the loop, as before. If the loop cannot finish, the run fails with "nothing was written" as it already did (it falls back to the per-file call only when the AI service has no loop at all). Also in rc.50: a Go test file in the repository's root is linked to its case. The live regression check for this change (decimal Mod, Go) wrote two tests that failed on the old code, but the red check saw no failing test: the report names a root-level Go test by the module's import path ("github.com/shopspring/decimal"), which names no folder of the file, so the place check never matched and the test was not tagged to its case. A path-shaped place now matches a root-level file (the test's name must still match). Also in rc.50: everything in rc.49.
|
|
168
|
+
|
|
167
169
|
**9.3.0-rc.49 - Go and Python runs are no longer failed by the test placement check, and a push retries (QUIKTR-1884, QUIKTR-1885).** The placement check (before the write) compared a test file with the files named in the repository's own test report, and took a testcase's classname for a file. In JavaScript a classname is a file path; in Go it is the package path ("github.com/acme/app") and in pytest a dotted module ("tests.test_auth.TestLogin"), so the report held names but no file, and every real Go or Python test file was called "never discovered by the test runner" - found on the first live Go run (decimal). Now only a classname that looks like a file counts; a report with no file in it means "cannot tell" and the check steps aside, as its own description always said (the later check that every claimed case was really run still decides). Also: a push right after the installation token was minted can be answered "Repository not found" by GitHub although the token works seconds later (a test-change proposal failed that way on two live QuikIT runs in a row). The push now waits and tries again up to three more times (3, 6 and 12 seconds), only for that exact answer; any other failure fails at once as before, and each retry is logged (git.push_retry, git.push_retry_ok). Also in rc.49: everything in rc.48.
|
|
168
170
|
|
|
169
171
|
**9.3.0-rc.47 — an approved test change that does not fit is named, and can go back to a person (QUIKTR-1844).** On the live bug-3 re-run (QTRIA-16, 26 Oct) a person approved one change to a table test (`toBe(401)` became `toBe(200)` for all 11 rows); with the code complete, 10 rows still failed, the failure said only "existing tests that may expect the old behaviour", and the fix turn, seeing names only, took the approval as proof the test was right and gave up with a stop left. Now, when rows of a test a person approved changing still fail at the final check: the failure message says so first (`the test change approved for <file>: "<title>" does not fit 10 of its 11 rows (now: "expected 404 to be 200")`); the fix turn lists those rows first and shows the first line of each failure (scrubbed, at most 120 characters; approved tests only, every other existing test is still shown by name only); the test is sent as `stillFailing: true` in `decidedTests` (contract §38.12); and, while stops remain, the AI may report that test once more with a change written against the approved text. The revised proposal's line carries `revises` (the commit it replaces) and `misfit` (counts and up to 3 short lines), its message says "This revises the change approved in <sha>", and when approved it replaces the earlier change instead of being merged with it. A revision is checked like any report (inside the test, expectations only). Needs the AI service with §38.12 (it refuses `stillFailing` otherwise, so release that first). A run with no approved test changes, or whose approved tests pass, is exactly as in rc.46. Also in rc.47: everything in rc.46.
|
package/dist/index.js
CHANGED
|
@@ -34025,7 +34025,7 @@ function placeMatches(c, path) {
|
|
|
34025
34025
|
if (cls.slice(0, k2).join("/") === segs.slice(-k2).join("/")) return true;
|
|
34026
34026
|
}
|
|
34027
34027
|
const dir = segs.slice(0, -1);
|
|
34028
|
-
if (dir.length === 0) return
|
|
34028
|
+
if (dir.length === 0) return /\//.test(c.classname ?? "");
|
|
34029
34029
|
const k = Math.min(dir.length, cls.length);
|
|
34030
34030
|
return cls.slice(-k).join("/") === dir.slice(-k).join("/");
|
|
34031
34031
|
}
|
|
@@ -35962,6 +35962,7 @@ function flushCodegenResults(results) {
|
|
|
35962
35962
|
|
|
35963
35963
|
// src/codegenMode.ts
|
|
35964
35964
|
var CODEGEN_MODE_ENV = "QUIKPILOT_CODEGEN_MODE";
|
|
35965
|
+
var DEFAULT_CODEGEN_MODE = "loop-tests";
|
|
35965
35966
|
function parse4(value) {
|
|
35966
35967
|
if (typeof value !== "string") return null;
|
|
35967
35968
|
const v = value.trim().toLowerCase();
|
|
@@ -35971,7 +35972,7 @@ function parse4(value) {
|
|
|
35971
35972
|
return null;
|
|
35972
35973
|
}
|
|
35973
35974
|
function resolveCodegenMode(env2 = process.env, packetSetting) {
|
|
35974
|
-
return parse4(packetSetting) ?? parse4(env2[CODEGEN_MODE_ENV]) ??
|
|
35975
|
+
return parse4(packetSetting) ?? parse4(env2[CODEGEN_MODE_ENV]) ?? DEFAULT_CODEGEN_MODE;
|
|
35975
35976
|
}
|
|
35976
35977
|
|
|
35977
35978
|
// src/ownedRepository.ts
|
|
@@ -45124,6 +45125,7 @@ function buildRepoScope(i2) {
|
|
|
45124
45125
|
|
|
45125
45126
|
// src/targetingMode.ts
|
|
45126
45127
|
var TARGETING_MODE_ENV = "QUIKPILOT_TARGETING_MODE";
|
|
45128
|
+
var DEFAULT_TARGETING_MODE = "loop";
|
|
45127
45129
|
function parse5(value) {
|
|
45128
45130
|
if (typeof value !== "string") return null;
|
|
45129
45131
|
const v = value.trim().toLowerCase();
|
|
@@ -45134,7 +45136,7 @@ function parse5(value) {
|
|
|
45134
45136
|
function resolveTargetingMode(env2 = process.env, packetSetting) {
|
|
45135
45137
|
const fromSetting = parse5(packetSetting);
|
|
45136
45138
|
if (fromSetting) return fromSetting;
|
|
45137
|
-
return parse5(env2[TARGETING_MODE_ENV]) ??
|
|
45139
|
+
return parse5(env2[TARGETING_MODE_ENV]) ?? DEFAULT_TARGETING_MODE;
|
|
45138
45140
|
}
|
|
45139
45141
|
|
|
45140
45142
|
// src/installationToken.ts
|
|
@@ -45308,7 +45310,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
|
|
|
45308
45310
|
var REPORT_COPY = "final-test-report.xml";
|
|
45309
45311
|
var MAX_REPORT_BYTES = 5 * 1024 * 1024;
|
|
45310
45312
|
var MAX_FILES = 200;
|
|
45311
|
-
var RUNNER_VERSION = true ? "9.3.0-rc.
|
|
45313
|
+
var RUNNER_VERSION = true ? "9.3.0-rc.50" : "dev";
|
|
45312
45314
|
function safeDestination(base, repoPath) {
|
|
45313
45315
|
if (!repoPath || (0, import_node_path24.isAbsolute)(repoPath)) return null;
|
|
45314
45316
|
const destination = (0, import_node_path24.resolve)(base, repoPath);
|
|
@@ -45978,7 +45980,15 @@ async function run(env2) {
|
|
|
45978
45980
|
console.log(JSON.stringify({ event: "tools.decided", ...toolsDecision }));
|
|
45979
45981
|
const tools2 = toolsDecision.on ? buildToolsV2Env({ scope, readText: readCheckoutText2, notes: notesEnabled() }) : void 0;
|
|
45980
45982
|
if (mapMode) {
|
|
45981
|
-
console.log(
|
|
45983
|
+
console.log(
|
|
45984
|
+
JSON.stringify(
|
|
45985
|
+
startMapMode({
|
|
45986
|
+
testCommand: packet.commands.test,
|
|
45987
|
+
targetingMode: resolveTargetingMode(process.env, packet.targetingMode),
|
|
45988
|
+
codegenMode: resolveCodegenMode(process.env, packet.codegenMode)
|
|
45989
|
+
})
|
|
45990
|
+
)
|
|
45991
|
+
);
|
|
45982
45992
|
}
|
|
45983
45993
|
const outOfScope = (packet.outOfScope ?? []).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
45984
45994
|
const setupStartedAt = Date.now();
|
|
@@ -46020,7 +46030,8 @@ async function run(env2) {
|
|
|
46020
46030
|
// without a completed look calls it exactly as before.
|
|
46021
46031
|
// QUIKTR-1580 - and the scope: in map mode it is how targeting sees the repository; since QUIKTR-1582 it is also handed over in listing
|
|
46022
46032
|
// mode, only so the record can say which folder the run could change (listing-mode targeting reads nothing else from it).
|
|
46023
|
-
|
|
46033
|
+
// QUIKTR-1888 - the mode the packet and the environment settle on, so the project's switch reaches the targeting step too.
|
|
46034
|
+
{ ...packet.findings ? { findings: packet.findings } : {}, scope, ...tools2 ? { tools2 } : {}, mode: resolveTargetingMode(process.env, packet.targetingMode) }
|
|
46024
46035
|
);
|
|
46025
46036
|
targetingResult = targeting;
|
|
46026
46037
|
for (const w of targeting.warnings ?? []) {
|
|
@@ -46072,7 +46083,7 @@ async function run(env2) {
|
|
|
46072
46083
|
targeting.targets,
|
|
46073
46084
|
targeting.skippedCases ?? []
|
|
46074
46085
|
);
|
|
46075
|
-
const codegenMode = mapMode ? "loop-tests" : resolveCodegenMode();
|
|
46086
|
+
const codegenMode = mapMode ? "loop-tests" : resolveCodegenMode(process.env, packet.codegenMode);
|
|
46076
46087
|
const keepOnGiveUp = codegenMode === "loop-tests" && packet.guardrails.maxHealIterations > 0 && process.env.QUIKPILOT_KEEP_ON_GIVE_UP?.trim().toLowerCase() !== "off";
|
|
46077
46088
|
const callFunctionAllowed = callFunctionEnabled(env2.githubRepository, codegenMode);
|
|
46078
46089
|
const callFunctionFits = callFunctionFitsTargets(targeting.targets, discoveredTestsOf(packet.testDiscovery));
|