loki-mode 10.6.8 → 10.6.10

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 (111) hide show
  1. package/README.md +15 -14
  2. package/SKILL.md +2 -2
  3. package/VERSION +1 -1
  4. package/autonomy/lib/backlog.py +167 -36
  5. package/autonomy/lib/workspace.py +133 -39
  6. package/autonomy/lib/workspace_comment.py +91 -0
  7. package/autonomy/loki +92 -22
  8. package/bin/loki +3 -3
  9. package/completions/_loki +1 -0
  10. package/completions/loki.bash +1 -1
  11. package/dashboard/__init__.py +1 -1
  12. package/dashboard/api_start.py +26 -1
  13. package/docs/INSTALLATION.md +1 -1
  14. package/docs/TOOL-INTEGRATION.md +3 -3
  15. package/docs/WORKSPACES.md +11 -4
  16. package/docs/control-plane-container.md +8 -3
  17. package/docs/dashboard-guide.md +4 -0
  18. package/docs/exit-codes.md +1 -0
  19. package/docs/slack.md +12 -4
  20. package/docs/trackers.md +27 -0
  21. package/docs/v10/BOARD.md +70 -29
  22. package/docs/v10/CONTROL-PLANE.md +14 -7
  23. package/docs/v10/D51-PHASE-B.md +3 -1
  24. package/docs/v10/D61-SPEED.md +4 -0
  25. package/docs/v10/D63-CARDS.md +354 -0
  26. package/docs/v10/DECISIONS.md +44 -0
  27. package/docs/v10/E2E-D65.md +28 -0
  28. package/docs/v10/PROGRESS.md +63 -0
  29. package/loki-ts/dist/loki.js +584 -565
  30. package/mcp/__init__.py +1 -1
  31. package/mcp/tests/test_v10_tools.py +56 -0
  32. package/mcp/v10_tools.py +13 -3
  33. package/package.json +2 -1
  34. package/packages/control-plane/dist/server.js +76 -6
  35. package/packages/control-plane/drizzle/0001_group_id.sql +3 -0
  36. package/packages/control-plane/drizzle/meta/_journal.json +8 -1
  37. package/packages/control-plane/src/db/schema.ts +3 -0
  38. package/packages/control-plane/src/server/answer.ts +1 -1
  39. package/packages/control-plane/src/server/app.ts +6 -2
  40. package/packages/control-plane/src/server/auth.ts +51 -0
  41. package/packages/control-plane/src/server/runs.ts +4 -3
  42. package/packages/control-plane/src/server/serve.ts +11 -1
  43. package/packages/control-plane/src/shipper/discover.ts +29 -0
  44. package/packages/control-plane/ui/dist/assets/{index-53E32yrO.js → index-Jt31nrK-.js} +24 -24
  45. package/packages/control-plane/ui/dist/index.html +1 -1
  46. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  47. package/schemas/features.schema.json +71 -0
  48. package/schemas/loki-yaml.schema.json +123 -0
  49. package/schemas/manifest.schema.json +77 -0
  50. package/schemas/migration-plan.schema.json +109 -0
  51. package/schemas/outcome-contract.schema.json +73 -0
  52. package/schemas/seams.schema.json +90 -0
  53. package/schemas/status-result.schema.json +30 -0
  54. package/schemas/why-result.schema.json +51 -0
  55. package/web-app/dist/assets/{AdminPage-DN_pe8vo.js → AdminPage-OaSCF3M4.js} +1 -1
  56. package/web-app/dist/assets/{Avatar-BnQsr8z-.js → Avatar-xa3G7_vs.js} +1 -1
  57. package/web-app/dist/assets/{Badge-DzERiZn2.js → Badge-Ci_UcHij.js} +1 -1
  58. package/web-app/dist/assets/{Button-CaaoxQAt.js → Button-CFrrmbvL.js} +1 -1
  59. package/web-app/dist/assets/{CockpitPage-SXhnysJA.js → CockpitPage-6hyVl_QZ.js} +1 -1
  60. package/web-app/dist/assets/{ComparePage-krxTCFJY.js → ComparePage-B5H56KCG.js} +1 -1
  61. package/web-app/dist/assets/{ErrorBoundary-BL96ESMc.js → ErrorBoundary-CBbRHsYr.js} +1 -1
  62. package/web-app/dist/assets/{EvidenceReceiptPanel-PUiGSpkB.js → EvidenceReceiptPanel-D-Zoneum.js} +1 -1
  63. package/web-app/dist/assets/{GitHubIssuesPanel-C0hPs-P2.js → GitHubIssuesPanel-D7XPRsic.js} +1 -1
  64. package/web-app/dist/assets/{GitHubPRsPanel-CLvqNUlu.js → GitHubPRsPanel-CzHbBPAn.js} +1 -1
  65. package/web-app/dist/assets/{HomePage-X-sq_Rc9.js → HomePage-ClOx5qF1.js} +2 -2
  66. package/web-app/dist/assets/{LoginPage-DhQuwdua.js → LoginPage-3Yz_9j8E.js} +1 -1
  67. package/web-app/dist/assets/{MagicPage-CP2ODjfn.js → MagicPage-Dumn48gC.js} +1 -1
  68. package/web-app/dist/assets/{MetricsPage-C6SYiQES.js → MetricsPage-CYCYVG_8.js} +1 -1
  69. package/web-app/dist/assets/{NotFoundPage-CCDxxYc-.js → NotFoundPage-CV-x_1qH.js} +1 -1
  70. package/web-app/dist/assets/{ProjectPage-yDF--8FQ.js → ProjectPage-CeO7dnyM.js} +3 -3
  71. package/web-app/dist/assets/{ProjectsPage-BBLspdLn.js → ProjectsPage-BT9mz6iD.js} +1 -1
  72. package/web-app/dist/assets/{SettingsPage-C_sWbQRw.js → SettingsPage-BL8X9fAB.js} +1 -1
  73. package/web-app/dist/assets/{ShowcasePage-xCMuL0N8.js → ShowcasePage-8f3lnSpc.js} +1 -1
  74. package/web-app/dist/assets/{SystemSettingsPage-DnJKGCx7.js → SystemSettingsPage-BUNAAzh2.js} +1 -1
  75. package/web-app/dist/assets/{TeamsPage-BBXdhrSs.js → TeamsPage-Qj-VEZJz.js} +1 -1
  76. package/web-app/dist/assets/{TemplatesPage-AZ1Lr1rn.js → TemplatesPage-b8lKqe5q.js} +1 -1
  77. package/web-app/dist/assets/{TerminalOutput-CtIm9tXc.js → TerminalOutput-jOnfQKB4.js} +1 -1
  78. package/web-app/dist/assets/{activity-Dk1FK25Q.js → activity-w7GnyBNp.js} +1 -1
  79. package/web-app/dist/assets/{bell-dhqXyzP4.js → bell-2i4ejMOA.js} +1 -1
  80. package/web-app/dist/assets/{bot-CExHd4Kf.js → bot-jaPm4NIs.js} +1 -1
  81. package/web-app/dist/assets/{check-D51zaA1a.js → check-CvNtxeKM.js} +1 -1
  82. package/web-app/dist/assets/{chevron-left-DEwnQzH1.js → chevron-left-zzBjHAtX.js} +1 -1
  83. package/web-app/dist/assets/{circle-alert-C6U90Msk.js → circle-alert-CCU0IU2m.js} +1 -1
  84. package/web-app/dist/assets/{clock-6mFbMzzH.js → clock-BvZckMwN.js} +1 -1
  85. package/web-app/dist/assets/{cloud-BrZZtE7F.js → cloud-hrMWDdYp.js} +1 -1
  86. package/web-app/dist/assets/{code-xml-DTFzeepP.js → code-xml-v6l40T-K.js} +1 -1
  87. package/web-app/dist/assets/{database-B5rEiTre.js → database-l2TMUrQd.js} +1 -1
  88. package/web-app/dist/assets/{dollar-sign-bQs4rlS_.js → dollar-sign-C2V6OvpO.js} +1 -1
  89. package/web-app/dist/assets/{file-code-corner-Mo6e6qbf.js → file-code-corner-Bytb5JGA.js} +1 -1
  90. package/web-app/dist/assets/{file-plus-DzHZ0jpP.js → file-plus-BynCYQB8.js} +1 -1
  91. package/web-app/dist/assets/{globe-DYN9UhTa.js → globe-DifDdNMH.js} +1 -1
  92. package/web-app/dist/assets/{hammer-bB0hSRcJ.js → hammer-D7TsOJD6.js} +1 -1
  93. package/web-app/dist/assets/{index-CIH5CqZB.js → index-Zohfqaz4.js} +3 -3
  94. package/web-app/dist/assets/{layers-qhFkY8Nu.js → layers-Bk8c2YLS.js} +1 -1
  95. package/web-app/dist/assets/{loader-circle-BGBkaYH7.js → loader-circle-BrLdbMwP.js} +1 -1
  96. package/web-app/dist/assets/{lock-DIcsNFum.js → lock-COpmjMyJ.js} +1 -1
  97. package/web-app/dist/assets/{package-BdIIbZhS.js → package-BMzYdY7F.js} +1 -1
  98. package/web-app/dist/assets/{plus-Co1Bv8zT.js → plus-B9xpu1Pg.js} +1 -1
  99. package/web-app/dist/assets/{refresh-cw-CGF4ABWH.js → refresh-cw-C2Lzh-AA.js} +1 -1
  100. package/web-app/dist/assets/{rotate-ccw-BX10Q79h.js → rotate-ccw-2Yyy-uQd.js} +1 -1
  101. package/web-app/dist/assets/{scroll-text-CbXDlpGp.js → scroll-text-DiK2yhsT.js} +1 -1
  102. package/web-app/dist/assets/{server-CIhi6yUO.js → server-xlJBgleU.js} +1 -1
  103. package/web-app/dist/assets/{shield-alert-DJ5fB6Dg.js → shield-alert-D9w4yBCi.js} +1 -1
  104. package/web-app/dist/assets/{thumbs-up-BEft2T94.js → thumbs-up-CcWfvcE9.js} +1 -1
  105. package/web-app/dist/assets/{trash-2-CWGUPn7Y.js → trash-2-_hk_pEAp.js} +1 -1
  106. package/web-app/dist/assets/{trending-down-CjqstvxQ.js → trending-down-CDZT99tC.js} +1 -1
  107. package/web-app/dist/assets/{trending-up-CTyLjMzE.js → trending-up-A0oreTXc.js} +1 -1
  108. package/web-app/dist/assets/{upload-BmRx-uv4.js → upload-DfLwhGG2.js} +1 -1
  109. package/web-app/dist/assets/{usePolling-ChHkSJye.js → usePolling-B7gW2YY_.js} +1 -1
  110. package/web-app/dist/assets/{user-ZXh_f35z.js → user-C-y7_Oon.js} +1 -1
  111. package/web-app/dist/index.html +1 -1
