loki-mode 11.141.2 → 11.141.3

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.
Files changed (68) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/dashboard/__init__.py +1 -1
  4. package/docs/CLI-REFERENCE.md +1 -1
  5. package/docs/INSTALLATION.md +1 -1
  6. package/docs/dev/architecture-reference.md +16 -16
  7. package/loki-ts/dist/loki.js +1531 -1531
  8. package/mcp/__init__.py +1 -1
  9. package/package.json +2 -2
  10. package/packages/control-plane/dist/server.js +107 -179
  11. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  12. package/web-app/dist/assets/{AdminPage-DSbRbe0v.js → AdminPage-CXYutD4P.js} +1 -1
  13. package/web-app/dist/assets/{Avatar-C8BD5DjM.js → Avatar-DtQv32ei.js} +1 -1
  14. package/web-app/dist/assets/{Badge-ybZgUI7G.js → Badge-B0OEiGWj.js} +1 -1
  15. package/web-app/dist/assets/{Button-BxnJjf8y.js → Button-DAxRHI93.js} +1 -1
  16. package/web-app/dist/assets/{CockpitPage-BvFUPj_0.js → CockpitPage-B9Hi4roF.js} +1 -1
  17. package/web-app/dist/assets/{ComparePage-DFwXFM-Q.js → ComparePage-BFCQ2npD.js} +1 -1
  18. package/web-app/dist/assets/{ErrorBoundary-BwP9fkOB.js → ErrorBoundary-iD00UcjA.js} +1 -1
  19. package/web-app/dist/assets/{EvidenceReceiptPanel-UtZITPZE.js → EvidenceReceiptPanel-B76dpKnO.js} +1 -1
  20. package/web-app/dist/assets/{GitHubIssuesPanel-DxODDLHg.js → GitHubIssuesPanel-B5-pxBUX.js} +1 -1
  21. package/web-app/dist/assets/{GitHubPRsPanel-Cusw3eTc.js → GitHubPRsPanel-Cz8MDVpH.js} +1 -1
  22. package/web-app/dist/assets/{HomePage-B6v2AlNd.js → HomePage-RN8tGnly.js} +2 -2
  23. package/web-app/dist/assets/{LoginPage-D1mdogAE.js → LoginPage-3bgx6JO5.js} +1 -1
  24. package/web-app/dist/assets/{MagicPage-DdvQeS91.js → MagicPage-Csph1itx.js} +1 -1
  25. package/web-app/dist/assets/{MetricsPage-BKd3XFIG.js → MetricsPage-C-gpg5dg.js} +1 -1
  26. package/web-app/dist/assets/{NotFoundPage-kERfZ3m9.js → NotFoundPage-D_2iaSIZ.js} +1 -1
  27. package/web-app/dist/assets/{ProjectPage-DmyBN_Bx.js → ProjectPage-sOWNmoyz.js} +3 -3
  28. package/web-app/dist/assets/{ProjectsPage-Do8fG_P4.js → ProjectsPage-Bcj1zeOK.js} +1 -1
  29. package/web-app/dist/assets/{SettingsPage-sH_31XYz.js → SettingsPage-V3PvBKXt.js} +1 -1
  30. package/web-app/dist/assets/{ShowcasePage-CMYgZaKq.js → ShowcasePage-Dgnx6rqF.js} +1 -1
  31. package/web-app/dist/assets/{SystemSettingsPage-ByVNwqn_.js → SystemSettingsPage-CYwtNhot.js} +1 -1
  32. package/web-app/dist/assets/{TeamsPage-C0FGS8r8.js → TeamsPage-zE5VGlot.js} +1 -1
  33. package/web-app/dist/assets/{TemplatesPage-BRcX6l3n.js → TemplatesPage-ByMfvWWy.js} +1 -1
  34. package/web-app/dist/assets/{TerminalOutput-Ce6QWrJf.js → TerminalOutput-DWlKNNgH.js} +1 -1
  35. package/web-app/dist/assets/{activity-Ce1SB-cf.js → activity-E89Nv0Gn.js} +1 -1
  36. package/web-app/dist/assets/{bell-DADtISI_.js → bell-F5OLNHAS.js} +1 -1
  37. package/web-app/dist/assets/{bot-BvDEf7yA.js → bot-BgMvMeIE.js} +1 -1
  38. package/web-app/dist/assets/{check-CLVUAlWY.js → check-DDjMmGIx.js} +1 -1
  39. package/web-app/dist/assets/{chevron-left-2ROPERNV.js → chevron-left-DOuYhQj3.js} +1 -1
  40. package/web-app/dist/assets/{circle-alert-RkWs-ah6.js → circle-alert-4RB4dTkg.js} +1 -1
  41. package/web-app/dist/assets/{clock-B6TJX470.js → clock-CuPAeSjR.js} +1 -1
  42. package/web-app/dist/assets/{cloud-D-BwCi5S.js → cloud-BMbPHSHB.js} +1 -1
  43. package/web-app/dist/assets/{code-xml-DDqISZ2a.js → code-xml-DM3_SytH.js} +1 -1
  44. package/web-app/dist/assets/{database-BqxJRAWO.js → database-Dg6mN6Ow.js} +1 -1
  45. package/web-app/dist/assets/{dollar-sign-DVG1lkwH.js → dollar-sign-B614dJTB.js} +1 -1
  46. package/web-app/dist/assets/{file-code-corner-DeAq0OFO.js → file-code-corner-Dl4JdVpI.js} +1 -1
  47. package/web-app/dist/assets/{file-plus-BkdnoJN-.js → file-plus-BInei2Fp.js} +1 -1
  48. package/web-app/dist/assets/{globe-BGOT-GKH.js → globe-D9dhwBk0.js} +1 -1
  49. package/web-app/dist/assets/{hammer-Cb-LNfqJ.js → hammer-DkHCWudw.js} +1 -1
  50. package/web-app/dist/assets/{index-DkpuEwul.js → index-CGg-uQi6.js} +3 -3
  51. package/web-app/dist/assets/{layers-DhpEAhRT.js → layers-D7FRJ2Cg.js} +1 -1
  52. package/web-app/dist/assets/{loader-circle-CCV48bQT.js → loader-circle-DWu2xFyT.js} +1 -1
  53. package/web-app/dist/assets/{lock-Cn6FyKkM.js → lock-DtQ7UEiT.js} +1 -1
  54. package/web-app/dist/assets/{package-IeC5AvCW.js → package-D-uGJ1YH.js} +1 -1
  55. package/web-app/dist/assets/{plus-Dd3wYQ1s.js → plus-BfTkHz42.js} +1 -1
  56. package/web-app/dist/assets/{refresh-cw-Cfs25NI1.js → refresh-cw-BXeJY2sm.js} +1 -1
  57. package/web-app/dist/assets/{rotate-ccw-CJKx2Gmj.js → rotate-ccw-CSugG-Ae.js} +1 -1
  58. package/web-app/dist/assets/{scroll-text-DO0KqepF.js → scroll-text-DRwM3FIU.js} +1 -1
  59. package/web-app/dist/assets/{server-DFEgI3PJ.js → server-CClk8rzC.js} +1 -1
  60. package/web-app/dist/assets/{shield-alert-Ck3diB6S.js → shield-alert-xtO3fBXY.js} +1 -1
  61. package/web-app/dist/assets/{thumbs-up-ChkPDQWP.js → thumbs-up-DbWHOFPx.js} +1 -1
  62. package/web-app/dist/assets/{trash-2-Bfe0D1gc.js → trash-2-CYZZlWrP.js} +1 -1
  63. package/web-app/dist/assets/{trending-down-DEZOctZO.js → trending-down-DUl7D2qn.js} +1 -1
  64. package/web-app/dist/assets/{trending-up-CmwiS2AA.js → trending-up-CgDQ9rvV.js} +1 -1
  65. package/web-app/dist/assets/{upload-DLn73BbB.js → upload-DuB3Cd-6.js} +1 -1
  66. package/web-app/dist/assets/{usePolling--_JycqXa.js → usePolling-u10dSbx_.js} +1 -1
  67. package/web-app/dist/assets/{user-Diby1Rt7.js → user-CUl0PWOM.js} +1 -1
  68. package/web-app/dist/index.html +1 -1
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: Runs an autonomous software factory that knows what it is supposed to deliver and proves it did, with a signed receipt. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.
4
4
  ---
