@quikit/quikpilot-runner 9.3.0-rc.37 → 9.3.0-rc.38
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 -2
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -154,6 +154,8 @@ wrong (a field that arrives from a database row or a request), so it only warns
|
|
|
154
154
|
|
|
155
155
|
**9.3.0-rc.37 — the AI always sees what it just read (QUIKTR-1582, S7).** In map mode the code-writing loop trims old read outputs once a request passes a soft target, to keep turns small. That target was a flat 40,000 estimated tokens, and the trim also took the outputs of the turn just finished, before the AI had seen them. On a big repository the loop's first request alone can weigh about 36,000 (the summary, the context files, the cases), so every read went over the target and was dropped unseen: in the first S7 trial on the QuikIT fork the AI read the same three files 27 times and wrote nothing. Now the soft target is the first request plus room for 20,000 tokens of reads (at least 40,000, never above the ceiling); the soft trim only takes outputs the AI has already been shown; and an output it has not seen is dropped only when nothing else makes the request fit the ceiling, after the text of old writes is shortened. That last case answers "Too large to send with the rest of this request. Read a smaller part of the file." and logs `codegen.read_dropped_unseen`. Listing mode keeps the ceiling as its only target, with the same order.
|
|
156
156
|
|
|
157
|
+
**9.3.0-rc.38 — a loop turn waits as long as its own clock says (QUIKTR-1582, S7).** Node's built-in `fetch` gives up on any reply whose headers take longer than 300 seconds, whatever limit the caller passes ("fetch failed", cause `UND_ERR_HEADERS_TIMEOUT`; measured on Node 20 and 24). So the 420 seconds a loop's first turn was given (9.3.0-rc.34) never happened: when the AI service's first answer of the day took more than 300 seconds, the call failed as "transport", and in map mode that ended the run (S7 trial QTRIA-8). Now every AI call that brings its own clock (each turn of the targeting, code-writing and early-look loops) goes through Node's own `http`/`https` client, which has no such limit, with TCP keep-alive as `fetch` sets it; the clock is the only thing that ends it, and a timed-out turn still reads as `turn_timeout`. Calls without a clock (the single targeting and code-writing calls) keep `fetch` exactly as before, 300 seconds included, and the retry rules are unchanged. No new dependency.
|
|
158
|
+
|
|
157
159
|
**9.3.0-rc.35 — the AI's own notes, old looks shrunk to a stub, the end-of-turn recap, a folder's guidance, and the newer versions only where a repository needs them (QUIKTR-1581, S6 release B; contract §37).** On `targeting-loop-4` and `codegen-loop-6` (each behind its own AI Runtime flag; a refusal steps one version back, `-4` to `-3` and `-6` to `-5`, then as before) a loop request carries `loop.recap`, the LAST key of `loop`: the approved cases, the folders the AI may change and its own notes. A `TOOL_CALLS` reply may carry `notes`; they replace the notes kept so far (an empty string clears them, a reply without them keeps them), credentials are hidden, at most 1,500 characters are kept, and the run record keeps their length only. The answer of a look (`list_files`, `read_file`, `grep`, `find_definition`) from a turn older than the latest three shrinks to `{dropped: true, note: "read src/a.ts lines 120-220"}`; asking for it again is answered afresh, not as a repeat. The first read under a folder that has its own `AGENTS.md`, `CLAUDE.md` or `README.md` (not the repository root's, not one already shown in the repository map) carries that file once, credentials hidden, at most 2,000 characters, at most six a run. The early look's `findings` are cut to 6,000 characters of JSON before they are handed on (open questions first, never what the verdict stands on). **`QUIKPILOT_TOOLS2` now defaults to `auto`**: search tools v2 and the notes are asked for only when the repository needs them, that is in the map view or when its file list would cost `QUIKPILOT_TOOLS_MIN_TOKENS` (default 8,000) or more tokens; a small project keeps the loops it always had (`targeting-loop-1`, `codegen-loop-3`) and pays for no extra tool, response format or recap. `on` always asks for the newest version, `off` never asks, and `QUIKPILOT_NOTES=off` keeps the tools but never asks for the notes. The run logs `tools.decided`.
|
|
158
160
|
|
|
159
161
|
**9.3.0-rc.34 — the first turn of a loop waits for a new response schema (QUIKTR-1581 follow-up).** The first call with a response schema the model provider has not seen recently is very slow (232 to 275 seconds measured on 19 Oct 2026 for a request that takes 5 to 8 once the provider has it) and fast afterwards. The targeting loop's turn limit was 180 seconds, the same as the AI Runtime's own provider timeout, so that first call was cut off every time, the provider never kept the schema, and runs fell back to the single targeting call (one found no file and failed). Now the FIRST turn of the targeting loop and of the code-writing loop waits up to 420 seconds; every later turn keeps its own limit (180 and 300), so a hung call does not cost the long wait twice. The targeting loop's whole-loop limit is 900 seconds (it was 600). A limit set by the caller still applies to every turn. Pair it with `OPENROUTER_TIMEOUT_SECONDS=420` on the AI Runtime (its default, 180, ends the call before the runner would). Nothing else changes.
|
package/dist/index.js
CHANGED
|
@@ -26725,6 +26725,46 @@ function scrubEntriesForModel(entries, secrets, keep) {
|
|
|
26725
26725
|
});
|
|
26726
26726
|
}
|
|
26727
26727
|
|
|
26728
|
+
// src/fetchOnOwnClock.ts
|
|
26729
|
+
var import_node_http = __toESM(require("node:http"));
|
|
26730
|
+
var import_node_https = __toESM(require("node:https"));
|
|
26731
|
+
var NATIVE_FETCH = globalThis.fetch;
|
|
26732
|
+
var KEEP_ALIVE_INITIAL_DELAY_MS = 6e4;
|
|
26733
|
+
var NULL_BODY_STATUSES = /* @__PURE__ */ new Set([204, 205, 304]);
|
|
26734
|
+
async function fetchOnOwnClock(url, init) {
|
|
26735
|
+
if (!init.signal || globalThis.fetch !== NATIVE_FETCH) return globalThis.fetch(url, init);
|
|
26736
|
+
return requestWithoutHeadersLimit(url, init, init.signal);
|
|
26737
|
+
}
|
|
26738
|
+
async function requestWithoutHeadersLimit(url, init, signal) {
|
|
26739
|
+
if (init.body != null && typeof init.body !== "string") throw new TypeError("fetchOnOwnClock sends a string body only");
|
|
26740
|
+
const target = new URL(url);
|
|
26741
|
+
const client = target.protocol === "http:" ? import_node_http.default : import_node_https.default;
|
|
26742
|
+
const headers = Object.fromEntries(new Headers(init.headers).entries());
|
|
26743
|
+
return new Promise((resolve6, reject) => {
|
|
26744
|
+
const fail = (err) => reject(signal.aborted ? signal.reason : err);
|
|
26745
|
+
const req = client.request(target, { method: init.method ?? "GET", headers, signal }, (res) => {
|
|
26746
|
+
const chunks = [];
|
|
26747
|
+
res.on("data", (chunk) => chunks.push(chunk));
|
|
26748
|
+
res.on("error", fail);
|
|
26749
|
+
res.on("end", () => {
|
|
26750
|
+
const status = res.statusCode ?? 0;
|
|
26751
|
+
const responseHeaders = new Headers();
|
|
26752
|
+
for (const [name, value] of Object.entries(res.headers)) {
|
|
26753
|
+
for (const one of Array.isArray(value) ? value : value === void 0 ? [] : [value]) responseHeaders.append(name, one);
|
|
26754
|
+
}
|
|
26755
|
+
try {
|
|
26756
|
+
resolve6(new Response(NULL_BODY_STATUSES.has(status) ? null : Buffer.concat(chunks), { status, statusText: res.statusMessage ?? "", headers: responseHeaders }));
|
|
26757
|
+
} catch (err) {
|
|
26758
|
+
reject(err);
|
|
26759
|
+
}
|
|
26760
|
+
});
|
|
26761
|
+
});
|
|
26762
|
+
req.on("socket", (socket) => socket.setKeepAlive(true, KEEP_ALIVE_INITIAL_DELAY_MS));
|
|
26763
|
+
req.on("error", fail);
|
|
26764
|
+
req.end(typeof init.body === "string" ? init.body : void 0);
|
|
26765
|
+
});
|
|
26766
|
+
}
|
|
26767
|
+
|
|
26728
26768
|
// src/retryFetch.ts
|
|
26729
26769
|
var RETRYABLE_STATUS_CODES = /* @__PURE__ */ new Set([502, 503, 504]);
|
|
26730
26770
|
var RETRYABLE_NETWORK_ERROR_CODES = /* @__PURE__ */ new Set(["ECONNRESET", "ETIMEDOUT"]);
|
|
@@ -26735,7 +26775,7 @@ function isRetryableNetworkError(err) {
|
|
|
26735
26775
|
async function fetchWithRetry(url, init, { retries = 2, backoffMs = 250 } = {}) {
|
|
26736
26776
|
for (let attempt2 = 0; ; attempt2++) {
|
|
26737
26777
|
try {
|
|
26738
|
-
const res = await
|
|
26778
|
+
const res = await fetchOnOwnClock(url, init);
|
|
26739
26779
|
if (RETRYABLE_STATUS_CODES.has(res.status) && attempt2 < retries) {
|
|
26740
26780
|
await new Promise((r) => setTimeout(r, backoffMs));
|
|
26741
26781
|
continue;
|
|
@@ -43196,7 +43236,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
|
|
|
43196
43236
|
var REPORT_COPY = "final-test-report.xml";
|
|
43197
43237
|
var MAX_REPORT_BYTES = 5 * 1024 * 1024;
|
|
43198
43238
|
var MAX_FILES = 200;
|
|
43199
|
-
var RUNNER_VERSION = true ? "9.3.0-rc.
|
|
43239
|
+
var RUNNER_VERSION = true ? "9.3.0-rc.38" : "dev";
|
|
43200
43240
|
function safeDestination(base, repoPath) {
|
|
43201
43241
|
if (!repoPath || (0, import_node_path21.isAbsolute)(repoPath)) return null;
|
|
43202
43242
|
const destination = (0, import_node_path21.resolve)(base, repoPath);
|