@quikit/quikpilot-runner 9.3.0-rc.92 → 9.3.0-rc.94
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 +51 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -194,6 +194,10 @@ wrong (a field that arrives from a database row or a request), so it only warns
|
|
|
194
194
|
|
|
195
195
|
**9.3.0-rc.81 (also) - pytest and go test reports place their tests on files (QUIKTR-2465 item 3).** The Python and Go trial repositories' reports placed no test on a file, so the test-file list was empty and the AI Runtime's early check was off. pytest tests are placed by the longest dotted prefix that is a `.py` file of the listing; Go tests by go.mod's module and the one `_test.go` file of the package's folder that declares the function. Real reports: sqlparse 454 tests on 9 files, decimal 145 tests on 3 files, 0 unmapped each. A report that places none of its tests says so in the run's notes. JavaScript reports are unchanged.
|
|
196
196
|
|
|
197
|
+
**9.3.0-rc.94 - the two reports back to QuikProjects are tried again after any connection failure that brought no answer, and a lost report names its cause (QUIKTR-2790).** On UAT (17 Nov) the early look finished its work and its one report failed with a connection error that was not ECONNRESET or ETIMEDOUT (about 10.5 s later: most likely a connect timeout); it was not tried again, the log said only `report_failed`, and the run went on without the look. The look's report and the run's final report now try again after any fetch that threw with no HTTP answer (a connect timeout, a closed socket, DNS, a refused connection), with the same waits and the same bytes each time; a refusal (4xx), an invalid URL, a certificate problem and the runner's own 60 s limit for a try stay final. Every lost look now logs `report_failed` with the cause: the last HTTP status, or a closed word (an error code or an error name; never the message, the URL, the token or the body). The AI calls keep their old two-code retry on purpose: a repeated AI call that reached the AI service is paid twice. No change to the work packet, the contract or the site.
|
|
198
|
+
|
|
199
|
+
**9.3.0-rc.93 - a turn the AI service calls too big is not mistaken for a switch that is off (QUIKTR-2712, RT-05).** The AI service refused a loop turn over its per-turn size limit with the same code (`CONTRACT_REJECTED`) it uses for "switch off", "unknown version" and "malformed request", which the run answers by stepping down a version, dropping a key or writing the files one at a time (on a first request it could even end the run as "needs a database change"). The service now sends its own code, `LOOP_TURN_TOO_LARGE`, for that one refusal, and the three loops (code writing, the file search and the early look) end the attempt as `token_ceiling` ("the request grew too large for one step") with the service's code kept in the record: no step down, no key dropped, no per-file fallback. A runner of this version against the older service behaves as before. Release this runner BEFORE the service half.
|
|
200
|
+
|
|
197
201
|
**9.3.0-rc.92 - each loop version's fixed prompt part counted honestly (QUIKTR-2709, RT-01).** A loop turn was sized as 5,000 for the fixed part (instruction, forms, user turn) plus its context, against 90,000; the fixed part is really 7,000 to 23,500 depending on the contract version, so the ceiling allowed ~104,000. The 90,000 is now the whole request: the fixed part comes from one table per version (`PROMPT_OVERHEAD_BY_VERSION`, the AI Runtime's values word for word), and an unknown version is charged the largest. Long runs drop old file contents a little sooner. Release this runner BEFORE the runtime half: it trims sooner, which today's runtime accepts.
|
|
198
202
|
|
|
199
203
|
**9.3.0-rc.91 - the rest of the leftover exam findings (QUIKTR-2708, batches B and C).** A branch name git would read as an option or a forced push ("+name") stops the run before any git call, and the push names its exact target; git.ts holds no raw control character any more, so its diffs show in review (RN-15, RN-11). A readiness check whose result never reached QuikProjects fails the job and reports a path inside the repository (RN-14). A targeted run with nothing to commit fails with a plain reason instead of "completed" (RN-18). A quoted "{file}" in the one-file test command works (RN-16). Every network call has its own limit (one minute for tokens, the packet, uploads and reports; five for a single model call), and a reply over 32 MB is refused (RN-22, RN-21). The test-report search walks the checkout once and never follows a link (RN-08); the packet is checked for shape when it arrives (RN-20); the fix record never shows more fixes made than allowed (RN-17). Code clean-up with no change to what a run does: the tool loops share one copy of their helpers, files are put back one way, the contract steps back as one table, and a long request is measured once while it is trimmed (RN-09, RN-19, RN-21).
|
package/dist/index.js
CHANGED
|
@@ -37060,6 +37060,7 @@ var TargetingHttpError = class extends Error {
|
|
|
37060
37060
|
};
|
|
37061
37061
|
|
|
37062
37062
|
// src/loopShared.ts
|
|
37063
|
+
var LOOP_TURN_TOO_LARGE_CODE = "LOOP_TURN_TOO_LARGE";
|
|
37063
37064
|
var MAX_ID_CHARS = 64;
|
|
37064
37065
|
var MAX_CALLS_IN_A_REPLY = 50;
|
|
37065
37066
|
var MAX_ARGS_JSON_CHARS = 1e3;
|
|
@@ -40129,13 +40130,14 @@ function jobStoppedMessage() {
|
|
|
40129
40130
|
}
|
|
40130
40131
|
var SHORT_CALL_MS = 6e4;
|
|
40131
40132
|
var LONG_CALL_MS = 5 * 6e4;
|
|
40133
|
+
var STEP_TIMEOUT_CODE = "STEP_TIMEOUT";
|
|
40132
40134
|
async function fetchWithin(what, url, init2, limitMs) {
|
|
40133
40135
|
const signal = AbortSignal.timeout(limitMs);
|
|
40134
40136
|
try {
|
|
40135
40137
|
return await fetch(url, { ...init2, signal });
|
|
40136
40138
|
} catch (err2) {
|
|
40137
40139
|
if (signal.aborted && err2?.name === "TimeoutError") {
|
|
40138
|
-
throw new Error(`${what} did not answer within ${minutesOrSeconds(limitMs)} and was stopped`);
|
|
40140
|
+
throw Object.assign(new Error(`${what} did not answer within ${minutesOrSeconds(limitMs)} and was stopped`), { code: STEP_TIMEOUT_CODE });
|
|
40139
40141
|
}
|
|
40140
40142
|
throw err2;
|
|
40141
40143
|
}
|
|
@@ -40218,6 +40220,37 @@ function isRetryableNetworkError(err2) {
|
|
|
40218
40220
|
const code = networkErrorCode(err2);
|
|
40219
40221
|
return code !== void 0 && RETRYABLE_NETWORK_ERROR_CODES.has(code);
|
|
40220
40222
|
}
|
|
40223
|
+
var TRANSPORT_FAILURE_CODES = /* @__PURE__ */ new Set([
|
|
40224
|
+
"ECONNRESET",
|
|
40225
|
+
"ETIMEDOUT",
|
|
40226
|
+
"ECONNREFUSED",
|
|
40227
|
+
"EAI_AGAIN",
|
|
40228
|
+
"ENOTFOUND",
|
|
40229
|
+
"EPIPE",
|
|
40230
|
+
"ENETUNREACH",
|
|
40231
|
+
"EHOSTUNREACH",
|
|
40232
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
40233
|
+
"UND_ERR_SOCKET",
|
|
40234
|
+
"UND_ERR_HEADERS_TIMEOUT",
|
|
40235
|
+
"UND_ERR_BODY_TIMEOUT",
|
|
40236
|
+
"UND_ERR_CLOSED"
|
|
40237
|
+
]);
|
|
40238
|
+
function isTransportFailure(err2) {
|
|
40239
|
+
if (typeof err2 !== "object" || err2 === null) return false;
|
|
40240
|
+
const code = networkErrorCode(err2);
|
|
40241
|
+
if (code !== void 0) return TRANSPORT_FAILURE_CODES.has(code);
|
|
40242
|
+
const e = err2;
|
|
40243
|
+
return e.name === "TypeError" && e.message === "fetch failed";
|
|
40244
|
+
}
|
|
40245
|
+
function describeFailureCause(err2) {
|
|
40246
|
+
const word = (s) => {
|
|
40247
|
+
if (typeof s !== "string") return void 0;
|
|
40248
|
+
const clean = s.replace(/[^A-Za-z0-9_.-]/g, "").slice(0, 40);
|
|
40249
|
+
return clean === "" ? void 0 : clean;
|
|
40250
|
+
};
|
|
40251
|
+
if (typeof err2 !== "object" || err2 === null) return "unknown";
|
|
40252
|
+
return word(networkErrorCode(err2)) ?? word(err2.name) ?? "unknown";
|
|
40253
|
+
}
|
|
40221
40254
|
async function fetchWithRetry(url, init2, { retries = 2, backoffMs = 250 } = {}) {
|
|
40222
40255
|
for (let attempt2 = 0; ; attempt2++) {
|
|
40223
40256
|
try {
|
|
@@ -40274,8 +40307,8 @@ async function reportBack(params) {
|
|
|
40274
40307
|
signal: AbortSignal.timeout(params.urgent ? URGENT_REPORT_TIMEOUT_MS : SHORT_CALL_MS)
|
|
40275
40308
|
});
|
|
40276
40309
|
} catch (err2) {
|
|
40277
|
-
if (!
|
|
40278
|
-
failure = `the connection failed (${
|
|
40310
|
+
if (!isTransportFailure(err2)) throw err2;
|
|
40311
|
+
failure = `the connection failed (${describeFailureCause(err2)})`;
|
|
40279
40312
|
if (attempt2 === tries) throw new Error(`Report back to QuikTrack failed: ${failure} after ${tries} tries`);
|
|
40280
40313
|
await waitBeforeRetry(failure, attempt2);
|
|
40281
40314
|
continue;
|
|
@@ -49263,6 +49296,10 @@ async function runTargetingLoop(args2, deps) {
|
|
|
49263
49296
|
log({ event: "targeting.loop_recovered", turn, reason: "schema_mismatch", runtimeCode, elapsedMs: now() - turnStarted });
|
|
49264
49297
|
continue;
|
|
49265
49298
|
}
|
|
49299
|
+
if (runtimeCode === LOOP_TURN_TOO_LARGE_CODE) {
|
|
49300
|
+
log({ event: "targeting.turn_too_large", turn, requestTokens });
|
|
49301
|
+
throw new LoopFailure("token_ceiling", runtimeCode);
|
|
49302
|
+
}
|
|
49266
49303
|
throw new LoopFailure(runtimeCode && OUTPUT_TOO_LARGE_CODES.has(runtimeCode) ? "output_too_large" : "runtime_failed", runtimeCode);
|
|
49267
49304
|
}
|
|
49268
49305
|
let body2;
|
|
@@ -50825,6 +50862,11 @@ async function runCodegenLoop(args2, deps) {
|
|
|
50825
50862
|
if (handled === true) continue;
|
|
50826
50863
|
throw handled;
|
|
50827
50864
|
}
|
|
50865
|
+
if (runtimeCode === LOOP_TURN_TOO_LARGE_CODE) {
|
|
50866
|
+
const version2 = contextData.contractVersion;
|
|
50867
|
+
log({ event: "codegen.turn_too_large", turn, ...typeof version2 === "string" ? { version: version2 } : {}, requestTokens });
|
|
50868
|
+
throw new CodegenLoopFailure("token_ceiling", runtimeCode);
|
|
50869
|
+
}
|
|
50828
50870
|
throw new CodegenLoopFailure("runtime_failed", runtimeCode);
|
|
50829
50871
|
}
|
|
50830
50872
|
let body2;
|
|
@@ -54908,7 +54950,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
|
|
|
54908
54950
|
var REPORT_COPY = "final-test-report.xml";
|
|
54909
54951
|
var MAX_REPORT_BYTES = 5 * 1024 * 1024;
|
|
54910
54952
|
var MAX_FILES = 200;
|
|
54911
|
-
var RUNNER_VERSION = true ? "9.3.0-rc.
|
|
54953
|
+
var RUNNER_VERSION = true ? "9.3.0-rc.94" : "dev";
|
|
54912
54954
|
function safeDestination(base, repoPath) {
|
|
54913
54955
|
if (!repoPath || (0, import_node_path27.isAbsolute)(repoPath)) return null;
|
|
54914
54956
|
const destination = (0, import_node_path27.resolve)(base, repoPath);
|
|
@@ -56822,6 +56864,7 @@ function classifyEnvelope(envelope) {
|
|
|
56822
56864
|
if (code === "RUN_BUDGET_EXCEEDED") return new InvestigateFailure("budget_exceeded");
|
|
56823
56865
|
if (code === "RUN_CREDENTIAL_SCOPE") return new InvestigateFailure("credential_scope");
|
|
56824
56866
|
if (code === "SEMANTIC_MISMATCH") return new InvestigateFailure("semantic_mismatch");
|
|
56867
|
+
if (code === LOOP_TURN_TOO_LARGE_CODE) return new InvestigateFailure("token_ceiling");
|
|
56825
56868
|
if (code === "CONTRACT_REJECTED") {
|
|
56826
56869
|
const text3 = `${typeof e?.error === "string" ? e.error : ""} ${typeof e?.normalizedText === "string" ? e.normalizedText : ""}`;
|
|
56827
56870
|
return new InvestigateFailure(text3.includes(SWITCH_OFF_SENTENCE) ? "switch_off" : "contract_rejected");
|
|
@@ -57089,8 +57132,10 @@ async function reportInvestigation(callbackUrl, runToken, body2, sleep = (ms) =>
|
|
|
57089
57132
|
failure = await describeQuikTrackFailure(res);
|
|
57090
57133
|
status = res.status;
|
|
57091
57134
|
} catch (err2) {
|
|
57092
|
-
|
|
57093
|
-
|
|
57135
|
+
networkCode = describeFailureCause(err2);
|
|
57136
|
+
if (!isTransportFailure(err2)) {
|
|
57137
|
+
throw new InvestigationReportError(`Investigation callback failed: the request could not be completed (${networkCode})`, void 0, networkCode);
|
|
57138
|
+
}
|
|
57094
57139
|
failure = `the connection failed (${networkCode})`;
|
|
57095
57140
|
}
|
|
57096
57141
|
if (status !== void 0 && !REPORT_RETRY_STATUSES.has(status)) throw new InvestigationReportError(`Investigation callback failed: ${failure}`, status);
|