@@ -0,0 +1,354 @@
1
+ # D63 remaining slice cards (Architect, main 23298d2eb)
2
+
3
+ Scope: Control Plane default, Slack, Jira and Linear, multi-repo, MCP, containers, and the stub-provider E2E. Visual and contract flips and the D61 speed slices are carded elsewhere. These cards are a design; nothing here is implemented.
4
+
5
+ ## Findings
6
+
7
+ Control Plane
8
+ - `loki control` is gated on `LOKI_CONTROL=1` (`loki-ts/src/commands/control.ts:71`).
9
+ - `LOKI_CONTROL_DEFAULT` exists only in bash `cmd_dashboard` (`autonomy/loki:7330`). Bare `loki` still runs `cmd_ui`, which starts the old dashboard.
10
+ - Runs ship only when `LOKI_CONTROL_URL` is set (`engine10/supervisor.ts:189`). The `instance.json` discovery described in `docs/v10/CONTROL-PLANE.md:52` does not exist.
11
+ - The BLOCKED answer UI exists (`packages/control-plane/ui/src/App.tsx:168-216`, `src/server/answer.ts`). It only writes `~/.loki/control/answers/<src>/<run>.answer.txt`; nothing reads that file to resume the run.
12
+
13
+ Security gap (HIGH)
14
+ - `docs/v10/CONTROL-PLANE.md:43` says a non-loopback bind refuses without `LOKI_CONTROL_TOKEN` and that `/v1` needs a Bearer token. Neither is implemented: `app.ts` has no auth middleware and `serve.ts` binds whatever `LOKI_CONTROL_HOST` says.
15
+ - `Dockerfile.control-plane`, the Helm chart and the ECS task all set `0.0.0.0`, so the shipped container exposes unauthenticated ingest and answer-write on every interface.
16
+ - On loopback there is no Host check (DNS rebinding).
17
+
18
+ Routing (`bin/loki`)
19
+ - `slack` is missing from the Bun allowlist at `bin/loki:570`, so the documented `loki slack serve` is unreachable from an installed CLI.
20
+ - `jira:PROJ-1` and `linear:ENG-42` are one word and fall to the legacy engine.
21
+ - Linear URLs (`/issue/`, singular) match neither `*/issues/*` nor `*/browse/*` and also go legacy. Only Jira `https://...atlassian.net/browse/` URLs reach v10.
22
+
23
+ Slack
24
+ - The default launcher spawns `process.execPath process.argv[1] <task>`, which is `cli.ts`, not `bin/loki`; `cli.ts` has no task route, so the launch fails.
25
+ - The launcher passes `SLACK_BOT_TOKEN` and `SLACK_SIGNING_SECRET` into the child run's env.
26
+ - Outbound with no webhook is already a clean no-op (`engine10/adapters/slack.ts:19`).
27
+
28
+ Jira and Linear
29
+ - Already on with no flag. A missing credential throws an error naming the variable, before any LLM call. Self-hosted Jira URLs are not parsed.
30
+
31
+ Multi-repo
32
+ - `autonomy/lib/workspace.py` is a 290-line compact version: repos run sequentially; no `show`, `status` or `clean`; no exit code 3; SIGINT not handled. The gate exists twice (`workspace.py:50`, `autonomy/loki:12926`).
33
+
34
+ MCP
35
+ - The three v10 tools are always registered. `mcp/tests/test_v10_tools.py` is not run by any runner, workflow or local-ci.
36
+
37
+ Containers
38
+ - Files exist; the only check is `packages/control-plane/test/deploy/container.test.ts`. The Dockerfile comment says "no authentication of its own". The token is optional in Helm.
39
+
40
+ Stub provider (BUG-2 in E2E-D65.md)
41
+ - A usage gap, not missing code: `LOKI_E10_INVOKER=cli` plus `LOKI_CLAUDE_CLI=<stub>` already drives v10 with a stub (`scripts/first-run-gate.sh:98`, `docs/v10/FIRST-RUN-GATE.md:11`).
42
+
43
+ ## File-set rules for every card
44
+ - CHANGELOG: each card supplies its sentence; the Release Manager writes `CHANGELOG.md` at the train. No card edits it.
45
+ - README: each card edits only the README section it names.
46
+ - Headless tests: `LOKI_NO_BROWSER=1`, a throwaway `HOME`, `--port 0` or a stub server, never a port in 57374-57399. Stop only recorded PIDs; never kill by name or pattern.
47
+ - Every spawn under `loki-ts/src` passes an explicit env. No stored credentials are read.
48
+ - No new `tests/*.sh` except in C5, which owns `tests/run-all-tests.sh` and `tests/shard-durations.tsv`. Other cards extend existing suites.
49
+ - Caps: core engine10 has 64 lines left (D71), e10ext 33 lines left. New code goes in `loki-ts/src/features` or `packages/`.
50
+
51
+ ---
52
+
53
+ ## C1 CP-AUTH: Control Plane auth enforced as documented
54
+ - Tier: HIGH (auth, security). Budget: 30 min.
55
+ - Goal:
56
+ - With `LOKI_CONTROL_TOKEN` set, every `/v1/*` call needs `Authorization: Bearer <token>`, compared with `timingSafeEqual`. `/health` and `/ready` stay open.
57
+ - A non-loopback `LOKI_CONTROL_HOST` without a token refuses to start: exit 2 with a line naming `LOKI_CONTROL_TOKEN`. Override: `LOKI_CONTROL_ALLOW_INSECURE_BIND=1`.
58
+ - On loopback, a request whose Host is not `127.0.0.1`, `localhost` or `[::1]` (any port) gets 403.
59
+ - The UI accepts `#token=` once, keeps it in sessionStorage and sends it on each call.
60
+ - Files:
61
+ - `packages/control-plane/src/server/auth.ts` (new), `packages/control-plane/src/server/app.ts`, `packages/control-plane/src/server/serve.ts`
62
+ - `packages/control-plane/ui/src/api.ts`, `packages/control-plane/ui/dist/**` (rebuild)
63
+ - `packages/control-plane/test/server/auth.test.ts` (new)
64
+ - `docs/v10/CONTROL-PLANE.md` (Auth section only)
65
+ - Wall checks:
66
+ - With a token: no header 401, wrong token 401, right token 200 on GET `/v1/runs`, POST `/v1/ingest`, POST `.../answer`.
67
+ - No token on loopback: behaviour unchanged, existing tests green.
68
+ - `serve.ts` with `LOKI_CONTROL_HOST=0.0.0.0` and no token exits 2 without binding (explicit env, port 0).
69
+ - `Host: evil.example` on loopback gives 403.
70
+ - Mutation: removing the middleware turns the 401 tests red.
71
+ - Commands: `cd packages/control-plane && bun test ./test/ && bun run typecheck && bun run build:all`
72
+ - CHANGELOG: "The Control Plane now enforces `LOKI_CONTROL_TOKEN` on every API call and refuses to listen on a non-loopback address without one."
73
+ - Docs: `docs/v10/CONTROL-PLANE.md` Auth section.
74
+ - Dependencies: none. Blocks C10.
75
+
76
+ ## C2 CP-DEFAULT: Control Plane on by default; local runs ship to it
77
+ - Tier: MEDIUM. Budget: 30 min.
78
+ - Goal:
79
+ - `LOKI_CONTROL` defaults on; `LOKI_CONTROL=0` prints one "off" line and exits 0.
80
+ - `serve` reads the child's "listening on" line and writes `~/.loki/control/instance.json` `{pid, port, url, version, install_path, db}` (mode 0600), removed when the CLI exits.
81
+ - The ship hook ships when `LOKI_CONTROL_URL` is set, or when `instance.json` names a live pid (`kill -0`) whose `/health` answers `service=loki-control` within 300 ms. It never starts a server. `LOKI_CONTROL=0` disables discovery.
82
+ - Files:
83
+ - `loki-ts/src/commands/control.ts`
84
+ - `packages/control-plane/src/shipper/discover.ts` (new)
85
+ - `loki-ts/src/e10ext/ship_hook.ts` (at most 8 lines)
86
+ - `loki-ts/src/engine10/supervisor.ts` (line 189 only, 1-line condition change)
87
+ - `loki-ts/tests/commands/control_default.test.ts` (new)
88
+ - `tests/test-control-plane.sh` (update the "ungated" assertion)
89
+ - `docs/v10/CONTROL-PLANE.md` (sections 5 and 6)
90
+ - README "Control Plane" section
91
+ - Wall checks:
92
+ - No `instance.json` gives zero fetch calls (injected fetch).
93
+ - A stale pid is ignored; a live stub `/health` with the wrong service is ignored; a valid instance gives one ship.
94
+ - `LOKI_CONTROL=0` gives no discovery.
95
+ - `instance.json` is mode 0600 and gone after serve exits.
96
+ - `budget.test.ts` passes (core under 5000, e10ext under 1500).
97
+ - Commands: `cd loki-ts && bun test tests/commands/control_default.test.ts tests/engine10/budget.test.ts && bunx tsc --noEmit`; `bash tests/test-control-plane.sh`
98
+ - CHANGELOG: "The Control Plane is on by default: `loki control serve` needs no flag, and runs on this machine appear in it automatically while it is running."
99
+ - Docs: `docs/v10/CONTROL-PLANE.md` sections 5 and 6, README Control Plane section.
100
+ - Dependencies: none. C3 builds against its `instance.json` contract.
101
+
102
+ ## C3 BASH-FLIPS: bare `loki` opens the Control Plane; workspace gate flips
103
+ - Tier: MEDIUM. Budget: 30 min.
104
+ - Goal:
105
+ - `cmd_ui` (bare `loki`) and `cmd_dashboard ""|start|open` use the Control Plane by default; `LOKI_CONTROL_DEFAULT=0` restores the old dashboard.
106
+ - Reuse a live `instance.json` URL; otherwise start `loki control serve` detached, record its PID and print the URL.
107
+ - Headless (`LOKI_HEADLESS=1`, `LOKI_NO_BROWSER=1` or `--no-open`): print only, never open.
108
+ - No bun: the old dashboard plus one line naming bun.
109
+ - `cmd_workspace`: the gate becomes "`LOKI_WORKSPACES=0` disables".
110
+ - Help lines 1633 and 1786 drop "preview" and "needs".
111
+ - Files:
112
+ - `autonomy/loki` (`cmd_ui`, `cmd_dashboard` head, `cmd_workspace`, the two help lines only)
113
+ - `tests/test-ui-bare-loki.sh` (pin the legacy leg to `LOKI_CONTROL_DEFAULT=0`; add a Control Plane leg with a python stub answering `/health` with `service=loki-control`)
114
+ - `docs/dashboard.md` or the nearest dashboard doc (one paragraph)
115
+ - Wall checks:
116
+ - Control Plane leg: bare `loki` with `LOKI_NO_BROWSER=1` and a stub `instance.json` prints the stub URL; the logging `open` stub has zero calls.
117
+ - Legacy leg output unchanged.
118
+ - No port in 57374-57399 bound (lsof on recorded PIDs).
119
+ - shellcheck on the changed test; `bash -n autonomy/loki`.
120
+ - Commands: `bash tests/test-ui-bare-loki.sh; bash -n autonomy/loki; shellcheck tests/test-ui-bare-loki.sh`
121
+ - CHANGELOG: "`loki` with no arguments now opens the Control Plane (set `LOKI_CONTROL_DEFAULT=0` for the previous dashboard)."
122
+ - Docs: dashboard doc paragraph.
123
+ - Dependencies: merges on the same train as C2 or one later.
124
+
125
+ ## C4 BLOCKED-RESUME: `loki answer` closes the BLOCKED loop
126
+ - Tier: MEDIUM. Budget: 30 min.
127
+ - Goal:
128
+ - New `loki answer [<run-id>] [--text "..."]`; default run is the newest BLOCKED run.
129
+ - Reads the run's task and question from events, and the answer from `--text` or the Control Plane answer file.
130
+ - Launches `bin/loki "<task>\n\nClarification answering \"<q>\": <a>"` with an explicit env (`LOKI_NO_BROWSER=1`; no `SLACK_*` and no `LOKI_CONTROL_TOKEN`) and prints the new run id.
131
+ - Refuses a run that is not BLOCKED (exit 2, says why).
132
+ - The Control Plane `writeAnswer` resume string becomes `loki answer <run>`.
133
+ - Files:
134
+ - `loki-ts/src/features/blocked_answer.ts` (new, at most 120 lines)
135
+ - `loki-ts/src/cli.ts` (`answer` case plus the `control` help line)
136
+ - `packages/control-plane/src/server/answer.ts` (resume string only)
137
+ - `loki-ts/tests/features/blocked_answer.test.ts` (new)
138
+ - `packages/control-plane/test/server/answer.test.ts` (resume assertion)
139
+ - `docs/v10/CONTROL-PLANE.md` ("Answering a BLOCKED run" section)
140
+ - README "Answering a BLOCKED run" paragraph
141
+ - Wall checks:
142
+ - A fixture BLOCKED run plus an answer file gives a spawn argv containing the task, question and answer (spawn injected).
143
+ - The env lacks `SLACK_BOT_TOKEN` and has `LOKI_NO_BROWSER=1`.
144
+ - A non-BLOCKED run gives exit 2.
145
+ - The features budget test passes.
146
+ - Commands: `cd loki-ts && bun test tests/features/blocked_answer.test.ts tests/engine10/budget.test.ts && bunx tsc --noEmit`; `cd packages/control-plane && bun test test/server/answer.test.ts`
147
+ - CHANGELOG: "`loki answer` resumes a BLOCKED run with the answer typed in the Control Plane (or `--text`)."
148
+ - Docs: CONTROL-PLANE.md section and README paragraph above.
149
+ - Dependencies: CLI reachability via C5 (unit tests independent).
150
+
151
+ ## C5 ROUTING: shim entry points for D65 features
152
+ - Tier: MEDIUM. Budget: 20 min.
153
+ - Goal:
154
+ - The `bin/loki:570` Bun allowlist gains `slack|answer`.
155
+ - v10 routing (top level and the `start` case) gains `jira:*|linear:*|https://linear.app/*/issue/*`.
156
+ - Files:
157
+ - `bin/loki`
158
+ - `tests/test-d65-routing.sh` (new, `timeout -k`)
159
+ - `tests/run-all-tests.sh` (one `run_test` row)
160
+ - `tests/shard-durations.tsv` (one row)
161
+ - Wall checks:
162
+ - With a probe bun that echoes argv: `loki slack serve` and `loki answer x` reach `cli.ts`; `loki jira:ABC-1`, `loki linear:ENG-2` and a Linear URL reach `engine10`; one-word `loki foo` stays legacy.
163
+ - Real-CLI leg: `loki jira:ABC-1` with no `JIRA_*` env exits non-zero in under 5 s, names `JIRA_BASE_URL`, and the stub claude logs zero calls.
164
+ - `tests/test-shard-coverage.sh` and shellcheck pass.
165
+ - Commands: `bash tests/test-d65-routing.sh; bash tests/test-shard-coverage.sh; shellcheck bin/loki tests/test-d65-routing.sh`
166
+ - CHANGELOG: "`loki jira:KEY`, `loki linear:KEY`, Linear issue URLs and `loki slack serve` now reach the Loki 10 engine directly."
167
+ - Docs: none beyond C6 and C7 docs.
168
+ - Dependencies: none. Merge early; C4, C6, C7, C11a, C11b CLI-level checks rely on it.
169
+
170
+ ## C6 SLACK: two-way Slack polished and on by default
171
+ - Tier: MEDIUM. Budget: 25 min.
172
+ - Goal:
173
+ - Inbound defaults on; `LOKI_SLACK_INBOUND=0` disables.
174
+ - With no `SLACK_BOT_TOKEN` or `SLACK_SIGNING_SECRET`: one line naming both, exit 2, nothing bound.
175
+ - The launcher spawns `REPO_ROOT/bin/loki` (not `argv[1]`) with an explicit env that strips both Slack secrets and sets `LOKI_NO_BROWSER=1`.
176
+ - The poster logs an HTTP failure as one redacted line.
177
+ - Outbound unchanged: no webhook, no call.
178
+ - Files:
179
+ - `loki-ts/src/features/slack_inbound.ts`
180
+ - `loki-ts/tests/features/slack_inbound.test.ts`
181
+ - `docs/slack.md`
182
+ - README Slack paragraph (around line 173)
183
+ - Wall checks:
184
+ - No credentials: exit 2 and `Bun.serve` never called (injected).
185
+ - Spawn argv[0] ends in `bin/loki`; env lacks both Slack secrets.
186
+ - Signed `url_verification` returns the challenge; a bad signature returns 401.
187
+ - BLOCKED (exit 4) posts the question; a thread reply relaunches with the clarification.
188
+ - `LOKI_SLACK_INBOUND=0` gives exit 2 with the disabled line.
189
+ - Commands: `cd loki-ts && bun test tests/features/slack_inbound.test.ts && bunx tsc --noEmit`
190
+ - CHANGELOG: "Two-way Slack is on by default: with a bot token and signing secret, `@loki <task>` in a thread starts a run and a BLOCKED question is answered in the same thread."
191
+ - Docs: `docs/slack.md`, README Slack paragraph.
192
+ - Dependencies: CLI reachability via C5.
193
+
194
+ ## C7 TRACKERS: Jira and Linear intake polish
195
+ - Tier: MEDIUM. Budget: 20 min.
196
+ - Goal:
197
+ - `LOKI_TRACKER_INTAKE=0` kill switch (`parseTrackerRef` returns null).
198
+ - Self-hosted Jira: `<JIRA_BASE_URL>/browse/KEY` parses when its origin equals `JIRA_BASE_URL`.
199
+ - Error text names the exact variables per tracker (the one fix).
200
+ - Linear: `errors[]` with no data, or HTTP 401, names `LINEAR_API_KEY`.
201
+ - Intake only; no sync claims.
202
+ - Files:
203
+ - `loki-ts/src/features/tracker_intake.ts`
204
+ - `loki-ts/tests/engine10/tracker_intake.test.ts`
205
+ - `docs/trackers.md` (new)
206
+ - README "Issue intake" paragraph
207
+ - Wall checks:
208
+ - Injected fetch only; zero network.
209
+ - Self-hosted URL parses only when `JIRA_BASE_URL` matches, else null.
210
+ - Kill switch gives null.
211
+ - Missing credentials: message names the variable.
212
+ - ADF fixture output unchanged.
213
+ - Commands: `cd loki-ts && bun test tests/engine10/tracker_intake.test.ts && bunx tsc --noEmit`
214
+ - CHANGELOG: "Jira (cloud and self-hosted) and Linear issues start a Loki 10 run with `loki jira:KEY` or `loki linear:KEY`, using credentials from the environment only."
215
+ - Docs: `docs/trackers.md`, README Issue intake paragraph.
216
+ - Dependencies: CLI reachability via C5.
217
+
218
+ ## C8 WORKSPACES: multi-repo parity and the flag flipped
219
+ - Tier: MEDIUM. Budget: 30 min.
220
+ - Goal:
221
+ - `enabled()` defaults on; `LOKI_WORKSPACES=0` disables.
222
+ - Repos with no pending `after` run in parallel, bounded by `concurrency` (default 2).
223
+ - Add `show <ws>` and `status [<run>]`, reading `integration.json`.
224
+ - Exit 3 when the only non-ok outcomes are budget stops (child exit 3); 1 otherwise.
225
+ - SIGINT handled like SIGTERM (killpg on recorded PIDs).
226
+ - Files:
227
+ - `autonomy/lib/workspace.py`
228
+ - `tests/test_workspace.py`
229
+ - `tests/workspace/50-run.sh` (new part, auto-sourced by the registered `tests/test-workspace.sh`)
230
+ - `docs/WORKSPACES.md`
231
+ - `docs/v10/D51-PHASE-B.md` (status block)
232
+ - `tests/docs-drift-allowlist.tsv` (remove rows 44-46; the commands now exist)
233
+ - Wall checks (stub launcher):
234
+ - Two independent repos overlap in time (start timestamps).
235
+ - The `after` dependent starts after its predecessor; a failed predecessor makes it SKIPPED.
236
+ - All children exiting 3 gives group exit 3.
237
+ - `status` prints per-repo rows.
238
+ - `LOKI_WORKSPACES=0` gives exit 2.
239
+ - The docs drift guard passes.
240
+ - Commands: `python3 -m pytest tests/test_workspace.py -q && bash tests/test-workspace.sh` plus the suite that reads `docs-drift-allowlist.tsv`
241
+ - CHANGELOG: "Multi-repo workspaces are on by default: `loki workspace run <ws> <ref>` runs each repo in parallel, respects `after` ordering and records integration evidence."
242
+ - Docs: `docs/WORKSPACES.md`, `docs/v10/D51-PHASE-B.md`.
243
+ - Dependencies: the bash gate flip is in C3; `workspace.py` is gated independently, so either order works.
244
+
245
+ ## C9 MCP: v10 tools wired into CI and documented
246
+ - Tier: MEDIUM. Budget: 20 min.
247
+ - Goal:
248
+ - `mcp/tests/test_v10_tools.py` runs in CI through the existing `tests/test-mcp-server.sh` (no new runner row).
249
+ - `_env()` forces `LOKI_NO_BROWSER=1` and drops `LOKI_CONTROL_TOKEN` and the Slack secrets.
250
+ - `v10_status` returns `blocked_question` when the verdict is BLOCKED.
251
+ - `v10_run` passes `jira:` and `linear:` refs through; the leading-dash guard stays.
252
+ - Files:
253
+ - `mcp/v10_tools.py`
254
+ - `mcp/tests/test_v10_tools.py`
255
+ - `tests/test-mcp-server.sh`
256
+ - `docs/mcp.md` (or the existing MCP doc)
257
+ - README MCP section (with the `claude mcp add` line)
258
+ - Wall checks:
259
+ - pytest green.
260
+ - The suite counts the v10 tests (positive control: one deliberately failing assert, run locally, turns the suite red).
261
+ - Child env has no secrets.
262
+ - A BLOCKED fixture returns the question.
263
+ - `tests/test-mcp-tool-surface-packaged.sh` still lists all three tools.
264
+ - Commands: `python3 -m pytest mcp/tests/test_v10_tools.py -q && bash tests/test-mcp-server.sh && bash tests/test-mcp-tool-surface-packaged.sh`
265
+ - CHANGELOG: "The MCP server's `loki_v10_run`, `loki_v10_status` and `loki_v10_verify` tools are tested in CI and report a BLOCKED run's question."
266
+ - Docs: MCP doc, README MCP section.
267
+ - Dependencies: none.
268
+
269
+ ## C10 CONTAINERS: image, Helm and ECS aligned with token auth
270
+ - Tier: MEDIUM (the reviewer reads C1). Budget: 20 min.
271
+ - Goal:
272
+ - Dockerfile: drop the "no authentication" comment; document that `LOKI_CONTROL_TOKEN` is required on `0.0.0.0`.
273
+ - Helm: `controlToken.existingSecret` required, failing at template time when unset (`required`), unless `allowInsecureBind: true` sets `LOKI_CONTROL_ALLOW_INSECURE_BIND=1`.
274
+ - ECS: already maps the token; README states it.
275
+ - Files:
276
+ - `Dockerfile.control-plane`
277
+ - `deploy/helm/control-plane/**`
278
+ - `deploy/ecs/**`
279
+ - `docs/control-plane-container.md`
280
+ - `packages/control-plane/test/deploy/container.test.ts`
281
+ - Wall checks (static, no helm or docker needed):
282
+ - The deployment template references the `LOKI_CONTROL_TOKEN` `secretKeyRef` and a `required` guard.
283
+ - The ECS task carries `LOKI_CONTROL_TOKEN` via `valueFrom`.
284
+ - Dockerfile has `USER loki`, a HEALTHCHECK on `/ready`, and no "no authentication" text.
285
+ - If `helm` is on PATH: `helm template` without the secret fails and with it succeeds. Otherwise the test prints SKIP (helm absent) and never passes silently.
286
+ - Commands: `cd packages/control-plane && bun test test/deploy/`
287
+ - CHANGELOG: "The Control Plane container, Helm chart and ECS task now require an access token whenever the service is exposed beyond localhost."
288
+ - Docs: `docs/control-plane-container.md`, `deploy/helm/README.md`, `deploy/ecs/README.md`.
289
+ - Dependencies: ships on the same train as C1 or later, never before.
290
+
291
+ ## C11a E2E-HARNESS: hermetic `npm pack` E2E, legs 1-4
292
+ - Tier: MEDIUM. Budget: 30 min.
293
+ - Goal: `scripts/e2e-d65.sh`
294
+ - `npm pack`, install into a temp prefix under a run-owned dir (`loki_run_tmp_create` pattern) with a throwaway `HOME` and `npm_config_cache`.
295
+ - Stub `claude` on PATH (reuse the `first-run-gate.sh` stub shape; writes only on a real `-p` call).
296
+ - `LOKI_E10_INVOKER=cli`, `LOKI_CLAUDE_CLI=<stub>`, `LOKI_NO_BROWSER=1`, `GIT_CONFIG_GLOBAL=/dev/null`; no `*_API_KEY` or `*_TOKEN` (`env -i` plus an allowlist).
297
+ - Sources `scripts/e2e-d65/legs/*.sh`; prints one `PASS|FAIL|SKIP(<reason>)` per leg; exit 0 if and only if there is no FAIL.
298
+ - `E2E_FORCE_FAIL=<leg>` is a positive control.
299
+ - Legs:
300
+ - 1 D61 speed: `LOKI_SPEED=1` on a 2-file fixture task; receipt exists.
301
+ - 2 Visual evidence: no Playwright gives a NOT PROVEN line, not a failure.
302
+ - 3 Control Plane: `serve --port 0` (recorded PID); a run ships via `instance.json`; GET `/v1/runs` has at least one row; POST `answer` on the BLOCKED fixture returns 200.
303
+ - 4 Slack: `serve --port 0` with fake secrets; signed `url_verification` returns the challenge; bad signature returns 401; nothing outbound.
304
+ - Files:
305
+ - `scripts/e2e-d65.sh` (new)
306
+ - `scripts/e2e-d65/legs/01-speed.sh`, `02-visual.sh`, `03-control.sh`, `04-slack.sh` (new)
307
+ - `scripts/e2e-d65/stub-claude.sh` (new)
308
+ - Wall checks:
309
+ - shellcheck clean.
310
+ - A run on the current tree exits 0, or each FAIL names a bug.
311
+ - `E2E_FORCE_FAIL=3` gives exit 1.
312
+ - Afterwards no recorded PID is alive and the run dir is removed.
313
+ - Commands: `bash scripts/e2e-d65.sh` (timeout 10 min); `shellcheck scripts/e2e-d65.sh scripts/e2e-d65/*.sh scripts/e2e-d65/legs/*.sh`
314
+ - CHANGELOG: none (tooling); C11b documents it in `docs/v10/E2E-D65.md`.
315
+ - Dependencies: final run after C1-C10 merge; leg 3 needs C2, leg 4 needs C5 and C6.
316
+
317
+ ## C11b E2E-LEGS: legs 5-9 and the results doc
318
+ - Tier: MEDIUM. Budget: 30 min.
319
+ - Legs:
320
+ - 5 Jira: `jira:ABC-1` against a local fake `JIRA_BASE_URL=http://127.0.0.1:<port0>` gives a run whose `issue.json` has `source=jira`; with no credentials it exits fast naming the variable.
321
+ - 6 Spec to contract: a `.loki/contract.json` fixture gives a receipt containing the contract section.
322
+ - 7 Multi-repo: two local git repos in `loki.yaml` give two runs plus `integration.json`.
323
+ - 8 MCP: `python3` imports `mcp.v10_tools` from the installed package; `v10_status` then `v10_verify` on leg 6's repo.
324
+ - 9 Containers: deploy files exist in the repo; if `docker` is on PATH and the daemon answers, build `Dockerfile.control-plane` and probe `/ready` on a random host port; otherwise SKIP(docker unavailable), never PASS.
325
+ - Results doc: append section 6 "Stub E2E (`scripts/e2e-d65.sh`)" to `docs/v10/E2E-D65.md` with version, date, per-leg table (exit codes, seconds), the note that BUG-2 is resolved by `LOKI_E10_INVOKER=cli`, and which legs SKIP and why.
326
+ - Files:
327
+ - `scripts/e2e-d65/legs/05-jira.sh`, `06-contract.sh`, `07-workspaces.sh`, `08-mcp.sh`, `09-containers.sh` (new)
328
+ - `docs/v10/E2E-D65.md`
329
+ - Wall checks: as C11a, plus every leg is cited with its rc line in the doc.
330
+ - Commands: `bash scripts/e2e-d65.sh` (with the C11a harness)
331
+ - CHANGELOG: none (tooling).
332
+ - Docs: `docs/v10/E2E-D65.md`.
333
+ - Dependencies: C11a harness; leg 5 needs C5 and C7, leg 7 needs C8, leg 8 needs C9, leg 9 needs C10.
334
+
335
+ ## C12 STUB-INVOKER (optional; drop if fix-e2e-bugs already owns BUG-2)
336
+ - Tier: MEDIUM. Budget: 15 min.
337
+ - Goal: setting `LOKI_CLAUDE_CLI` implies `LOKI_E10_INVOKER=cli`, so a stub path alone drives v10. Core edit at most 3 lines.
338
+ - Files:
339
+ - `loki-ts/src/engine10/session.ts` (around line 39 only)
340
+ - `loki-ts/tests/engine10/session_invoker.test.ts` (new)
341
+ - `docs/v10/FIRST-RUN-GATE.md` (one line)
342
+ - Wall checks:
343
+ - `LOKI_CLAUDE_CLI` set: env has no `LOKI_SDK_LOOP`.
344
+ - Unset: unchanged (`LOKI_SDK_LOOP=1`).
345
+ - Budget test passes.
346
+ - Commands: `cd loki-ts && bun test tests/engine10/session_invoker.test.ts tests/engine10/budget.test.ts`
347
+ - CHANGELOG: "Setting `LOKI_CLAUDE_CLI` now selects the Claude CLI invoker, so a stub or custom `claude` binary drives Loki 10 directly."
348
+ - Docs: `docs/v10/FIRST-RUN-GATE.md`.
349
+ - Dependencies: none; C11a works without it.
350
+
351
+ ---
352
+
353
+ ## Ordering and parallelism
354
+ All 12 cards can start now; file sets do not overlap. C1 (HIGH, opus reviewer) is the critical path and goes on the first train; C10 ships on the same train or later. C5 merges early because the CLI-level checks of C4, C6, C7 and both E2E cards reach their commands through it. C2 and C3 together make the Control Plane the default; they build in parallel against C2's `instance.json` contract, and C3 merges on the same train as C2 or one later. C11a and C11b start in parallel, but the final E2E runs only on a tree containing C1-C10. C12 goes only if fix-e2e-bugs has not fixed BUG-2. With 8 engineers: C1, C5, C2, C6, C7, C8, C9, C4 first; then C3, C10, C11a, C11b, C12 as seats free. Only C1 needs the HIGH review.
@@ -515,3 +515,47 @@ The D61 decomposer (125 lines) does not fit: engine10 core is at 4,993 of its 5,
515
515
  - D34 and D38 are unchanged. lg- and tier "large" mean only real upstream PR tasks. measure-size.py runs over every task with no name exclusion, and a test proves an unsized lg- task fails it.
