loki-mode 11.3.0 → 11.3.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.
Files changed (242) hide show
  1. package/README.md +68 -650
  2. package/SKILL.md +5 -5
  3. package/VERSION +1 -1
  4. package/autonomy/completion-council.sh +2 -2
  5. package/autonomy/context-tracker.py +4 -4
  6. package/autonomy/council-v2.sh +1 -1
  7. package/autonomy/grill.sh +1 -1
  8. package/autonomy/lib/done-recognition.sh +1 -1
  9. package/autonomy/lib/efficiency_cost.py +8 -0
  10. package/autonomy/lib/engine10-push.sh +22 -8
  11. package/autonomy/lib/prd-enrich.sh +1 -1
  12. package/autonomy/lib/voter-agents.sh +1 -1
  13. package/autonomy/loki +161 -105
  14. package/autonomy/run.sh +30 -18
  15. package/autonomy/sandbox.sh +1 -1
  16. package/autonomy/tui.sh +6 -5
  17. package/autonomy/verify.sh +1 -1
  18. package/bin/loki +195 -59
  19. package/completions/_loki +8 -0
  20. package/completions/loki.bash +3 -3
  21. package/dashboard/__init__.py +1 -1
  22. package/dashboard/server.py +47 -45
  23. package/docs/AGENT-CHANGE-RECEIPT.md +2 -2
  24. package/docs/ARCHITECTURE.md +337 -0
  25. package/docs/BRANDING.md +124 -0
  26. package/docs/CLI-REFERENCE.md +11 -1
  27. package/docs/COMPONENTS.md +447 -0
  28. package/docs/DEPLOYMENT.md +9 -9
  29. package/docs/DOCKER.md +469 -0
  30. package/docs/INSTALLATION.md +67 -1045
  31. package/docs/KNOWN-ISSUES.md +11 -35
  32. package/docs/OTEL-COLLECTOR.md +24 -0
  33. package/docs/ROUTING-EVIDENCE.md +32 -0
  34. package/docs/TESTING.md +161 -0
  35. package/docs/air-gapped.md +1 -2
  36. package/docs/alternative-installations.md +14 -24
  37. package/docs/architecture/DECISIONS.md +333 -0
  38. package/docs/audit-logging.md +7 -7
  39. package/docs/authentication.md +3 -3
  40. package/docs/authorization.md +1 -1
  41. package/docs/certification/04-production-deployment/lab.md +6 -6
  42. package/docs/certification/04-production-deployment/lesson.md +4 -4
  43. package/docs/certification/README.md +1 -1
  44. package/docs/control-plane-container.md +2 -2
  45. package/docs/dev/real-run.md +34 -0
  46. package/docs/dev/release-checklist.md +2 -2
  47. package/docs/environment-variables.md +1 -0
  48. package/docs/exit-codes.md +3 -3
  49. package/docs/git-workflow.md +3 -3
  50. package/docs/metrics.md +37 -55
  51. package/docs/network-security.md +1 -1
  52. package/docs/siem-integration.md +5 -5
  53. package/docs/spec-first-intent.md +28 -0
  54. package/docs/v10/CLI-MODERN.md +7 -3
  55. package/docs/v10/DECISIONS.md +59 -0
  56. package/docs/v10/DEPS.md +22 -22
  57. package/docs/v10/ENGINE.md +1 -1
  58. package/docs/v10/FAILURE-CLASSES.md +212 -1
  59. package/docs/v10/FOUNDER-QUEUE.md +1 -0
  60. package/docs/v10/GUARDS.md +31 -0
  61. package/docs/v10/GUIDE.md +7 -5
  62. package/docs/v10/LEGACY-REMOVAL.md +4 -6
  63. package/docs/v10/METRICS.md +14 -2
  64. package/docs/v10/MODERNIZE.md +1 -1
  65. package/docs/v10/OPERATING-MODEL.md +4 -3
  66. package/docs/v10/PROGRESS.md +35 -0
  67. package/docs/v11/COST-HALF.md +352 -0
  68. package/docs/v11/INTOTO-AGENT-CHANGE-PREDICATE.md +77 -0
  69. package/docs/v11/MARKET-SLICES.md +315 -0
  70. package/docs/v11/MCP-2026-07-28.md +55 -0
  71. package/docs/v11/REGISTRIES.md +730 -0
  72. package/docs/v11/VERIFY-PR-SANDBOX.md +41 -0
  73. package/loki-ts/data/model-pricing.json +52 -24
  74. package/loki-ts/dist/loki.js +1185 -945
  75. package/mcp/__init__.py +1 -1
  76. package/mcp/v10_tools.py +29 -0
  77. package/package.json +9 -11
  78. package/packages/control-plane/dist/ask-tools-server.js +8 -2
  79. package/packages/control-plane/dist/server.js +15832 -12361
  80. package/packages/control-plane/drizzle/0006_token_sessions.sql +1 -0
  81. package/packages/control-plane/drizzle/meta/0006_snapshot.json +807 -0
  82. package/packages/control-plane/drizzle/meta/_journal.json +7 -0
  83. package/packages/control-plane/src/db/schema.ts +1 -0
  84. package/packages/control-plane/src/server/routes/cost.ts +4 -3
  85. package/packages/control-plane/src/server/runs.ts +3 -3
  86. package/packages/control-plane/ui/dist/assets/index-DbLzr87u.js +190 -0
  87. package/packages/control-plane/ui/dist/index.html +1 -1
  88. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  89. package/providers/opencode.sh +2 -3
  90. package/src/observability/genai-spans.js +104 -0
  91. package/src/observability/otel-bridge.js +49 -1
  92. package/src/observability/otel.js +2 -2
  93. package/src/protocols/mcp-client.js +6 -2
  94. package/src/protocols/mcp-server.js +191 -6
  95. package/src/protocols/transport/sse.js +23 -2
  96. package/tools/audit-docs.py +1 -1
  97. package/web-app/dist/assets/{AdminPage-D_e45uTw.js → AdminPage-DuRQZsF9.js} +1 -1
  98. package/web-app/dist/assets/{Avatar-T3nIpoaf.js → Avatar-7GtOQvsO.js} +1 -1
  99. package/web-app/dist/assets/{Badge-BKqb59pP.js → Badge-CYgTnIxj.js} +1 -1
  100. package/web-app/dist/assets/{Button-DjVlkh8_.js → Button-rYSyIu7X.js} +1 -1
  101. package/web-app/dist/assets/{CockpitPage-DXJgLGmh.js → CockpitPage-9adANY4o.js} +1 -1
  102. package/web-app/dist/assets/{ComparePage-BRP_eVc_.js → ComparePage-DEG2oA-R.js} +1 -1
  103. package/web-app/dist/assets/{ErrorBoundary-CLjpGLjC.js → ErrorBoundary-CwtvY4xs.js} +1 -1
  104. package/web-app/dist/assets/{EvidenceReceiptPanel-DX-vb4Xy.js → EvidenceReceiptPanel-DTT73pPB.js} +1 -1
  105. package/web-app/dist/assets/{GitHubIssuesPanel-214HVHtX.js → GitHubIssuesPanel-CpWZLz2x.js} +1 -1
  106. package/web-app/dist/assets/{GitHubPRsPanel-BEiZKc4t.js → GitHubPRsPanel-H293R7E2.js} +1 -1
  107. package/web-app/dist/assets/{HomePage-VvMHS5ga.js → HomePage-B11Imp9k.js} +2 -2
  108. package/web-app/dist/assets/{LoginPage-5WD-v7n3.js → LoginPage-BZBgx5Jr.js} +1 -1
  109. package/web-app/dist/assets/{MagicPage-DUQT_Jye.js → MagicPage-B27S4_X8.js} +1 -1
  110. package/web-app/dist/assets/{MetricsPage-lga-z79v.js → MetricsPage-CfbJWNDG.js} +1 -1
  111. package/web-app/dist/assets/{NotFoundPage-CGhBX3G1.js → NotFoundPage-Tp_4zMSm.js} +1 -1
  112. package/web-app/dist/assets/{ProjectPage-CdzF2GzZ.js → ProjectPage-CM4fgMsV.js} +3 -3
  113. package/web-app/dist/assets/{ProjectsPage-DRG64N8s.js → ProjectsPage-DP2Fvsrd.js} +1 -1
  114. package/web-app/dist/assets/{SettingsPage-5fzW9Frb.js → SettingsPage-C4G9-EAy.js} +1 -1
  115. package/web-app/dist/assets/{ShowcasePage-DrTdxO4y.js → ShowcasePage-Dj-n4dwu.js} +1 -1
  116. package/web-app/dist/assets/{SystemSettingsPage-C9Mqs6Rd.js → SystemSettingsPage-BqMLpuGt.js} +1 -1
  117. package/web-app/dist/assets/{TeamsPage-CUGPdSWo.js → TeamsPage-mIH8H96m.js} +1 -1
  118. package/web-app/dist/assets/{TemplatesPage-CNraDY0F.js → TemplatesPage-BagW-v4n.js} +1 -1
  119. package/web-app/dist/assets/{TerminalOutput-BIu_6Pea.js → TerminalOutput-CTQRHhnK.js} +1 -1
  120. package/web-app/dist/assets/{activity-Bk-kgqaf.js → activity-DNQiBDDL.js} +1 -1
  121. package/web-app/dist/assets/{bell-BXmUdmo8.js → bell-Coiwdad1.js} +1 -1
  122. package/web-app/dist/assets/{bot-CiuzXxUR.js → bot-Cou-rTgR.js} +1 -1
  123. package/web-app/dist/assets/{check-BEzjXppd.js → check-CsF-XtQp.js} +1 -1
  124. package/web-app/dist/assets/{chevron-left-AYWCXHf8.js → chevron-left-BJiy55Ht.js} +1 -1
  125. package/web-app/dist/assets/{circle-alert-BNg2uSRq.js → circle-alert-D6-pQQWq.js} +1 -1
  126. package/web-app/dist/assets/{clock-DTj0kkGT.js → clock-BOGqwgt9.js} +1 -1
  127. package/web-app/dist/assets/{cloud-x4nTDBLT.js → cloud-DsxhTtf5.js} +1 -1
  128. package/web-app/dist/assets/{code-xml-BVh_MLrk.js → code-xml-CxJDHUlE.js} +1 -1
  129. package/web-app/dist/assets/{database-DdfBaowG.js → database-BJePscl_.js} +1 -1
  130. package/web-app/dist/assets/{dollar-sign-XuYFmAOY.js → dollar-sign-6qWGAkZo.js} +1 -1
  131. package/web-app/dist/assets/{file-code-corner-D4cRnmeL.js → file-code-corner-DcOtYeDb.js} +1 -1
  132. package/web-app/dist/assets/{file-plus-CyoVlHc_.js → file-plus-WuRyLFo0.js} +1 -1
  133. package/web-app/dist/assets/{globe-Y6IK2RPW.js → globe-r-xCP4DE.js} +1 -1
  134. package/web-app/dist/assets/{hammer-BKzr9VZI.js → hammer-DTt0SsCB.js} +1 -1
  135. package/web-app/dist/assets/{index-B20cSx5G.js → index-BkbXyH8y.js} +3 -3
  136. package/web-app/dist/assets/{layers-DebNOhGS.js → layers-BvZhvSMY.js} +1 -1
  137. package/web-app/dist/assets/{loader-circle-DyGbrEgd.js → loader-circle-3gosTei9.js} +1 -1
  138. package/web-app/dist/assets/{lock-BKPpyt20.js → lock-CZZMxP0U.js} +1 -1
  139. package/web-app/dist/assets/{package-egF5Wi4y.js → package-C5A8CkJr.js} +1 -1
  140. package/web-app/dist/assets/{plus-OiEgKIc-.js → plus-Btv7tTIF.js} +1 -1
  141. package/web-app/dist/assets/{refresh-cw-CzKvrONq.js → refresh-cw-DsWLXgs_.js} +1 -1
  142. package/web-app/dist/assets/{rotate-ccw-Bu2mII0p.js → rotate-ccw-DOVDjway.js} +1 -1
  143. package/web-app/dist/assets/{scroll-text-CSkiyax8.js → scroll-text-smySzlrX.js} +1 -1
  144. package/web-app/dist/assets/{server-DlPthJFw.js → server-b5PHsqAU.js} +1 -1
  145. package/web-app/dist/assets/{shield-alert-CbpHWQQX.js → shield-alert-BD7FDlh-.js} +1 -1
  146. package/web-app/dist/assets/{thumbs-up-DgGpZe-Q.js → thumbs-up-CAsFzbyE.js} +1 -1
  147. package/web-app/dist/assets/{trash-2-BV3GlCB-.js → trash-2-BJ35qHgl.js} +1 -1
  148. package/web-app/dist/assets/{trending-down-Y4TJtXhD.js → trending-down-Ozrd26cZ.js} +1 -1
  149. package/web-app/dist/assets/{trending-up-DsDNoHZY.js → trending-up-BhnMcM32.js} +1 -1
  150. package/web-app/dist/assets/{upload-gkThrc_I.js → upload-JVHfdwoA.js} +1 -1
  151. package/web-app/dist/assets/{usePolling-jpNSeNAe.js → usePolling-CTzbDV-e.js} +1 -1
  152. package/web-app/dist/assets/{user-3Zez1WOK.js → user-Bks3-GYv.js} +1 -1
  153. package/web-app/dist/index.html +1 -1
  154. package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
  155. package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
  156. package/docs/COCKPIT-SPEC.md +0 -72
  157. package/docs/COCKPIT-UX-MANDATE.md +0 -53
  158. package/docs/COMPETITIVE-ANALYSIS.md +0 -303
  159. package/docs/COMPETITIVE-NEXT-10.md +0 -316
  160. package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
  161. package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
  162. package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
  163. package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
  164. package/docs/DEMOS.md +0 -63
  165. package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
  166. package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
  167. package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
  168. package/docs/GATE-FAILURE-TRIAGE.md +0 -254
  169. package/docs/HANDOFF-2026-08-03.md +0 -439
  170. package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
  171. package/docs/LOOP-HARNESS-AUDIT.md +0 -684
  172. package/docs/MERGE-DEDUP-MAP.md +0 -420
  173. package/docs/MERGE-ROUTE-MAP.md +0 -139
  174. package/docs/MODEL-REGISTRY-PLAN.md +0 -155
  175. package/docs/OUTCOME-FRONTIER.md +0 -536
  176. package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
  177. package/docs/PLANS-INDEX.md +0 -32
  178. package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
  179. package/docs/PROMPT-ABLATION-RESULT.md +0 -97
  180. package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
  181. package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
  182. package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
  183. package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
  184. package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
  185. package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
  186. package/docs/RARV-C-100X-PLAN.md +0 -286
  187. package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
  188. package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
  189. package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
  190. package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
  191. package/docs/STALE-STATE-AUDIT.md +0 -174
  192. package/docs/SYNERGY-TASKS.md +0 -143
  193. package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
  194. package/docs/TOP-100-BACKLOG.md +0 -159
  195. package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
  196. package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
  197. package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
  198. package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
  199. package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
  200. package/docs/WELCOME-OPENER-PLAN.md +0 -106
  201. package/docs/adoption-baseline-2026-07-31.md +0 -84
  202. package/docs/architecture/bmad-integration-epic.md +0 -271
  203. package/docs/architecture/bmad-integration-review.md +0 -86
  204. package/docs/architecture/bmad-integration-validation.md +0 -249
  205. package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
  206. package/docs/auto-claude-comparison.md +0 -250
  207. package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
  208. package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
  209. package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
  210. package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
  211. package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
  212. package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
  213. package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
  214. package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
  215. package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
  216. package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
  217. package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
  218. package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
  219. package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
  220. package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
  221. package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
  222. package/docs/bug-fixes/agent-19-code-review.md +0 -316
  223. package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
  224. package/docs/competitive/bolt-new-analysis.md +0 -579
  225. package/docs/competitive/emergence-others-analysis.md +0 -605
  226. package/docs/competitive/replit-lovable-analysis.md +0 -622
  227. package/docs/dashboard-guide.md +0 -487
  228. package/docs/enterprise/migration.md +0 -265
  229. package/docs/history/one-run-audit.md +0 -304
  230. package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
  231. package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
  232. package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
  233. package/docs/prd-purple-lab-ide.md +0 -152
  234. package/docs/prd-purple-lab-platform-v2.md +0 -223
  235. package/docs/prd-purple-lab-platform.md +0 -319
  236. package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
  237. package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
  238. package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
  239. package/docs/show-hn-post.md +0 -46
  240. package/docs/test-scenarios/enterprise-scenarios.md +0 -732
  241. package/docs/thick2thin.md +0 -173
  242. package/packages/control-plane/ui/dist/assets/index-DcBJXjCJ.js +0 -190