5
5
 
6
- # Loki Mode v11.141.2
6
+ # Loki Mode v11.141.3
7
7
 
8
8
  **Current entry points (Loki 10 engine):** `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` run the Loki 10 engine and end with a signed receipt (`loki verify`). `loki backlog owner/repo --all` runs many issues in parallel. Guide: `docs/v10/GUIDE.md`. The skill instructions below, and `loki start`, describe the previous bash loop. PRD-file starts (`loki start ./prd.md`) and the opencode provider still run on it until FC38-SWEEP ports them; the legacy-engine command and the LOKI_ENGINE switch remain removed. Prefer `loki owner/repo#N` for issues.
9
9
 
@@ -461,4 +461,4 @@ Implemented, planned and deprecated items, with the version each landed in: `CHA
461
461
 
462
462
  ---
463
463
 
464
- **v11.141.2 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
464
+ **v11.141.3 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 11.141.2
1
+ 11.141.3
@@ -7,6 +7,6 @@ Modules:
7
7
  control: Session control helpers (status, atomic writes, origin check)
8
8
  """
9
9
 
10
- __version__ = "11.141.2"
10
+ __version__ = "11.141.3"
11
11
 
12
12
  __all__ = ["__version__"]
@@ -1,6 +1,6 @@
1
1
  # CLI reference
2
2
 
3
- Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.141.2. Do not edit by hand.
3
+ Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.141.3. Do not edit by hand.
4
4
  Hidden and legacy-only commands are omitted; see `docs/CLI-INVENTORY.md` for the full inventory.
5
5
 
6
6
  | Command | Description |
@@ -2,7 +2,7 @@
2
2
 
3
3
  Loki Mode, by [Autonomi](https://www.autonomi.dev/), turns a spec or an issue into a verified pull request with a receipt you can check. This page covers installing it, a first run, and the options around it.
4
4
 
5
- **Version:** v11.141.2
5
+ **Version:** v11.141.3
6
6
 
7
7
  **Engine note:** `loki start` is the primary command. `loki start`, `loki "<task>"`, `loki owner/repo#N` and `loki quick` all run the Loki 10 engine, whatever the flag order or input form (PRD file, issue ref, task or one-word brief). The previous loop runs only on `--engine legacy`, `LOKI_ENGINE=legacy`, or for one call when a flag Loki 10 cannot honor is present. See the [user guide](v10/GUIDE.md) and the [5-minute quickstart](QUICKSTART.md).
8
8
 
