loki-mode 9.17.0 → 9.17.2
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/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/issue-providers.sh +0 -24
- package/autonomy/lib/agent_readiness.py +1 -79
- package/autonomy/lib/outcome_ledger.py +0 -122
- package/autonomy/lib/proof-generator.py +4 -71
- package/autonomy/lib/verdict.py +4 -25
- package/autonomy/loki +5 -262
- package/autonomy/notify.sh +1 -70
- package/autonomy/queue-consumer.sh +18 -290
- package/autonomy/run.sh +65 -178
- package/autonomy/verify.sh +100 -12
- package/completions/_loki +0 -3
- package/completions/loki.bash +2 -2
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +1 -168
- package/dashboard/static/index.html +222 -249
- package/docs/VERIFICATION-COST.md +20 -170
- package/loki-ts/dist/loki.js +311 -305
- package/mcp/__init__.py +1 -1
- package/mcp/_sdk_loader.py +0 -25
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/autonomy/lib/gate_policy.py +0 -166
- package/docs/QUEUE-OPERATIONS.md +0 -107
|
@@ -25,6 +25,8 @@ different answer on your hardware.
|
|
|
25
25
|
| FULL local gate | 23 to 26 minutes | `LOCAL_CI_TIER=full bash scripts/local-ci.sh`, 166 checks, five runs on an M-series Mac |
|
|
26
26
|
| FAST local gate | about 1 minute | `bash scripts/local-ci.sh`, the documented pre-push tier |
|
|
27
27
|
| Shell suite, sharded | 352 seconds | 323 suites, `LOCAL_CI_SHARDS=4`; 1440 seconds serial, so 4.1x |
|
|
28
|
+
| `loki verify` | 77 seconds | `loki verify HEAD~1` on this repository, 5 changed files; dominated by the project's own test suite, not by our gates |
|
|
29
|
+
| of which, shipped-vs-dev CVE split | 418 ms | one extra `npm audit --omit=dev`; 0.5% of the run, and the reason the audit finding can say whether a CVE reaches users |
|
|
28
30
|
| `loki outcomes` | under 1 second per receipt | `git blame` and one `git log` per changed file |
|
|
29
31
|
| `loki intent status` | milliseconds | hash comparison against `.loki/spec/spec.lock` |
|
|
30
32
|
| Agent readiness | milliseconds | filesystem checks only, no network |
|
|
@@ -50,6 +52,24 @@ non-forgeability requires the signed path
|
|
|
50
52
|
(`LOKI_PROOF_GPG_KEY`, see [SIGNED-RECEIPTS.md](SIGNED-RECEIPTS.md)). We removed
|
|
51
53
|
our own "non-forgeable" claim in v7.111.0 after finding it false on that path.
|
|
52
54
|
|
|
55
|
+
**The tests gate depends on correctly identifying YOUR test runner, and it has
|
|
56
|
+
been wrong before.** Until 2026-08-07 the runner was chosen by grepping
|
|
57
|
+
`package.json` for `"jest"` / `"vitest"` / `"mocha"`, which matches a
|
|
58
|
+
**devDependency**. This repository is the case that exposed it: jest is a
|
|
59
|
+
devDependency with no jest config while `scripts.test` runs `bash -n` plus
|
|
60
|
+
`node --test`, so verify ran jest, jest globbed 895 files that are not jest
|
|
61
|
+
tests, and `loki verify` returned BLOCKED on a clean tree -- permanently, for a
|
|
62
|
+
defect that did not exist. It now reads `scripts.test` with a JSON parser and
|
|
63
|
+
runs what the project declares.
|
|
64
|
+
|
|
65
|
+
We record this rather than quietly fixing it because a false BLOCK is the more
|
|
66
|
+
damaging direction of that error: a gate that cries wolf on every run trains
|
|
67
|
+
you to ignore the verdict, which costs more than the gate ever earned. If the
|
|
68
|
+
tests gate reports a runner you do not use, that is a bug in our detection, not
|
|
69
|
+
a finding about your code -- the runner is named in
|
|
70
|
+
`.loki/verify/evidence.json` under `deterministic_gates[].runner` so you can
|
|
71
|
+
check which one it picked.
|
|
72
|
+
|
|
53
73
|
**Only four of the eight quality gates are agent-independent.** Static analysis,
|
|
54
74
|
mock-integrity, test-mutation and documentation coverage do not ask a model
|
|
55
75
|
anything. The other four involve model judgment and are labelled ASSESSMENTS
|
|
@@ -101,173 +121,3 @@ bash tests/test-competitor-verify-surface.sh # the competitor CLI measurement
|
|
|
101
121
|
|
|
102
122
|
If a number here does not reproduce on your machine, that is a defect and we
|
|
103
123
|
want the report.
|
|
104
|
-
|
|
105
|
-
## How we compare, and what we cannot measure
|
|
106
|
-
|
|
107
|
-
A goal was set to be "2-10x better than factory.ai, cognition devin, 8090.ai
|
|
108
|
-
and replit". This section reports what is measurable and refuses the rest.
|
|
109
|
-
|
|
110
|
-
### What is NOT benchmarked, and why
|
|
111
|
-
|
|
112
|
-
None of those four products has a runnable local arm. Checked on this machine:
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
droid NOT installed devin NOT installed
|
|
116
|
-
replit NOT installed
|
|
117
|
-
claude on PATH aider on PATH
|
|
118
|
-
codex on PATH loki on PATH
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Devin and 8090 are hosted services with no CLI. Factory's droid and Replit run
|
|
122
|
-
cloud-side. `benchmarks/bench/adapters/` can drive a competing arm as a
|
|
123
|
-
subprocess (`claude_code.py` invokes `claude -p` live), but it cannot drive a
|
|
124
|
-
product that has no local binary.
|
|
125
|
-
|
|
126
|
-
**So there is no "2-10x vs Factory/Devin/8090/Replit" number here, and any such
|
|
127
|
-
figure elsewhere should be treated as unearned.** Publishing one would be the
|
|
128
|
-
same error as sourcing a colour token from a frontend that does not ship: a
|
|
129
|
-
number that looks authoritative and measures something else.
|
|
130
|
-
|
|
131
|
-
### What IS measured: the verification surface
|
|
132
|
-
|
|
133
|
-
`tests/test-competitor-verify-surface.sh`, run on this machine:
|
|
134
|
-
|
|
135
|
-
> **5 installed competitor CLIs. 0 expose an output-verification command.**
|
|
136
|
-
|
|
137
|
-
That is not a multiplier, it is a category. The comparison is not "our
|
|
138
|
-
verification is faster" but "there is nothing on the other side to compare
|
|
139
|
-
against". Re-run it yourself; it names each CLI it checked and SKIPs the ones
|
|
140
|
-
it could not find rather than counting them as absent.
|
|
141
|
-
|
|
142
|
-
### What the competitors say about verification, in their own words
|
|
143
|
-
|
|
144
|
-
Verbatim, with the file each came from, so every line is checkable against the
|
|
145
|
-
scraped corpora:
|
|
146
|
-
|
|
147
|
-
| Source | Their words |
|
|
148
|
-
|---|---|
|
|
149
|
-
| `factory_ai/docs.factory.ai_missions_overview.md` | "**How do you maximize correctness?** Long-running plans accumulate errors." -- published as an OPEN QUESTION |
|
|
150
|
-
| `factory_ai/docs.factory.ai_missions_overview.md` | "Without it, the mission **cannot reliably verify its own work**" (Missions require repo readiness Level 4+) |
|
|
151
|
-
| `devin_cognition_ai/docs.devin.ai_admin_security.md.md` | "it can still experience **hallucinations, introduce bugs into code**, or suggest insecure code" |
|
|
152
|
-
| `8090_ai/www.8090.ai_terms-of-service.md` | "**HUMAN REVIEW AND VERIFICATION OF ALL OUTPUT**" required, while the same ToS caps liability at "FIFTY US DOLLARS" and disclaims "ACCURACY" |
|
|
153
|
-
|
|
154
|
-
Factory's is the most honest of the four: they name verification as an open
|
|
155
|
-
research question rather than a solved feature, and they state that
|
|
156
|
-
self-verification is a property of the ENVIRONMENT, not of the agent. We agree,
|
|
157
|
-
which is why `loki readiness` measures the repo and not the model.
|
|
158
|
-
|
|
159
|
-
### The claim we will actually defend
|
|
160
|
-
|
|
161
|
-
Not a multiplier. A receipt you can recompute:
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
loki proof verify <id> # re-hash the receipt; exit 1 on tamper
|
|
165
|
-
loki outcomes --json # anchored, or UNKNOWN with a named reason
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Against "human review and verification of all output" and "cannot reliably
|
|
169
|
-
verify its own work", an anchored receipt is a categorical difference. It is
|
|
170
|
-
also falsifiable: if `loki outcomes` reports UNKNOWN, we say UNKNOWN. On this
|
|
171
|
-
repo it reported ANCHORED 0 of 9 for weeks, and the fix
|
|
172
|
-
(`facts.git.base_sha` was empty) is in the history.
|
|
173
|
-
|
|
174
|
-
### Honest limits on this section
|
|
175
|
-
|
|
176
|
-
- The verify-surface count is a check for a COMMAND, not for internal
|
|
177
|
-
verification a product may do without exposing it. A hosted product could
|
|
178
|
-
verify server-side and expose nothing to a CLI.
|
|
179
|
-
- It measures what is installed HERE. A CLI absent from this machine is
|
|
180
|
-
reported as SKIP, never as a competitor that lacks the feature.
|
|
181
|
-
- Nothing here measures build quality, speed, or cost against those four.
|
|
182
|
-
Those comparisons are not available to us and are not claimed.
|
|
183
|
-
|
|
184
|
-
### Measured: what the harness is worth, model held constant
|
|
185
|
-
|
|
186
|
-
The one comparison we CAN run. `benchmarks/bench/matrix.sh` defines two
|
|
187
|
-
configs against the same task and the same model:
|
|
188
|
-
|
|
189
|
-
- `baseline` -- raw model, minimal orchestration (in-repo comment: "the
|
|
190
|
-
Replit/Cursor mode")
|
|
191
|
-
- `full` -- the harness: council, code review, self-heal, auto-tune
|
|
192
|
-
|
|
193
|
-
Paired on identical tasks, both arms on `haiku`, from
|
|
194
|
-
`benchmarks/bench/results/`:
|
|
195
|
-
|
|
196
|
-
| Task | harness (`full`) | raw model (`baseline`) | verdict |
|
|
197
|
-
|---|---|---|---|
|
|
198
|
-
| `hard-2-ledger` | **4/4**, $0.89 | **0/4**, $0.19 | harness wins outright |
|
|
199
|
-
| `hard-1-order-api` | 3 runs, 1.00, $0.58 | 1 run, 1.00, $0.20 | harness cost 2.8x for nothing |
|
|
200
|
-
| `multifail-1-two-modules` | 2 runs, 1.00, $0.27 | 1 run, 1.00, $0.14 | harness cost 1.9x for nothing |
|
|
201
|
-
|
|
202
|
-
**Two of the three paired tasks are UNFAVOURABLE to the harness.** That is the
|
|
203
|
-
honest headline, and it is narrower than "the harness is worth more than the
|
|
204
|
-
model":
|
|
205
|
-
|
|
206
|
-
**The harness matters on hard tasks and is pure overhead on easy ones.**
|
|
207
|
-
|
|
208
|
-
On `hard-2-ledger` the raw model never finished the task across 4 trials and
|
|
209
|
-
the harness finished it every time. That is not a percentage improvement; the
|
|
210
|
-
baseline success rate is zero. It cost 4.7x more per run and produced a working
|
|
211
|
-
result instead of nothing.
|
|
212
|
-
|
|
213
|
-
On the other two, both arms succeed and the harness simply costs 1.9x-2.8x
|
|
214
|
-
more. We publish those rows because the direction is unfavourable to us, and a
|
|
215
|
-
benchmark table that only survives its favourable rows is an advertisement.
|
|
216
|
-
|
|
217
|
-
**Two further baseline cells were attempted and produced NO data.**
|
|
218
|
-
`tokenheavy-1-crm` (2 trials) and a wider `hard-1-order-api` (3 trials) both hit
|
|
219
|
-
the 1200s cell timeout, which caps all trials of a cell together. The harness
|
|
220
|
-
wrote no result file and the runner said so:
|
|
221
|
-
|
|
222
|
-
> WARNING: cell haiku-baseline / tokenheavy-1-crm wrote NO new result (likely
|
|
223
|
-
> timed out at 1200s). This cell is MISSING from the report.
|
|
224
|
-
|
|
225
|
-
They are absent from the table rather than counted as failures. A timeout is
|
|
226
|
-
not evidence the raw model cannot do the task; it is evidence we did not
|
|
227
|
-
measure it. Reporting them as baseline losses would have made the harness look
|
|
228
|
-
better on data that does not exist.
|
|
229
|
-
|
|
230
|
-
An earlier version of this section reported only the first two tasks and read
|
|
231
|
-
as a stronger claim than the data supported. The `multifail` baseline arm was
|
|
232
|
-
run afterwards specifically to test whether the claim would survive more data.
|
|
233
|
-
It did not survive intact, and the table was corrected rather than the
|
|
234
|
-
measurement dropped.
|
|
235
|
-
|
|
236
|
-
Aggregate across all recorded cells:
|
|
237
|
-
|
|
238
|
-
| Cell | n | success (median) | cost (median) |
|
|
239
|
-
|---|---|---|---|
|
|
240
|
-
| `haiku` + harness | 11 | 1.00 | $0.54 |
|
|
241
|
-
| `opus` + baseline | 5 | 1.00 | $0.83 |
|
|
242
|
-
| `haiku` + baseline | 8 | 0.50 | $0.19 |
|
|
243
|
-
|
|
244
|
-
The cheap model WITH the harness matches the expensive model without it, at
|
|
245
|
-
35% lower cost. Treat that as directional, not as a headline: the task sets
|
|
246
|
-
differ between those three cells, which is exactly why the paired table above
|
|
247
|
-
is the one that carries the argument.
|
|
248
|
-
|
|
249
|
-
**Limits of this measurement, stated so it cannot be over-read:**
|
|
250
|
-
|
|
251
|
-
- Two paired tasks. `hard-1-order-api`'s baseline arm is n=1.
|
|
252
|
-
- It measures OUR harness against OUR baseline config. `baseline` is a
|
|
253
|
-
documented stand-in for "raw model, minimal orchestration", NOT a
|
|
254
|
-
measurement of Replit, Cursor, or any other product.
|
|
255
|
-
- Success is a held-out acceptance exit code, not a judgement of code quality.
|
|
256
|
-
- Reproduce it: `LOKI_BENCH_SPEND_APPROVED=1 bash benchmarks/bench/matrix.sh pilot`.
|
|
257
|
-
The spend interlock is default-deny on purpose; a benchmark that starts a
|
|
258
|
-
paid tool without an explicit opt-in is how a surprise bill happens.
|
|
259
|
-
|
|
260
|
-
**The exclusion rule, observed on a live run rather than asserted.** A fresh
|
|
261
|
-
`haiku-full` trial on `hard-1-order-api` (2026-08-07) hit the 1200s adapter
|
|
262
|
-
timeout. The held-out grader inspected the workdir and returned
|
|
263
|
-
`success: true` -- there WAS a passing artifact. The harness still recorded
|
|
264
|
-
`measured: false`, `unmeasured_reasons: ["adapter exit_status=timeout"]`, and
|
|
265
|
-
excluded the trial from k/N, with this note in the result file:
|
|
266
|
-
|
|
267
|
-
> "the held-out grader's own verdict on whatever was in the workdir. Real
|
|
268
|
-
> evidence about the ARTIFACT; NOT evidence that a run happened."
|
|
269
|
-
|
|
270
|
-
A naive harness scores that 1/1. Ours scores it 0/0 and says why, so the
|
|
271
|
-
`hard-1-order-api` row above stayed at n=3 instead of being inflated to n=4 by
|
|
272
|
-
a run that never finished. The number in this document is smaller because of
|
|
273
|
-
that rule, which is the point of having it.
|