@quikit/quikpilot-runner 9.3.0-rc.53 → 9.3.0-rc.55
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 +923 -418
- package/dist/index.js.map +3 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -164,6 +164,10 @@ wrong (a field that arrives from a database row or a request), so it only warns
|
|
|
164
164
|
|
|
165
165
|
**9.3.0-rc.46 — the existing tests to read first include the ones that reach the code through one file in between (QUIKTR-1845).** On the live bug-6 run (QTRIA-17) the design changed `lib/services/issueFilters.ts`, and the two tests that assert the bug import `app/api/issues/route.ts`, which imports it, so the list of existing tests the AI reads before writing (`testsToCheck`, rc.44) was empty. When fewer than 3 test files are found by name or a direct import, the runner now takes one more step: of the files the tests import (code, not a test, not under a denied path; the 150 most shared first) it keeps the ones that import a changed file, and adds the tests that import them, after the others and up to 10 in all. A file in between imported by more than 12 tests only brings the tests named after it (a route by its folder) or after the changed file. Paths only, as before. With 3 or more found the list is exactly as in rc.45. Also in rc.46: everything in rc.45. Nothing else changes.
|
|
166
166
|
|
|
167
|
+
**9.3.0-rc.55 - a cut-off answer or a slow turn continues in a smaller step instead of ending the attempt (QUIKTR-1853).** Until now one turn that the AI Runtime cut off for length (`output_too_large`) or that ran past the turn limit (`turn_timeout`) threw the whole code-writing attempt away, and with two attempts per job two such turns ended a job with nothing written, though the AI was making progress (QTRIA-21: one slow turn, then one cut-off answer while writing tests, nothing written, $1.70). Nothing the attempt holds changes with a lost turn (the overlay, the transcript and the counters change only after a reply comes back as an answer), so the runner now asks again, once: the AI's transcript gets one fixed sentence of the runner's own - "your last answer was too long and was cut off / your last step took too long, so none of it was run. Take a smaller step: fewer files and fewer edits in one turn, and make each edit a small find-and-replace change" - as a refused turn with the shared rule word `length`, which every AI Runtime version already accepts, so nothing is deployed on the AI Runtime (`turnRecovery.ts`). It is never counted as a refusal or as a turn that changed nothing, so it cannot force `refused_repeatedly` or `no_progress`; it uses a turn and the attempt deadline and the step clock still bound it. It never happens twice in a row: a second lost turn straight after the first, and any lost turn on the final turn, end the attempt as before, and the failure message then says "a second time in a row, even after the AI was asked to take a smaller step". The run log gets `codegen.loop_recovered` (turn, reason, the service's code) and `afterRecovery` on `codegen.attempt_end`; the recovered turn appears in the record as a refused turn with the rule `length`. The AI Runtime's own log `output.measured` names the model that was cut off. `QUIKPILOT_TURN_RECOVERY=off` returns to ending the attempt. Also in rc.55: everything in rc.54.
|
|
168
|
+
|
|
169
|
+
**9.3.0-rc.54 - eight languages share one tree-sitter base: a syntax check and "never weaken an existing test" by structure (QUIKTR-1701, release 1).** Until now the runner's safety checks read code with a JavaScript parser and switched off for any other language: nothing noticed a broken Go or Ruby file, and an existing test in another language was protected only by the text rule, which lets any text be added in front of or behind the matched part (`t.Skip()`, an early `return`, `@pytest.mark.skip`, `@Disabled`, a shadowing `test_a = lambda: None` all passed). Now `languages.ts` is the one table of the languages read with tree-sitter - Python, Go, Java, Kotlin, C#, Rust, Ruby and PHP (JavaScript and TypeScript keep acorn and sucrase and every check they have). (1) Syntax: after each edit the code-writing loop tells the AI "the file no longer parses (a syntax error at line N)" when a file that parsed does not, and at hand-over a file that parsed before and does not now stops the run, exactly as for JavaScript; a file that was already broken, or a language whose grammar is not loaded, is never judged. (2) Existing tests (`existingTestsLang.ts`): every unit of the test file as it was before the run (a function, a class, an import, a statement - with its decorators, annotations and modifiers) must still be there, byte for byte and in order; a class, module, `impl` or RSpec `describe` is compared by what is around its body and then by its own units; an import may only gain names or a whole new import may be added; comments between units are free; a NEW unit may only declare something whose name no unit of that level has, and may not be a hook that runs around every test (`setUp`, `TestMain`, `init`, `@BeforeEach`, `[SetUp]`, a constructor, an RSpec `before`/`let`, a fixture, a static or `init` block, an inner attribute), a build constraint, a statement that declares nothing (`pytest.skip(...)` at module level), or a Rust attribute in front of an old item. The reasons are the same closed words as for JavaScript (`changed_text`, `removed_text`, `moved_block`, `affects_existing`). A file that does not parse falls back to the text rule. Size: the five new grammars are vendored brotli-compressed and embedded the same way (each decoded on first use, 2-25 ms), and the published source map no longer copies the source text, so the package is about 1.4 MB (rc.53: about 1.9 MB). `QUIKPILOT_LANG_CHECKS=js` turns both checks back to the old behaviour. Also in rc.54: everything in rc.53.
|
|
170
|
+
|
|
167
171
|
**9.3.0-rc.53 - a Python, Go or Java test that pins the bug can be reported to a person (QUIKTR-1855, release 2).** Until now the stop "an existing test expects what an approved case calls wrong - may I change it?" worked only for JavaScript and TypeScript tests: the test was found, and an edit of it judged, by a JavaScript parser, so a Go, Python or Java test ended the run with `test_unsupported_language`. Now `testLocateLang.ts` finds the tests of those languages with tree-sitter (a Python `def test_*` with its decorators, a Go `func TestX` whose subtests are its rows, a Java `@Test`/`@ParameterizedTest` method with its annotations) and judges an edit by its SHAPE: the test's tokens with every literal value (text, number, true/false/None/nil/null), assertion statements (`assert ...`, `self.assertEqual`, `assert.Equal`, `assertEquals`, `assertThat(...)...`), comments and the test's own name taken out must be the same before and after - so the values of a `parametrize` list, a Go table or a `@CsvSource` may change, and the call the test makes, its loops and its set-up may not. Data a test reads from elsewhere in the file (a module-level list, a `@MethodSource`) is outside the test and an edit there is refused as outside it. The tests are found by the function's name (a Java `@DisplayName` is the title when there is one); a reply that does not find the title lists the file's test names. A later job (the approval) reads the file the same way. The tree-sitter runtime and the three grammars (`vendor/tree-sitter/`, MIT, about 1.3 MB) are embedded in the bundle as base64 and decoded only when the first Python, Go or Java test file is read, so a JavaScript run pays nothing; the package grows from about 330 KB to about 700 KB gzipped and stays one file with no dependencies. A file that does not parse cleanly, and any other language (Kotlin, C#, Ruby, PHP), is still `test_unsupported_language`. `QUIKPILOT_TEST_LOCATE=js` turns the new readers off. Also in rc.53: everything in rc.52.
|
|
168
172
|
|
|
169
173
|
**9.3.0-rc.52 - the rows of a table test, in every test framework (QUIKTR-1855, release 1).** A test written once for many rows (vitest `describe.each`, pytest `parametrize`, Go subtests, JUnit 5 parameterized) is named by the test report in the framework's own way: vitest writes the row's values into the title, pytest adds `[1]`, Go adds `/subtest` (and reports the parent `TestMod` as an entry of its own), JUnit 5 adds `(Type)[2]` or writes only a display name (`[2] a, b`). Only the vitest way was understood, so for any other framework the give-up check, the count in "does not fit 10 of its 11 rows" and the baseline rows of a reported test never found the rows. One module (`rowNames.ts`) now reads those suffixes - only where the test is not a JavaScript or TypeScript file, so a JavaScript title that ends in `(legacy)` or `/b` is never taken for a row - and the same rule links a report's classname (a dotted pytest module, a Go package path, a Java class) to the test file. Used by `nameEndsWithTitle`, `rowPattern`, `matchRows`, `groupRegressions`, `unexplainedRegressions`, `approvedTestsFailing`, `failingNameIs` and the approved-rename check; a Go table test's parent entry is not counted as a row. Nothing changes for JavaScript and TypeScript; `QUIKPILOT_ROW_NAMES=js` turns the suffix reading off. Reading a Go, Python or Java test file to report a change to it is release 2. Also in rc.52: everything in rc.51.
|