516
516
  - Speed-tier results measure decomposer choice and wall-time ratio only. They are never published as large-tier, "any size" or completion-at-scale claims.
517
517
  - The LOKI_SPEED default flips only when D61 section 5 B and 5 C hold on the speed tier and LOKI_SPEED=1 is no worse than LOKI_SPEED=0 on completion, p50 wall and tokens per completed across the real medium tasks and any D34 large tasks on main, at 2 runs per arm. A loss on any axis keeps the default off.
518
+
519
+ ## D68: D65 12-hour mandate (founder, about 03:00Z 2026-10-03, relayed by autonomi-dev-76)
520
+ - Founder's words: "steer with highest velocity for releasing asap everything to complete all implementation roadmap within this time.. no excuses". Deadline 15:00Z 2026-10-03; work continues after it.
521
+ - Goal: every D63 item released to npm latest with flags ON and documented. An item whose opus D12 review has not passed ships flags-off and is named in the handoff.
522
+ - The per-hour governor pace is lifted for 12 hours. The only usage floor is 85% of the week on live /usage (03:01Z reading: 46%). Builders scale with CI and machine load. train-cycle runs every 10 to 15 minutes; red slices are dropped, never held.
523
+ - Unchanged: CI gates (no waivers), no stored credentials read (real-model E2E legs stay parked), P9 rerun once in full with the new diagnostics, never added to pending.txt.
524
+ - Every release carries a CHANGELOG sentence, README and docs in the same slice, and a version report to the peer. docs/v10/MORNING-BRIEF-1003.md is written at 14:30Z (60 lines max).
525
+
526
+ ## D69: no founder waits (founder, about 03:05Z 2026-10-03, relayed by autonomi-dev-76)
527
+ - Founder's words: "lokimode session should never prompt me or wait for me for anything ... complete all work with chief of staff and software factory it is".
528
+ - The Chief of Staff and the CTO role decide every call that would go to the founder: product, scope, ordering, D12 sign-offs through the opus reviewer, and flag flips. Each decision is logged here with its rationale so the founder can reverse it.
529
+ - Anything only the founder can physically do (credentials, licensing, external accounts, posting as himself) becomes a non-blocking FOUNDER-QUEUE.md row; work goes around it.
530
+ - Safety rules are not founder waits and still hold: CI gates, no stored keys read, never kill by pattern, the Never list, and repo configuration (CLAUDE.md, .claude/settings.json) is not edited on a relayed request.
531
+
532
+ ## D70: contract and visual evidence default ON (Chief of Staff and CTO role, 03:08Z 2026-10-03, under D68 and D69)
533
+ - The opus D12 HIGH re-review (af6ddde5) approved both after reproducing C1 and B1-B3 on the pre-fix parent and showing them fixed. D68 asks for flags on once D12 passes.
534
+ - LOKI_CONTRACT and LOKI_VISUAL_EVIDENCE default to on; `=0` turns each off. Contract only acts when .loki/contract.json exists. Visual evidence only acts when Playwright is present and pages changed, inside its 25s budget, and otherwise writes a NOT PROVEN line, never a failure.
535
+ - Rationale: both fail closed or advisory (neither can raise a verdict to VERIFIED); the remaining should-fixes (D65-SPEC-F1, D62-VIS-F1, D65-SPEC-F2) are non-blocking and build in parallel. Reverse by setting the defaults back to off.
536
+
537
+ ## D71: D61 parallel-units code lives under loki-ts/src/features/speed (CTO role, 03:08Z 2026-10-03)
538
+ - Core engine10 measures 4936 lines against the 5000 cap (D29, D33, D42), so 64 lines remain. The cap is a gate and is not raised.
539
+ - New D61 modules (decompose check, unit mode, integrator, group seal helpers, group output) go under loki-ts/src/features/speed/ (features budget 3000, 993 used). Each slice may add at most 10 lines of hook code to core engine10; the wave's total stays under 60, and structural-checks.sh must pass on every merge.
540
+ - engine10/decompose.ts (slice 8) stays where it is.
541
+
542
+ ## D72: drop D63-C12 (stub invoker via LOKI_CLAUDE_CLI alone) (CoS with CTO, 04:13Z 2026-10-03)
543
+ - Opus HIGH review blocked 7a83f2fa8: setting LOKI_CLAUDE_CLI alone switches to the CLI invoker, so a paid run records $0 with source "cli-invoker-unmetered", and supervisor.ts disagrees with the receipt. That breaks cost honesty in the receipt.
544
+ - The card marked C12 optional, and an explicit LOKI_E10_INVOKER=cli already selects the CLI invoker for the stub-provider gate. Dropping it costs no user capability.
545
+ - C11b and the D65 stub E2E use LOKI_E10_INVOKER=cli explicitly. Row set to rejected; no founder input needed (D69).
546
+
547
+
548
+ ## D60-5 addendum: INTEL-2 closed (visible cost cap)
549
+ The $20.00 default per-run cap stays. It is a hard stop on priced sessions only; lower it with one line in loki.yaml (`budgets.per_run`) or `--max-cost`. Every v10 start line shows the cap and its source (`--max-cost`, `loki.yaml` or `default`). A run that reaches it ends BUDGET_STOP with exit 3. Unpriced sessions (subscription or local providers) never count, so the cap never fires on a guess. Proven end to end through the CLI for the flag, the yaml key and flag-over-yaml precedence (loki-ts/tests/engine10/budget_stop_e2e.test.ts, commit 0cc189106). The typical cost of a fast run has not been measured yet; the default is not justified by a run-cost figure.
550
+
551
+ ## D73: drop D61-12 (integrator) from the 10-03 window (CoS with CTO, 04:47Z 2026-10-03, under D68 and D69)
552
+ - Round 8 opus review of 35a7b0c32 reproduced four cases (C1-C4) and one regression (S3) where a unit's change is missing from HEAD while the group reports merged and ready, plus a false failure on a mode-only change (E6). Probe: scratchpad rev-d61-12-r8/r8.test.ts.
553
+ - Round 8 was declared final. Eight rounds on a HIGH Seal-adjacent surface without convergence means the per-path containment design needs rework, not another patch.
554
+ - D61-12 is parked. D61 ships without an integrator: parallel units stay behind their flag and the integrator is not in the shipped feature set. Named in the handoff as not shipped.
555
+ - Next window: redesign around per-resolution-commit containment (B at R^1, X at R, H at HEAD) and a revert guard for covered units, as the reviewer proposed.
556
+
557
+
558
+ ## D74: gitleaks job timeout 15 -> 30 min (CoS under D69, 07:25Z 2026-10-03)
559
+ - Evidence: the gitleaks full-history scan took 8-15 min on trains 83-87 and was cancelled at the 15 min limit on trains 86, 88, 89 and 90 ("gitleaks scan (all reachable history) ##[error]The operation was canceled", run 37104195817 attempt 2). Every other Security Audit job passed.
560
+ - Decision: raise timeout-minutes to 30. Same scan, same config, same blocking posture; nothing is narrowed or skipped, so this is not a gate weakening.
561
+ - Follow-up slice: make the scan scale (incremental scan against a reviewed baseline commit) before history doubles again. Any change to scan scope needs a CTO pass.
@@ -85,3 +85,31 @@ grep -rIl -E 'sk-ant-|oat01-' "$HOME/loki-ci-logs/real-repo-gate-e2e.logs" || ec
85
85
  ```
86
86
 
87
87
  Pass criteria per repo are in `scripts/real-repo-gate.repos` (expected outcome, allowed diff paths, max seconds); evidence to record for the log: exit code, wall seconds, Outcome line, receipt path, `loki verify` verdict.
88
+
89
+ ## 6. Stub E2E (`scripts/e2e-d65.sh`)
90
+
91
+ Hermetic run on loki-mode 10.6.8 (tree 158d977ba plus the C11b legs), 2026-10-03. The script runs `npm pack`, installs the tarball into a run-owned temp prefix (throwaway `HOME` and npm cache), puts a stub `claude` on PATH and drives the INSTALLED `loki` under `env -i` with an allowlist: no `*_API_KEY`, no `*_TOKEN` (only fake values such as `JIRA_API_TOKEN=e2e-fake-token`). Command: `LOKI_NO_BROWSER=1 timeout 600 bash scripts/e2e-d65.sh`; total 19 s, script rc=1 (two FAIL legs, both named product bugs below).
92
+
93
+ BUG-2 (the v10 engine ignored the stub `claude`) is resolved by `LOKI_E10_INVOKER=cli` plus `LOKI_CLAUDE_CLI=<stub>`, which the harness sets for every leg: legs 1, 2, 5 and 6 each produced a receipt with run rc=0 and no `Not logged in`.
94
+
95
+ | Leg | Result | Wall | rc line (from the run) |
96
+ |---|---|---|---|
97
+ | 1 D61 speed | PASS | 1 s | `loki quick rc=0 run=e10-20261003T053414Z-f543` |
98
+ | 2 Visual evidence | PASS | 1 s | `loki quick rc=0 run=e10-20261003T053416Z-13df`; NOT PROVEN line present |
99
+ | 3 Control Plane | PASS | 1 s | `blocked run rc=4 run=e10-20261003T053417Z-a324`; `POST answer ... -> 200` |
100
+ | 4 Slack | PASS | 1 s | signed `url_verification` returned the challenge; bad signature 401; no outbound connection |
101
+ | 5 Jira | PASS | 1 s | `loki quick jira:ABC-1 rc=0 run=e10-20261003T053418Z-d497`, `issue.json has source=jira`; `no-credentials rc=2 in 0s`, names `JIRA_EMAIL`/`JIRA_API_TOKEN` |
102
+ | 6 Spec to contract | PASS | 1 s | `loki quick rc=0 run=e10-20261003T053419Z-7afd`; receipt has the `contract` section with AC-1 |
103
+ | 7 Multi-repo | FAIL | 1 s | `loki workspace run rc=2`, `receipts=0 integration.json=none` (BUG-5) |
104
+ | 8 MCP | PASS | 0 s | `python rc=0`; `v10_status` done/VERIFIED, `v10_verify` `exit_code` 0 on leg 6's repo |
105
+ | 9 Containers | FAIL | 3 s | deploy files present; docker daemon answered; `docker build` failed (BUG-6) |
106
+
107
+ SKIP legs: none in this run. Leg 8 would SKIP if leg 6 had not produced a run, and leg 9 SKIPs with `SKIP(docker unavailable)` when `docker` is missing or `docker info` does not answer within 10 s; it never passes without a real `/ready` 200 probe on a random host port.
108
+
109
+ Positive control: `E2E_LEGS=6 E2E_FORCE_FAIL=6 bash scripts/e2e-d65.sh` prints `FAIL leg 6 ... forced by E2E_FORCE_FAIL=6 (positive control)` and exits 1. After each run the recorded PIDs (control-plane servers, the fake Jira `http.server`, the Slack proxy trap) are stopped by PID and the run directory is removed; nothing outside the run dir was touched.
110
+
111
+ New bugs found by this run (product code is not changed by this slice):
112
+
113
+ BUG-5 (P1, packaging): the npm package omits `schemas/`, so `loki workspace` fails on every installed copy. `package.json` `files` has no `schemas/` entry, while `autonomy/lib/loki_yaml.py:23` reads `schemas/loki-yaml.schema.json` relative to the package root. Repro: install the tarball, put a `workspaces:` block in `loki.yaml`, run `loki workspace run <name> <task>`; output `workspace: cannot read loki.yaml: [Errno 2] No such file or directory: '.../node_modules/loki-mode/autonomy/lib/../../schemas/loki-yaml.schema.json'`, rc=2. Leg 7 stays FAIL until `schemas/loki-yaml.schema.json` ships; the two-runs and `integration.json` assertions were therefore not reached.
114
+
115
+ BUG-6 (P1, container): `Dockerfile.control-plane` cannot build. Its build stage copies only `packages/control-plane/`, but `packages/control-plane/src/server/ingest.ts:3` and `:5` import `../../../../loki-ts/src/engine10/events.ts` and `../../../../loki-ts/src/util/redact.ts`. Repro: `docker build -f Dockerfile.control-plane .` fails at `RUN bun run build:all` with `error: Could not resolve: "../../../../loki-ts/src/engine10/events.ts"` and `.../util/redact.ts`. The `/ready` probe was therefore not reached and leg 9 is FAIL, not PASS.
@@ -1911,3 +1911,66 @@ The swarm is stopped: .loki/V10-STOP exists, the loop has no wake-ups, and the c
1911
1911
  - D62 (resume now) and D63 (roadmap, docs/v10/ROADMAP-D63.md) recorded and pushed (main 49a940d81). D64 (max pace, all Vorflux rows) arrived at 00:20Z and was withdrawn at 00:25Z; recorded as WITHDRAWN, no builder started.
1912
1912
  - Building (sonnet, worktrees): D61-17 large eval tier, D61-01 pre-model timer, D61-08 decomposer, D62-FIX (action.yml to Loki 10 plus real BUDGET_STOP exit 3 test). Ready next: D61-02, D61-07, D62-VIS, D62-JIRA.
1913
1913
  - Governor: weekly projected 57.4% at 01:55Z; pace target about 0.5% of the week per hour at 4 engineers.
1914
+
1915
+ ## 2026-10-03T03:04Z Train 82 in CI; HIGH re-review APPROVES contract and visual evidence
1916
+ - Train 82 (e072e47a9) carries every D61, D62 and D65 slice from trains 80 and 81 plus fixes: CI fixes dc1fa634f, contract spawn env 32b9db508, visual evidence B1-B3 e035e9929, P9 diagnostic capture e3b353e7a. Local gates: bun test 2905 pass 0 fail, dist guard 13/0, moat rc=0.
1917
+ - CI on train/82 so far: Bun Parity, First-run gate, Tier A, Coverage (baseline) success; Tests and Security Audit running.
1918
+ - HIGH re-review (opus, af6ddde5): APPROVE both. C1 and B1-B3 each reproduced on the pre-fix parent and shown fixed. Its release-gate item (stale dist) is already met: e072e47a9 dist contains "seal aborted", "keyword_match", "contract trace failed" (1 each) and no "untraced: " line.
1919
+ - Five non-blocking should-fixes filed as D65-SPEC-F1, D65-SPEC-F2 (HIGH, design) and D62-VIS-F1.
1920
+ - LOKI_CONTRACT and LOKI_VISUAL_EVIDENCE stay default off; flipping them is a separate decision.
1921
+ - Reviewer incident: a failed cd ran `loki contract` in the main checkout and wrote .loki/contract.json (gitignored); the reviewer removed it, confirmed absent at 03:04Z.
1922
+
1923
+ ## 2026-10-03T03:20Z train/83 red, P0-D66-FENCE
1924
+ - train/83 (1a63ad156) Coverage (baseline) failure: run 37092508809, `features size and import budget (D66)` fails on "speed/lean_select.ts imports ../../engine10/stages/plan.ts without a whole-statement 'import type'" (local repro: `bun test tests/engine10/budget.test.ts` 26 pass 1 fail).
1925
+ - Cause: D61-03 (999ea6af3) value-imports selectRelevantFiles from stages/plan.ts. Fix-forward slice P0-D66-FENCE dispatched (dependency injection, test untouched). Train 83 will not release; train 84 carries the fix.
1926
+ - Guard gap: the D61-03 engineer and TL did not run budget.test.ts. Every features/ slice prompt now names it as a required command.
1927
+ - Dispatched D63 cards C1 (HIGH), C2, C5, C8, C9, C12 and D61-10-F1; reviews: D61-04 (opus), D61-12 re-review (opus).
1928
+
1929
+ ## 2026-10-03T03:56Z v10.6.8 released, train 85 staged, train 86 reviewed
1930
+ - v10.6.8 released from main d95095d9d (train/82 tree e072e47a9; Tests, Bun Parity, Coverage, Security Audit, First-run green on that SHA). Peer told; D49 auto-promote pending (npm latest 10.6.7 at 03:46Z).
1931
+ - train/84 (b45cc902e, carries P0-D66-FENCE) CI running.
1932
+ - Train 85 on local main 52c3b0e02: C5, C9, C7, D61-10-F1, D61-16, C4 plus dist (dist guard 13/0). local-ci fast tier hit the 590s cap (rc 124) after 76 PASS, 0 FAIL, bun test PASS; train CI is the authority.
1933
+ - Train 86 fully reviewed: C2 00f6741d9 (opus) + C2-F 3177c28ba + C2-F2 3fca6590d (TL, preload mutation goes red), C3 e41381751 + C3-F 362e9c501 (TL, 20/0), C11a 50a75bcfa (TL; legs 1-2 PASS, positive control rc 1).
1934
+ - D61-12 round 4 opus BLOCK (B3: repo filter driver fooled the fresh verify checkout). Round 5 630772f97 fixes B3, N1, N5, N7 (integrate tests 68/0); opus round 5 running.
1935
+ - In review: C6 (HIGH), C1 (HIGH), C8, C12 (HIGH), D61-04, D61-11, D61-13, D61-16-F, VIS-F1. Next: BUG-C (slack --port 0) after C6, C10 after C1, C11b after train 86.
1936
+
1937
+ ## 2026-10-03T04:13Z Train 85 pushed (2cc94a548), C1 approved, C12 dropped
1938
+ - Train 84 went stale behind the v10.6.8 release commit (train-cycle B: TRAIN_STALE); merged origin/main into local main (dist conflict resolved by rebuild, dist guard 13/0) and pushed train/85 (train-cycle A: TRAIN_PUSHED).
1939
+ - Train 85 carries C2, C3, C4, C5, C7, C9, C11a, D61-10-F1, D61-16, D61-16-F (opus APPROVE round 3) and C8 (TL APPROVE). Main moat on bf3e42066: 4 of 9, rc 0. Local-ci hit the 590s cap at 43 PASS, 0 FAIL.
1940
+ - C1 round 2 opus APPROVE (7ca8f9832); held until C10 so the Dockerfile and Helm chart do not exit 2 on a tokenless 0.0.0.0 bind. C10 builder dispatched on top of C1.
1941
+ - C12 dropped (D72). D61-12 round 6 BLOCK; round 7 fix running. Opus round 2 reviews running for D61-04, D61-13, C6, D61-11.
1942
+ - Deferred cleanup (no compound rm mid-window): review scratch dirs rev-d61-16-f-r3, rev-d61-12-r6, and 12 git-home dirs leaked by the D61-12 tests (reviewer removed 2 it owned).
1943
+
1944
+
1945
+ ## 2026-10-03T04:40Z CoS tick
1946
+ - Train 85 Tests red twice in full (run 37095579466): control_default "serve needs no flag; instance.json is 0600" times out on ubuntu only (passes on macOS 13/0). Real cause, so P0-CONTROL-LINUX dispatched (D68). Train 85 will not promote; train 86 supersedes it once green.
1947
+ - Merged to local main: C1, C10, INTEL-2, C6, C6-F (TL APPROVE e8837ffa4), D61-13 (opus r3 APPROVE a2c3d9cb2); dist 7ad4a44e9.
1948
+ - Core engine10 at 5001 after D61-13 (budget.test needs < 5000): P0-CORE-BUDGET dispatched. Train 86 waits on it and on P0-CONTROL-LINUX.
1949
+ - D61-04 r3 BLOCK (live-tree read), r4 fix 9d2bbf4b9 in opus review. D61-12 r7 BLOCK, r8 fix 35a7b0c32 in opus review (final round, else drop). P0-VERIFY-ARG r2 BLOCK (core budget, unguarded unknown-option check, autonomy/loki routes --pubkey= to legacy), r3 fix running. D61-11 r3 fix running.
1950
+ - Deferred cleanup adds: scratchpad rev-d61-04-r3, rev-d61-12-r7, rev-d61-13-r3; 13 pre-existing loki-run.git-home-* dirs in TMPDIR (record exact list at end-of-window pass).
1951
+
1952
+ ## 2026-10-03T04:57Z CoS tick
1953
+ - D73 logged: D61-12 integrator dropped from this window (r8 reproduced C1-C4, S3, E6); D61 ships without it, flag-gated, named in handoff. BOARD a1f83c7a9.
1954
+ - Merged to local main: D51-B11 (933ecc9fc, test-workspace 14/0), D51-B05/B06 (c1095889f, backlog 49/0, api_start_prep 2 passed). D51-B02/03/04/07/08/09/10/12 parked as already delivered (99aaa6d2b).
1955
+ - P0-CONTROL-LINUX opus APPROVE: root cause reproduced in oven/bun:1.3.13 (repo-root node_modules disables bun auto-install, hono missing); npm tarball uses bundled dist/server.js so no runtime fetch. Cherry-picked 2d6e4a77d, dist 377871c88, dist guard 13/0.
1956
+ - Train 86 now waits only on P0-CORE-BUDGET TL verdict. In flight: P0-VERIFY-ARG r3 opus, D61-04 r5 fix, D61-11 test fix, P1-DISCARD-PROTO build (HIGH), D50-F4b build.
1957
+ - Deferred cleanup adds: scratchpad rev-d61-04-r4, rev-d61-12-r8.
1958
+
1959
+ ## 2026-10-03T05:27Z tick (CoS)
1960
+ - Merged to local main since 04:57Z: P0-VERIFY-ARG (dist 7bfa73a64), P1-DISCARD-PROTO (dist 4d8d1db59), D50-F4b (dist 159abf6d6), D61-04 off-path already-done check under LOKI_SPEED=1 (dist 588658b36, main bun test 1338/0 on rerun after one load flake). Core budget now passes on main, so train 86 no longer waits on P0-CORE-BUDGET.
1961
+ - Train 86 first push failed: gitleaks github-pat on the synthetic token fixture tests/workspace/80-comment.sh:7 (D51-B11). Fingerprint baselined with a reason line in .gitleaksignore (acb4ee58f). Rerun: TRAIN_PUSHED train/86 at acb4ee58f, 05:25:53Z; CI pending.
1962
+ - In flight: P0-CORE-BUDGET TL r2, D61-11 test fix, D61-04-F leak fixes (MEDIUM, new BOARD row).
1963
+ - Carry-forward reviewer notes: P0-CONTROL-LINUX wants a frozen-lockfile install for packages/control-plane in CI; D50-F4b invalid-base reason unreachable in supervisor; D61-04 child env carries OLDPWD (informational).
1964
+
1965
+ ## 2026-10-03T06:15Z tick (CoS)
1966
+ - Train 86 red: spawn_env_guard flagged already_done_async.ts (env passed via spread) and the gitleaks shape pin drifted after acb4ee58f. Fixed by P0-SPAWN-ENV-SPEED (env inline, bun suite 3072/0) and the shape pin 3c47d0f1a (31/0).
1967
+ - Train 87 (3c47d0f1a) all six checks green (Tests 37101104493, Coverage, Security Audit, Bun Parity, Tier A, First-run). Promoted by SHA to main at 06:14Z (fast-forward from d95095d9d); Phase C waits on main Tests.
1968
+ - Incident: train-cycle Phase A pushed train/88 before Phase B evaluated green train/87, and Phase B only looks at the newest train, so a green train was skipped. Promoted 87 by hand with the same RM push Phase B uses. Guard slice wanted: Phase A must not supersede a green unpromoted train.
1969
+ - Train 88 (c127f5e9f) pushed: C11b E2E legs 5-9, D65-BUG5 (schemas/ shipped), D65-BUG6 (Dockerfile COPYs), D65-BUG6-G (TL APPROVE, 18/0), D61-04-F.
1970
+ - In flight: P0-CORE-BUDGET TL r2, D61-11 test fix. E2E-D65 section 6 table refresh due after train 88.
1971
+
1972
+ ## 2026-10-03T06:31Z tick (CoS)
1973
+ - v10.6.9 released (tag 48dadd05c). Release run all 10 jobs success; publish-npm logged "+ loki-mode@10.6.9" at 06:24:51Z. Registry at 06:30Z still reads latest=next=10.6.8 with no time entry; not announced as latest until npm view shows it (peer finding accepted).
1974
+ - Peer finding: `loki serve` is the deprecated alias of `loki api start`, not the Control Plane; docs and help disagreed. D65-UI-NAMING (62b592031) and D65-UI-NAMING-2 (e564d2423, bash fallback honors LOKI_CONTROL=0 and names bun) merged, both TL APPROVE.
1975
+ - P0-TC-SUPERSEDE merged (bd686b7c9): train-cycle now holds a green unpromoted train so Phase B promotes it first.
1976
+ - Train 88 was cut before the v10.6.9 release commit, so it is not a fast-forward of main. Merged origin/main into local main (7ad91e03f, no conflicts, dist rebuilt unchanged, dist guard 13/0) and pushed train 89 (8576564a7) carrying C11b, D65-BUG5, D65-BUG6, D65-BUG6-G, D61-04-F, P0-TC-SUPERSEDE, D65-UI-NAMING and -2.