@quikit/quikpilot-runner 9.3.0-rc.97 → 9.3.0-rc.98
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 +5 -0
- package/dist/index.js +40 -10
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -194,6 +194,11 @@ 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.98 - the tests the run wrote reach the pull request even when the repository ignores test files (QUIKTR-2851).** A repository that lists its test files in .gitignore (`*.test.ts`; QuikProjects' own repository does) got pull requests without the tests QuikPilot wrote and ran: the change was staged with `git add -A`, which skips ignored files, and nothing said so.
|
|
198
|
+
- **What is committed now.** The files the run itself created (through its one write of the change to disk) are staged with `git add -f`, inside the run's folder when it has one. A file created by an attempt that was undone is gone from disk, so it is not staged.
|
|
199
|
+
- **What is still left out.** Every other ignored file: a build output, a file a command wrote, and a file that was there before the run, even if the AI edited it. The denied paths are checked on everything staged, as before.
|
|
200
|
+
- **The final-change listing** (the parts check and the database-change check) counts the created files too, so both see what the pull request holds.
|
|
201
|
+
|
|
197
202
|
**9.3.0-rc.97 - the early look can say the reported behaviour already works (QUIKTR-2821).** On UAT (17 Nov) the look read an already-fixed bug's fix and had no word for it: the model answered NOT_PRESENT, its searches had found code, and the runner turned that into CANNOT_TELL, so the run went through both gates and a build first.
|
|
198
203
|
- **The new verdict.** The look now speaks the AI Runtime's `investigate-loop-2`, which adds a fifth verdict, **ALREADY_WORKS**: the code the report points at exists and already behaves as the report says it should. It stands only on a citation the runner checked (the rule PRESENT has), otherwise CANNOT_TELL, and a trimmed record keeps a citation for it.
|
|
199
204
|
- **Older AI Runtimes.** An AI Runtime that predates loop-2 refuses it on the first turn: that turn is asked once more on `investigate-loop-1` (`investigate.version_fallback`) and the look carries on there. A switched-off look and any later refusal end the look as before. The fixed part of a loop-2 request is 7,000 tokens (the AI Runtime's value).
|
package/dist/index.js
CHANGED
|
@@ -29091,14 +29091,19 @@ function checkoutTargetBranch(targetBranch) {
|
|
|
29091
29091
|
}
|
|
29092
29092
|
var LIST_MAX_BUFFER_BYTES = 64 * 1024 * 1024;
|
|
29093
29093
|
var RUNNER_OWN_FOLDER = ".quikpilot";
|
|
29094
|
-
|
|
29094
|
+
var FORCE_ADD_CHUNK = 200;
|
|
29095
|
+
function addAll(scope, created = []) {
|
|
29095
29096
|
if (!scope) {
|
|
29096
29097
|
git(["add", "-A"]);
|
|
29097
|
-
|
|
29098
|
-
|
|
29099
|
-
|
|
29100
|
-
|
|
29098
|
+
} else {
|
|
29099
|
+
for (const path of [scope, RUNNER_OWN_FOLDER]) {
|
|
29100
|
+
if ((0, import_node_fs.existsSync)(path)) git(["add", "-A", "--", path]);
|
|
29101
|
+
}
|
|
29101
29102
|
}
|
|
29103
|
+
const prefix = scope ? scope.endsWith("/") ? scope : `${scope}/` : "";
|
|
29104
|
+
const inScope = scope ? created.filter((p) => p === scope || p.startsWith(prefix)) : [...created];
|
|
29105
|
+
const forced = inScope.filter((p) => (0, import_node_fs.existsSync)(p));
|
|
29106
|
+
for (let i3 = 0; i3 < forced.length; i3 += FORCE_ADD_CHUNK) git(["add", "-f", "--", ...forced.slice(i3, i3 + FORCE_ADD_CHUNK)]);
|
|
29102
29107
|
}
|
|
29103
29108
|
function changedOutside(scope) {
|
|
29104
29109
|
const out2 = (0, import_node_child_process.execFileSync)("git", [...NO_HOOKS_ARGS, "status", "--porcelain", "-z", "--untracked-files=all", "--no-renames"], {
|
|
@@ -42022,6 +42027,23 @@ function safeRepoTarget(rel, root = process.cwd()) {
|
|
|
42022
42027
|
}
|
|
42023
42028
|
}
|
|
42024
42029
|
}
|
|
42030
|
+
var createdByRun = /* @__PURE__ */ new Map();
|
|
42031
|
+
function filesCreatedByRun(root = process.cwd()) {
|
|
42032
|
+
let rootReal;
|
|
42033
|
+
try {
|
|
42034
|
+
rootReal = (0, import_node_fs10.realpathSync)(root);
|
|
42035
|
+
} catch {
|
|
42036
|
+
return [];
|
|
42037
|
+
}
|
|
42038
|
+
const isFile = (path) => {
|
|
42039
|
+
try {
|
|
42040
|
+
return (0, import_node_fs10.statSync)((0, import_node_path13.join)(rootReal, path)).isFile();
|
|
42041
|
+
} catch {
|
|
42042
|
+
return false;
|
|
42043
|
+
}
|
|
42044
|
+
};
|
|
42045
|
+
return [...createdByRun.get(rootReal) ?? []].filter(isFile).sort();
|
|
42046
|
+
}
|
|
42025
42047
|
function writeRepoFile(rel, content, root = process.cwd()) {
|
|
42026
42048
|
const path = canonicalPath(rel);
|
|
42027
42049
|
if (path === null) throw new DiskWriteRefused("bad_path");
|
|
@@ -42049,13 +42071,20 @@ function writeRepoFile(rel, content, root = process.cwd()) {
|
|
|
42049
42071
|
(0, import_node_fs10.mkdirSync)(d);
|
|
42050
42072
|
if ((0, import_node_fs10.lstatSync)(d).isSymbolicLink()) throw new DiskWriteRefused("outside_checkout");
|
|
42051
42073
|
}
|
|
42074
|
+
let created = false;
|
|
42052
42075
|
try {
|
|
42053
42076
|
const stat = (0, import_node_fs10.lstatSync)(abs);
|
|
42054
42077
|
if (stat.isSymbolicLink() || !stat.isFile()) throw new DiskWriteRefused("not_a_file");
|
|
42055
42078
|
} catch (err2) {
|
|
42056
42079
|
if (err2 instanceof DiskWriteRefused) throw err2;
|
|
42080
|
+
created = true;
|
|
42057
42081
|
}
|
|
42058
42082
|
(0, import_node_fs10.writeFileSync)(abs, content);
|
|
42083
|
+
if (created) {
|
|
42084
|
+
const set2 = createdByRun.get(rootReal) ?? /* @__PURE__ */ new Set();
|
|
42085
|
+
set2.add(path);
|
|
42086
|
+
createdByRun.set(rootReal, set2);
|
|
42087
|
+
}
|
|
42059
42088
|
}
|
|
42060
42089
|
|
|
42061
42090
|
// src/baselineCheck.ts
|
|
@@ -54459,7 +54488,7 @@ async function verifyChange(ctx, results, undoable) {
|
|
|
54459
54488
|
// src/guardrail.ts
|
|
54460
54489
|
var MAX_LEFT_OUT_NAMES2 = 10;
|
|
54461
54490
|
function checkGuardrail(deniedPaths, writeRoot = "") {
|
|
54462
|
-
addAll(writeRoot || void 0);
|
|
54491
|
+
addAll(writeRoot || void 0, filesCreatedByRun());
|
|
54463
54492
|
const deleted = stagedDeletions();
|
|
54464
54493
|
unstage(deleted);
|
|
54465
54494
|
const deletionsLeftOut = { count: deleted.length, names: deleted.filter((p) => matchesDeniedPath(p, readDenied(deniedPaths)) === null).slice(0, MAX_LEFT_OUT_NAMES2) };
|
|
@@ -55120,7 +55149,7 @@ var FAILURE_ARTIFACT_DIR = "quikpilot-failure";
|
|
|
55120
55149
|
var REPORT_COPY = "final-test-report.xml";
|
|
55121
55150
|
var MAX_REPORT_BYTES = 5 * 1024 * 1024;
|
|
55122
55151
|
var MAX_FILES = 200;
|
|
55123
|
-
var RUNNER_VERSION = true ? "9.3.0-rc.
|
|
55152
|
+
var RUNNER_VERSION = true ? "9.3.0-rc.98" : "dev";
|
|
55124
55153
|
function safeDestination(base, repoPath) {
|
|
55125
55154
|
if (!repoPath || (0, import_node_path27.isAbsolute)(repoPath)) return null;
|
|
55126
55155
|
const destination = (0, import_node_path27.resolve)(base, repoPath);
|
|
@@ -55212,9 +55241,10 @@ function statusPaths(root) {
|
|
|
55212
55241
|
encoding: "utf8",
|
|
55213
55242
|
maxBuffer: 64 * 1024 * 1024
|
|
55214
55243
|
});
|
|
55215
|
-
return new Set(
|
|
55216
|
-
status.split("\0").filter((entry) => entry.length > 3).map((entry) => entry.slice(3))
|
|
55217
|
-
|
|
55244
|
+
return /* @__PURE__ */ new Set([
|
|
55245
|
+
...status.split("\0").filter((entry) => entry.length > 3).map((entry) => entry.slice(3)),
|
|
55246
|
+
...filesCreatedByRun(root)
|
|
55247
|
+
]);
|
|
55218
55248
|
}
|
|
55219
55249
|
var isFileOnDisk = (root, path) => {
|
|
55220
55250
|
try {
|