@quikit/quikpilot-runner 9.3.0-rc.65 → 9.3.0-rc.66
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 +42 -10
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
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.66 - the early look's report is tried again when QuikProjects cannot take it (QUIKTR-1999).** On 2 Nov two early looks (QuikIT Q2, QuikSplit S5) finished their work and then logged `investigate.failed report_failed`: the one report to QuikProjects failed once, while several runs overlapped and its database was busy, and was never tried again, so the look was lost and the run waited out its 200 s. The report now follows the rule the main callback got in rc.43, with a longer wait: a server error (500/502/503/504) or a dropped connection is tried again, 6 tries in all, waiting 2, 5, 10, 20 and 30 s (about 67 s, because the database stalls seen on 2 Nov and in the stress test lasted over 75 s), sending the same bytes each time; any other answer (a refusal such as 403) is final. When it still fails, the job log says which status the server last answered (`status`) or which connection error it was (`error`), next to the same closed reason as before. The main callback (`reportBack`) is unchanged. Needs the QuikProjects change from the same ticket to be most useful (it answers a busy database with 503 + Retry-After instead of a bare 500 or a 403), but works without it. Also in rc.66: everything in rc.65.
|
|
176
|
+
|
|
175
177
|
**9.3.0-rc.65 - the one correction of QuikPilot's own test now works on Python and Go (QUIKTR-2000).** When the code phase gives up because exactly one of the tests QuikPilot wrote itself still fails, it gets one chance to correct that test's expected value (QUIKTR-1608). Until now the runner recognised the failing test only by its file path, but pytest names a test by its module (`tests.test_grouping`) and gotestsum by its package, so on those languages the correction never ran: sqlparse run QTPY-15 (2 Nov) logged `frozenFailing: 0, amendFiles: 0` with exactly one of its own tests failing, and failed with no PR. Both places that match failing tests to the run's frozen tests (the amendment and the hand-over of a DONE whose own test still fails) now use the rule QUIKTR-1950 uses for the same names (`idPlaceMatches`); a path name is matched exactly as before. When several frozen files share the test's place (a Go or Java package), the one whose text defines the test is chosen, and when that is not exactly one file nothing is amended. The give-up log line also says how many failing tests the last run listed (`failingSeen`). Nothing changes on the AI Runtime or in QuikProjects; `QUIKPILOT_ROW_NAMES=js` gives back the old path-only matching. Also in rc.65: everything in rc.64.
|
|
176
178
|
|
|
177
179
|
**9.3.0-rc.64 - every re-read of a file says why it happened, and (switched off by default) the files the AI is working in are no longer shrunk while it works on them (QUIKTR-1963).** In QuikIT bug 3 (31 Oct) the AI read the same 429-line test file 28 times in 40 turns and gave up. On the notes versions an answer older than the latest three turns is shrunk to a one-line stub on every turn, whatever the request's size, with no exception for the file being worked on; but some re-reads came one turn later, so paging through the file or indecision may be part of it. (1) Always on, log only: each `read_file` on the turn line now carries its line range, and a read of a file already read in the loop logs `codegen.reread` with the earlier read's turn and range, how the two ranges meet (`same`, `overlapping`, `disjoint`), what had become of the earlier answer (`whole`, `stubbed`, `dropped`, `after_write`) and whether it was answered as a repeat; `codegen.reread_summary` counts them at the loop's end. Paths and line numbers only, never file text. (2) `QUIKPILOT_KEEP_WORKING_FILES=on` (off by default; the workflow can set it): the newest answer per range of the files the AI is working in (a file it changed, or read in two different turns; at most three files and 40,000 characters, newest first) stays whole instead of shrinking, and only answers made after the file's latest change count, so a stale read is never kept; a repeat's copy of an earlier answer can then shrink like the answer itself. The hard ceiling's last-resort drop still drops anything, so a request never exceeds today's limit. With the switch off every request the AI Runtime receives is what it was. Nothing changes on the AI Runtime or in QuikProjects. Also in rc.64: everything in rc.63.
|
package/dist/index.js
CHANGED
|
@@ -51633,7 +51633,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
|
|
|
51633
51633
|
var REPORT_COPY = "final-test-report.xml";
|
|
51634
51634
|
var MAX_REPORT_BYTES = 5 * 1024 * 1024;
|
|
51635
51635
|
var MAX_FILES = 200;
|
|
51636
|
-
var RUNNER_VERSION = true ? "9.3.0-rc.
|
|
51636
|
+
var RUNNER_VERSION = true ? "9.3.0-rc.66" : "dev";
|
|
51637
51637
|
function safeDestination(base, repoPath) {
|
|
51638
51638
|
if (!repoPath || (0, import_node_path26.isAbsolute)(repoPath)) return null;
|
|
51639
51639
|
const destination = (0, import_node_path26.resolve)(base, repoPath);
|
|
@@ -53266,13 +53266,44 @@ async function postInvestigate(gateway, contextData, signal) {
|
|
|
53266
53266
|
if (!res.ok) throw new TargetingHttpError(res.status, res.statusText);
|
|
53267
53267
|
return noteSpend(await res.json(), "investigate");
|
|
53268
53268
|
}
|
|
53269
|
-
|
|
53270
|
-
|
|
53271
|
-
|
|
53272
|
-
|
|
53273
|
-
|
|
53274
|
-
|
|
53275
|
-
|
|
53269
|
+
var INVESTIGATION_REPORT_RETRY_WAITS_MS = [2e3, 5e3, 1e4, 2e4, 3e4];
|
|
53270
|
+
var InvestigationReportError = class extends Error {
|
|
53271
|
+
constructor(message, status, networkCode) {
|
|
53272
|
+
super(message);
|
|
53273
|
+
this.status = status;
|
|
53274
|
+
this.networkCode = networkCode;
|
|
53275
|
+
this.name = "InvestigationReportError";
|
|
53276
|
+
}
|
|
53277
|
+
status;
|
|
53278
|
+
networkCode;
|
|
53279
|
+
};
|
|
53280
|
+
async function reportInvestigation(callbackUrl, runToken, body2, sleep = (ms) => new Promise((resolve6) => setTimeout(resolve6, ms))) {
|
|
53281
|
+
const payload = JSON.stringify(body2);
|
|
53282
|
+
const tries = INVESTIGATION_REPORT_RETRY_WAITS_MS.length + 1;
|
|
53283
|
+
for (let attempt2 = 1; ; attempt2++) {
|
|
53284
|
+
let failure;
|
|
53285
|
+
let status;
|
|
53286
|
+
let networkCode;
|
|
53287
|
+
try {
|
|
53288
|
+
const res = await fetch(callbackUrl, {
|
|
53289
|
+
method: "POST",
|
|
53290
|
+
headers: { Authorization: `Bearer ${runToken}`, "Content-Type": "application/json" },
|
|
53291
|
+
body: payload
|
|
53292
|
+
});
|
|
53293
|
+
if (res.ok) return;
|
|
53294
|
+
failure = await describeQuikTrackFailure(res);
|
|
53295
|
+
status = res.status;
|
|
53296
|
+
} catch (err2) {
|
|
53297
|
+
if (!isRetryableNetworkError(err2)) throw err2;
|
|
53298
|
+
networkCode = networkErrorCode(err2);
|
|
53299
|
+
failure = `the connection failed (${networkCode})`;
|
|
53300
|
+
}
|
|
53301
|
+
if (status !== void 0 && !REPORT_RETRY_STATUSES.has(status)) throw new InvestigationReportError(`Investigation callback failed: ${failure}`, status);
|
|
53302
|
+
if (attempt2 === tries) throw new InvestigationReportError(`Investigation callback failed: ${failure} after ${tries} tries`, status, networkCode);
|
|
53303
|
+
const waitMs = INVESTIGATION_REPORT_RETRY_WAITS_MS[attempt2 - 1];
|
|
53304
|
+
console.warn(`::warning::Investigation callback failed: ${failure}; trying again in ${waitMs / 1e3} s (try ${attempt2 + 1} of ${tries})`);
|
|
53305
|
+
await sleep(waitMs);
|
|
53306
|
+
}
|
|
53276
53307
|
}
|
|
53277
53308
|
function realDeps() {
|
|
53278
53309
|
return {
|
|
@@ -53315,8 +53346,9 @@ async function runInvestigate(env2, deps = realDeps()) {
|
|
|
53315
53346
|
try {
|
|
53316
53347
|
await deps.report(env2.callbackUrl, runToken, body2);
|
|
53317
53348
|
return { hardFailure: false };
|
|
53318
|
-
} catch {
|
|
53319
|
-
|
|
53349
|
+
} catch (err2) {
|
|
53350
|
+
const detail = err2 instanceof InvestigationReportError ? { ...err2.status !== void 0 ? { status: err2.status } : {}, ...err2.networkCode ? { error: err2.networkCode } : {} } : {};
|
|
53351
|
+
log({ event: "investigate.failed", reason: "report_failed", ...detail });
|
|
53320
53352
|
return { hardFailure: true };
|
|
53321
53353
|
}
|
|
53322
53354
|
}
|