@quikit/quikpilot-runner 9.3.0-rc.10 → 9.3.0-rc.12
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 +46 -7
- package/dist/index.js +1145 -77
- package/dist/index.js.map +4 -4
- package/package.json +29 -29
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ writing, is waited for first. The checkout is fingerprinted (git status plus a h
|
|
|
52
52
|
before the write and after the restore; whatever the test run itself added (a snapshot file, a tracked file it changed or deleted,
|
|
53
53
|
something it staged) is cleaned up, and if the tree still differs, or git cannot report on it, the whole run ends: no per-file fallback,
|
|
54
54
|
no pull request. A file that was already changed or untracked before the call is never repaired or deleted; the report the baseline run
|
|
55
|
-
left behind is saved and put back.
|
|
55
|
+
left behind is saved and put back. A second attempt (below) refuses to start from a checkout that is not what it was when the loop began.
|
|
56
56
|
The tests run with the same allow-listed environment as every other repository command, in their own process group, with a time limit
|
|
57
57
|
of three times the baseline run (never under 2 minutes, never over 10); a suite whose baseline took over 10 minutes gets no `run_tests`
|
|
58
58
|
and the run record says so. At most three runs; the same failing tests twice in a row is answered `no_progress` and ends the runs. What
|
|
@@ -67,7 +67,7 @@ a few milliseconds) and adds a plain warning to that tool result when the change
|
|
|
67
67
|
declared twice, an `import` that is not at the top of the file, an unterminated string or a stray brace), a name that is not defined or
|
|
68
68
|
imported, or a `const`, `let` or class used higher up in the same function than the line that declares it. The change still applies, so the
|
|
69
69
|
AI can read the file at the reported line and fix it; the warning is a closed phrase and a line number, never file text. If the AI still
|
|
70
|
-
ends with such a file, the
|
|
70
|
+
ends with such a file, the attempt is thrown away and is handled like any other ordinary failure (a second attempt; `syntax_error`
|
|
71
71
|
in the run record). Only what a change *introduces* is reported: a file that already had the problem, or that did not parse before (JSX,
|
|
72
72
|
Flow or decorators in a `.js` file), and TypeScript, JSX and every other language, are left alone; a new file is judged only once the
|
|
73
73
|
project's own files are known to parse, and a name the project's other files already use without defining (a global the build supplies) is
|
|
@@ -101,15 +101,54 @@ TypeScript files; other languages keep the older rule of new text before or afte
|
|
|
101
101
|
(one hop, JavaScript and TypeScript, the same scan and the same limits as the one-file-at-a-time path: 40,000 characters a file
|
|
102
102
|
and 60,000 in all, never a denied path, never the targets themselves), so the project's own names, values and rates are in front
|
|
103
103
|
of it instead of being guessed; the run's context record lists them like the one-file path's. The AI cannot finish before it has
|
|
104
|
-
changed something and written a test for every case it was given. If the loop cannot finish for an ordinary reason (
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
retried (
|
|
104
|
+
changed something and written a test for every case it was given. If the loop's first attempt cannot finish for an ordinary reason (a
|
|
105
|
+
timeout, a refused edit it cannot recover from, a cut-short file) everything it held is thrown away and the runner makes ONE more
|
|
106
|
+
attempt of the same loop from a clean start (9.3.0-rc.11, QUIKTR-1544); see "One code-writing path" below. A budget or credential
|
|
107
|
+
refusal from the AI Runtime is never retried (a second attempt would be refused again or paid for twice). A protected path is refused to the AI as an
|
|
108
108
|
ordinary answer, never read, listed or written, and the run carries on. Limits are told to the AI as ordinary answers: 20 turns, 40 actions, 60,000 characters read, 120,000 written, and the
|
|
109
109
|
same 90,000-token ceiling per turn. The callback gains an optional `codegenLoop` record (paths, counts, statuses and the AI's
|
|
110
110
|
short note per step; never file text) that QuikProjects shows as "What QuikPilot did". Without the variable nothing
|
|
111
111
|
changes. The workflow file is unchanged; the `env:` line is the only edit, and it is optional. The AI Runtime must have
|
|
112
|
-
`PILOT_CODEGEN_LOOP_ENABLED` on; while it is off the runner
|
|
112
|
+
`PILOT_CODEGEN_LOOP_ENABLED` on; while it is off (or the runtime does not have the loop at all) the runner writes the files one at a time,
|
|
113
|
+
as before, and says so in the run's warnings. That is the ONE case that still does.
|
|
114
|
+
|
|
115
|
+
**9.3.0-rc.11 — one code-writing path (QUIKTR-1544).** When the loop's first attempt ends without a result (and the AI Runtime has the
|
|
116
|
+
loop), the runner makes ONE more attempt of the same loop, from a clean start (a new in-memory overlay, the same per-attempt limits, three
|
|
117
|
+
`run_tests` runs per attempt, the baseline test run shared), and tells it how the first one ended in `loop.previousAttempt` (needs the AI
|
|
118
|
+
Runtime from the same release): the attempt number, a closed reason word, a short sentence, the last test result the AI saw, and the rule
|
|
119
|
+
words its replies broke. NOTHING NEW LEAVES: only what the AI Runtime already received during this run. The short sentence is built from
|
|
120
|
+
closed words (the ids of the test cases never written, the file the AI itself broke with a fixed phrase and a line number, the AI's own
|
|
121
|
+
summary when it said it could not complete); the names the truncated-rewrite check reads from the original file are never sent. If the
|
|
122
|
+
second attempt ends without a result too, the run FAILS with a plain reason and both attempts in the record; nothing is written and the
|
|
123
|
+
files are not written one at a time. A checkout that did not come back identical ends the run before any second attempt. Both attempts
|
|
124
|
+
share ONE clock of about 30 minutes, test runs included (the pilot job is cut at 45); a second attempt starts only when the time left is at
|
|
125
|
+
least as long as the first took, one run of the project's tests when they are on, and never under 3 minutes. The record keeps the
|
|
126
|
+
attempts and tells a run the clock ended (`out_of_time`) from one where the AI could not do it (`failed`). The log carries
|
|
127
|
+
`codegen.attempt_start`, `codegen.attempt_end` and `codegen.attempt_skipped` lines with counts and closed words only, and the second
|
|
128
|
+
attempt's start says which of the three additions to what it is told it carried (`hasDetail`, `rulesCount`, `hasLastTestRun`).
|
|
129
|
+
|
|
130
|
+
**9.3.0-rc.12 — the early look, and a warning for a field nothing supplies (QUIKTR-1545).** Two additions, both off unless QuikProjects
|
|
131
|
+
and the AI Runtime switch them on, and neither changes a run that does not use them.
|
|
132
|
+
|
|
133
|
+
*The early look (`MODE=investigate`).* Before the first question QuikProjects can dispatch the same workflow with `mode: investigate` and
|
|
134
|
+
`run_id: investigate:<run id>`. This mode is READ-ONLY: it exchanges the OIDC token for a run token whose only scope is
|
|
135
|
+
`pilot:investigate`, fetches a small packet (the person's report, the denied paths, the gateway), checks out the repository, and runs a
|
|
136
|
+
three-tool loop (`list_files`, `grep`, `read_file`) with at most 8 turns, 60 seconds for a turn and 120 seconds in all. It never installs,
|
|
137
|
+
runs the project's tests, commits or pushes. Extra paths are denied on top of the project's own (`**/.npmrc`, `**/*.pem`, `**/*.key`,
|
|
138
|
+
`**/*.tfvars`, `**/*credentials*.json`, `**/docker-compose*`), and everything it reads is scrubbed of secret-shaped text before the AI sees
|
|
139
|
+
it: five recorded kinds (`credential`, `private_key`, `cloud_key`, `url_credentials`, `assigned_secret`), COUNTED and never shown. The AI's
|
|
140
|
+
answer is checked, not trusted: every path must be in the checkout and not denied, every cited line must be one the AI really saw, every
|
|
141
|
+
symbol must occur in text it really read, and "not found" needs the zero-hit searches on record; otherwise the verdict becomes
|
|
142
|
+
`CANNOT_TELL`. The runner reports ONE record to QuikProjects (paths, line numbers, short names, the commit it read and counts; never file
|
|
143
|
+
text) or a closed failure reason. An unknown `MODE` now stops the job instead of falling into a full run, which is what keeps an old
|
|
144
|
+
template from ever treating the look as a run. The AI Runtime needs `PILOT_INVESTIGATE_ENABLED`; if it is off the look ends at once as
|
|
145
|
+
`switch_off` and the run goes on without it.
|
|
146
|
+
|
|
147
|
+
*A field nothing supplies.* After the code is written, the runner looks at the functions a change adds or changes in JavaScript files
|
|
148
|
+
(not tests). If one reads a field of its input that appears nowhere else in the project's non-test text and nothing in the change supplies
|
|
149
|
+
it, the callback carries it as `unsuppliedInputs` (at most 10 functions, 5 names each) and QuikProjects lists it under "What QuikPilot
|
|
150
|
+
noticed" as a check. This is the shape of a change whose new tests pass only because they hand the function the field themselves. It can be
|
|
151
|
+
wrong (a field that arrives from a database row or a request), so it only warns and never blocks. TypeScript is not covered (QUIKTR-1547).
|
|
113
152
|
|
|
114
153
|
**9.1.0 — the code-writing step sees the files the changed file imports.** For every existing file a run changes (code or
|
|
115
154
|
test), the runner now reads that file's own imports (JavaScript and TypeScript, one hop, never what those files import)
|