@@ -141,10 +141,10 @@ These knobs together implement the RARV-C (closure) loop: findings -> override c
141
141
  - `LOKI_E10_CHANGELOG_REF` -- on by default, `0` opts out (CR; `changelogRefStyle`, `releaseNoteProblems` and the CL brief line in `loki-ts/src/project_model/conventions.ts`; checked by the self-check's release-note item). The reference form most existing changelog entries use (a markdown issue/PR link, `(#N)`, an rst `:pr:` role, `GH-N`, bare `#N`; at least 3 of the first 40 bullets and at least half) goes into the CL brief line with "use the number the task gives in that form, and never invent a number". The self-check flags an added entry that cites a number the task does not give, an entry with no reference to the task's number when existing entries carry one, a changeset naming a package no changed file belongs to, and a towncrier fragment numbered differently from the task's issue; a flag starts the self-check's review turn. After that turn a deterministic pass (`stripInventedRefsInFile`, `stripInventedReleaseRefs` in `features/self_review.ts`) removes from every release-note line the run added each `#N`, `(#N)`, `[#N](url)`, issue or pull URL, `:pr:` role and `GH-N` whose number the task input never gives, and tidies what is left, so the entry falls back to the repo's no-reference form; the receipt lists each removal (`changelog_refs_removed`). Base lines are never touched. The failure: on held-out repos the second review-fail class was changelog entries with no PR or issue reference, or with the wrong package or issue number.
142
142
  - `LOKI_E10_SELF_REVIEW` -- on by default, `0` opts out, `always` runs the turn on every run (SR; `loki-ts/src/features/self_review.ts`, called at the end of the implement stage after the named-sites check and before the Wall restore; the receipt carries `self_review`). The pre-delivery review self-check. Five deterministic items are computed on the implemented tree against base, with no model call: (a) a release note the repo's rules require (the CL, changeset or towncrier convention) and the diff lacks; (b) stray files: a run-added file in a directory the repo has never tracked (build output is recorded as `auto`, the commit filter drops it); (c) a source change with no test file in the diff; (d) format: `auto` when a configured formatter normalizes the changed files at commit, otherwise the style configs are named; (e) scope: edits to existing files outside every scope signal (`outsideScope`). When any item is flagged (or with `always`), one bounded resume of the implement session (suffix `-rv`, turn cap `LOKI_E10_SELF_REVIEW_MAX_TURNS`, default 12, the cost cap; skipped when the stage has under 60 s left) gets the flagged items, the CONTRIBUTING and PR template text (6000 characters) and the style config names, may edit the diff, must change nothing that already follows the rules, and ends with one `REVIEW <a-e>: ok|fixed|justified: <reason>` line per item. Each item is then settled: the after-turn check no longer flagging it reads `fixed`; a persisting flag reads `justified` only with a stated reason, else `unresolved`. A clean minimal diff starts no turn, so it is never touched and costs nothing. Verify and the commit stage run on the reviewed tree as usual.
143
143
  - `LOKI_E10_REVIEW_TURN_GUARD` -- OFF by default until measured, `1` turns it on (TG; `guardReviewTurn`, `restoreTurnPaths` in `loki-ts/src/features/self_review.ts`, `reviewTurnGuard` in `loki-ts/src/engine10/stages/implement.ts`). Before the SR review turn the tree is snapshotted against base. When the turn changes any path, the tests of those paths (`patchCheckRefs`: the impacted tests of the turn's paths plus its own test files, at most 6) are rerun quietly through verify's runner. A test that fails after the turn is rerun with only the turn's paths put back to the snapshot; if it passes there, the turn stays taken back (the implement diff is kept, the implement result is not replaced by the review reply, and the items settle against the restored tree with the review reply ignored, so a flag the turn tried to fix reads unresolved), `self_review.turn_guard` records the paths, the runs and the broken test, and the receipt `not_proven` names it. A test that also fails without the turn keeps the turn. A new test file the turn added is never counted as a test that passed before.
144
- - `LOKI_E10_SR_COVERAGE` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (SC; `statedCases`, `caseCovered`, `siblingDefinitions` in `loki-ts/src/features/self_review.ts`). Two more self-check items, computed only when the diff changes source: (f) stated cases, kept to fenced code blocks that show an error or a result (an error or exception token, a `// =>` result comment, or an expected/actual/output/returns/raises line right after the block) and four sentence forms ("similar error when ...", "... has the same effect", "both `x` and `y`" with a code token, "gets neither treatment"); a block case is covered when an added test line carries one of the block's called names, a sentence case when an added test line carries one of its backticked tokens, and a sentence with no code token is always flagged; at most 8 cases. (g) sibling definitions: other definitions, by name, of the function or method enclosing each changed hunk (Python, JS/TS, Go, Rust), in untouched non-test files of the same language, outside vendored or built dirs; a name with more than 5 such definitions, and common names (`__init__`, `constructor`, `main` ...), are dropped. Either flag starts the existing single `-rv` review turn, whose brief adds items (f) and (g) and accepts `REVIEW f|g` lines; a clean minimal diff still starts no turn. The failure: on a held-out style dev set Loki fixed the headline case and missed a stated one (a "similar error when wrapping it in ..." edge, a "... has the same effect" sentence, the issue's own error reproduction) or a sibling override in a subclass, while a stronger raw model covered them; expected reach 3-4 of those 6 losses, unmeasured.
145
- - `LOKI_E10_DOC_ENUM` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (DE; `docEnumerations` in `loki-ts/src/features/self_review.ts`, self-check item (h) "docs"). A Markdown file in a changed source file's directory, or a `docs/` page named after its directory or file, that the diff leaves untouched and that already names at least 2 of the option keys or quoted names the source file holds on base, is flagged when the change adds a new key or name the doc does not carry. The flag starts the existing single review turn (brief item (h), reply `REVIEW h`). The failure: a change added a secondary option to two rules and left each rule's README, which lists every other option, without it.
146
- - `LOKI_E10_DOC_UPDATE_RULE` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (UD; `DOC_RULE_UPDATE` and `fixedRules` in `loki-ts/src/e10ext/context.ts`). The implement and fix rules no longer say "write no documentation": they say to write no new documentation pages unless asked, but to update existing docs that list what changed (an option, flag, method, rule or name a README or doc page already lists gets its entry, written like the entries around it). The never-announce-missing-behavior rule is unchanged. `=0` restores the v11.139.0 line byte for byte (`FIXED_RULES_DOC_V139`); either text is a constant, so the rules prefix stays cache-stable, and the legacy block (`LOKI_E10_PINNED_TEST_UPDATE=0`) keeps the old line. The failure: both Loki arms left a rule's README, which lists every option, without the added option, while every raw arm updated it.
147
- - `LOKI_E10_WALL_CASES` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (WC; `wallRequiredCases`, `wallCasesHanded` in `loki-ts/src/features/self_review.ts`, called from `stages/wall.ts`). The SC stated cases go to the Wall test writer as REQUIRED acceptance lines ("REQUIRED CASE n (stated in the issue; write a test that fails before the fix and passes after it): ..."), and the handoff is recorded in `<runDir>/wall-required-cases.json` (the fire marker). When the Wall then wrote tests, the self-check's stated-cases item reads `auto` (the Wall's sealed tests check the cases) instead of token-matching the model's own tests, which pass when they encode the model's wrong reading. With no Wall run the token match stays as the fallback. The sibling grep is unchanged.
144
+ - `LOKI_E10_SR_COVERAGE` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (SC; `statedCases`, `caseCovered`, `siblingDefinitions` in `loki-ts/src/features/self_review.ts`). Two more self-check items, computed only when the diff changes source: (f) stated cases, kept to fenced code blocks that show an error or a result (an error or exception token, a `// =>` result comment, or an expected/actual/output/returns/raises line right after the block) and four sentence forms ("similar error when ...", "... has the same effect", "both `x` and `y`" with a code token, "gets neither treatment"); a block case is covered when an added test line carries one of the block's called names, a sentence case when an added test line carries one of its backticked tokens, and a sentence with no code token is always flagged; at most 8 cases. (g) sibling definitions: other definitions, by name, of the function or method enclosing each changed hunk (Python, JS/TS, Go, Rust), in untouched non-test files of the same language, outside vendored or built dirs; a name with more than 5 such definitions, and common names (`__init__`, `constructor`, `main` ...), are dropped. Either flag starts the existing single `-rv` review turn, whose brief adds items (f) and (g) and accepts `REVIEW f|g` lines; a clean minimal diff still starts no turn. The failure: on a held-out style dev set Loki fixed the headline case and missed a stated one (a "similar error when wrapping it in ..." edge, a "... has the same effect" sentence, the issue's own error reproduction) or a sibling override in a subclass, while a stronger raw model covered them; expected reach 3-4 of those 6 losses, unmeasured.
145
+ - `LOKI_E10_DOC_ENUM` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (DE; `docEnumerations` in `loki-ts/src/features/self_review.ts`, self-check item (h) "docs"). A Markdown file in a changed source file's directory, or a `docs/` page named after its directory or file, that the diff leaves untouched and that already names at least 2 of the option keys or quoted names the source file holds on base, is flagged when the change adds a new key or name the doc does not carry. The flag starts the existing single review turn (brief item (h), reply `REVIEW h`). The failure: a change added a secondary option to two rules and left each rule's README, which lists every other option, without it.
146
+ - `LOKI_E10_DOC_UPDATE_RULE` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (UD; `DOC_RULE_UPDATE` and `fixedRules` in `loki-ts/src/e10ext/context.ts`). The implement and fix rules no longer say "write no documentation": they say to write no new documentation pages unless asked, but to update existing docs that list what changed (an option, flag, method, rule or name a README or doc page already lists gets its entry, written like the entries around it). The never-announce-missing-behavior rule is unchanged. `=0` restores the v11.139.0 line byte for byte (`FIXED_RULES_DOC_V139`); either text is a constant, so the rules prefix stays cache-stable, and the legacy block (`LOKI_E10_PINNED_TEST_UPDATE=0`) keeps the old line. The failure: both Loki arms left a rule's README, which lists every option, without the added option, while every raw arm updated it.
147
+ - `LOKI_E10_WALL_CASES` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (WC; `wallRequiredCases`, `wallCasesHanded` in `loki-ts/src/features/self_review.ts`, called from `stages/wall.ts`). The SC stated cases go to the Wall test writer as REQUIRED acceptance lines ("REQUIRED CASE n (stated in the issue; write a test that fails before the fix and passes after it): ..."), and the handoff is recorded in `<runDir>/wall-required-cases.json` (the fire marker). When the Wall then wrote tests, the self-check's stated-cases item reads `auto` (the Wall's sealed tests check the cases) instead of token-matching the model's own tests, which pass when they encode the model's wrong reading. With no Wall run the token match stays as the fallback. The sibling grep is unchanged.
148
148
  - `LOKI_E10_CHANGELOG_SCOPE` -- on by default, `0` opts out (CS; `briefChangelog` in `loki-ts/src/e10ext/scope.ts`, applied in `flagOutsideScope`). When the CL changelog-file convention applies, that changelog file is in scope for the advisory "outside stated scope" notes, so the entry the brief asked for is never called out of scope (`pr_lessons.ts` reads those notes). Every other unplanned file is still flagged. The failure: a run that added the required entry got "outside stated scope: CHANGELOG.md" on its receipt.
