Repository navigation
Loki Mode v11.158.0
The label describes exactly what the pull request merges, and a lint slip Loki made gets fixed instead of failing the run
Why: on FireLater#19 a run started from a feature branch was labelled VERIFIED while its pull request carried 5,159 lines the label never measured; on playwright#44124 a Haiku run did 4 of 4 asks with 0 of 159 tests broken and was sealed FAILED for two unused imports it had added, because a lint error never opened a fix round on Haiku.
Checked without a model, on the merged tree: scope-and-fix 868 passed, 0 failed; run-safety 220 passed, 0 failed; engine10-e2e-stub 262 passed, 0 failed; decompose-and-intake 162 passed, 0 failed; auto-route 47 passed, 0 failed; cli-entrypoints 72 passed, 0 failed; one-line-goal 36 passed, 0 failed. The new legs reproduced both defects on the code before the fix (a VERIFIED ready pull request carrying another branch's file; 0 fix rounds and FAILED for an introduced unused import).
Not measured yet: no real run on this build; lint tools were stand-ins in the tests; --base-current on a GitLab or fork origin, and a repository whose default branch is neither main nor master with no origin/HEAD, were not tried.
- A lint error that Loki's own change put in a file it changed no longer seals a working change as FAILED. In a recorded run (playwright issue 44124, Loki 11.155.0 on Haiku) the change did all 4 things the issue asked and broke none of 159 tests, but its two unused imports failed eslint; the run got no fix round (on Haiku a lint red did not count as an independent check) and was labelled FAILED. Now an eslint, ruff or shellcheck error that is the change's own, and a tsc error the change introduced, both count as independent checks, so a Haiku run gets a fix round whose brief carries the exact lint lines. If a style lint error (eslint, ruff, shellcheck) is still there after the fix rounds and every test passes, the label is PARTIAL with the lint line in NOT PROVEN, never FAILED. A type error (tsc) or a shell syntax error (bash -n) the change introduced also opens a fix round on Haiku now (a bash -n error used to get none), and if it survives the rounds it stays FAILED, as before. The verify step now records why a fix round did or did not open (fix_gate in its stage.completed event: open, closed with the reason, or none), so a run's record shows it. A lint error already on the base commit is excused exactly as before. Other failing checks are unchanged.
- A lint error that Loki's own change put in a file it changed no longer seals a working change as FAILED. In a recorded run (playwright issue 44124, Loki 11.155.0 on Haiku) the change did all 4 things the issue asked and broke none of 159 tests, but its two unused imports failed eslint; the run got no fix round (on Haiku a lint red did not count as an independent check) and was labelled FAILED. Now an eslint, ruff or shellcheck error that is the change's own, and a tsc error the change introduced, both count as independent checks, so a Haiku run gets a fix round whose brief carries the exact lint lines. If a style lint error (eslint, ruff, shellcheck) is still there after the fix rounds and every test passes, the label is PARTIAL with the lint line in NOT PROVEN, never FAILED. A type error the change introduced that survives the rounds stays FAILED, as before. A lint error already on the base commit is excused exactly as before. Other failing checks are unchanged.
- The label now describes exactly what the pull request merges. Measured on a real run (
loki start asklokesh/FireLater#19, pull request 70): the checkout was on a feature branch whose tip was not in main, Loki built on that tip, measured and labelled 12 files and 1,425 added lines, and opened a pull request into main that held 2 commits, 40 files and 6,584 added lines, with "safe to merge" on it. When a pull request will be opened and the commit you are on is not in the pull request's target, Loki now says what it does in one line before any model spend. With a clean working tree it starts from the target instead (starting from origin/main, not from your branch feature/x, so the pull request holds only this change (use --base-current to build on your branch)); your branch, its commits and your untracked files are not touched. With--base-current(orLOKI_BASE_CURRENT=1) it builds on your branch and opens the pull request into that branch, when origin has the branch and your commits are on it. When neither can be done (the branch is not on origin, or starting from the target would overwrite a file in your tree) it stops with exit 2, the reason and the two commands that work, before any session. A run started from main is unchanged and fetches nothing extra. - The seal measures what a pull request into its target would hold (files from the merge base, commits past the target) against what the run measured, and holds the label at PARTIAL with "the pull request would merge N files the label did not measure" when they differ. The receipt records the target, the merge base, the pull request's file and commit counts and the measured counts under
pr_base, with one line stating base and target; the pull request body carries the same line. The pull request stage repeats the measurement after fetching the target, so a pull request whose contents changed between the seal and the push opens as a draft and is never opened green; when the receipt holds that measurement, the pull request also says the receipt was sealed before the change. - The first lines of a run are at most three short lines in place of one long line that wrapped mid-word: the target and the base; the model and how to change it; the cost cap, when one is set, and the estimate. The "no dollar cap (subscription)" note and the model downgrade list moved behind
--verbose. A run withLOKI_ROUTERon keeps a fourth line for its route. - A run that started on a detached HEAD and opened a pull request now returns the checkout to that commit after the background deep verify; it used to stay on the run branch, because the record written for the deferred end had no branch and no commit to return to.