@quikit/quikpilot-runner 9.3.0-rc.91 → 9.3.0-rc.92

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 CHANGED
@@ -194,6 +194,8 @@ 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.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
+
197
199
  **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).
198
200
 
199
201
  **9.3.0-rc.90 - the leftover exam findings that change what a run does or can leak (QUIKTR-2708, batch A).** Links in a repository are never followed when the runner reads files for the AI, writes its change or runs the baseline check (`repoPath.ts`), and a NEW_FILE path is cleaned first so an existing file is never overwritten unread (RN-04). A run that fails while the baseline test run is still going stops it and reports at once, instead of waiting up to 25 minutes (RN-05). A CRLF file is no longer refused as a truncated rewrite on the whole-file path and keeps its line endings (RN-07). A review fix that does not pass keeps the earlier pass without running the checks again (RN-10). Every string sent back to QuikProjects is scrubbed of the run, AI Runtime and push tokens (RN-12/13). The push no longer blocks the runner, and each try has a 3-minute limit, so the deadline timer can always fire (RN-22).
package/dist/index.js CHANGED
@@ -38504,9 +38504,10 @@ var DEFAULT_LIMITS = {
38504
38504
  // The per-run read cap stops the COST; the per-turn ceiling below stops the FAILURE. Different jobs.
38505
38505
  readCharsTotal: 6e4,
38506
38506
  resultCharsTotal: 8e4,
38507
- // 131,072 (the smallest 128k-class window) - 8,192 reserved output - a 3,741-token real request leaves
38508
- // ~116,000; 90,000 keeps ~26,000 for a repository whose listing is thousands of paths, and stays well
38509
- // clear of the per-minute quota, which binds before the window does. Set by the AI Runtime owner.
38507
+ // The WHOLE request: its version's fixed part (`tokenEstimate.PROMPT_OVERHEAD_BY_VERSION`, QUIKTR-2709) plus
38508
+ // the rendered context. First sized for a 131,072 window (8,192 reserved output); the runtime's model now
38509
+ // has 1,000,000, so 90,000 is the per-turn cost and per-minute quota budget. The AI Runtime enforces the
38510
+ // same number (`pilot_*_max_request_tokens`).
38510
38511
  maxRequestTokens: 9e4,
38511
38512
  grepMaxMatches: 40,
38512
38513
  grepLineChars: 200,
@@ -42625,7 +42626,32 @@ var TOKENS_PER_DIGIT_CHAR = 0.18;
42625
42626
  var TOKENS_PER_SPACE_CHAR = 0.05;
42626
42627
  var TOKENS_PER_PUNCTUATION_CHAR = 1.05;
42627
42628
  var TOKENS_PER_NON_ASCII_CHAR = 1;
42628
- var PROMPT_OVERHEAD_TOKENS = 5e3;
42629
+ var PROMPT_OVERHEAD_BY_VERSION = Object.freeze({
42630
+ "codegen-loop-1": 7e3,
42631
+ "codegen-loop-2": 9e3,
42632
+ "codegen-loop-3": 11500,
42633
+ "codegen-loop-4": 12e3,
42634
+ "codegen-loop-5": 13e3,
42635
+ "codegen-loop-6": 16500,
42636
+ "codegen-loop-7": 22e3,
42637
+ "codegen-loop-8": 22e3,
42638
+ "codegen-loop-9": 23500,
42639
+ "targeting-loop-1": 10500,
42640
+ "targeting-loop-2": 10500,
42641
+ "targeting-loop-3": 11e3,
42642
+ "targeting-loop-4": 12500,
42643
+ "investigate-loop-1": 7e3
42644
+ });
42645
+ var LARGEST_OVERHEAD = Math.max(...Object.values(PROMPT_OVERHEAD_BY_VERSION));
42646
+ function promptOverheadTokens(version2) {
42647
+ if (typeof version2 === "string" && Object.prototype.hasOwnProperty.call(PROMPT_OVERHEAD_BY_VERSION, version2)) {
42648
+ return PROMPT_OVERHEAD_BY_VERSION[version2];
42649
+ }
42650
+ return LARGEST_OVERHEAD;
42651
+ }
42652
+ function versionOf(contextData) {
42653
+ return typeof contextData === "object" && contextData !== null ? contextData.contractVersion : void 0;
42654
+ }
42629
42655
  function estimateTokens(text3) {
42630
42656
  return tokensFrom(classCounts(text3));
42631
42657
  }
@@ -42651,7 +42677,7 @@ function tokensFrom(c) {
42651
42677
  );
42652
42678
  }