149
149
  - `LOKI_E10_TOWNCRIER_EXAMPLE` -- on by default, `0` opts out (TX; `releaseNoteBrief` in `loki-ts/src/project_model/conventions.ts`). The towncrier "Release-note convention" line names a real fragment as its example (`towncrierExample`: `<issue>.<type>[.<ext>]` or `+<slug>.<type>[.<ext>]` with a declared type, the same picker the fragment writer uses), or no example when the directory holds none. The failure: a fresh checkout ties every mtime, so the old newest-file pick fell to the name tie-break and named the repo's towncrier template (`template.rst`, `towncrier_template.md.jinja`) as the "newest example". Off: the newest file of the directory, as before.
150
150
  - `LOKI_E10_ATTEMPTS` -- best-of-N implement attempts (EXP-0010, `loki-ts/src/features/attempts.ts`). N is the TOTAL count: unset, `0`, `1` and anything unparseable are off (one attempt); `on`/`true`/`yes` is 2; a whole number 2-6 sets N on any model. Before 11.140 the number was the EXTRA count after a red verify, so `LOKI_E10_ATTEMPTS=3` meant 3 extra attempts and now means 3 in all. When the first attempt (fix rounds included) is not clean (a red check, a spec conflict, or a NOT PROVEN line from verify or a fix round; `pre red:` lines do not count), N-1 more independent attempts run in parallel on the same model (`LOKI_E10_ATTEMPT_MODELS`, unset by default, is a comma list with one model per attempt in order: `haiku,sonnet` runs the first attempt's implement session on Haiku and the extra one on Sonnet; an attempt past the list reuses its last entry; the receipt's `attempts` lines then name each attempt's model and `implement.attempts` records `models` and `winner_model`), each in a detached worktree in its own temp directory with a different instruction (smallest change, test first, read the covering tests first). Each finished attempt is swapped into the primary and gets Loki's normal verify (the complete one, never a fix round's quick one); the first clean one stops the others. Otherwise `e10ext/select.ts` rankAttempts orders them on what a user can see: verify green, then no spec conflict, then fewer NOT PROVEN lines. A disqualified attempt (killed, errored, an empty diff without already-done evidence, a loosened existing or Wall test) never wins. A tie at the top goes to one tool-less review (reviewTie; `LOKI_E10_SELECT_REVIEW_MODEL`, default claude-sonnet-5-5, `opus` for a reviewer independent of a Sonnet judge; `LOKI_E10_ATTEMPTS_REVIEW_MODEL` is its older name and loses to the new one; aliases resolve through `providers/model_catalog.json`; `LOKI_E10_ATTEMPTS_REVIEW=0` keeps the lowest index). It compares the tied diffs, new files included, against the issue, the repo's CONTRIBUTING, PR template, style configs, top-level entries and the pre-fix text of every touched file, all read at the base commit. It is shown in forward and reversed order and counts only when both orders name the same attempt; anything else keeps the lowest index. No hidden test or benchmark file is read. Only the chosen tree is sealed, with its own verify and fix outputs; the receipt field `attempts` lists every attempt and the selection reason, and is omitted when no extra attempt ran. Shares the run's `--max-cost` and time caps and needs one 90 s window. Journal event `attempts.selected`, stage data `implement.attempts`.
@@ -187,24 +187,24 @@ These knobs together implement the RARV-C (closure) loop: findings -> override c
187
187
  - `LOKI_E10_COLLATERAL_BASELINE` -- on by default, `0` opts out (acc-154, fix D; `loki-ts/src/runner/repo_profile.ts` collateralOnBaseline, `stages/verify.ts`). A collateral test (relevant, not the task's own) is pre-existing at once, with no COLLATERAL_RED cap and no fix round, only when the environment is as intake left it, the test file is unedited, no changed file is its path-paired source, and every comparable failing id with its error lines equals this base commit's intake profile. A changed paired source, a new failing id, or the same id with another error keeps the cap and the fix round. Before it, FireLater#24's collateral page tests cost a fix round each slice and capped VERIFIED although they matched base exactly.
188
188
  - `LOKI_DEFAULT_SESSION_MODEL` -- the session model a Claude run uses when the user names none (acc-156; `loki-ts/src/util/claude_model.ts` DEFAULT_SESSION_MODEL and chooseSessionModel, applied in `engine10/supervisor.ts`, shown by `autonomy/route.sh`). Unset means DEFAULT_SESSION_MODEL (`sonnet`); any session pin value (`haiku`, `sonnet`, `opus`, `small`, `medium`, `high`, ...) sets another; `provider` restores the pre-acc-156 run with no `--model`, the Claude CLI's account default. The default is exported as LOKI_SESSION_MODEL, so a default run is exactly a `--session-model <default>` run. `--session-model`, LOKI_SESSION_MODEL, LOKI_MODEL_OVERRIDE, LOKI_MODEL_ROUTE, LOKI_{,CLAUDE_}MODEL_{DEVELOPMENT,PLANNING,FAST} and the model router (LOKI_ROUTER=on|auto, which `--haiku` and `--cost lean` set) always win. The start line prints `model <m> (<why>)` and the receipt records `model_source` (explicit, default, provider). Bench: an `L-Default` arm or BENCH_NO_SESSION_MODEL=1 runs `bench/bin/run_arm.sh` with no `--session-model`.
189
189
  - `LOKI_E10_COMMIT_HOOK_BYPASS` -- on by default, `0` opts out (acc-160; `loki-ts/src/engine10/stages/seal.ts` commitStage, `engine10/machine.ts`, knob in `util/safe_git.ts`). Loki's internal commit runs the repo's own hooks first, with the user's signing kept and a 120 s limit. If that commit fails, the index and the run's own files go back to the tree verify judged, which undoes a hook that ran a formatter and restaged. The commit is then retried once with `core.hooksPath=/dev/null`, signing still kept. A pass on the retry proves a hook was the cause, and the receipt says so on NOT PROVEN (a disclosure, not a cap). A failure the retry does not fix, such as signing, stays `git commit failed`. In both cases seal now writes a FAILED receipt with the git error on NOT PROVEN, instead of ending with no receipt. Found on dev-msw-2829: the session's `pnpm run build` installed simple-git-hooks, whose commitlint `commit-msg` hook rejected the `loki:` subject.
190
- - `LOKI_E10_CARGO_MERGED_DOCTEST` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162; `loki-ts/src/util/check_result.ts`). rustdoc's merged-doctests note (Rust 2024 edition), `all doctests ran in Xs; merged doctests compilation took Ys`, prints after a doctest segment's own `test result:` trailer. It is cargo's note, not test output, so it is dropped from segment bodies and from the stream's tail, and the segment and the run read as measured. A green `cargo test` with no test target at all (a fuzz or bin-only crate) ran 0 tests instead of reading as unparsed. Found on tera (dev2): every cargo suite read not_run.
191
- - `LOKI_E10_AVA_TARGETED` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162; `engine10/testmap.ts` avaTargets, `util/check_result.ts`). When verify selects nothing, a changed JS/TS file whose nearest package declares ava (a dependency, an `ava` key, or an ava.config file) maps to its own ava test: itself under test/ or tests/ (helpers and fixtures excluded), else the same-stem file there. At most 8 refs, each run as `npx --no-install ava <file>`. The count comes from ava's own summary block after its last rule, past stderr noise. Found on ink (dev2): only lint:tsc ran.
192
- - `LOKI_E10_NO_TEST_FALLBACK` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162; `engine10/stages/verify.ts`, `project_model/package_suite.ts` ownedSuites). A low-tier verify that executed no test at all runs the repo's own test command, through the full-suite path and its base attribution. That means the Project Model suites of the packages that own the changed files (for example `cargo test` in that crate), else the detected runner's full command. verify records `no_test_fallback: true`. When nothing executable runs, NOT PROVEN still says `no tests executed`.
193
- - `LOKI_E10_BASE_CRASH_ENV` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162; `engine10/stages/verify.ts` crashSignature and subtractBase). A test check that failed with no parseable id because its process crashed or could not import (a fatal Python signal, a ModuleNotFoundError, a conftest or module ImportError) is run once on base, with the head's .venv or node_modules linked. When base crashes with the same signature, the check becomes not_run with the signature on NOT PROVEN, never a failure of the change and never fix-round input. A different signature, a base that passes, or a check with ids stays a failure. Found on pydantic (dev2): a stand-in env segfaulted on base and head alike, and the run ended FAILED.
194
- - `LOKI_E10_UV_REQUIRED` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162; `project_model/install.ts`). When a repo pins uv's `required-version` and the host uv is older, uv refuses every `uv sync`. The install is then retried once, unchanged, as `uvx --from 'uv<spec>' uv ...`. A workspace member's retry runs at the `[tool.uv.workspace]` root, as the repo's CI does, because a member-only sync of the shared .venv would drop the root's test dependencies. The install record's lock_note says so. Found on pydantic (dev2): `Required uv version >=0.13.0` against host uv 0.9.26.
195
- - `LOKI_E10_PYTEST_PRETTY` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162; `util/check_result.ts`). A repo that loads pytest-pretty prints `Results (Xs):` followed by one count per line instead of pytest's `N passed in Xs`. That block counts when it ends the output and every line in it is a count. Found on pydantic: every pytest check read as executed count unmeasured.
196
- - `LOKI_E10_SOURCE_SITES` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162 do-no-harm a; `features/exec_spec.ts` resolveSites and siteRank). A named symbol resolves to a source file first. It goes to a test-area file (test/, tests/, benchmark/, examples/, docs/) only if no source declares it, and to build output or a type declaration (build/, out/, lib/x beside a src/x twin, *.d.ts, *.min.js) last. Fire marker: a named site records `instead_of`, the file the old first-match order would have picked. Found on dev2: ink resolved to build/ and benchmark/, axios to index.d.ts.
197
- - `LOKI_E10_PLAN_HINTS` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162 do-no-harm a; `e10ext/context.ts`, `stages/implement.ts`). The implement brief introduces the plan as a hint, not the scope: the task decides what to change, and every case it states is covered even where the plan leaves it out. The same lead says any file the fix needs may be edited. The `Relevant files:` list keeps its wording, because the L021 Opus golden and the exemplar lookup read it. Fire marker: implement records `plan_hints: true` when a plan was given. Found on tera: the plan covered only a top-level `-1`.
198
- - `LOKI_E10_UNCAUSED_NO_FIX` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162 do-no-harm b; `stages/verify.ts` uncausedRed). A red check the diff cannot have caused never feeds a fix round. That means no failing id or diagnostic names a changed file, and either the diff changes only inert files (docs, type declarations, test files, changelog fragments) or, for a lint, every diagnostic sits in an unchanged file and names no symbol the diff changed. Wall, targeted and base-green-now-red checks are never uncaused. The check still fails and the verdict is unchanged; only the round is not spent. Fire marker: verify records `uncaused_reds`. Found on axios: 2 rounds on port clashes and a docs tsc error.
199
- - `LOKI_E10_HAIKU_INDEP_FIX` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (acc-162 do-no-harm b; `engine10/machine.ts`, `stages/verify.ts` independent_fail). A run whose implement model is Haiku gets no fix round unless an independent check failed: the Wall, a targeted test the diff touches (a changed test file, an impacted test, the task's own), or a full-suite failure absent from the base profile. Fire marker: verify records `fix_gate`, plus a skipped `loop.repeat` event. Found on dev2: rounds ran on 11 of 20 Loki-Haiku runs, at 25% of spend, and flipped none of the losses.
190
+ - `LOKI_E10_CARGO_MERGED_DOCTEST` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162; `loki-ts/src/util/check_result.ts`). rustdoc's merged-doctests note (Rust 2024 edition), `all doctests ran in Xs; merged doctests compilation took Ys`, prints after a doctest segment's own `test result:` trailer. It is cargo's note, not test output, so it is dropped from segment bodies and from the stream's tail, and the segment and the run read as measured. A green `cargo test` with no test target at all (a fuzz or bin-only crate) ran 0 tests instead of reading as unparsed. Found on tera (dev2): every cargo suite read not_run.
191
+ - `LOKI_E10_AVA_TARGETED` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162; `engine10/testmap.ts` avaTargets, `util/check_result.ts`). When verify selects nothing, a changed JS/TS file whose nearest package declares ava (a dependency, an `ava` key, or an ava.config file) maps to its own ava test: itself under test/ or tests/ (helpers and fixtures excluded), else the same-stem file there. At most 8 refs, each run as `npx --no-install ava <file>`. The count comes from ava's own summary block after its last rule, past stderr noise. Found on ink (dev2): only lint:tsc ran.
192
+ - `LOKI_E10_NO_TEST_FALLBACK` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162; `engine10/stages/verify.ts`, `project_model/package_suite.ts` ownedSuites). A low-tier verify that executed no test at all runs the repo's own test command, through the full-suite path and its base attribution. That means the Project Model suites of the packages that own the changed files (for example `cargo test` in that crate), else the detected runner's full command. verify records `no_test_fallback: true`. When nothing executable runs, NOT PROVEN still says `no tests executed`.
193
+ - `LOKI_E10_BASE_CRASH_ENV` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162; `engine10/stages/verify.ts` crashSignature and subtractBase). A test check that failed with no parseable id because its process crashed or could not import (a fatal Python signal, a ModuleNotFoundError, a conftest or module ImportError) is run once on base, with the head's .venv or node_modules linked. When base crashes with the same signature, the check becomes not_run with the signature on NOT PROVEN, never a failure of the change and never fix-round input. A different signature, a base that passes, or a check with ids stays a failure. Found on pydantic (dev2): a stand-in env segfaulted on base and head alike, and the run ended FAILED.
194
+ - `LOKI_E10_UV_REQUIRED` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162; `project_model/install.ts`). When a repo pins uv's `required-version` and the host uv is older, uv refuses every `uv sync`. The install is then retried once, unchanged, as `uvx --from 'uv<spec>' uv ...`. A workspace member's retry runs at the `[tool.uv.workspace]` root, as the repo's CI does, because a member-only sync of the shared .venv would drop the root's test dependencies. The install record's lock_note says so. Found on pydantic (dev2): `Required uv version >=0.13.0` against host uv 0.9.26.
195
+ - `LOKI_E10_PYTEST_PRETTY` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162; `util/check_result.ts`). A repo that loads pytest-pretty prints `Results (Xs):` followed by one count per line instead of pytest's `N passed in Xs`. That block counts when it ends the output and every line in it is a count. Found on pydantic: every pytest check read as executed count unmeasured.
196
+ - `LOKI_E10_SOURCE_SITES` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162 do-no-harm a; `features/exec_spec.ts` resolveSites and siteRank). A named symbol resolves to a source file first. It goes to a test-area file (test/, tests/, benchmark/, examples/, docs/) only if no source declares it, and to build output or a type declaration (build/, out/, lib/x beside a src/x twin, *.d.ts, *.min.js) last. Fire marker: a named site records `instead_of`, the file the old first-match order would have picked. Found on dev2: ink resolved to build/ and benchmark/, axios to index.d.ts.
197
+ - `LOKI_E10_PLAN_HINTS` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162 do-no-harm a; `e10ext/context.ts`, `stages/implement.ts`). The implement brief introduces the plan as a hint, not the scope: the task decides what to change, and every case it states is covered even where the plan leaves it out. The same lead says any file the fix needs may be edited. The `Relevant files:` list keeps its wording, because the L021 Opus golden and the exemplar lookup read it. Fire marker: implement records `plan_hints: true` when a plan was given. Found on tera: the plan covered only a top-level `-1`.
198
+ - `LOKI_E10_UNCAUSED_NO_FIX` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162 do-no-harm b; `stages/verify.ts` uncausedRed). A red check the diff cannot have caused never feeds a fix round. That means no failing id or diagnostic names a changed file, and either the diff changes only inert files (docs, type declarations, test files, changelog fragments) or, for a lint, every diagnostic sits in an unchanged file and names no symbol the diff changed. Wall, targeted and base-green-now-red checks are never uncaused. The check still fails and the verdict is unchanged; only the round is not spent. Fire marker: verify records `uncaused_reds`. Found on axios: 2 rounds on port clashes and a docs tsc error.
199
+ - `LOKI_E10_HAIKU_INDEP_FIX` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162 do-no-harm b; `engine10/machine.ts`, `stages/verify.ts` independent_fail). A run whose implement model is Haiku gets no fix round unless an independent check failed: the Wall, a targeted test the diff touches (a changed test file, an impacted test, the task's own), or a full-suite failure absent from the base profile. Fire marker: verify records `fix_gate`, plus a skipped `loop.repeat` event. Found on dev2: rounds ran on 11 of 20 Loki-Haiku runs, at 25% of spend, and flipped none of the losses.
200
200
  - `LOKI_E10_WALL_ON_LEAN` -- off by default, `1` opts in; implied by `LOKI_E10_CASCADE_V0=1` (`util/wall_knobs.ts`, `stages/wall.ts`, `stages/plan.ts`). A Wall that is on (`LOKI_E10_WALL=1`) also runs on the lean path, a small or normal task with a relevant visible test, without forcing plan. Off, the lean path skips the Wall as before.
201
201
  - `LOKI_E10_CASCADE_V0` -- OFF by default, `1` turns it on (cascade v0; `util/wall_knobs.ts`, `engine10/machine.ts` extraAttempts, `features/attempts.ts`). The Wall is the oracle and the model cascade is `LOKI_E10_ATTEMPT_MODELS`, or `haiku,sonnet` when that is unset. The flag turns the Wall on for the run, unless `LOKI_E10_WALL=0`. Only a Wall check that fails on the first candidate starts one more attempt, before any fix round, on the next model in the list. The run's own model is the first candidate, so a Haiku run cascades to Sonnet. That attempt's brief is the saved implement brief plus the Wall's failing output. The existing best-of selection keeps the better tree, and fix rounds still follow when the winner is red. No other red cascades: not lint, not a collateral test, not a NOT PROVEN line. With the flag on, the after-fix-rounds attempts trigger is off. The flag implies `LOKI_E10_WALL_ON_LEAN`, so the Wall also runs on the lean path, without forcing plan. Under this flag, a failed pre-implement snapshot (too big or too slow) no longer drops the concurrent Wall: its base run uses a fresh checkout of the base commit, said on NOT PROVEN (`base_checkout: fresh`). The receipt records `wall_oracle` {cost_usd, duration_s} whenever the Wall ran, and, under the flag, `cascade` {fired, from, to}. Fire marker: `attempts.cascade` = {trigger: "wall", from, to} on implement and on the `attempts.selected` event.
202
202
  - `LOKI_E10_ID_PKG_RELATIVE` -- on by default, `0` opts out (acc-154; `loki-ts/src/engine10/failures.ts` idNamesFile, also `repo_profile.ts` whyFullSuiteNotExcused). A package-relative vitest id (`src/x.test.ts > t`, printed by a run inside `frontend/`) names the repo file `frontend/src/x.test.ts`. Before it such an id never named its changed file, so a full-suite failure in an edited file could be excused (fail open). A full-suite id that TOUCHED-BASE-RED already showed red on base with the same error in the edited file's own run is the only one allowed to name that file.
203
203
  - `LOKI_E10_PROOF_PROJECT_API` -- on by default, `0` opts out (acc-154; `loki-ts/src/engine10/stages/seal.ts` baseProofRunner and the Wall mutation proof). The fail-then-pass proof runs each test with the real repo's Project Model. RealBaseTestRunner otherwise read the model from the temporary base worktree, which has no `.loki/`, so in a multi-package repo a frontend vitest file ran from the repo root (no vitest there) and the proof read "inconclusive (the Wall command did not execute to a result)".
204
204
  - `LOKI_E10_PRECEDENCE_CHECK` -- on by default, `0` opts out (F3; `loki-ts/src/util/edit_shape.ts` precedenceSites / precedenceBrief, `util/conflict_resume.ts` resumeForPrecedence). The edit-shape precedence rule detects a widened check from the diff alone: a Go `x.(T)` replaced by `errors.As` or `errors.Is`, an `isinstance` or `instanceof` moved to another type, or an exact `==` / `===` comparison replaced by a membership test (`includes`, `in`, `strings.Contains`). For each such site it lists the other type or value checks in the same function, the inputs that took their own branch before. After a clean LOKI_DONE with a non-empty diff, a site that has such inputs gets one follow-up resume (`-pr`) naming each input and asking that it still take its branch, with a test case per input; only a clean LOKI_DONE replaces the first result. Nothing fires, and nothing is spent, without such a site. The implement stage records `precedence_check: {sites, resumed}`. The tuning case was a widened error check placed ahead of an existing assertion branch; the test fixtures are synthetic.
205
205
  - `LOKI_E10_BUILD_ARTIFACT_DROP` -- on by default, `0` opts out (GB; `buildArtifacts` in `loki-ts/src/e10ext/commit_filter.ts`, part of `dropSet`, so the commit stage, the supervisor backstop and the WIP commit all apply it; seal names each one with "generated or build file left out of the commit: <path>"). A file the run ADDED is left out when the repo's ignore rules match it (`git check-ignore --no-index`, so a force-added file counts), when it is byte-compiled or incremental build state anywhere (`*.pyc`, `*.pyo`, `*.tsbuildinfo`, `__pycache__/`, `<name>.egg-info/`), or when it sits under `dist/`, `build/`, `coverage/`, `.nyc_output/` or `target/` at the repo root or beside a package manifest. Kept: the task names the file, or that output or cache directory (`dist/`, `__pycache__/`, `<name>.egg-info/` ...) already holds a file tracked at the run base (a repo that commits it). Modified tracked files are never touched. The ignore rules are the tree's at commit time, which equal the base's unless the run edited a `.gitignore`.
206
- - `LOKI_E10_REGEN_DROP` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (RD; `noteRegenerated`, `regenDrops` in `loki-ts/src/e10ext/commit_filter.ts`; the machine snapshots the tree around every verify run in `engine10/machine.ts`, and the commit stage in `stages/seal.ts` applies it). A path a verify run changed joins `<runDir>/regenerated.json`; a path a model stage (wall, implement, fix) later writes leaves it. At commit, a staged path still in that set is left out unless the task names it or one of its changed lines carries a task keyword (a backticked span, or an identifier of 5 or more characters with a digit, underscore or camelCase, or 8 or more letters), so a doc a test run regenerated in step with the change stays. Each drop is named on the receipt: "rewritten only by Loki's own check run, not by the change, and left out of the commit: <path>". The failure: a test run regenerated an unrelated doc page with a machine-specific path, the commit shipped it, and review failed a VERIFIED run as an unrelated edit.
207
- - `LOKI_E10_DIFF_NEED` -- off by default since 11.141.0 (no bench measurement yet, GOALS A3.2), `1` opts in (DN; `needDrops`, `formattingOnly`, `suppressionOnly` in `loki-ts/src/e10ext/commit_filter.ts`, applied by the commit stage in `stages/seal.ts` after RD). Deliver only what the fix needs, with no model call: a staged modified file the task does not name is left out when its change is formatting only (base and head equal once whitespace, quote style, semicolons and trailing commas are normalized; Python, YAML and other whitespace-significant files keep their indentation, so only trailing space, blank lines and quotes are normalized), unless the task asks for formatting; or when its change only adds or removes lint-suppression comments (noqa, type: ignore, eslint-disable, @ts-ignore, @ts-expect-error, nolint, pylint: disable, rubocop:disable, #[allow(..)], @SuppressWarnings) in a file outside the stated scope (or with no scope signal), unless the task is about lint or warnings. Each drop is named on the receipt ("formatting-only change left out of the delivered diff: <path>"). The failures: a 177 KB delivered diff of reformatted generated route trees and schema files where the raw run delivered 4.5 KB, and a drive-by suppression removal in an unrelated file.
206
+ - `LOKI_E10_REGEN_DROP` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (RD; `noteRegenerated`, `regenDrops` in `loki-ts/src/e10ext/commit_filter.ts`; the machine snapshots the tree around every verify run in `engine10/machine.ts`, and the commit stage in `stages/seal.ts` applies it). A path a verify run changed joins `<runDir>/regenerated.json`; a path a model stage (wall, implement, fix) later writes leaves it. At commit, a staged path still in that set is left out unless the task names it or one of its changed lines carries a task keyword (a backticked span, or an identifier of 5 or more characters with a digit, underscore or camelCase, or 8 or more letters), so a doc a test run regenerated in step with the change stays. Each drop is named on the receipt: "rewritten only by Loki's own check run, not by the change, and left out of the commit: <path>". The failure: a test run regenerated an unrelated doc page with a machine-specific path, the commit shipped it, and review failed a VERIFIED run as an unrelated edit.
207
+ - `LOKI_E10_DIFF_NEED` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (DN; `needDrops`, `formattingOnly`, `suppressionOnly` in `loki-ts/src/e10ext/commit_filter.ts`, applied by the commit stage in `stages/seal.ts` after RD). Deliver only what the fix needs, with no model call: a staged modified file the task does not name is left out when its change is formatting only (base and head equal once whitespace, quote style, semicolons and trailing commas are normalized; Python, YAML and other whitespace-significant files keep their indentation, so only trailing space, blank lines and quotes are normalized), unless the task asks for formatting; or when its change only adds or removes lint-suppression comments (noqa, type: ignore, eslint-disable, @ts-ignore, @ts-expect-error, nolint, pylint: disable, rubocop:disable, #[allow(..)], @SuppressWarnings) in a file outside the stated scope (or with no scope signal), unless the task is about lint or warnings. Each drop is named on the receipt ("formatting-only change left out of the delivered diff: <path>"). The failures: a 177 KB delivered diff of reformatted generated route trees and schema files where the raw run delivered 4.5 KB, and a drive-by suppression removal in an unrelated file.
208
208
  - `LOKI_E10_TEST_REACH` -- on by default, `0` opts out (TK; `exercisesChange` in `loki-ts/src/e10ext/scope.ts`, applied inside J3 `crossPackageTestEdits`). J3 never drops a test that imports the changed code: a JS/TS import or require whose relative specifier resolves to a changed source file (extension and `/index` optional) or names the changed file's package (its package.json name or a subpath), or a Go import of a changed file's package path (go.mod module plus directory; import blocks and single imports). A test that imports nothing changed is still dropped as before. Measured on synthetic layouts: a JS tests workspace importing the changed package, a relative import from a sibling package, and a Go package importing the changed subpackage were all dropped before (the run's only regression test, so the diff carried none) and are kept now; Python src-layout and Rust `tests/` are never J3 candidates.
209
209
  - `LOKI_E10_SCOPE_TEST_DROP` -- on by default, `0` opts out (J3; `loki-ts/src/e10ext/scope.ts` crossPackageTestEdits, applied by the commit stage in `stages/seal.ts`). The one non-advisory scope rule: a test file the run added or modified in an owner package (a Go directory, or a JS/TS package with its own package.json) where the change has no non-test change, the package has source files, and the task names neither the file nor the package, is reset to base (index and tree) before commit, with a NOT PROVEN line naming it. Source files, Python layouts, Go tests-only directories and test-only changes are never touched. On the tuning bench it fires on the 3 cross-package test scope fails and on 0 of 160 lean runs.
210
210
  - `LOKI_E10_FORMAT_RESOLVE` -- on by default, `0` opts out (J1; `loki-ts/src/runner/repo_profile.ts` detectFormatters / runFormattersRecord, called by the commit stage through `e10ext/commit_filter.ts` formatChangedRecord). The repo's own formatter is resolved the way verify resolves its linter: ruff through `util/check_result.ts` resolveTool (the project `.venv` or `venv`, then `uv run`, then PATH); prettier and biome stay repo-local binaries only. Only files the run added or modified and kept are formatted, and a modified file whose BASE text is not formatter-clean (the formatter's stdin mode prints something else, or fails) is left alone, so the run never reformats lines it did not write. The commit stage records `format: [{tool, cmd, formatted, skipped, error}]`, so a missing binary is visible. On the tuning bench the bare `ruff` argv found no binary (the repo's ruff is `.venv/bin/ruff`), nothing was formatted, and 11 judge fails were formatting. `=0` restores the bare argv with no base check.