@@ -1,439 +0,0 @@
1
- # Handoff, 2026-08-03
2
-
3
- ## 0. DECISION-GRADE RC SUMMARY (read this first)
4
-
5
- Pinned: **`worktree-pre-push-scoped-pytest` @ `16ba5c5e`**.
6
-
7
- | Fact | Value | Command |
8
- |---|---|---|
9
- | RC HEAD | `16ba5c5e` at the time of writing; this document's own commit
10
- advances it, so ALWAYS trust the command over this cell | `git rev-parse HEAD` |
11
- | vs `origin/main` (`dd692561`) | **27 ahead, 0 behind** | `git rev-list --count origin/main..HEAD` |
12
- | vs RC remote (`3808f63f`) | **17 ahead, 0 behind** | `git rev-list --count origin/worktree-...` |
13
-
14
- WHY THE SHA CELL IS ALWAYS ONE BEHIND. Committing this file moves HEAD, so
15
- a handoff can never pin its own commit. The cell records the SHA the
16
- receipts below were taken on; the live value is one commit later. Re-run
17
- `git rev-parse --short HEAD` and `git rev-list --count origin/main..HEAD`
18
- rather than trusting any number typed here -- that habit is what caught
19
- three stale pins in this document already.
20
-
21
- LOCAL EVIDENCE AND CI EVIDENCE ARE DIFFERENT THINGS, and this document keeps
22
- them apart deliberately. Everything under "Local receipts" ran on this machine
23
- against this exact SHA. NO CI has ever run on `16ba5c5e` or on any commit in this
24
- branch: a branch push triggers no workflow (see gate 2), so there is no CI
25
- verdict to report for the RC. The CI table below is for `origin/main` only.
26
-
27
- **A BRANCH PUSH ALONE RUNS NO CI.** Every workflow triggers only on
28
- push-to-main or a pull_request targeting main, and `test.yml` has no
29
- `workflow_dispatch`. Pushing this branch produces zero runs, as observed.
30
- A CI verdict on this SHA requires a branch push AND a PR to main.
31
-
32
- ### CI evidence, exact
33
-
34
- `origin/main` = `dd692561`:
35
-
36
- | Workflow | Conclusion | URL |
37
- |---|---|---|
38
- | Post-Release Soak Monitor | success | actions/runs/30805237104 |
39
- | Security Audit | success | actions/runs/30796434331 |
40
- | **Tests** | **failure** | actions/runs/30794017151 |
41
-
42
- The Tests failure is ONE job, ONE cause: `Shell tests (shard 3/4)` ->
43
- `ShellCheck Linting FAILED`. Shards 0, 1, 2 pass. Held commit `a4d8b839`
44
- takes shellcheck from 7 warning sites to **361 passed / 0 failed**.
45
-
46
- **RC branch CI: 0 runs, and it will stay 0.** Every workflow triggers only on
47
- push-to-main or a PR targeting main, and `test.yml` has no `workflow_dispatch`.
48
- A branch push cannot produce a CI verdict. PR #181 is MERGED 2026-07-28 on a
49
- different diff and is NOT evidence about current main.
50
-
51
- ### Local receipts on the exact RC HEAD `16ba5c5e`
52
-
53
- Measured on this machine. NOT CI: no workflow has run on this SHA.
54
-
55
- | Check | Result |
56
- |---|---|
57
- | `bash scripts/local-ci.sh` | **exit 0**, Failed 0 |
58
- | `bash tests/run-shellcheck.sh` | **361 passed, 0 failed** |
59
- | `bash tests/test-plan-command.sh` | **27 passed, 0 failed** (was 25/2; two stale June cost pins fixed) |
60
- | `python3 -m pytest tests/ -q -k "bench or schema"` | **149 passed**, 1 skipped |
61
- | `python3 -m pytest tests/` (full) | **2970 passed, 1 failed**, 19 skipped |
62
-
63
- THE ONE FULL-SUITE FAILURE, characterised rather than hidden:
64
- `tests/dashboard/test_build_supervisor.py::test_confined_claude_auth_uses_exact_login_keychain_capability`.
65
-
66
- - PRE-EXISTING, not caused by anything here: a pristine `git archive HEAD`
67
- extract with no working-tree residue reproduces it.
68
- - ENVIRONMENT-SENSITIVE, not a code defect: the same file passes **37/37 in
69
- isolation in this worktree, twice in a row**, and the failing assertion is
70
- about a real login-keychain capability, which differs between this worktree
71
- and a bare extract.
72
- - It is NOT in the fast tier, which is why `local-ci.sh` is green while the
73
- full suite is not. Both numbers are reported rather than the flattering one.
74
-
75
- ### Working-tree residue, classified. NOTHING deleted, reverted or committed.
76
-
77
- | Path | Class | Note |
78
- |---|---|---|
79
- | `coverage/clover.xml` | generated residue | rewritten by test runs |
80
- | `coverage/lcov-report/index.html` | generated residue | rewritten by test runs |
81
- | `loki-ts/dist/loki.js.map` | generated residue | rewritten by `bun run build` |
82
- | `f.txt` (deleted) | **user-owned** | deleted in working tree only; **still present in HEAD**, fully recoverable via `git checkout -- f.txt` |
83
- | `benchmarks/results/prompt-ablation.jsonl` | measurement output | untracked; the 6 real ablation trials |
84
-
85
-
86
- ### Every held commit (27, unpushed to main)
87
-
88
- | SHA | Subject |
89
- |---|---|
90
- | `16ba5c5e` | feat(bench): `loki bench oracles` -- reachable where the spend decision is made |
91
- | `5cc5ffd2` | feat(bench): attest the artifact hashes so an edited answer key cannot pass |
92
- | `6dbef513` | docs: both remaining tiers now verified against a near-miss, gate 3 precondition MET |
93
- | `89babec7` | docs: gate 3's precondition is PARTIALLY met, with the hashes that make it checkable |
94
- | `43e4d530` | test(bench): pin the private probe's own guarantees, and refuse to promote a tier on private evidence |
95
- | `f9895095` | feat(bench): hash-bound private oracle probes -- the replayable version of what I retracted |
96
- | `ed9f7a6c` | fix(bench,docs): retract the medium/high VERIFIED label -- the evidence cannot be replayed |
97
- | `a54c190c` | feat(bench): medium and high oracles verified against a plausible wrong answer |
98
- | `1fd65420` | docs: make HEAD decision-ready -- exact-SHA receipts, local evidence kept apart from CI |
99
- | `5e0ed5b5` | fix(tests): two demo assertions pinned a June cost the estimator has since corrected |
100
- | `49ebefa2` | docs: reconcile the handoff to live topology and separate the three founder gates |
101
- | `7b25a772` | docs(bench): record that adversarially_unverified is unreachable today, and why it stays |
102
- | `ea930bbb` | fix(bench,ci): fail on model mismatch, wire the integrity check, add adversarial oracle probes |
103
- | `8980313e` | docs: decision-grade RC handoff reconciled to current topology |
104
- | `2c031a14` | feat(safety): default-deny release interlock, and a detector for the recurring core.bare fault |
105
- | `6ffa5080` | feat(bench): founder-gated spend interlock, and keep grader evidence beside the measured flag |
106
- | `35add6d7` | fix(bench): flag acceptance commands that cannot fail -- a timeout scored as success |
107
- | `3808f63f` | feat(bench): cross-tier oracle receipt -- verifies the graders, runs no agent |
108
- | `1591f880` | docs: re-verify ref topology after an audit, and name the single CI blocker |
109
- | `ef0a6d49` | docs: put the spend decision's actual numbers in the handoff |
110
- | `12669cd3` | docs: the no-spend outcome frontier -- 3 held-out tasks, deterministic oracles, nothing run |
111
- | `fdba7023` | docs: handoff -- reconciliation, receipts, risks, founder-gated next action |
112
- | `19c2b5ad` | fix(tests): bound each completion probe, so a hang is a NAMED failure not rc143 |
113
- | `90468210` | feat(advisor): point at the calibration signal, and pin that it can never rank |
114
- | `0f4da110` | docs: freeze the T1/T2 benchmark designs, unrun and unpaid |
115
- | `8c33d123` | feat(tools): offline calibration audit, and it discloses that it cannot measure accuracy |
116
- | `a4d8b839` | fix(lint): the last red CI job was three pre-existing shellcheck warnings |
117
-
118
- ### THE THREE FOUNDER GATES, deliberately separate
119
-
120
- Ordered by dependency, not by value. Gate 1 first because gates 2 and 3 both
121
- move code toward main, and today nothing non-bypassable stands between main
122
- and a publish.
123
-
124
- **GATE 1 -- a durable, non-bypassable publish control.** Zero spend, zero
125
- code. Either an `environment:` key on release.yml's publish jobs (GitHub then
126
- requires a named reviewer before those jobs start), or a ruleset on main.
127
- Needs repository settings access, which is why it is not done here.
128
-
129
- Everything I built is operator-side and BYPASSABLE by not running it:
130
- `scripts/release-approval-gate.sh` refuses by default when run, and is a
131
- no-op when skipped. Treat a green run as "the operator checked", never as
132
- "publishing is gated". Measured today: release.yml triggers on any
133
- VERSION-path push to main and runs `gh release create`, `npm publish` twice
134
- and a Docker push, with no `environment:` key, and
135
- `gh api .../branches/main/protection` returns 404.
136
-
137
- **GATE 2 -- branch push PLUS a PR to main, for CI on this exact SHA.** Zero
138
- spend. These are ONE gate because either alone yields nothing: a branch push
139
- runs no workflow, and there is no PR without the push. Only this produces a
140
- CI verdict on `43e4d530`. It is also the only path by which held `a4d8b839`
141
- reaches main and clears the single remaining Tests failure.
142
-
143
- **GATE 3 -- benchmark spend, roughly $25-$180 and 4-12 hours.** Independent
144
- of gates 1 and 2. Buys the first OUTCOME evidence rather than affordance
145
- evidence (`docs/OUTCOME-FRONTIER.md`).
146
-
147
- PRECONDITION ON GATE 3: **MET, with one qualifier that decides who can
148
- check it.** Small is verified by a receipt ANY reader can reproduce.
149
- Medium and high are verified by a PRIVATE hash-bound receipt (below):
150
- replayable by whoever holds the artifacts, not by a reader on a fresh
151
- clone.
152
-
153
- | Tier | Positive | Adversarial | Receipt status |
154
- |---|---|---|---|
155
- | small `simple-1-contact-form` | exit 0 | exit 1 | **VERIFIED, reproducible** -- fixtures are committed, `tier_receipt.py` re-runs both probes on demand |
156
- | medium `multifail-1-two-modules` | -- | -- | **NOT ATTEMPTED** in the shared receipt; VERIFIED privately, see below |
157
- | high `hard-1-order-api` | -- | -- | **NOT ATTEMPTED** in the shared receipt; VERIFIED privately, see below |
158
-
159
- NON-REPRODUCIBLE OBSERVATION, recorded as a NOTE and explicitly NOT a
160
- receipt. On 2026-08-03 the medium and high graders were exercised by hand
161
- against artifacts built in a temp directory and destroyed. Observed exits
162
- were 0 for a correct implementation and 1 for a near-miss (high: omitting
163
- the subtotal>=100 discount; medium: fixing only cluster A). The high-tier
164
- near-miss passed all ten validation cases and both non-discount totals.
165
-
166
- That observation must not be promoted to VERIFIED, and the earlier draft of
167
- this section wrongly did. The artifacts are gone, no hash binds them to the
168
- run, and nothing in this repo can replay it -- so it fails the same standard
169
- this codebase applies to every other claim: an unreproducible observation is
170
- not evidence. It is recorded because it is a useful prior for whoever builds
171
- the real probes, and for no stronger purpose.
172
-
173
- THE MECHANISM THAT MEETS THIS PRECONDITION NOW EXISTS, and one of the two
174
- tiers is verified against it. `benchmarks/bench/private_probe.py` runs the
175
- in-repo graders against artifacts held OUTSIDE this repository (default
176
- `~/loki-bench-private`), content-hashes each set over its sorted
177
- (filename, bytes) pairs, and records the hash beside the exit code. The
178
- artifacts stay out of the repo, so the held-out design is uncontaminated;
179
- the hash makes the claim replayable, which the earlier by-hand run was not.
180
-
181
- Measured 2026-08-03:
182
-
183
- | Task | Probe | Exit | Expected | Artifact sha256 (first 16) |
184
- |---|---|---|---|---|
185
- | `hard-1-order-api` | positive | 0 | 0 | `884d555b6e53833d` |
186
- | `hard-1-order-api` | adversarial | 1 | 1 | `486a62137c64167a` |
187
- | `multifail-1-two-modules` | positive | 0 | 0 | `a7134c9c1ae36ae9` |
188
- | `multifail-1-two-modules` | adversarial | 1 | 1 | `f4daff9d346c6116` |
189
-
190
- Both tiers read `verified`. Each adversarial artifact is the near-miss the
191
- grader's own docstring names: the high one omits the subtotal>=100 discount
192
- while passing all ten validation cases and both non-discount totals; the
193
- medium one fixes cluster A and leaves cluster B absent, and the grader
194
- rejects it naming `cluster B_roman`.
195
-
196
- So every tier now rejects a PLAUSIBLE WRONG answer, not merely an absent
197
- one, which is the property that makes a paid run's number mean something.
198
-
199
- HOW TO CHECK IT YOURSELF, and what stops it rotting.
200
-
201
- loki bench oracles # or: python3 benchmarks/bench/private_probe.py
202
-
203
- Reachable from the CLI deliberately, and placed beside `bench run`: the
204
- question in front of a paid run is whether a green cell would mean
205
- anything, so the answer sits one command from the spend decision. Costs
206
- nothing -- local graders against artifacts already on disk, never a
207
- provider.
208
-
209
- `benchmarks/bench/private_attestation.json` commits the HASHES (never the
210
- artifacts) and the probe compares against them. Without that the probe
211
- would verify whatever bytes it found, so an artifact edited afterwards
212
- would be re-blessed under a new hash while the receipt still read
213
- `verified` -- which is how an edited answer key launders itself green.
214
-
215
- Proven on the case that matters: appending a COSMETIC comment leaves
216
- behaviour identical, the grader still returns its expected exit code, and
217
- the run still fails with `attestation=DRIFTED` naming both hashes. Only
218
- the hash comparison can catch that.
219
-
220
- An unattested probe reads `unattested`, not drift. Absence of a record is
221
- not evidence of tampering.
222
-
223
- TWO QUALIFIERS THAT MUST TRAVEL WITH THAT TABLE.
224
-
225
- First, this is a PRIVATE receipt. It is checkable by whoever holds the
226
- artifacts, and not by a reader on a fresh clone. `tier_receipt.py`
227
- therefore still reports medium and high as `not_attempted`, deliberately:
228
- promoting them there would make a shared receipt's verdict depend on who
229
- ran it, which re-creates the retracted defect one level up. The two
230
- receipts answer different questions and a human combines them.
231
-
232
- Second, the hashes above identify one operator's artifacts on one machine.
233
- They prove the claim is REPLAYABLE, not that anyone else can replay it
234
- today. Making it shareable (a second repository, an attested bundle) is a
235
- distribution decision, not a code change.
236
-
237
- ### RELEASE EXPOSURE, measured today
238
-
239
- `.github/workflows/release.yml` triggers on `push: paths: ['VERSION'],
240
- branches: [main]` and runs `gh release create`, `npm publish --access public`
241
- (twice) and a Docker push. It has **no `environment:` approval gate**, and
242
- `gh api .../branches/main/protection` returns **404 Branch not protected**.
243
-
244
- So a single VERSION-editing commit reaching main publishes with no human in
245
- the loop. `scripts/release-approval-gate.sh` is a default-DENY local interlock
246
- against exactly that, verified on a throwaway 9.11.0 -> 9.99.99 bump. The
247
- durable fix (an `environment:` gate or a ruleset) changes the publishing path
248
- or repo settings and is **founder-gated** -- it is listed as an approval still
249
- needed, not silently applied.
250
-
251
-
252
- State at handoff. Everything below is verified by a command whose output was
253
- read, or is marked UNKNOWN. Nothing has been pushed, published, merged, or
254
- released, and nothing was spent.
255
-
256
- ## 1. Reconciliation
257
-
258
- SUPERSEDED SNAPSHOT. The HEAD and commit count below are from an earlier
259
- point in the session and are kept as history, NOT as current state. Section 0
260
- is the live topology: `7b25a772`, 16 ahead of origin/main, 6 ahead of the RC
261
- remote. The VERSION / npm / tag rows are still accurate.
262
-
263
- | Fact | Value (as of `19c2b5ad`) | How verified |
264
- |---|---|---|
265
- | Local HEAD | `19c2b5ad` (SUPERSEDED, now `7b25a772`) | `git rev-parse HEAD` |
266
- | `origin/main` | `dd692561` (unchanged) | `git rev-parse origin/main` after fetch |
267
- | Commits ahead | 5 (SUPERSEDED, now 16) | `git rev-list --count origin/main..HEAD` |
268
- | repo VERSION | 9.11.0 | `cat VERSION` |
269
- | npm latest | 9.8.1 | `npm view loki-mode version` |
270
- | newest git tag | v9.8.1 | `git tag --sort=-v:refname \| head -1` |
271
-
272
- **npm and the tag agree at 9.8.1.** The repo being at 9.11.0 is not drift: it
273
- is an unreleased repo under a no-publish directive. Three minor versions of
274
- work are committed and unpublished by instruction. Reconciled, not a defect.
275
-
276
- ## 1b. Ref topology, re-verified after an independent audit (09:04Z)
277
-
278
- An audit reported the session ref `loki/session-1785167314-9337` at
279
- `09138e26` as 0 ahead / 176 behind, fully contained in `origin/main`, and
280
- concluded the "commits held/unpushed" claim was stale. **Both statements are
281
- correct, about DIFFERENT refs.** Re-measured here:
282
-
283
- ```
284
- git rev-list --left-right --count origin/main...loki/session-1785167314-9337
285
- -> 176 0 (behind 176, ahead 0)
286
- git merge-base --is-ancestor loki/session-1785167314-9337 origin/main
287
- -> true origin/main CONTAINS it; nothing to push from that ref
288
-
289
- git rev-list --left-right --count origin/main...HEAD # worktree-pre-push-scoped-pytest
290
- -> 0 8 (behind 0, ahead 8)
291
- git merge-base --is-ancestor HEAD origin/main
292
- -> false NOT contained; the 8 are unique
293
- ```
294
-
295
- Each of the 8 was additionally tested individually with
296
- `git merge-base --is-ancestor <sha> origin/main`; none is in `origin/main`.
297
-
298
- The audited session ref is not one I have worked on. The held work is on
299
- `worktree-pre-push-scoped-pytest`. The push was NOT cancelled as stale,
300
- because it does not target the audited ref -- but it remains UNPUSHED by
301
- directive, pending explicit approval.
302
-
303
- ## 1c. origin/main is ONE JOB from CI-green
304
-
305
- Receipts for `origin/main` = `dd692561`:
306
-
307
- | Workflow | Conclusion | URL |
308
- |---|---|---|
309
- | Security Audit | success | actions/runs/30796434331 |
310
- | SBOM (CycloneDX) | success | actions/runs/30794017044 |
311
- | Bun Parity | success | actions/runs/30794017132 |
312
- | Coverage (baseline) | success | actions/runs/30794017182 |
313
- | pages build | success | actions/runs/30794016322 |
314
- | **Tests** | **failure** | actions/runs/30794017151 |
315
-
316
- The Tests failure is ONE job with ONE cause: `Shell tests (shard 3/4)` ->
317
- `ShellCheck Linting FAILED`. Shards 0, 1 and 2 pass.
318
-
319
- Measured on both sides of the fix:
320
-
321
- - `origin/main`'s copies of the three files carry **7 shellcheck warning
322
- sites** (test-iteration-grace 5, test-go-cargo-gate-timeout 1,
323
- cleanup-test-processes 1).
324
- - The held commit `a4d8b839` takes those same three files to **0**, and
325
- `tests/run-shellcheck.sh` reports **360 passed / 0 failed**.
326
-
327
- So the single blocker to a CI-green release candidate is already fixed and
328
- held. No new work is required to clear it; only the push gate.
329
-
330
- ## 2. Held commits (8, unpushed)
331
-
332
- | SHA | What it is |
333
- |---|---|
334
- | `a4d8b839` | Last red CI job: three PRE-EXISTING shellcheck warnings (not mine; last touched Jul 31 / Aug 1). One was a real hazard -- an unguarded `cd` that could make a gate examine the wrong tree and report a pass for a repo it never looked at. |
335
- | `8c33d123` | Offline calibration audit. Discloses, before any number, that it measures agreement with the council majority and NOT accuracy. |
336
- | `0f4da110` | T1/T2 benchmark designs frozen with held-out discipline. Unrun, unpaid. |
337
- | `90468210` | Calibration wired into model-advisor as a ONE-WAY caveat. Pinned by test so it can never become a ranking input. |
338
- | `19c2b5ad` | Per-command timeout on the completion-coverage probe. Root cause of the weekly audit's rc143, with the culprit named. |
339
- | `fdba7023` | This handoff. |
340
- | `12669cd3` | The no-spend outcome frontier: 3 held-out tasks, deterministic non-self-grading oracles, nothing run. |
341
- | `ef0a6d49` | Spend-decision figures moved into the handoff so the decision needs one file, not two. |
342
-
343
- ## 3. Receipts
344
-
345
- - **shellcheck: 360 passed, 0 failed.** Was 357/3.
346
- - **Weekly-integrity rc143: root-caused and fixed.**
347
- `test-completion-coverage.sh` probes ~274 command candidates as
348
- `loki <c> --help`. `help` is among them (verified by re-running the
349
- candidate extraction standalone), so it executed `loki help --help` -- the
350
- unbounded self-delegation fixed in `ccf8dcbb`, which spawned a process per
351
- level until the fork table was exhausted and the runner was SIGTERM'd.
352
- Fixed with a PER-COMMAND 15s bound, never a blanket skip: skipping `help`
353
- would have hidden the bug that needed fixing.
354
- Proven non-vacuous by injecting a 60s hang into `doctor`:
355
- `rc=1`, 34s, `PROBE HUNG: 'loki doctor --help' did not return within 15s`.
356
- Without the hang: 6 passed, 0 failed, 20s.
357
- - **CI on `dd692561` (last pushed SHA), terminal:** shards 0, 1, 2 GREEN --
358
- the first shell shards to pass on a runner this session. Shard 3 red on
359
- ShellCheck only, which `a4d8b839` fixes locally.
360
- - **Local gate:** `scripts/local-ci.sh` exit 0, Failed 0, on every commit above.
361
- - **Fork bomb:** contained 4,172 -> 375 processes. Root cause and counterfactual
362
- in `ccf8dcbb` (already pushed).
363
-
364
- ## 4. The calibration audit has NEVER run on real data
365
-
366
- Searched this machine for council transcripts:
367
-
368
- ```
369
- find ~/git ~/loki-bench-v7 -type d -name transcripts -path "*council*" -> empty
370
- find ~ -maxdepth 4 -type d -name council -> empty
371
- ```
372
-
373
- **No real council transcripts exist here.** Every calibration number produced
374
- so far is fixture-derived, and the fixtures were built to have a hand-checkable
375
- answer rather than to resemble production. The audit is correct against
376
- hand-derived arithmetic; it is unvalidated against reality.
377
-
378
- This is stated because "the tool works" and "the tool has told us something
379
- about our system" are different claims, and only the first is supported.
380
-
381
- ## 5. Risks
382
-
383
- - **The calibration signal is not an accuracy signal, and it never becomes
384
- one.** `tools/calibration-audit.py` scores agreement with the council
385
- MAJORITY. The council outcome is derived from the votes, so a voter partly
386
- causes its own label. A low Brier score there means "voted with the pack",
387
- not "was correct". No artifact in this repo records whether the council was
388
- right. This must stay a caveat; `90468210` pins by test that it cannot enter
389
- model-advisor's machine-readable contract.
390
- - **Local green is not CI green.** `a4d8b839` and `19c2b5ad` are verified only
391
- on this machine. They are unpushed by instruction, so no runner has executed
392
- them. Do not read the local 360/0 as a CI verdict.
393
- - **Shard 3 has never been fully measured locally.** Its run was stopped during
394
- the fork-bomb containment. Shards 0/1/2 were measured, partly during a window
395
- when the process table was exhausted -- and in that state `grep` and `echo`
396
- return EMPTY WITH NO ERROR, indistinguishable from "no matches". Readings
397
- taken then are absent measurements, not results.
398
- - **Three worktree agents' output was landed after review, and review found
399
- real defects** (an unregistered guard that would never have run; a 48-vs-36
400
- test-count misreport). Self-reports are not receipts.
401
- - **Version skew is deliberate but load-bearing.** Anyone installing from npm
402
- gets 9.8.1 and none of this work. If a user reports a bug fixed in 9.9-9.11,
403
- that is why.
404
-
405
- ## 6. Founder-gated next action
406
-
407
- Exactly one decision unblocks the rest. All five commits are gate-green
408
- locally and held only by the standing directive.
409
-
410
- **Option A -- release the gate.** Push the 5 commits. CI then runs them for the
411
- first time, which is the only way to confirm shard 3 goes green and the
412
- rc143 fix holds on a runner. No publish is implied by a push.
413
-
414
- **Option B -- keep the gate, name the next target.** Work continues and
415
- continues to be held. The next unblocked item is the outcome frontier design
416
- (in flight, no-spend).
417
-
418
- **Option C -- authorize spend.** Only this unlocks measuring OUTCOME quality
419
- against competitors. Every axis in the scorecard that reads UNKNOWN reads that
420
- way because no paid run has happened.
421
-
422
- The design is ready and unrun: `docs/OUTCOME-FRONTIER.md`, three held-out
423
- tasks with deterministic non-self-grading oracles, a frozen three-dimension
424
- rubric, and seven dimensions deliberately left UNSCORED rather than
425
- approximated with an LLM judge.
426
-
427
- **Estimated cost: roughly $25 to $180 in provider spend and 4 to 12 hours of
428
- wall clock**, for a 4-tool, 2-task matrix. That is an ESTIMATE with its
429
- assumptions listed in the document, not a measurement, and the two runnable
430
- tasks (brownfield, multi-file migration) are the ones priced. The scientific
431
- task is PLAN ONLY -- it needs a paper chosen and its number transcribed before
432
- it can run at all, and its results must never be reported as equally rigorous
433
- to the other two.
434
-
435
- What approving this buys: the first evidence about OUTCOME rather than CLI
436
- affordances. What it does not buy: the seven unscored dimensions, which no
437
- amount of spend makes deterministic.
438
-
439
- Nothing in this handoff requires spend, and nothing in it has been published.
@@ -1,167 +0,0 @@
1
- # loop-candidate-v1: proposal only
2
-
3
- **GATE VERDICT: FALSE.** Nothing here is implemented, and nothing may be until
4
- the gate closes. See the last section for the single gate-closing action.
5
-
6
- | Gate | Verdict | Evidence |
7
- |---|---|---|
8
- | Local full tier | **DO NOT PUSH** | 161 passed, 3 failed, 0 deferred |
9
- | Remote exact-SHA | **failure** | `Tests@dda8beec` completed/failure, Shell shard 2 |
10
-
11
- ## 0. Why this proposal is small
12
-
13
- The six cheaper surfaces come first by directive, and the honest finding is
14
- that **the one evidenced product defect this session surfaced cannot be
15
- addressed by any of them**: `loki onboard --stdout` emits 0 bytes and exits 0
16
- on a 4100-file repository while working on a small one. It is a bash command
17
- that never calls a model, so memory, retrieval, skills, prompts, tool
18
- descriptions, compression and routing are all inapplicable by construction.
19
-
20
- That leaves routing as the only surface with both an evidenced question and
21
- existing instrumentation. This proposal is therefore scoped to **one routing
22
- candidate**, and it is deliberately the smallest thing that could clear the
23
- preregistered bar.
24
-
25
- ## 1. Provenance
26
-
27
- Every field pinned, no "current" or "latest":
28
-
29
- | Field | Value |
30
- |---|---|
31
- | baseline runtime | `dda8beec` (origin/main), loki-mode 9.12.5 |
32
- | candidate runtime | **none** -- this proposal changes no runtime code |
33
- | harness | `tools/loop-harness-report.py` @ `2910a95d` (read-only) |
34
- | task corpus | 1 spec, `wordcount` (pure helper + test), verbatim in both arms |
35
- | grader | the produced test suite, executed; plus receipt `iterations.succeeded` |
36
- | prompt version | unchanged; main-loop prompt is **NOT ATTRIBUTABLE** (assembled in memory, `run.sh:8987`) |
37
- | skill version | unchanged |
38
- | routing arm A | `LOKI_SESSION_MODEL=sonnet` |
39
- | routing arm B | `LOKI_SESSION_MODEL=opus` |
40
- | verifier set | unchanged; **records carry no cost/latency**, see §5 |
41
-
42
- **The prompt row is a known provenance hole.** The main-loop prompt cannot be
43
- versioned today, so any candidate that claims a prompt effect is unfalsifiable.
44
- This proposal therefore claims none.
45
-
46
- ## 2. Success and noise criteria, preregistered
47
-
48
- - **Primary**: cost_usd per successful run, matched on the identical spec.
49
- - **Secondary**: wall_clock_sec, and `progress duration_ms` reported separately
50
- -- these are NOT the same quantity and are never summed. Wall clock includes
51
- orchestration; progress duration is measured work.
52
- - **Success requires**: `iterations.succeeded >= 1` AND the produced test suite
53
- passes when executed. A receipt is not evidence the code works.
54
- - **Noise rule**: a difference below **25%** on the primary is declared noise
55
- and not reported as an effect. Justification: the two prior UNMATCHED runs
56
- differed by 2.0x on the same nominal models, which bounds run-to-run
57
- variance well above any effect a single pair could detect.
58
- - **Minimum n**: 5 matched pairs. Below that, report "insufficient", never a
59
- direction.
60
-
61
- ## 3. Caps
62
-
63
- | Cap | Value |
64
- |---|---|
65
- | retries | 0 -- a failed arm is recorded as failed, never retried |
66
- | per-run timeout | 900s (matches the runs already executed) |
67
- | iterations per run | `LOKI_MAX_ITERATIONS=2` |
68
- | total spend ceiling | **$25**, hard stop; at ~$0.70/run that is ~35 runs |
69
- | canary population | **none** -- offline only; no production traffic |
70
- | canary window | n/a until offline clears |
71
-
72
- ## 4. Evals
73
-
74
- **Deterministic regression**: the existing suites, unchanged and frozen at the
75
- baseline SHA. Any new failure disqualifies the candidate outright, regardless
76
- of primary-metric movement.
77
-
78
- **Ambitious artifact-level outcome**: one real `loki start` on a spec requiring
79
- a multi-file artifact (module + test + usage doc), graded by (a) the produced
80
- tests executing green, and (b) the receipt verifying via
81
- `api_evidence.receipts_report`. Flat-or-better is required; a cost win with a
82
- degraded artifact is a rejection, not a trade.
83
-
84
- ## 5. Verifier lift versus p95 latency and cost -- BLOCKED, stated as such
85
-
86
- This element **cannot be satisfied today** and the proposal does not pretend
87
- otherwise.
88
-
89
- Verifier records carry no cost, latency, criterion, or terminal-outcome effect:
90
- `code_review_complete` emits exactly `review_id`, `source`, `iteration`; the
91
- three gate functions (`_evidence_`, `_invariant_`, `_semantic_gate_and_surface`)
92
- emit nothing structured at all. So the denominator for "lift vs p95 latency and
93
- cost" does not exist, and no matched on/off cohort can be computed.
94
-
95
- Closing this needs runtime instrumentation, which the directive excludes
96
- without an evidenced deterministic requirement. **This proposal therefore makes
97
- no verifier claim and proposes no verifier change.**
98
-
99
- ## 6. One reversible candidate at a time
100
-
101
- Exactly one variable moves: `LOKI_SESSION_MODEL`. It is an environment
102
- variable, so reversal is unsetting it -- no code, no migration, no state.
103
-
104
- Structured-trace learning is **read-only**: `loop-harness-report.py` reports
105
- what traces contain and marks every underivable field UNKNOWN. It proposes
106
- nothing automatically.
107
-
108
- ## 7. Replay, rollback, retention
109
-
110
- - **Frozen replay**: each run's receipt pins `base_sha`, `head_sha`,
111
- `diff_sha256`, model, provider and cost. The spec is stored verbatim.
112
- - **Automatic rollback**: none needed -- no runtime change to roll back. If the
113
- candidate loses, the env var is simply not set.
114
- - **Retained prior version**: baseline is `dda8beec` on origin/main, immutable.
115
-
116
- ## 8. Trigger-to-receipt path
117
-
118
- Already present and verified by execution, not by grep:
119
-
120
- | Property | State |
121
- |---|---|
122
- | authentication | present |
123
- | idempotency | present |
124
- | dedupe | present -- `seen_delivery()`, lock-guarded bounded OrderedDict |
125
- | backpressure | present -- bounded queue, 503 shed |
126
- | bounded retry | present |
127
- | timeout | present |
128
- | dead-letter | **failures logged, not queryable** |
129
-
130
- The one gap is a queryable failure record. It is narrow and **not proposed for
131
- change** on this evidence.
132
-
133
- ## 9. Human approval
134
-
135
- Required for: promotion to default, any spend beyond the $25 ceiling,
136
- destructive or security-boundary changes, and any external action (publish,
137
- tag, post). Not required for: running the offline arms within the ceiling.
138
-
139
- ## What would falsify this candidate
140
-
141
- - any new deterministic regression -> reject
142
- - artifact outcome degraded -> reject even if cheaper
143
- - primary difference < 25% -> declare noise, no promotion
144
- - fewer than 5 matched pairs -> report insufficient, no direction claimed
145
-
146
- ## THE SINGLE GATE-CLOSING ACTION
147
-
148
- The gate is red because of **three failures, none introduced by the held
149
- commits**:
150
-
151
- | Failure | Class | Fixable here? |
152
- |---|---|---|
153
- | `test-onboard-command` (6) | pre-existing; identical at `1c80c85ff~1` | needs a runtime fix to `autonomy/loki` |
154
- | `test-model-override` (1) | pre-existing; 65/66 identical at `1c80c85ff~1` | unknown, undiagnosed |
155
- | `bun run typecheck` | environmental; `tsc` not installed locally | one install |
156
-
157
- **The single next action: install the TypeScript toolchain so
158
- `bun run typecheck` can execute locally.** It is the only one of the three that
159
- is a local environment gap rather than a code defect, it is non-destructive and
160
- reversible, and it removes the one failure that is not telling us anything
161
- about the repository.
162
-
163
- That alone does not turn the gate green -- the two pre-existing suite failures
164
- remain, and deciding whether to fix them, accept the remote gate as the
165
- documented equivalent, or waive them is a founder call, not mine.
166
-
167
- **Implementation stops here.**