42653
42679
  function estimateRequestTokens(contextData) {
42654
- return PROMPT_OVERHEAD_TOKENS + estimateTokens(JSON.stringify(contextData ?? {}, null, 2));
42680
+ return promptOverheadTokens(versionOf(contextData)) + estimateTokens(JSON.stringify(contextData ?? {}, null, 2));
42655
42681
  }
42656
42682
 
42657
42683
  // src/turnUsage.ts
@@ -42674,7 +42700,7 @@ function usageOf(envelope) {
42674
42700
  var sizeOf = (value) => value === void 0 ? 0 : estimateTokens(JSON.stringify(value, null, 2));
42675
42701
  var RESULT_KEYS = /* @__PURE__ */ new Set(["transcript", "toolResults", "previousAttempt"]);
42676
42702
  function requestParts(contextData) {
42677
- const parts2 = { fixed: PROMPT_OVERHEAD_TOKENS, map: 0, cases: 0, task: 0, results: 0, notes: 0, other: 0 };
42703
+ const parts2 = { fixed: promptOverheadTokens(versionOf(contextData)), map: 0, cases: 0, task: 0, results: 0, notes: 0, other: 0 };
42678
42704
  for (const [key, value] of Object.entries(contextData)) {
42679
42705
  if (key === "repoMap" || key === "workspaceListing") parts2.map += sizeOf(value);
42680
42706
  else if (key === "requiredTests") parts2.cases += sizeOf(value);
@@ -50542,6 +50568,7 @@ async function runCodegenLoop(args2, deps) {
50542
50568
  const makeRoom = (nextTurn, nextFinal, finalReason) => {
50543
50569
  const whole4 = () => classCounts(JSON.stringify(buildContext(nextTurn, nextFinal, finalReason) ?? {}, null, 2));
50544
50570
  let counts = whole4();
50571
+ const fixed2 = promptOverheadTokens(versionOf(buildContext(nextTurn, nextFinal, finalReason)));
50545
50572
  const replaced = (before, after) => {
50546
50573
  const b = JSON.stringify(before, null, 2);
50547
50574
  const a = JSON.stringify(after, null, 2);
@@ -50561,7 +50588,7 @@ async function runCodegenLoop(args2, deps) {
50561
50588
  const full = whole4();
50562
50589
  if (JSON.stringify(full) !== JSON.stringify(counts)) throw new Error(`makeRoom's running count drifted: ${JSON.stringify(counts)} vs ${JSON.stringify(full)}`);
50563
50590
  }
50564
- return PROMPT_OVERHEAD_TOKENS + tokensFrom(counts) <= limit;
50591
+ return fixed2 + tokensFrom(counts) <= limit;
50565
50592
  };
50566
50593
  const fits = () => under(limits.maxRequestTokens);
50567
50594
  const soft = args2.readRoots ? mapSoftTarget(firstRequestTokens, limits.maxRequestTokens) : limits.maxRequestTokens;
@@ -54881,7 +54908,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
54881
54908
  var REPORT_COPY = "final-test-report.xml";
54882
54909
  var MAX_REPORT_BYTES = 5 * 1024 * 1024;
54883
54910
  var MAX_FILES = 200;
54884
- var RUNNER_VERSION = true ? "9.3.0-rc.91" : "dev";
54911
+ var RUNNER_VERSION = true ? "9.3.0-rc.92" : "dev";
54885
54912
  function safeDestination(base, repoPath) {
54886
54913
  if (!repoPath || (0, import_node_path27.isAbsolute)(repoPath)) return null;
54887
54914
  const destination = (0, import_node_path27.resolve)(base, repoPath);