create-walle 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/README.md +3 -1
  2. package/lib/release-schema.json +2 -2
  3. package/lib/runtime-closure-policy.json +8 -7
  4. package/package.json +1 -1
  5. package/template/coding-task-manager/api-prompts.js +45 -7
  6. package/template/coding-task-manager/bin/claude-hook.js +55 -1
  7. package/template/coding-task-manager/bin/ctm-relay-client.js +35 -12
  8. package/template/coding-task-manager/bin/land.js +2069 -0
  9. package/template/coding-task-manager/bin/memory-census.js +4 -2
  10. package/template/coding-task-manager/bin/memory-sync-verify.js +151 -0
  11. package/template/coding-task-manager/bin/probe-refusal-scope.js +530 -0
  12. package/template/coding-task-manager/db.js +156 -32
  13. package/template/coding-task-manager/lib/acp/acp-client.js +383 -0
  14. package/template/coding-task-manager/lib/acp/dsh-context-truth.js +176 -0
  15. package/template/coding-task-manager/lib/acp/dsh-launch-model.js +302 -0
  16. package/template/coding-task-manager/lib/acp/dsh-mcp-servers.js +194 -0
  17. package/template/coding-task-manager/lib/acp/dsh-prompt-lane.js +616 -0
  18. package/template/coding-task-manager/lib/acp/dsh-route-patch.js +308 -0
  19. package/template/coding-task-manager/lib/acp/dsh-session-runtime.js +522 -0
  20. package/template/coding-task-manager/lib/acp/dsh-transcript.js +395 -0
  21. package/template/coding-task-manager/lib/acp/dsh-usage-log.js +162 -0
  22. package/template/coding-task-manager/lib/acp/ndjson-stdio-transport.js +225 -0
  23. package/template/coding-task-manager/lib/adopted-host-redial.js +47 -11
  24. package/template/coding-task-manager/lib/adopted-launch-environment.js +123 -0
  25. package/template/coding-task-manager/lib/agent-auto-update-runtime.js +0 -3
  26. package/template/coding-task-manager/lib/agent-auto-update.js +26 -10
  27. package/template/coding-task-manager/lib/agent-bundle/build.js +657 -0
  28. package/template/coding-task-manager/lib/agent-bundle/codex-install.js +558 -0
  29. package/template/coding-task-manager/lib/agent-bundle/drift.js +120 -0
  30. package/template/coding-task-manager/lib/agent-bundle/gc.js +522 -0
  31. package/template/coding-task-manager/lib/agent-bundle/inventory.js +346 -0
  32. package/template/coding-task-manager/lib/agent-bundle/push.js +717 -0
  33. package/template/coding-task-manager/lib/agent-bundle/skill-transfer.js +724 -0
  34. package/template/coding-task-manager/lib/agent-bundle/spawn.js +119 -0
  35. package/template/coding-task-manager/lib/agent-bundle/store.js +568 -0
  36. package/template/coding-task-manager/lib/agent-capabilities.js +142 -12
  37. package/template/coding-task-manager/lib/agent-cli-cache.js +30 -5
  38. package/template/coding-task-manager/lib/agent-definitions.js +19 -0
  39. package/template/coding-task-manager/lib/agent-hooks-codex-toml.js +28 -16
  40. package/template/coding-task-manager/lib/agent-hooks-codex-workspace.js +9 -1
  41. package/template/coding-task-manager/lib/agent-hooks-installer.js +23 -8
  42. package/template/coding-task-manager/lib/agent-hooks-prune.js +37 -11
  43. package/template/coding-task-manager/lib/agent-hooks-shim.js +105 -0
  44. package/template/coding-task-manager/lib/agent-presets.js +84 -1
  45. package/template/coding-task-manager/lib/agent-upgrade-jobs.js +12 -1
  46. package/template/coding-task-manager/lib/agent-version-service.js +74 -11
  47. package/template/coding-task-manager/lib/all-sessions-query.js +6 -2
  48. package/template/coding-task-manager/lib/api/agent-bundles.js +436 -0
  49. package/template/coding-task-manager/lib/api/backup-retention.js +83 -0
  50. package/template/coding-task-manager/lib/api/conversation-sync-routes.js +124 -0
  51. package/template/coding-task-manager/lib/api/diagnostics.js +549 -69
  52. package/template/coding-task-manager/lib/api/fleet.js +118 -0
  53. package/template/coding-task-manager/lib/api/hub-bridge.js +243 -0
  54. package/template/coding-task-manager/lib/api/ingress.js +9 -1
  55. package/template/coding-task-manager/lib/api/landing.js +403 -0
  56. package/template/coding-task-manager/lib/api/machines.js +691 -2
  57. package/template/coding-task-manager/lib/api/memory-sync-routes.js +335 -0
  58. package/template/coding-task-manager/lib/api/misc-ops.js +8 -3
  59. package/template/coding-task-manager/lib/api/remote-sessions.js +1326 -0
  60. package/template/coding-task-manager/lib/api/session-attach.js +623 -0
  61. package/template/coding-task-manager/lib/api/session-messages.js +1384 -0
  62. package/template/coding-task-manager/lib/api/sessions.js +77 -51
  63. package/template/coding-task-manager/lib/api/setup-network.js +544 -16
  64. package/template/coding-task-manager/lib/api/setup-wizard-handlers.js +884 -0
  65. package/template/coding-task-manager/lib/api/setup.js +829 -10
  66. package/template/coding-task-manager/lib/api/walle-bridge.js +9 -1
  67. package/template/coding-task-manager/lib/attachment-reconciler-wiring.js +5 -2
  68. package/template/coding-task-manager/lib/auth-rate-limit.js +23 -0
  69. package/template/coding-task-manager/lib/auth-rules.js +292 -21
  70. package/template/coding-task-manager/lib/background-stop.js +369 -0
  71. package/template/coding-task-manager/lib/best-of-attempts.js +4 -1
  72. package/template/coding-task-manager/lib/best-of-launch-plan.js +52 -0
  73. package/template/coding-task-manager/lib/box-keep-awake.js +89 -0
  74. package/template/coding-task-manager/lib/broadcast-reason-stats.js +152 -0
  75. package/template/coding-task-manager/lib/broadcast-serialize.js +5 -0
  76. package/template/coding-task-manager/lib/build-info.js +4 -2
  77. package/template/coding-task-manager/lib/claude-model-truth.js +13 -2
  78. package/template/coding-task-manager/lib/claude-transcript-terminal-renderer.js +17 -13
  79. package/template/coding-task-manager/lib/client-diag-handler.js +64 -2
  80. package/template/coding-task-manager/lib/codex-app-server-client.js +14 -16
  81. package/template/coding-task-manager/lib/codex-configuration-history.js +55 -0
  82. package/template/coding-task-manager/lib/codex-harness-qualification.js +43 -20
  83. package/template/coding-task-manager/lib/codex-rollout-history.js +743 -0
  84. package/template/coding-task-manager/lib/coding-agent-models.js +27 -12
  85. package/template/coding-task-manager/lib/coding-cli-skill-installer.js +44 -14
  86. package/template/coding-task-manager/lib/coding-session-model-adapters.js +43 -2
  87. package/template/coding-task-manager/lib/coding-session-model-owner.js +1 -1
  88. package/template/coding-task-manager/lib/coding-session-model-public.js +7 -1
  89. package/template/coding-task-manager/lib/coding-session-model-runtime.js +23 -4
  90. package/template/coding-task-manager/lib/coding-session-model-scan.js +31 -0
  91. package/template/coding-task-manager/lib/coding-session-model-state.js +7 -0
  92. package/template/coding-task-manager/lib/conversation-freshness-diagnostics.js +280 -0
  93. package/template/coding-task-manager/lib/conversation-item-clock.js +261 -0
  94. package/template/coding-task-manager/lib/conversation-source-registry.js +5 -0
  95. package/template/coding-task-manager/lib/conversation-store-v2.js +44 -0
  96. package/template/coding-task-manager/lib/conversation-sync.js +355 -0
  97. package/template/coding-task-manager/lib/create/resolve-launch-params.js +96 -12
  98. package/template/coding-task-manager/lib/create/worker-role-profile.js +4 -4
  99. package/template/coding-task-manager/lib/create-intent-lease.js +51 -0
  100. package/template/coding-task-manager/lib/ctm-session-context-api.js +97 -6
  101. package/template/coding-task-manager/lib/db-domain-tables.js +1 -0
  102. package/template/coding-task-manager/lib/db-domains.js +1 -0
  103. package/template/coding-task-manager/lib/db-owner-dispatch-probe.js +32 -0
  104. package/template/coding-task-manager/lib/db-owner-request-counts.js +178 -0
  105. package/template/coding-task-manager/lib/db-owner-worker-client.js +68 -14
  106. package/template/coding-task-manager/lib/db-schema-source-files.js +5 -0
  107. package/template/coding-task-manager/lib/deferred-restore-attempt.js +6 -2
  108. package/template/coding-task-manager/lib/feature-manifest.js +4 -0
  109. package/template/coding-task-manager/lib/fleet-conversation-route.js +97 -0
  110. package/template/coding-task-manager/lib/fleet-fanout.js +78 -0
  111. package/template/coding-task-manager/lib/fleet-hub.js +762 -0
  112. package/template/coding-task-manager/lib/fleet-origin-follower.js +252 -0
  113. package/template/coding-task-manager/lib/fleet-resolver-effects.js +147 -0
  114. package/template/coding-task-manager/lib/fleet-resolver-tick.js +148 -0
  115. package/template/coding-task-manager/lib/fleet-resolver.js +454 -0
  116. package/template/coding-task-manager/lib/fleet-session-list-routes.js +114 -0
  117. package/template/coding-task-manager/lib/fleet-session-lists.js +672 -0
  118. package/template/coding-task-manager/lib/fleet-update.js +798 -0
  119. package/template/coding-task-manager/lib/fs-watcher-root-watch.js +141 -0
  120. package/template/coding-task-manager/lib/fs-watcher.js +58 -42
  121. package/template/coding-task-manager/lib/harness-history-transition.js +50 -9
  122. package/template/coding-task-manager/lib/headless-term-service.js +84 -8
  123. package/template/coding-task-manager/lib/hermetic-agent-launch-guard.js +10 -0
  124. package/template/coding-task-manager/lib/history-transition-read-op.js +175 -8
  125. package/template/coding-task-manager/lib/host-cpu-categories.js +310 -0
  126. package/template/coding-task-manager/lib/host-fseventsd-sampler.js +399 -0
  127. package/template/coding-task-manager/lib/host-handoff.js +16 -19
  128. package/template/coding-task-manager/lib/host-stats.js +150 -3
  129. package/template/coding-task-manager/lib/hosted-sync-worker.js +43 -320
  130. package/template/coding-task-manager/lib/hub-bridge-access.js +798 -0
  131. package/template/coding-task-manager/lib/hub-bridge-box.js +409 -0
  132. package/template/coding-task-manager/lib/hub-bridge-mcp.js +380 -0
  133. package/template/coding-task-manager/lib/hub-bridge-mesh.js +313 -0
  134. package/template/coding-task-manager/lib/hub-bridge-ops.js +721 -0
  135. package/template/coding-task-manager/lib/hub-bridge.js +398 -0
  136. package/template/coding-task-manager/lib/idle-notify.js +491 -0
  137. package/template/coding-task-manager/lib/instance-id-ownership-manifest.js +8 -0
  138. package/template/coding-task-manager/lib/instance-manifest.js +5 -1
  139. package/template/coding-task-manager/lib/instance-sync-status.js +18 -8
  140. package/template/coding-task-manager/lib/landing/agent-rule.txt +1 -0
  141. package/template/coding-task-manager/lib/landing/batch-runner.js +366 -0
  142. package/template/coding-task-manager/lib/landing/config.js +536 -0
  143. package/template/coding-task-manager/lib/landing/ctm-view.js +256 -0
  144. package/template/coding-task-manager/lib/landing/gate.js +360 -0
  145. package/template/coding-task-manager/lib/landing/git.js +344 -0
  146. package/template/coding-task-manager/lib/landing/lease.js +247 -0
  147. package/template/coding-task-manager/lib/landing/merge-delta.js +380 -0
  148. package/template/coding-task-manager/lib/landing/proof.js +223 -0
  149. package/template/coding-task-manager/lib/landing/queue.js +998 -0
  150. package/template/coding-task-manager/lib/landing/radar.js +489 -0
  151. package/template/coding-task-manager/lib/landing/resolve-cli.js +424 -0
  152. package/template/coding-task-manager/lib/landing/state.js +263 -0
  153. package/template/coding-task-manager/lib/landing/stop.js +49 -0
  154. package/template/coding-task-manager/lib/landing/sync-cli.js +475 -0
  155. package/template/coding-task-manager/lib/landing/sync.js +456 -0
  156. package/template/coding-task-manager/lib/landing/train.js +885 -0
  157. package/template/coding-task-manager/lib/landing/window.js +57 -0
  158. package/template/coding-task-manager/lib/launch-environment.js +121 -0
  159. package/template/coding-task-manager/lib/launch-model-override.js +36 -10
  160. package/template/coding-task-manager/lib/launch-plan-pool.js +2 -1
  161. package/template/coding-task-manager/lib/launch-plan-warm-cache.js +6 -0
  162. package/template/coding-task-manager/lib/lead-model-observer.js +57 -1
  163. package/template/coding-task-manager/lib/lead-model-options.js +160 -3
  164. package/template/coding-task-manager/lib/lead-model-restore-reconciliation.js +106 -24
  165. package/template/coding-task-manager/lib/lead-model-switch-runtime.js +352 -68
  166. package/template/coding-task-manager/lib/lead-model-switch.js +114 -10
  167. package/template/coding-task-manager/lib/lead-model-transition-runtime.js +14 -2
  168. package/template/coding-task-manager/lib/lead-model-transition-store.js +24 -6
  169. package/template/coding-task-manager/lib/lead-route-preflight.js +179 -0
  170. package/template/coding-task-manager/lib/lead-switch-history-mode.js +110 -0
  171. package/template/coding-task-manager/lib/lead-wire-agent.js +7 -0
  172. package/template/coding-task-manager/lib/lifecycle-wake-experiment.js +9 -2
  173. package/template/coding-task-manager/lib/live-defer-announce.js +45 -0
  174. package/template/coding-task-manager/lib/machine-registry.js +750 -5
  175. package/template/coding-task-manager/lib/macos-capabilities.js +32 -15
  176. package/template/coding-task-manager/lib/main-thread-lint-exemptions.json +433 -53
  177. package/template/coding-task-manager/lib/mainloop-observability.js +14 -9
  178. package/template/coding-task-manager/lib/media-draft-owner.js +16 -3
  179. package/template/coding-task-manager/lib/memory-join.js +337 -0
  180. package/template/coding-task-manager/lib/memory-sync-verify.js +393 -0
  181. package/template/coding-task-manager/lib/memory-sync.js +565 -0
  182. package/template/coding-task-manager/lib/migrations/v57-delegate-pref-mirror-opencode.js +68 -0
  183. package/template/coding-task-manager/lib/migrations/v58-subagent-launch-native-subagents.js +42 -0
  184. package/template/coding-task-manager/lib/migrations/v59-coding-session-model-state-dsh.js +73 -0
  185. package/template/coding-task-manager/lib/migrations/v60-delegate-pref-mirror-dsh.js +78 -0
  186. package/template/coding-task-manager/lib/migrations/v61-conversation-item-clock.js +71 -0
  187. package/template/coding-task-manager/lib/model-availability.js +727 -0
  188. package/template/coding-task-manager/lib/model-execution-recipe-metadata.js +4 -6
  189. package/template/coding-task-manager/lib/model-host-receipt.js +6 -3
  190. package/template/coding-task-manager/lib/model-id-rule.js +19 -0
  191. package/template/coding-task-manager/lib/model-proxy/anthropic-face.js +4 -0
  192. package/template/coding-task-manager/lib/model-proxy/auto-mode-review.js +110 -23
  193. package/template/coding-task-manager/lib/model-proxy/chat-response-translators.js +3 -0
  194. package/template/coding-task-manager/lib/model-proxy/generation-probe.js +60 -17
  195. package/template/coding-task-manager/lib/model-proxy/historical-tool-declarations.js +37 -0
  196. package/template/coding-task-manager/lib/model-proxy/lead-request-validation.js +1 -0
  197. package/template/coding-task-manager/lib/model-proxy/lead-token-admin.js +130 -0
  198. package/template/coding-task-manager/lib/model-proxy/refusal-scope.js +151 -0
  199. package/template/coding-task-manager/lib/model-proxy/request-budget-store.js +11 -2
  200. package/template/coding-task-manager/lib/model-proxy/tokens.js +69 -5
  201. package/template/coding-task-manager/lib/model-proxy/upstream-outcome.js +9 -0
  202. package/template/coding-task-manager/lib/native-agent-model-args.js +25 -22
  203. package/template/coding-task-manager/lib/native-history-control.js +6 -4
  204. package/template/coding-task-manager/lib/native-lead-settings-client.js +44 -4
  205. package/template/coding-task-manager/lib/oauth-proxy-supervisor.js +173 -36
  206. package/template/coding-task-manager/lib/online-backup-worker-client.js +2 -0
  207. package/template/coding-task-manager/lib/opencode-cli.js +480 -0
  208. package/template/coding-task-manager/lib/opencode-launch-model.js +471 -0
  209. package/template/coding-task-manager/lib/opencode-v1-plugin/model-carrier.mjs +35 -0
  210. package/template/coding-task-manager/lib/opencode-v2-plugin/server.js +118 -0
  211. package/template/coding-task-manager/lib/owner-action-manifest-data.json +1 -1
  212. package/template/coding-task-manager/lib/park-composer-draft.js +54 -0
  213. package/template/coding-task-manager/lib/park-fresh-relaunch.js +41 -10
  214. package/template/coding-task-manager/lib/perf-phase-trace.js +72 -0
  215. package/template/coding-task-manager/lib/perf-summary.js +7 -0
  216. package/template/coding-task-manager/lib/perf-tracker.js +63 -2
  217. package/template/coding-task-manager/lib/project-config.js +7 -0
  218. package/template/coding-task-manager/lib/prompt-purge-v2.js +52 -1
  219. package/template/coding-task-manager/lib/provider-login-broker.js +72 -15
  220. package/template/coding-task-manager/lib/provider-login-tab.js +10 -2
  221. package/template/coding-task-manager/lib/read-pool-client.js +89 -2
  222. package/template/coding-task-manager/lib/read-pool-worker-handle.js +29 -4
  223. package/template/coding-task-manager/lib/recent-catalog-query.js +15 -0
  224. package/template/coding-task-manager/lib/recent-session-catalog-response.js +67 -10
  225. package/template/coding-task-manager/lib/recovery-evidence.js +26 -11
  226. package/template/coding-task-manager/lib/relay-client.js +57 -3
  227. package/template/coding-task-manager/lib/relink-audit.js +34 -5
  228. package/template/coding-task-manager/lib/remote-machine-catalog.js +321 -26
  229. package/template/coding-task-manager/lib/remote-machine-create.js +576 -36
  230. package/template/coding-task-manager/lib/remote-machine-link.js +546 -59
  231. package/template/coding-task-manager/lib/remote-machine-proxy.js +143 -9
  232. package/template/coding-task-manager/lib/remote-session-forward.js +65 -7
  233. package/template/coding-task-manager/lib/remote-terminal-target.js +9 -2
  234. package/template/coding-task-manager/lib/restart-guard.js +18 -6
  235. package/template/coding-task-manager/lib/restore-seed-modes.js +87 -0
  236. package/template/coding-task-manager/lib/restored-scrollback-hydration-runtime.js +22 -2
  237. package/template/coding-task-manager/lib/resume-admission.js +17 -3
  238. package/template/coding-task-manager/lib/review-repo-registry.js +58 -19
  239. package/template/coding-task-manager/lib/root-delivery-runtime.js +2 -2
  240. package/template/coding-task-manager/lib/root-prompt-flow.js +1 -1
  241. package/template/coding-task-manager/lib/runtime-contract.js +3 -1
  242. package/template/coding-task-manager/lib/schema-indexes.js +1 -0
  243. package/template/coding-task-manager/lib/session-context-locator.js +742 -0
  244. package/template/coding-task-manager/lib/session-create/attachment.js +2 -2
  245. package/template/coding-task-manager/lib/session-create/create-phases.js +118 -0
  246. package/template/coding-task-manager/lib/session-create/delegate-worker.js +86 -16
  247. package/template/coding-task-manager/lib/session-create/dsh-session.js +930 -0
  248. package/template/coding-task-manager/lib/session-create/lead-route-launch.js +186 -13
  249. package/template/coding-task-manager/lib/session-create/native-lead-lifetime.js +55 -3
  250. package/template/coding-task-manager/lib/session-create/opencode-lead-provider.js +50 -0
  251. package/template/coding-task-manager/lib/session-create/prepared.js +162 -38
  252. package/template/coding-task-manager/lib/session-create/provider-process.js +160 -28
  253. package/template/coding-task-manager/lib/session-create/response.js +7 -7
  254. package/template/coding-task-manager/lib/session-create/structured-session.js +27 -0
  255. package/template/coding-task-manager/lib/session-create/subagent-pick-table.js +3 -1
  256. package/template/coding-task-manager/lib/session-create/subagent-pick.js +458 -9
  257. package/template/coding-task-manager/lib/session-create/transcript.js +1 -1
  258. package/template/coding-task-manager/lib/session-create/worker-budget-setup.js +21 -2
  259. package/template/coding-task-manager/lib/session-create/worker-continuation.js +7 -1
  260. package/template/coding-task-manager/lib/session-create/worker-launch-sandbox.js +39 -10
  261. package/template/coding-task-manager/lib/session-create/worker-observability.js +2 -2
  262. package/template/coding-task-manager/lib/session-empty.js +13 -10
  263. package/template/coding-task-manager/lib/session-host-manager.js +60 -0
  264. package/template/coding-task-manager/lib/session-jobs.js +3 -1
  265. package/template/coding-task-manager/lib/session-lifecycle.js +10 -4
  266. package/template/coding-task-manager/lib/session-model-action-preconditions.js +6 -2
  267. package/template/coding-task-manager/lib/session-model-intent-contract.js +11 -8
  268. package/template/coding-task-manager/lib/session-park.js +738 -0
  269. package/template/coding-task-manager/lib/session-path-grant.js +13 -4
  270. package/template/coding-task-manager/lib/session-status-ledger.js +106 -4
  271. package/template/coding-task-manager/lib/session-transport.js +17 -0
  272. package/template/coding-task-manager/lib/session-workspace-projection.js +54 -5
  273. package/template/coding-task-manager/lib/session-workspace-tracking-runtime.js +213 -1
  274. package/template/coding-task-manager/lib/skill-autocomplete-query.js +120 -3
  275. package/template/coding-task-manager/lib/skill-autocomplete.js +15 -1
  276. package/template/coding-task-manager/lib/sqlite-file-set.js +39 -0
  277. package/template/coding-task-manager/lib/standup-search-adapter.js +16 -2
  278. package/template/coding-task-manager/lib/state-sync/client-ledger.js +12 -0
  279. package/template/coding-task-manager/lib/state-sync/frame-emitter.js +319 -100
  280. package/template/coding-task-manager/lib/storage/coding-session-model-store.js +4 -1
  281. package/template/coding-task-manager/lib/storage/delegate-pref-mirror-store.js +32 -9
  282. package/template/coding-task-manager/lib/structured-session-boot-sweep.js +235 -0
  283. package/template/coding-task-manager/lib/submission-ack.js +90 -2
  284. package/template/coding-task-manager/lib/systemd-scope.js +115 -0
  285. package/template/coding-task-manager/lib/telemetry-receiver.js +39 -0
  286. package/template/coding-task-manager/lib/terminal-attach-geometry.js +985 -0
  287. package/template/coding-task-manager/lib/terminal-bootstrap.js +30 -0
  288. package/template/coding-task-manager/lib/terminal-draft-operation.js +357 -0
  289. package/template/coding-task-manager/lib/terminal-input-admission.js +17 -1
  290. package/template/coding-task-manager/lib/terminal-input-prepared.js +563 -0
  291. package/template/coding-task-manager/lib/transcript-cache-temps.js +171 -0
  292. package/template/coding-task-manager/lib/transcript-frame-cache.js +8 -3
  293. package/template/coding-task-manager/lib/transcript-source.js +36 -4
  294. package/template/coding-task-manager/lib/transcript-store.js +9 -0
  295. package/template/coding-task-manager/lib/typing-interaction-trace.js +106 -3
  296. package/template/coding-task-manager/lib/usage-ledger/backfill.js +40 -5
  297. package/template/coding-task-manager/lib/usage-ledger/client.js +4 -1
  298. package/template/coding-task-manager/lib/usage-ledger/dsh-parse.js +152 -0
  299. package/template/coding-task-manager/lib/usage-ledger/dsh-read.js +73 -0
  300. package/template/coding-task-manager/lib/usage-ledger/ingest.js +34 -6
  301. package/template/coding-task-manager/lib/usage-ledger/live.js +35 -8
  302. package/template/coding-task-manager/lib/usage-ledger/read.js +29 -20
  303. package/template/coding-task-manager/lib/usage-ledger/schema.js +61 -1
  304. package/template/coding-task-manager/lib/usage-ledger/task-coordinator.js +4 -2
  305. package/template/coding-task-manager/lib/wake-skip-reasons.js +1 -0
  306. package/template/coding-task-manager/lib/walle/turn.js +1 -1
  307. package/template/coding-task-manager/lib/walle-history-serve.js +838 -0
  308. package/template/coding-task-manager/lib/walle-kill-authority.js +2 -2
  309. package/template/coding-task-manager/lib/walle-log-rotation.js +164 -1
  310. package/template/coding-task-manager/lib/walle-mcp-auto-config.js +56 -2
  311. package/template/coding-task-manager/lib/walle-row-history.js +495 -0
  312. package/template/coding-task-manager/lib/walle-supervisor.js +33 -14
  313. package/template/coding-task-manager/lib/watch-worker-client.js +203 -0
  314. package/template/coding-task-manager/lib/worker-terminal-output.js +5 -2
  315. package/template/coding-task-manager/lib/ws/hub-bridge.js +35 -0
  316. package/template/coding-task-manager/lib/ws/lifecycle.js +6 -11
  317. package/template/coding-task-manager/lib/ws/misc.js +1 -1
  318. package/template/coding-task-manager/lib/ws/state-sync.js +106 -4
  319. package/template/coding-task-manager/lib/ws/terminal-attach.js +91 -0
  320. package/template/coding-task-manager/oauth-proxy.js +112 -115
  321. package/template/coding-task-manager/package-lock.json +10 -94
  322. package/template/coding-task-manager/package.json +4 -3
  323. package/template/coding-task-manager/protocol/message-table.json +10 -0
  324. package/template/coding-task-manager/protocol/messages.js +10 -0
  325. package/template/coding-task-manager/protocol/ws-schema.json +20 -0
  326. package/template/coding-task-manager/protocol/ws-schema.md +2 -0
  327. package/template/coding-task-manager/public/css/app.css +170 -0
  328. package/template/coding-task-manager/public/css/walle-session.css +4 -0
  329. package/template/coding-task-manager/public/index.html +473 -243
  330. package/template/coding-task-manager/public/js/agent-command.js +86 -0
  331. package/template/coding-task-manager/public/js/app/backups-panel.js +111 -5
  332. package/template/coding-task-manager/public/js/app/coding-agent-upgrade.js +103 -4
  333. package/template/coding-task-manager/public/js/app/machines-page.js +1328 -8
  334. package/template/coding-task-manager/public/js/app/models-tab.js +113 -38
  335. package/template/coding-task-manager/public/js/app/restart-banner.js +53 -0
  336. package/template/coding-task-manager/public/js/app/worktrees-panel.js +184 -2
  337. package/template/coding-task-manager/public/js/background-work.js +196 -27
  338. package/template/coding-task-manager/public/js/coding-session-model-presentation.js +138 -10
  339. package/template/coding-task-manager/public/js/core/active-session-groups.js +179 -0
  340. package/template/coding-task-manager/public/js/core/pending-create.js +238 -0
  341. package/template/coding-task-manager/public/js/core/recent-machine-source.js +228 -0
  342. package/template/coding-task-manager/public/js/core/session-commands.js +180 -14
  343. package/template/coding-task-manager/public/js/dashboard-client-function-order.json +8 -0
  344. package/template/coding-task-manager/public/js/document-review-links.js +9 -1
  345. package/template/coding-task-manager/public/js/file-resolution-client.js +52 -1
  346. package/template/coding-task-manager/public/js/history-app-seam.js +22 -2
  347. package/template/coding-task-manager/public/js/machine-pool-shared.js +558 -3
  348. package/template/coding-task-manager/public/js/message-renderer.js +4 -3
  349. package/template/coding-task-manager/public/js/model-picker.js +3 -1
  350. package/template/coding-task-manager/public/js/native-subagent-review.js +15 -2
  351. package/template/coding-task-manager/public/js/new-session-agent-grid.js +346 -0
  352. package/template/coding-task-manager/public/js/pasted-content.js +236 -0
  353. package/template/coding-task-manager/public/js/pe-private-content-lifetime.js +39 -7
  354. package/template/coding-task-manager/public/js/private-model-lifetime.js +6 -2
  355. package/template/coding-task-manager/public/js/prompts.js +11 -10
  356. package/template/coding-task-manager/public/js/protocol.js +10 -0
  357. package/template/coding-task-manager/public/js/restart-banner-policy.js +29 -1
  358. package/template/coding-task-manager/public/js/session-model-picker.js +447 -57
  359. package/template/coding-task-manager/public/js/session-search-utils.js +18 -2
  360. package/template/coding-task-manager/public/js/session-usage-view.js +2 -1
  361. package/template/coding-task-manager/public/js/session-workspace-tracking.js +51 -1
  362. package/template/coding-task-manager/public/js/state-sync-client.js +10 -1
  363. package/template/coding-task-manager/public/js/stream-view.js +6 -5
  364. package/template/coding-task-manager/public/js/terminal/conv-only-session.js +287 -0
  365. package/template/coding-task-manager/public/js/terminal/runtime-09.js +2 -0
  366. package/template/coding-task-manager/public/js/terminal/runtime-10.js +5 -5
  367. package/template/coding-task-manager/public/js/terminal/runtime-12.js +8 -1
  368. package/template/coding-task-manager/public/js/terminal/runtime-16.js +4 -0
  369. package/template/coding-task-manager/public/js/terminal/runtime-20.js +1 -1
  370. package/template/coding-task-manager/public/js/terminal-attachment-draft.js +67 -13
  371. package/template/coding-task-manager/public/js/terminal-image-orchestration.js +52 -6
  372. package/template/coding-task-manager/public/js/terminal-wheel.js +23 -3
  373. package/template/coding-task-manager/public/js/walle/chat-conversation.js +4 -4
  374. package/template/coding-task-manager/public/js/walle.js +6 -0
  375. package/template/coding-task-manager/public/js/ws/live-dispatch.js +10 -0
  376. package/template/coding-task-manager/public/m/app.css +140 -0
  377. package/template/coding-task-manager/public/m/app.js +507 -68
  378. package/template/coding-task-manager/public/m/index.html +17 -0
  379. package/template/coding-task-manager/public/m/machines.js +838 -4
  380. package/template/coding-task-manager/public/m/private-api.js +31 -1
  381. package/template/coding-task-manager/public/usage.html +1 -0
  382. package/template/coding-task-manager/scripts/dev-route-fixture/synthetic-route-upstream.js +104 -0
  383. package/template/coding-task-manager/scripts/dev-route-fixture.js +339 -0
  384. package/template/coding-task-manager/scripts/opencode-lead-route-probe.js +195 -0
  385. package/template/coding-task-manager/scripts/opencode-v2-contract-probe/fake-anthropic.js +168 -0
  386. package/template/coding-task-manager/scripts/opencode-v2-contract-probe/probe-plugin/server.js +95 -0
  387. package/template/coding-task-manager/scripts/opencode-v2-contract-probe.js +673 -0
  388. package/template/coding-task-manager/server.js +1950 -11679
  389. package/template/coding-task-manager/session-integrity.js +64 -4
  390. package/template/coding-task-manager/workers/db-owner-worker.js +19 -2
  391. package/template/coding-task-manager/workers/online-backup-worker.js +1 -0
  392. package/template/coding-task-manager/workers/read-pool-model-collector.js +51 -3
  393. package/template/coding-task-manager/workers/read-pool-worker.js +76 -6
  394. package/template/coding-task-manager/workers/session-host-pool-process.js +6 -6
  395. package/template/coding-task-manager/workers/session-host-process.js +5 -5
  396. package/template/coding-task-manager/workers/watch-worker.js +105 -0
  397. package/template/coding-task-manager/workers/worktree-worker.js +168 -33
  398. package/template/ctm-relay/lib/protocol.js +14 -1
  399. package/template/package-lock.json +2 -2
  400. package/template/package.json +1 -1
  401. package/template/shared/backup-retention.js +82 -0
  402. package/template/shared/conversation-admission.js +2 -0
  403. package/template/shared/conversation-provenance.js +3 -7
  404. package/template/shared/conversation-storage-v2-contract.js +5 -0
  405. package/template/shared/linked-worktree.js +51 -0
  406. package/template/shared/macos-fda-target.js +57 -0
  407. package/template/shared/orphan-parents.js +55 -0
  408. package/template/shared/release-schema.json +2 -2
  409. package/template/shared/storage/contract.js +3 -0
  410. package/template/wall-e/adapters/imessage.js +12 -0
  411. package/template/wall-e/agent.js +71 -4
  412. package/template/wall-e/api-walle.js +21 -1
  413. package/template/wall-e/bin/train-gemma-e4b-tooluse.js +2 -2
  414. package/template/wall-e/bin/walle-mcp-stdio.js +5 -5
  415. package/template/wall-e/brain/brain-join.js +859 -0
  416. package/template/wall-e/brain/brain-sync-membership.js +20 -0
  417. package/template/wall-e/brain/brain-sync-store.js +131 -77
  418. package/template/wall-e/brain/brain-sync-v2-schema.js +203 -0
  419. package/template/wall-e/brain/brain-sync-v2.js +578 -0
  420. package/template/wall-e/brain/delegate-model-prefs-store.js +13 -4
  421. package/template/wall-e/brain/deterministic-id.js +51 -0
  422. package/template/wall-e/brain/memories.js +2 -2
  423. package/template/wall-e/brain/migrations.js +40 -6
  424. package/template/wall-e/brain/model-identity-migration.js +1 -1
  425. package/template/wall-e/brain/owner-call-whitelist.js +23 -7
  426. package/template/wall-e/brain/schema.js +45 -85
  427. package/template/wall-e/brain.js +171 -35
  428. package/template/wall-e/chat.js +3 -3
  429. package/template/wall-e/coding/agent-shell-env.js +7 -2
  430. package/template/wall-e/coding/prompt-bundle.js +66 -21
  431. package/template/wall-e/config/main-loop-exemptions.json +2 -2
  432. package/template/wall-e/http/admin-api.js +37 -0
  433. package/template/wall-e/http/gws-api.js +4 -0
  434. package/template/wall-e/http/helper-rules-api.js +7 -1
  435. package/template/wall-e/http/model-admin.js +8 -1
  436. package/template/wall-e/http/model-delegate-pref-admin.js +3 -3
  437. package/template/wall-e/http/model-proxy-providers.js +174 -1
  438. package/template/wall-e/http/model-route-health.js +157 -0
  439. package/template/wall-e/http/sync-api.js +278 -464
  440. package/template/wall-e/jobs/job-runner.js +28 -1
  441. package/template/wall-e/lib/brain-owner-op-priority.js +9 -1
  442. package/template/wall-e/lib/ctm-data-dir.js +26 -0
  443. package/template/wall-e/lib/derivation-home.js +147 -0
  444. package/template/wall-e/lib/helper-rules/evaluate.js +50 -9
  445. package/template/wall-e/lib/helper-rules/grade.js +51 -8
  446. package/template/wall-e/lib/helper-rules/lead-call-hook.js +38 -5
  447. package/template/wall-e/lib/helper-rules/store.js +4 -2
  448. package/template/wall-e/lib/landing-mcp-tools.js +170 -0
  449. package/template/wall-e/lib/mcp-client-config.js +133 -14
  450. package/template/wall-e/lib/mcp-gateway-migrate.js +28 -64
  451. package/template/wall-e/lib/mcp-integration.js +58 -13
  452. package/template/wall-e/lib/parent-death.js +7 -1
  453. package/template/wall-e/lib/scheduler-worker-jobs.js +6 -4
  454. package/template/wall-e/llm/delegate-lead-prefs.js +16 -1
  455. package/template/wall-e/llm/delegate-vendor-default.js +12 -5
  456. package/template/wall-e/llm/model-roles.js +1 -1
  457. package/template/wall-e/llm/native-delegate-selection.js +56 -8
  458. package/template/wall-e/llm/worker-delegate-args.js +72 -7
  459. package/template/wall-e/llm/worker-mcp-routing.js +66 -17
  460. package/template/wall-e/loops/brain-custom-writes.js +19 -0
  461. package/template/wall-e/loops/ingest.js +17 -1
  462. package/template/wall-e/loops/think.js +19 -4
  463. package/template/wall-e/mcp-contract.js +222 -6
  464. package/template/wall-e/mcp-protocol-contract.js +40 -5
  465. package/template/wall-e/mcp-server.js +128 -29
  466. package/template/wall-e/mcp-worker-schemas.js +5 -5
  467. package/template/wall-e/memory/ctm-context-client.js +85 -0
  468. package/template/wall-e/memory/ctm-session-context.js +9 -3
  469. package/template/wall-e/memory/hub-bridge-client.js +388 -0
  470. package/template/wall-e/memory/replica-origin.js +56 -0
  471. package/template/wall-e/memory/session-pool.js +135 -0
  472. package/template/wall-e/runtime/live-capabilities.js +8 -3
  473. package/template/wall-e/server.js +4 -2
  474. package/template/wall-e/shared/release-schema.json +2 -2
  475. package/template/wall-e/shared/sqlite-file-set.js +39 -0
  476. package/template/wall-e/shared/storage/contract.js +3 -0
  477. package/template/wall-e/skills/_templates/delegate-worker/VERSION +1 -1
  478. package/template/wall-e/skills/_templates/delegate-worker/released-sha256.json +7 -1
  479. package/template/wall-e/skills/_templates/delegate-worker/templates/claude/SKILL.md +4 -4
  480. package/template/wall-e/skills/_templates/delegate-worker/templates/codex/SKILL.md +6 -6
  481. package/template/wall-e/skills/_templates/fleet-sync/VERSION +1 -0
  482. package/template/wall-e/skills/_templates/fleet-sync/released-sha256.json +16 -0
  483. package/template/wall-e/skills/_templates/fleet-sync/templates/claude/SKILL.md +64 -0
  484. package/template/wall-e/skills/_templates/fleet-sync/templates/codex/SKILL.md +64 -0
  485. package/template/wall-e/tools/chrome-automation.js +6 -0
  486. package/template/wall-e/training/setup-cuda-train-env.sh +2 -2
  487. package/template/wall-e/workers/brain-owner-worker.js +18 -4
  488. package/template/wall-e/workers/mcp-gateway-process.js +5 -5
@@ -2,6 +2,10 @@
2
2
  "version": 1,
3
3
  "description": "Owner-reviewed exemptions for existing main-hot sites. New entries require a non-empty justification.",
4
4
  "entries": [
5
+ {
6
+ "key": "server.js\tprocess-launch\texecFileCb(\texecFileCb('ps', ['-o', 'args=', '-p', String(numericPid)], { timeout: 2000, maxBuffer: 256 * 1024, killSignal: 'SIGKILL' }, (error, stdout) => {",
7
+ "justification": "Agent-bundle drift WP-3 (docs/agent-bundle-darwin-readonly-rename-2026-10-27.html D-11): ONE asynchronous `ps -o args= -p <pid>` per ADOPTED session, run once at boot inside _adoptStartupTaskSession to read the --add-dir tree a process this box did not spawn carries (a spawned session is stamped from its own spawn result and never runs ps). Bounded to a single pid, 2 s timeout, 256 KiB maxBuffer, SIGKILL on timeout; the callback resolves 'unknown' on any failure and reports it. Same shape as the baselined `ps -o command= -p <pid>` adoption probe below in this file; never on a request path."
8
+ },
5
9
  {
6
10
  "key": "lib/codex-native-history-prefix.js\tsync-api\tfs.realpathSync.native(\tconst canonical = fs.realpathSync.native(filePath);",
7
11
  "justification": "Provider-history WP-4: exact canonical containment check for one native rollout prefix, called only by readHistoryTransitionSnapshot/verifyHistoryTransitionFork inside the exclusive read-pool worker. Each request is bounded by the declared 64 MiB byte and 200,000-record limits, depth 8 and at most three candidates; no server request handler calls this synchronous resolver."
@@ -622,10 +626,6 @@
622
626
  "key": "db.js\tsync-api\tfs.rmSync(\ttry { fs.rmSync(destPath, { force: true }); } catch {}",
623
627
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
624
628
  },
625
- {
626
- "key": "db.js\tsync-api\tfs.rmSync(\ttry { fs.rmSync(p, { force: true }); } catch {}",
627
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
628
- },
629
629
  {
630
630
  "key": "db.js\tsync-api\tfs.rmSync(\ttry { fs.rmSync(tmp, { force: true }); } catch {}",
631
631
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
@@ -1983,12 +1983,8 @@
1983
1983
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
1984
1984
  },
1985
1985
  {
1986
- "key": "server.js\tprocess-launch\texecFile(\texecFile(opener, ['-R', g.bundlePath], () => {}); // reveal the bundle so it can be dragged in",
1987
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
1988
- },
1989
- {
1990
- "key": "server.js\tprocess-launch\texecFile(\texecFile(opener, [g.settingsUrl], () => {}); // jump to Full Disk Access pane",
1991
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
1986
+ "key": "server.js\tprocess-launch\texecFile(\tfor (const args of macCaps.fdaOpenCommands(g)) execFile(opener, args, () => {}); // one execFile per open command",
1987
+ "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down. WP-2 (signin-flow-restart-settle-and-fda-target-identity-2026-10-26): one execFile per open command."
1992
1988
  },
1993
1989
  {
1994
1990
  "key": "server.js\tprocess-launch\texecFileCb(\texecFileCb('ps', ['-o', 'command=', '-p', String(pid)], { encoding: 'utf8', timeout: 2000 }, (err, stdout) => {",
@@ -2011,25 +2007,13 @@
2011
2007
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2012
2008
  },
2013
2009
  {
2014
- "key": "server.js\tprocess-launch\tspawn(\tproc = spawn(resolveAgentCliCommand('claude'), ['--version'], { stdio: ['ignore', 'pipe', 'pipe'], timeout: 5000 });",
2015
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2016
- },
2017
- {
2018
- "key": "server.js\tprocess-launch\tspawn(\tproc = spawn(resolveAgentCliCommand('claude'), ['auth', 'status'], {",
2019
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2020
- },
2021
- {
2022
- "key": "server.js\tprocess-launch\tspawn(\tproc = spawn(resolveAgentCliCommand('codex'), ['login', 'status'], { stdio: ['ignore', 'pipe', 'pipe'], timeout: 10000, env: childEnv });",
2010
+ "key": "lib/api/setup-wizard-handlers.js\tprocess-launch\tspawn(\tproc = spawn(_deps.resolveAgentCliCommand('claude'), ['--version'], { stdio: ['ignore', 'pipe', 'pipe'], timeout: 5000 });",
2023
2011
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2024
2012
  },
2025
2013
  {
2026
2014
  "key": "server.js\tprocess-launch\tspawn(\tproc = spawn(resolveRealNode(), args, {",
2027
2015
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2028
2016
  },
2029
- {
2030
- "key": "server.js\tsync-api\texecFileSync(\tconst credJson = execFileSync('security', ['find-generic-password', '-s', 'Claude Code-credentials', '-w'], { encoding: 'utf8', timeout: 3000 }).trim();",
2031
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2032
- },
2033
2017
  {
2034
2018
  "key": "server.js\tsync-api\texecFileSync(\tconst out = execFileSync(shell, ['-lc', `${getShellRcSource(shell)} printf %s \"$${name}\"`], {",
2035
2019
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
@@ -2039,23 +2023,23 @@
2039
2023
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2040
2024
  },
2041
2025
  {
2042
- "key": "server.js\tsync-api\tfs.copyFileSync(\tfs.copyFileSync(backup.backupPath, dst);",
2026
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.copyFileSync(\t_deps.fs.copyFileSync(backup.backupPath, dst);",
2043
2027
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2044
2028
  },
2045
2029
  {
2046
- "key": "server.js\tsync-api\tfs.existsSync(\tconst exists = fs.existsSync(dir);",
2030
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.existsSync(\tconst exists = _deps.fs.existsSync(dir);",
2047
2031
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2048
2032
  },
2049
2033
  {
2050
- "key": "server.js\tsync-api\tfs.existsSync(\tconst hasBackups = fs.existsSync(path.join(dir, 'backups'));",
2034
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.existsSync(\tconst hasBackups = _deps.fs.existsSync(_deps.path.join(dir, 'backups'));",
2051
2035
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2052
2036
  },
2053
2037
  {
2054
- "key": "server.js\tsync-api\tfs.existsSync(\tconst hasBrainDb = fs.existsSync(path.join(dir, 'wall-e-brain.db'));",
2038
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.existsSync(\tconst hasBrainDb = _deps.fs.existsSync(_deps.path.join(dir, 'wall-e-brain.db'));",
2055
2039
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2056
2040
  },
2057
2041
  {
2058
- "key": "server.js\tsync-api\tfs.existsSync(\tconst hasCtmDb = fs.existsSync(path.join(dir, 'task-manager.db'));",
2042
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.existsSync(\tconst hasCtmDb = _deps.fs.existsSync(_deps.path.join(dir, 'task-manager.db'));",
2059
2043
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2060
2044
  },
2061
2045
  {
@@ -2079,7 +2063,7 @@
2079
2063
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2080
2064
  },
2081
2065
  {
2082
- "key": "server.js\tsync-api\tfs.existsSync(\tif (!fs.existsSync(dst)) {",
2066
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.existsSync(\tif (!_deps.fs.existsSync(dst)) {",
2083
2067
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2084
2068
  },
2085
2069
  {
@@ -2131,35 +2115,23 @@
2131
2115
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2132
2116
  },
2133
2117
  {
2134
- "key": "server.js\tsync-api\tfs.mkdirSync(\tif (ctmDir) try { fs.mkdirSync(ctmDir, { recursive: true }); } catch {}",
2118
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.mkdirSync(\tif (ctmDir) try { _deps.fs.mkdirSync(ctmDir, { recursive: true }); } catch {}",
2135
2119
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2136
2120
  },
2137
2121
  {
2138
- "key": "server.js\tsync-api\tfs.mkdirSync(\tif (walleDir) try { fs.mkdirSync(walleDir, { recursive: true }); } catch {}",
2122
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.mkdirSync(\tif (walleDir) try { _deps.fs.mkdirSync(walleDir, { recursive: true }); } catch {}",
2139
2123
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2140
2124
  },
2141
2125
  {
2142
2126
  "key": "lib/api/worktrees.js\tsync-api\tfs.openSync(\tlogFd = fs.openSync(logPath, 'a');",
2143
2127
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2144
2128
  },
2145
- {
2146
- "key": "server.js\tsync-api\tfs.readFileSync(\tconst auth = JSON.parse(fs.readFileSync(codexPaths.codexAuthPath(), 'utf8'));",
2147
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2148
- },
2149
2129
  {
2150
2130
  "key": "server.js\tsync-api\tfs.readFileSync(\tconst cache = JSON.parse(fs.readFileSync(ANALYSIS_CACHE_FILE, 'utf8'));",
2151
2131
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2152
2132
  },
2153
2133
  {
2154
- "key": "server.js\tsync-api\tfs.readFileSync(\tconst claudeScript = fs.readFileSync(path.join(serverConfig.HOME, '.devbox', 'ai', 'claude', 'claude'), 'utf8');",
2155
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2156
- },
2157
- {
2158
- "key": "server.js\tsync-api\tfs.readFileSync(\tconst existing = fs.readFileSync(envPath, 'utf8');",
2159
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2160
- },
2161
- {
2162
- "key": "server.js\tsync-api\tfs.readFileSync(\tconst headers = fs.readFileSync(authFile, 'utf8').trim();",
2134
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.readFileSync(\tconst existing = _deps.fs.readFileSync(envPath, 'utf8');",
2163
2135
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2164
2136
  },
2165
2137
  {
@@ -2171,7 +2143,7 @@
2171
2143
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2172
2144
  },
2173
2145
  {
2174
- "key": "server.js\tsync-api\tfs.readFileSync(\tcreds = JSON.parse(fs.readFileSync(GEMINI_CLI_CREDS, 'utf8'));",
2146
+ "key": "lib/api/setup-wizard-handlers.js\tsync-api\tfs.readFileSync(\tcreds = JSON.parse(_deps.fs.readFileSync(GEMINI_CLI_CREDS, 'utf8'));",
2175
2147
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2176
2148
  },
2177
2149
  {
@@ -2222,10 +2194,6 @@
2222
2194
  "key": "server.js\tsync-api\tfs.writeFileSync(\tfs.writeFileSync(filePath, content);",
2223
2195
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2224
2196
  },
2225
- {
2226
- "key": "server.js\tsync-api\treadFileSync(\tconst auth = JSON.parse(require('fs').readFileSync(codexPaths.codexAuthPath(), 'utf8'));",
2227
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2228
- },
2229
2197
  {
2230
2198
  "key": "server.js\tsync-api\treadFileSync(\trequire('fs').readFileSync(envPath, 'utf8').split('\\n').forEach(line => {",
2231
2199
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
@@ -2234,10 +2202,6 @@
2234
2202
  "key": "server.js\tsync-api\treadFileSync(\ttry { text = require('fs').readFileSync(p, 'utf8'); }",
2235
2203
  "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2236
2204
  },
2237
- {
2238
- "key": "server.js\tsync-api\tspawnSync(\tconst proc = require('child_process').spawnSync(resolveAgentCliCommand('codex'), ['login', 'status'], { encoding: 'utf8', timeout: 8000 });",
2239
- "justification": "Pre-existing main-thread site migrated from the preserved baseline; tracked for burn-down."
2240
- },
2241
2205
  {
2242
2206
  "key": "api-prompts.js\tsync-api\tfs.statSync(\ttry { stat = fs.statSync(locator); } catch { return false; }",
2243
2207
  "justification": "Byte-complete short-circuit safety guard in _drainSourceFilesStillMatchObservedState, invoked only from the sliced conversation-import coop drain (not the interactive lane). Does ONE bounded fs.statSync per ingest-relevant member to confirm the file still exists at the recorded size before trusting the cached byte-complete verdict; this NET-REDUCES main-thread cost because it gates skipping a full catchUpTranscriptFiles scan+parse (WP-5a). Regression-anchored by tests/conversation-import-failure-cooldown.test.js."
@@ -2805,6 +2769,422 @@
2805
2769
  {
2806
2770
  "key": "lib/session-create/delegate-worker.js\tsync-api\tfs.readFileSync(\tconst bytes = fs.readFileSync(filePath);",
2807
2771
  "justification": "Lead-cost routing round 2 D-3 (docs/lead-cost-routing-round2-2026-10-24.html §6.2): getWorkerStatus() counts the distinct file:line citations of the text its report_source names -- one read of the worker's own report or --output-last-message file (tens of KB, capped at WORKER_REPORT_TEXT_CAP_BYTES for counting) per status/wait read of a TERMINAL worker only (non-terminal statuses read nothing), not a hot loop; synchronous for the same reason the report_present fs.existsSync and last-message fs.statSync exemptions above are: getWorkerStatus's §6.2 contract returns synchronously."
2772
+ },
2773
+ {
2774
+ "key": "lib/sqlite-file-set.js\tsync-api\tunlinkSync(\tfsModule.unlinkSync(`${p}${suffix}`);",
2775
+ "justification": "temp-file-leaks WP-2: removeSqliteFileSet unlinks the <=4 known paths of ONE SQLite file set (base, -journal, -wal, -shm) — metadata-only, no data read. Called only on a backup failure/teardown path (db.js _reclaimBackupDestinationSet after a backup writer threw, before the original error is rethrown); never in a request handler or a steady-state tick."
2776
+ },
2777
+ {
2778
+ "key": "lib/transcript-source.js\tsync-api\tfs.unlinkSync(\tfs.unlinkSync(tmp);",
2779
+ "justification": "temp-file-leaks WP-1 D-4: failure-path-only unlink of the sync decode writer's OWN temp (one path), run only after the already-ledgered writeFileSync/renameSync in the sync twin threw; never on the success path."
2780
+ },
2781
+ {
2782
+ "key": "lib/walle-log-rotation.js\tsync-api\tunlinkSync(\ttry { fsModule.unlinkSync(target); }",
2783
+ "justification": "temp-file-leaks WP-4: rotateInheritedStdio runs only from server.js runDiskHygiene (once at 60 s, then every 10 min), never in a request handler. Bounded: one stat of the log, one APFS clone (COPYFILE_FICLONE, metadata-only on APFS; rotation keeps the source near the 64 MiB threshold if a filesystem falls back to copying), one readdir of the log dir and at most keep+1 archive unlinks. Clone then ftruncate stay synchronous so no event-loop turn lands log writes between the snapshot and the truncate."
2784
+ },
2785
+ {
2786
+ "key": "lib/walle-log-rotation.js\tsync-api\treaddirSync(\ttry { entries = fsModule.readdirSync(directory); }",
2787
+ "justification": "temp-file-leaks WP-4: rotateInheritedStdio runs only from server.js runDiskHygiene (once at 60 s, then every 10 min), never in a request handler. Bounded: one stat of the log, one APFS clone (COPYFILE_FICLONE, metadata-only on APFS; rotation keeps the source near the 64 MiB threshold if a filesystem falls back to copying), one readdir of the log dir and at most keep+1 archive unlinks. Clone then ftruncate stay synchronous so no event-loop turn lands log writes between the snapshot and the truncate."
2788
+ },
2789
+ {
2790
+ "key": "lib/walle-log-rotation.js\tsync-api\tunlinkSync(\ttry { fsModule.unlinkSync(path.join(directory, name)); }",
2791
+ "justification": "temp-file-leaks WP-4: rotateInheritedStdio runs only from server.js runDiskHygiene (once at 60 s, then every 10 min), never in a request handler. Bounded: one stat of the log, one APFS clone (COPYFILE_FICLONE, metadata-only on APFS; rotation keeps the source near the 64 MiB threshold if a filesystem falls back to copying), one readdir of the log dir and at most keep+1 archive unlinks. Clone then ftruncate stay synchronous so no event-loop turn lands log writes between the snapshot and the truncate."
2792
+ },
2793
+ {
2794
+ "key": "lib/walle-log-rotation.js\tsync-api\tstatSync(\ttry { pathStat = fsModule.statSync(logPath); }",
2795
+ "justification": "temp-file-leaks WP-4: rotateInheritedStdio runs only from server.js runDiskHygiene (once at 60 s, then every 10 min), never in a request handler. Bounded: one stat of the log, one APFS clone (COPYFILE_FICLONE, metadata-only on APFS; rotation keeps the source near the 64 MiB threshold if a filesystem falls back to copying), one readdir of the log dir and at most keep+1 archive unlinks. Clone then ftruncate stay synchronous so no event-loop turn lands log writes between the snapshot and the truncate."
2796
+ },
2797
+ {
2798
+ "key": "lib/walle-log-rotation.js\tsync-api\tcopyFileSync(\tfsModule.copyFileSync(logPath, clonePath, copyFlags);",
2799
+ "justification": "temp-file-leaks WP-4: rotateInheritedStdio runs only from server.js runDiskHygiene (once at 60 s, then every 10 min), never in a request handler. Bounded: one stat of the log, one APFS clone (COPYFILE_FICLONE, metadata-only on APFS; rotation keeps the source near the 64 MiB threshold if a filesystem falls back to copying), one readdir of the log dir and at most keep+1 archive unlinks. Clone then ftruncate stay synchronous so no event-loop turn lands log writes between the snapshot and the truncate."
2800
+ },
2801
+ {
2802
+ "key": "lib/walle-log-rotation.js\tsync-api\tunlinkSync(\ttry { fsModule.unlinkSync(clonePath); }",
2803
+ "justification": "temp-file-leaks WP-4: rotateInheritedStdio runs only from server.js runDiskHygiene (once at 60 s, then every 10 min), never in a request handler. Bounded: one stat of the log, one APFS clone (COPYFILE_FICLONE, metadata-only on APFS; rotation keeps the source near the 64 MiB threshold if a filesystem falls back to copying), one readdir of the log dir and at most keep+1 archive unlinks. Clone then ftruncate stay synchronous so no event-loop turn lands log writes between the snapshot and the truncate."
2804
+ },
2805
+ {
2806
+ "key": "lib/landing/config.js\tsync-api\tfs.readFileSync(\treturn fs.readFileSync(file, 'utf8');",
2807
+ "justification": "WP-0 landing queue (§6.1): reads .ctm.json#landing and probes package.json/Makefile/etc. once per `land` CLI invocation for gate autodetect; CLI-only, never on the CTM request path."
2808
+ },
2809
+ {
2810
+ "key": "lib/landing/config.js\tsync-api\tfs.realpathSync(\treturn fs.realpathSync(dir);",
2811
+ "justification": "WP-0 landing queue (§6.1): reads .ctm.json#landing and probes package.json/Makefile/etc. once per `land` CLI invocation for gate autodetect; CLI-only, never on the CTM request path."
2812
+ },
2813
+ {
2814
+ "key": "lib/landing/git.js\tsync-api\tfs.copyFileSync(\tfs.copyFileSync(realIndex, tmpIndex);",
2815
+ "justification": "WP-0 landing queue (§5 D-3/D-11): synchronous --no-optional-locks git plumbing (merge-tree, commit-tree, update-ref CAS, ff-only) for the serial `land` CLI runner, where each step must complete before the next decision; CLI-only, never on the CTM request path."
2816
+ },
2817
+ {
2818
+ "key": "lib/landing/git.js\tsync-api\tfs.realpathSync(\treturn fs.realpathSync(top);",
2819
+ "justification": "WP-0 landing queue (§5 D-3/D-11): synchronous --no-optional-locks git plumbing (merge-tree, commit-tree, update-ref CAS, ff-only) for the serial `land` CLI runner, where each step must complete before the next decision; CLI-only, never on the CTM request path."
2820
+ },
2821
+ {
2822
+ "key": "lib/landing/git.js\tsync-api\tfs.rmSync(\tfs.rmSync(file, { force: true });",
2823
+ "justification": "WP-0 landing queue (§5 D-3/D-11): synchronous --no-optional-locks git plumbing (merge-tree, commit-tree, update-ref CAS, ff-only) for the serial `land` CLI runner, where each step must complete before the next decision; CLI-only, never on the CTM request path."
2824
+ },
2825
+ {
2826
+ "key": "lib/landing/git.js\tsync-api\tspawnSync(\tconst res = spawnSync('git', ['--no-optional-locks', ...args], {",
2827
+ "justification": "WP-0 landing queue (§5 D-3/D-11): synchronous --no-optional-locks git plumbing (merge-tree, commit-tree, update-ref CAS, ff-only) for the serial `land` CLI runner, where each step must complete before the next decision; CLI-only, never on the CTM request path."
2828
+ },
2829
+ {
2830
+ "key": "lib/landing/lease.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(staging, { recursive: true });",
2831
+ "justification": "WP-0 landing queue (§5 D-2): the runner lease is the broker-ported mkdtemp+renameSync claim / tombstone-rename removal; atomic correctness depends on synchronous rename, and the module runs only inside the `land` CLI process, never on the CTM main thread."
2832
+ },
2833
+ {
2834
+ "key": "lib/landing/lease.js\tsync-api\tfs.renameSync(\tfs.renameSync(dir, tombstone);",
2835
+ "justification": "WP-0 landing queue (§5 D-2): the runner lease is the broker-ported mkdtemp+renameSync claim / tombstone-rename removal; atomic correctness depends on synchronous rename, and the module runs only inside the `land` CLI process, never on the CTM main thread."
2836
+ },
2837
+ {
2838
+ "key": "lib/landing/lease.js\tsync-api\tfs.renameSync(\tfs.renameSync(tmp, dir);",
2839
+ "justification": "WP-0 landing queue (§5 D-2): the runner lease is the broker-ported mkdtemp+renameSync claim / tombstone-rename removal; atomic correctness depends on synchronous rename, and the module runs only inside the `land` CLI process, never on the CTM main thread."
2840
+ },
2841
+ {
2842
+ "key": "lib/landing/lease.js\tsync-api\tfs.rmSync(\tfs.rmSync(dir, { recursive: true, force: true });",
2843
+ "justification": "WP-0 landing queue (§5 D-2): the runner lease is the broker-ported mkdtemp+renameSync claim / tombstone-rename removal; atomic correctness depends on synchronous rename, and the module runs only inside the `land` CLI process, never on the CTM main thread."
2844
+ },
2845
+ {
2846
+ "key": "lib/landing/lease.js\tsync-api\tfs.rmSync(\tfs.rmSync(tombstone, { recursive: true, force: true });",
2847
+ "justification": "WP-0 landing queue (§5 D-2): the runner lease is the broker-ported mkdtemp+renameSync claim / tombstone-rename removal; atomic correctness depends on synchronous rename, and the module runs only inside the `land` CLI process, never on the CTM main thread."
2848
+ },
2849
+ {
2850
+ "key": "lib/landing/lease.js\tsync-api\tfs.writeFileSync(\tfs.writeFileSync(path.join(tmp, OWNER_FILENAME), `${JSON.stringify(record)}\\n`);",
2851
+ "justification": "WP-0 landing queue (§5 D-2): the runner lease is the broker-ported mkdtemp+renameSync claim / tombstone-rename removal; atomic correctness depends on synchronous rename, and the module runs only inside the `land` CLI process, never on the CTM main thread."
2852
+ },
2853
+ {
2854
+ "key": "lib/landing/lease.js\tsync-api\tspawnSync(\tconst res = spawnSync('ps', ['-o', 'command=', '-p', String(pid)], { encoding: 'utf8' });",
2855
+ "justification": "WP-0 landing queue (§5 D-2): the runner lease is the broker-ported mkdtemp+renameSync claim / tombstone-rename removal; atomic correctness depends on synchronous rename, and the module runs only inside the `land` CLI process, never on the CTM main thread."
2856
+ },
2857
+ {
2858
+ "key": "lib/landing/state.js\tsync-api\tfs.mkdirSync(\tfor (const name of SUBDIRS) fs.mkdirSync(path.join(root, name), { recursive: true });",
2859
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2860
+ },
2861
+ {
2862
+ "key": "lib/landing/state.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(path.dirname(file), { recursive: true });",
2863
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2864
+ },
2865
+ {
2866
+ "key": "lib/landing/state.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(root, { recursive: true });",
2867
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2868
+ },
2869
+ {
2870
+ "key": "lib/landing/state.js\tsync-api\tfs.readFileSync(\traw = fs.readFileSync(file, 'utf8');",
2871
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2872
+ },
2873
+ {
2874
+ "key": "lib/landing/state.js\tsync-api\tfs.renameSync(\tfs.renameSync(mutexDir, tombstone);",
2875
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2876
+ },
2877
+ {
2878
+ "key": "lib/landing/state.js\tsync-api\tfs.renameSync(\tfs.renameSync(staging, mutexDir);",
2879
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2880
+ },
2881
+ {
2882
+ "key": "lib/landing/state.js\tsync-api\tfs.renameSync(\tfs.renameSync(tmp, file);",
2883
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2884
+ },
2885
+ {
2886
+ "key": "lib/landing/state.js\tsync-api\tfs.rmSync(\tfs.rmSync(dir, { recursive: true, force: true });",
2887
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2888
+ },
2889
+ {
2890
+ "key": "lib/landing/state.js\tsync-api\tfs.rmSync(\tfs.rmSync(tmp, { force: true });",
2891
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2892
+ },
2893
+ {
2894
+ "key": "lib/landing/state.js\tsync-api\tfs.rmSync(\tfs.rmSync(tombstone, { recursive: true, force: true });",
2895
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2896
+ },
2897
+ {
2898
+ "key": "lib/landing/state.js\tsync-api\tfs.writeFileSync(\tfs.writeFileSync(tmp, `${JSON.stringify(payload, null, 2)}\\n`);",
2899
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2900
+ },
2901
+ {
2902
+ "key": "lib/landing/state.js\tsync-api\trenameSync (\t// Atomic JSON write: `<file>.<pid>.<rand>.tmp` then renameSync (same-filesystem, so the rename",
2903
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2904
+ },
2905
+ {
2906
+ "key": "lib/landing/state.js\tsync-api\trmSync(\t// the tombstone: rmSync(recursive) unlinks owner.json and rmdirs the path in two steps, which",
2907
+ "justification": "WP-0 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-1/D-2, §6.3): lib/landing/ is the `land` CLI library; it runs in the land process (and, from WP-3, only in a CTM child spawned for `land run --once`), never on the CTM request path. State writes are tiny tmp+rename JSON files and a mkdir/rename mutex whose atomicity REQUIRES the synchronous rename syscall."
2908
+ },
2909
+ {
2910
+ "key": "lib/landing/gate.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(path.dirname(file), { recursive: true });",
2911
+ "justification": "WP-1 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-4): the train gate bookkeeping (cache-path links, info/exclude, job log fd) inside the land runner process, a CLI child that is never on the CTM request path; each call touches a path the runner itself created."
2912
+ },
2913
+ {
2914
+ "key": "lib/landing/gate.js\tsync-api\tfs.readFileSync(\texisting = fs.readFileSync(file, 'utf8');",
2915
+ "justification": "WP-1 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-4): the train gate bookkeeping (cache-path links, info/exclude, job log fd) inside the land runner process, a CLI child that is never on the CTM request path; each call touches a path the runner itself created."
2916
+ },
2917
+ {
2918
+ "key": "lib/landing/gate.js\tsync-api\tfs.appendFileSync(\tif (missing.length) fs.appendFileSync(file, `${existing && !existing.endsWith('\\n') ? '\\n' : ''}${missing.join('\\n')}\\n`);",
2919
+ "justification": "WP-1 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-4): the train gate bookkeeping (cache-path links, info/exclude, job log fd) inside the land runner process, a CLI child that is never on the CTM request path; each call touches a path the runner itself created."
2920
+ },
2921
+ {
2922
+ "key": "lib/landing/gate.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(path.dirname(logFile), { recursive: true });",
2923
+ "justification": "WP-1 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-4): the train gate bookkeeping (cache-path links, info/exclude, job log fd) inside the land runner process, a CLI child that is never on the CTM request path; each call touches a path the runner itself created."
2924
+ },
2925
+ {
2926
+ "key": "lib/landing/gate.js\tsync-api\tfs.openSync(\tconst logFd = fs.openSync(logFile, 'a');",
2927
+ "justification": "WP-1 landing queue (local-landing-queue-multi-session-integration-2026-10-26.html §5 D-4): the train gate bookkeeping (cache-path links, info/exclude, job log fd) inside the land runner process, a CLI child that is never on the CTM request path; each call touches a path the runner itself created."
2928
+ },
2929
+ {
2930
+ "key": "lib/landing/queue.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(logsDir(root), { recursive: true });",
2931
+ "justification": "WP-1 landing queue (§5 D-2, §6.3): job/queue/metrics state of the land CLI, small JSON/JSONL files under $GIT_COMMON_DIR/landing written by the single runner or a submitter under the queue mutex; CLI-only, never on the CTM request path."
2932
+ },
2933
+ {
2934
+ "key": "lib/landing/queue.js\tsync-api\tfs.readdirSync(\tnames = fs.readdirSync(jobsDir(root));",
2935
+ "justification": "WP-1 landing queue (§5 D-2, §6.3): job/queue/metrics state of the land CLI, small JSON/JSONL files under $GIT_COMMON_DIR/landing written by the single runner or a submitter under the queue mutex; CLI-only, never on the CTM request path."
2936
+ },
2937
+ {
2938
+ "key": "lib/landing/queue.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(metricsDir(root), { recursive: true });",
2939
+ "justification": "WP-1 landing queue (§5 D-2, §6.3): job/queue/metrics state of the land CLI, small JSON/JSONL files under $GIT_COMMON_DIR/landing written by the single runner or a submitter under the queue mutex; CLI-only, never on the CTM request path."
2940
+ },
2941
+ {
2942
+ "key": "lib/landing/queue.js\tsync-api\tfs.appendFileSync(\tfs.appendFileSync(file, `${JSON.stringify({ contract: state.CONTRACT, ...entry })}\\n`);",
2943
+ "justification": "WP-1 landing queue (§5 D-2, §6.3): job/queue/metrics state of the land CLI, small JSON/JSONL files under $GIT_COMMON_DIR/landing written by the single runner or a submitter under the queue mutex; CLI-only, never on the CTM request path."
2944
+ },
2945
+ {
2946
+ "key": "lib/landing/queue.js\tsync-api\tfs.readdirSync(\tnames = fs.readdirSync(metricsDir(root));",
2947
+ "justification": "WP-1 landing queue (§5 D-2, §6.3): job/queue/metrics state of the land CLI, small JSON/JSONL files under $GIT_COMMON_DIR/landing written by the single runner or a submitter under the queue mutex; CLI-only, never on the CTM request path."
2948
+ },
2949
+ {
2950
+ "key": "lib/landing/queue.js\tsync-api\tfs.readFileSync(\traw = fs.readFileSync(path.join(metricsDir(root), name), 'utf8');",
2951
+ "justification": "WP-1 landing queue (§5 D-2, §6.3): job/queue/metrics state of the land CLI, small JSON/JSONL files under $GIT_COMMON_DIR/landing written by the single runner or a submitter under the queue mutex; CLI-only, never on the CTM request path."
2952
+ },
2953
+ {
2954
+ "key": "lib/landing/batch-runner.js\tsync-api\tfs.existsSync(\tif (fs.existsSync(trainDir)) train.removeTrainWorktree(workdir, trainDir);",
2955
+ "justification": "landing pipeline WP-1 batched runner (moved out of bin/land.js): the land CLI's runner process, never the CTM request path — the same train-worktree cleanup and gate-log read runJobInner performs for a single job."
2956
+ },
2957
+ {
2958
+ "key": "lib/landing/batch-runner.js\tsync-api\tfs.readFileSync(\tplanBase: finalBuilt.base, tree: finalBuilt.tree, logText: fs.readFileSync(result.logPath, 'utf8'),",
2959
+ "justification": "landing pipeline WP-1 batched runner (moved out of bin/land.js): the land CLI's runner process, never the CTM request path — the same train-worktree cleanup and gate-log read runJobInner performs for a single job."
2960
+ },
2961
+ {
2962
+ "key": "lib/landing/train.js\tprocess-launch\tspawn(\tchild = spawn('/bin/sh', ['-c', command], {",
2963
+ "justification": "WP-1 landing queue (§5 D-3/D-5/D-8): the land runner train-worktree housekeeping and its async detached gate spawn (process-group kill on timeout); CLI-only, never on the CTM request path."
2964
+ },
2965
+ {
2966
+ "key": "lib/landing/train.js\tsync-api\tfs.lstatSync(\tfs.lstatSync(dir);",
2967
+ "justification": "WP-1 landing queue (§5 D-3/D-5/D-8): the land runner train-worktree housekeeping and its async detached gate spawn (process-group kill on timeout); CLI-only, never on the CTM request path."
2968
+ },
2969
+ {
2970
+ "key": "lib/landing/train.js\tsync-api\tfs.rmSync(\tfs.rmSync(dir, { recursive: true, force: true });",
2971
+ "justification": "WP-1 landing queue (§5 D-3/D-5/D-8): the land runner train-worktree housekeeping and its async detached gate spawn (process-group kill on timeout); CLI-only, never on the CTM request path."
2972
+ },
2973
+ {
2974
+ "key": "lib/landing/train.js\tsync-api\tfs.openSync(\tconst logFd = log ? fs.openSync(log, 'a') : null;",
2975
+ "justification": "WP-1 landing queue (§5 D-3/D-5/D-8): the land runner train-worktree housekeeping and its async detached gate spawn (process-group kill on timeout); CLI-only, never on the CTM request path."
2976
+ },
2977
+ {
2978
+ "key": "lib/landing/train.js\tsync-api\tfs.appendFileSync(\tif (log) fs.appendFileSync(log, `[regenerate] committed ${train} (tree ${tree})\\n`);",
2979
+ "justification": "WP-1 landing queue (§5 D-3/D-5/D-8): the land runner train-worktree housekeeping and its async detached gate spawn (process-group kill on timeout); CLI-only, never on the CTM request path."
2980
+ },
2981
+ {
2982
+ "key": "lib/landing/train.js\tsync-api\tfs.appendFileSync(\tif (log) fs.appendFileSync(log, `[refresh] no owned path changed (${entries.length} entry/entries); train ${built.train} unchanged\\n`);",
2983
+ "justification": "WP-0 landing.refresh (landing-throughput design 2026-10-29 §5 D-2/D-3): the land runner appends the refresh pass outcome to the job log, exactly like the regenerate line above; CLI-only, never on the CTM request path."
2984
+ },
2985
+ {
2986
+ "key": "lib/landing/train.js\tsync-api\tfs.appendFileSync(\tif (log) fs.appendFileSync(log, `[refresh] committed ${train} (tree ${tree})\\n`);",
2987
+ "justification": "WP-0 landing.refresh (landing-throughput design 2026-10-29 §5 D-2/D-3): the land runner appends the refresh pass outcome to the job log, exactly like the regenerate line above; CLI-only, never on the CTM request path."
2988
+ },
2989
+ {
2990
+ "key": "lib/landing/radar.js\tsync-api\tfs.readdirSync(\tnames = fs.readdirSync(claimsDir(cwd));",
2991
+ "justification": "WP-2 landing queue (§5 D-7): the advisory conflict radar of the land CLI lists the soft-claim files under $GIT_COMMON_DIR/landing/claims once per sweep; CLI-only, never on the CTM request path."
2992
+ },
2993
+ {
2994
+ "key": "lib/api/landing.js\tprocess-launch\texecFile(\texecFile(process.execPath, [CLI_PATH, ...args], {",
2995
+ "justification": "WP-3 landing queue (§6.3, D-1): the ASYNC land CLI child (execFile with callback, timeout and maxBuffer) and the detached unref(d) land run --once runner; neither blocks the event loop, and the CLI is deliberately a separate process so the synchronous lib/landing code never runs in the CTM server."
2996
+ },
2997
+ {
2998
+ "key": "lib/api/landing.js\tprocess-launch\tspawn(\tconst child = spawn(process.execPath, [CLI_PATH, 'run', '--once'], {",
2999
+ "justification": "WP-3 landing queue (§6.3, D-1): the ASYNC land CLI child (execFile with callback, timeout and maxBuffer) and the detached unref(d) land run --once runner; neither blocks the event loop, and the CLI is deliberately a separate process so the synchronous lib/landing code never runs in the CTM server."
3000
+ },
3001
+ {
3002
+ "key": "lib/agent-presets.js\tsync-api\tfs.readFileSync(\tconst parsed = JSON.parse(fs.readFileSync(path.join(configDir, 'settings.json'), 'utf8'));",
3003
+ "justification": "Restore-seed alt-screen trap WP-2 (R-4): one synchronous read of the user's small Claude settings.json per Claude launch, inside the already-synchronous spawn-env assembly (resolveCreateLaunchParams / resume spawn); the file is a few KB, read once per process spawn, never on a request hot path or per frame."
3004
+ },
3005
+ {
3006
+ "key": "lib/background-stop.js\tprocess-launch\texecFile(\texecFile(binary, PS_STOP_ARGS, { timeout: PS_TIMEOUT_MS, maxBuffer: PS_MAX_BUFFER }, (error, out) => {",
3007
+ "justification": "Background-task termination WP-3a (§6.4/§6.5): the operator's Stop click re-reads the process table with one async `ps -axo pid=,ppid=,pgid=,lstart=,command=` -- at most four reads per explicit stop of one declared background shell (two identity reads, one after the TERM grace, one after KILL), never on a timer or per request. Async callback form because the hermetic preload's execFile wrapper drops util.promisify.custom, so promisify(execFile) would resolve with bare stdout (same hazard as lib/harness-model-profile.js)."
3008
+ },
3009
+ {
3010
+ "key": "lib/fleet-update.js\tprocess-launch\texecFile(\texecFile('git', args, { cwd, timeout }, (error, stdout) => {",
3011
+ "justification": "Fleet auto-update version truth + box-side bundle ingress (docs/fleet-auto-update-pooled-machines-2026-10-26.html S-4/S-6): ONE async execFile('git', argv array, explicit timeout - 5 s for the status reads, 60 s for `bundle verify`/`fetch`); readHubTarget memoizes per repo for 15 s, readFleetStatus serves one peer GET, acceptFleetBundle runs at most four git calls per pushed bundle. Never synchronous, never a shell string, and every failure is handled as an empty/unknown field or a 400/409 refusal."
3012
+ },
3013
+ {
3014
+ "key": "lib/fleet-update.js\tprocess-launch\texecFile(\texecFile('systemd-run', systemdRunArgv(to, { repoRoot, dataDir, port, logPath }),",
3015
+ "justification": "Fleet auto-update WP-1 fix 3 (docs/fleet-auto-update-pooled-machines-2026-10-26.html S-6, measured on the DGX Spark 2026-10-27): on a systemd HOST ONLY (platform === 'linux' && INVOCATION_ID, i.e. we ARE ctm.service), the helper is launched with `systemd-run --user --collect --quiet`, so it lands in its own transient unit instead of ctm.service's cgroup - KillMode=control-group would otherwise reap it when the exit-42 restart stops the unit, stranding the box in `restarting` with no confirm and no rollback. One argv array, no shell, 10 s launcher timeout, at most once per accepted bundle; a non-zero exit falls back to the detached child (below). Never runs on macOS."
3016
+ },
3017
+ {
3018
+ "key": "lib/fleet-update.js\tprocess-launch\tspawn(\tconst child = spawn(process.execPath, [path.join(repoRoot, 'bin', 'fleet-apply.js'), to], {",
3019
+ "justification": "Fleet auto-update WP-1 (docs/fleet-auto-update-pooled-machines-2026-10-26.html S-6/D-4): the box-side bundle route's DEFAULT helper launcher - one detached `node bin/fleet-apply.js <to>` per accepted bundle, stdio on <dataDir>/fleet/apply-<to12>.log, unref'd immediately so the apply survives the CTM restart it triggers. This is the only way the box applies (the hub runs no command on it); the spawn happens at most once per accepted bundle, and acceptFleetBundle's tests inject spawnHelper instead."
3020
+ },
3021
+ {
3022
+ "key": "lib/fleet-hub.js\tprocess-launch\texecFile(\texecFile('git', args, { cwd, timeout }, (error, stdout) => {",
3023
+ "justification": "Fleet auto-update WP-2 hub reconciler (docs/fleet-auto-update-pooled-machines-2026-10-26.html §8 WP-2, §9 S-8): ONE async execFile('git', argv array, explicit 5 s timeout) for the `git merge-base --is-ancestor <boxHead> <target>` ancestry probe - at most once per behind box per sweep (the pool is two boxes today, and only a box whose head is a full sha and differs from the target is probed), never synchronous, never a shell string, and a non-zero exit (1 = not an ancestor, 128 = unknown sha) is a handled `diverged`, not a throw."
3024
+ },
3025
+ {
3026
+ "key": "lib/fleet-hub.js\tprocess-launch\tspawn(\tchild = spawn('git', ['-C', repoRoot, 'bundle', 'create', '-', `${from}..main`], { stdio: ['ignore', 'pipe', 'pipe'] });",
3027
+ "justification": "Fleet auto-update WP-2 hub reconciler (docs/fleet-auto-update-pooled-machines-2026-10-26.html §8 WP-2 D-3): the hub's bundle build `git bundle create - <from>..main`, one argv array, no shell, run at most once per sending pass (at most one box in flight across the pool, D-7). stdout is capped at FLEET_BUNDLE_MAX_BYTES - past the cap the child is SIGKILLed and the promise rejects with code `too_large` - and a non-zero exit rejects with the stderr tail, which the reconciler records as a refusal instead of throwing into the sweep."
3028
+ },
3029
+ {
3030
+ "key": "lib/api/setup.js\tprocess-launch\tspawn(\tproc = spawn(_deps.resolveAgentCliCommand('claude'), ['auth', 'status'], {",
3031
+ "justification": "WP-5 shard S2 (landing-throughput design 2026-10-29 §5 D-10): relocated VERBATIM from server.js into lib/api/setup.js / setup-network.js -- the same pre-existing setup-flow site (key probe, CLI login status, env-file read) behind _deps.; not a new main-thread site."
3032
+ },
3033
+ {
3034
+ "key": "lib/api/setup.js\tprocess-launch\tspawn(\tproc = spawn(_deps.resolveAgentCliCommand('codex'), ['login', 'status'], { stdio: ['ignore', 'pipe', 'pipe'], timeout: 10000, env: childEnv });",
3035
+ "justification": "WP-5 shard S2 (landing-throughput design 2026-10-29 §5 D-10): relocated VERBATIM from server.js into lib/api/setup.js / setup-network.js -- the same pre-existing setup-flow site (key probe, CLI login status, env-file read) behind _deps.; not a new main-thread site."
3036
+ },
3037
+ {
3038
+ "key": "lib/api/setup.js\tsync-api\tfs.readFileSync(\tconst auth = JSON.parse(_deps.fs.readFileSync(_deps.codexPaths.codexAuthPath(), 'utf8'));",
3039
+ "justification": "WP-5 shard S2 (landing-throughput design 2026-10-29 §5 D-10): relocated VERBATIM from server.js into lib/api/setup.js / setup-network.js -- the same pre-existing setup-flow site (key probe, CLI login status, env-file read) behind _deps.; not a new main-thread site."
3040
+ },
3041
+ {
3042
+ "key": "lib/api/setup.js\tsync-api\tspawnSync(\tconst proc = require('child_process').spawnSync(_deps.resolveAgentCliCommand('codex'), ['login', 'status'], { encoding: 'utf8', timeout: 8000 });",
3043
+ "justification": "WP-5 shard S2 (landing-throughput design 2026-10-29 §5 D-10): relocated VERBATIM from server.js into lib/api/setup.js / setup-network.js -- the same pre-existing setup-flow site (key probe, CLI login status, env-file read) behind _deps.; not a new main-thread site."
3044
+ },
3045
+ {
3046
+ "key": "lib/api/setup.js\tsync-api\treadFileSync(\tconst auth = JSON.parse(require('fs').readFileSync(_deps.codexPaths.codexAuthPath(), 'utf8'));",
3047
+ "justification": "WP-5 shard S2 (landing-throughput design 2026-10-29 §5 D-10): relocated VERBATIM from server.js into lib/api/setup.js / setup-network.js -- the same pre-existing setup-flow site (key probe, CLI login status, env-file read) behind _deps.; not a new main-thread site."
3048
+ },
3049
+ {
3050
+ "key": "lib/api/setup.js\tsync-api\tfs.readFileSync(\tconst headers = _deps.fs.readFileSync(authFile, 'utf8').trim();",
3051
+ "justification": "WP-5 shard S2 (landing-throughput design 2026-10-29 §5 D-10): relocated VERBATIM from server.js into lib/api/setup.js / setup-network.js -- the same pre-existing setup-flow site (key probe, CLI login status, env-file read) behind _deps.; not a new main-thread site."
3052
+ },
3053
+ {
3054
+ "key": "lib/api/setup.js\tsync-api\tfs.readFileSync(\tconst claudeScript = _deps.fs.readFileSync(_deps.path.join(_deps.serverConfig.HOME, '.devbox', 'ai', 'claude', 'claude'), 'utf8');",
3055
+ "justification": "WP-5 shard S2 (landing-throughput design 2026-10-29 §5 D-10): relocated VERBATIM from server.js into lib/api/setup.js / setup-network.js -- the same pre-existing setup-flow site (key probe, CLI login status, env-file read) behind _deps.; not a new main-thread site."
3056
+ },
3057
+ {
3058
+ "key": "lib/api/setup.js\tsync-api\texecFileSync(\tconst credJson = _deps.execFileSync('security', ['find-generic-password', '-s', 'Claude Code-credentials', '-w'], { encoding: 'utf8', timeout: 3000 }).trim();",
3059
+ "justification": "WP-5 shard S2 (landing-throughput design 2026-10-29 §5 D-10): relocated VERBATIM from server.js into lib/api/setup.js / setup-network.js -- the same pre-existing setup-flow site (key probe, CLI login status, env-file read) behind _deps.; not a new main-thread site."
3060
+ },
3061
+ {
3062
+ "key": "lib/api/setup.js\tsync-api\tfs.readFileSync(\tconst existing = _deps.fs.readFileSync(envPath, 'utf8');",
3063
+ "justification": "WP-5 shard S2 (landing-throughput design 2026-10-29 §5 D-10): relocated VERBATIM from server.js into lib/api/setup.js / setup-network.js -- the same pre-existing setup-flow site (key probe, CLI login status, env-file read) behind _deps.; not a new main-thread site."
3064
+ },
3065
+ {
3066
+ "key": "lib/landing/train.js\tsync-api\tfs.statSync(\tstat = fs.statSync(source);",
3067
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3068
+ },
3069
+ {
3070
+ "key": "lib/landing/train.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(path.dirname(link), { recursive: true });",
3071
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3072
+ },
3073
+ {
3074
+ "key": "lib/landing/train.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(path.dirname(logFile), { recursive: true });",
3075
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3076
+ },
3077
+ {
3078
+ "key": "lib/landing/train.js\tsync-api\tfs.appendFileSync(\tfs.appendFileSync(logFile, `\\n[triage] rerun on base ${String(base).slice(0, 12)}\\n`);",
3079
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3080
+ },
3081
+ {
3082
+ "key": "lib/landing/train.js\tsync-api\tfs.existsSync(\tif (!fs.existsSync(path.join(dir, file))) continue; // added by the branch: base cannot be broken by it",
3083
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3084
+ },
3085
+ {
3086
+ "key": "lib/landing/train.js\tsync-api\tfs.appendFileSync(\tfs.appendFileSync(logFile, `$ (cd ${group.launcher.dir || '.'} && ${command})\\n`);",
3087
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3088
+ },
3089
+ {
3090
+ "key": "lib/landing/train.js\tsync-api\tfs.openSync(\tconst outFd = fs.openSync(outFile, 'a');",
3091
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3092
+ },
3093
+ {
3094
+ "key": "lib/landing/train.js\tsync-api\tfs.readFileSync(\tconst output = fs.readFileSync(outFile, 'utf8');",
3095
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3096
+ },
3097
+ {
3098
+ "key": "lib/landing/train.js\tsync-api\tfs.appendFileSync(\tfs.appendFileSync(logFile, output);",
3099
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3100
+ },
3101
+ {
3102
+ "key": "lib/landing/train.js\tsync-api\tfs.rmSync(\tfs.rmSync(scratch, { recursive: true, force: true });",
3103
+ "justification": "WP-2 landing triage (landing-throughput design 2026-10-29 §5 D-6/D-7): the land runner reruns the failed files on the base commit in a second train worktree and appends the launcher output to the job log; CLI-only, never on the CTM request path (same class as the regenerate/refresh rows above)."
3104
+ },
3105
+ {
3106
+ "key": "lib/landing/gate.js\tsync-api\tfs.rmSync(\tfs.rmSync(selectionFile, { force: true });",
3107
+ "justification": "WP-0 landing gate-once telemetry (landing-queue-gate-once-merge-delta-2026-10-29.html §5 D-8): clears this job's previous-round --selection-out record before a retrained gate, inside the land runner process, a CLI child that is never on the CTM request path; the path is one the runner itself owns."
3108
+ },
3109
+ {
3110
+ "key": "lib/landing/merge-delta.js\tprocess-launch\tspawn(\tchild = spawn(process.execPath, plannerArgs(trainDir, base), {",
3111
+ "justification": "WP-3a merge-delta shadow (docs/landing-queue-gate-once-merge-delta-2026-10-29.html §5 D-3, §6.5, §8 WP-3a): the ASYNC planner spawn — at most two `node <trainDir>/bin/test-plan.js --json` children per merge train, one argv array, no shell, stdout piped and capped by the 5-minute PLANNER_TIMEOUT_MS kill — and it never blocks the runner's event loop (the lease heartbeat is an interval). CLI-only (the land runner), never on the CTM request path, and unit tests inject `planner` so no child is spawned in the tests/ tier."
3112
+ },
3113
+ {
3114
+ "key": "lib/landing/merge-delta.js\tsync-api\tfs.readFileSync(\treturn fs.readFileSync(file, 'utf8');",
3115
+ "justification": "WP-3a merge-delta shadow (§8 WP-3a): ONE synchronous read of the current job's own gate log, in the runner process immediately after that gate returned, to list the failing test files the runners printed (`[test-suite] FAILED (N file(s)):` blocks) and compare them against S. One bounded read per terminal FAIL of a merge train; CLI-only, never on the CTM request path."
3116
+ },
3117
+ {
3118
+ "key": "lib/landing/proof.js\tsync-api\tfs.readdirSync(\treturn fs.readdirSync(path.join(root, 'verdicts')).sort();",
3119
+ "justification": "WP-3a treeHasProof (§5 D-3(a), §6.3): the `verdicts/` listing needed to answer \"has this tree ever passed a gate under this gates hash\" for the merge base. One readdir of a small directory (the number of proofs recorded for one repository) per merge train, sorted for a deterministic reader; CLI-only, never on the CTM request path."
3120
+ },
3121
+ {
3122
+ "key": "lib/host-fseventsd-sampler.js\tprocess-launch\texecFile(\treturned = execFile(file, args, options, callback);",
3123
+ "justification": "fsevents-churn-followups-r2 WP-2 (D-4/D-6): the host fseventsd sampler's single child-launch helper. It only calls the ASYNC child_process.execFile (pgrep, top ~2.5 s, and at most one 30 s fs-event-census per 6 h) with an explicit timeout, awaited inside tick(), which runs from one unref'd 30 min interval plus one unref'd 60 s post-boot tick in the primary only (never on a dev instance, never in a request handler)."
3124
+ },
3125
+ {
3126
+ "key": "lib/hub-bridge-access.js\tsync-api\tfs.statSync(\tstat = fs.statSync(file);",
3127
+ "justification": "Hub bridge WP-2 (docs/remote-session-hub-bridge-2026-10-30.html R-11): the per-machine trust policy is read when each gated hub-bridge op is decided (decide() is synchronous on the op's request path). The file is the tiny getDataDir()/hub-bridge-trust.json ({v,default,machines}); the read runs only when statSync's mtime/size differ from the cached copy, so the steady state is one stat per gated op, at most 4 in flight per machine (R-8). Writes, the audit append and the audit tail are async (fs.promises)."
3128
+ },
3129
+ {
3130
+ "key": "lib/hub-bridge-access.js\tsync-api\tfs.readFileSync(\ttext = fs.readFileSync(file, 'utf8');",
3131
+ "justification": "Hub bridge WP-2 (docs/remote-session-hub-bridge-2026-10-30.html R-11): the per-machine trust policy is read when each gated hub-bridge op is decided (decide() is synchronous on the op's request path). The file is the tiny getDataDir()/hub-bridge-trust.json ({v,default,machines}); the read runs only when statSync's mtime/size differ from the cached copy, so the steady state is one stat per gated op, at most 4 in flight per machine (R-8). Writes, the audit append and the audit tail are async (fs.promises)."
3132
+ },
3133
+ {
3134
+ "key": "lib/fleet-update.js\tprocess-launch\texecFile(\texecFile('systemd-run', systemdRunArgv(to, { repoRoot, dataDir, port, logPath, local: true }),",
3135
+ "justification": "Fleet origin-main sync WP-2b (docs/fleet-origin-main-sync-skill-2026-10-31.html §8): the LOCAL launch shape on a systemd host, a transient unit for `bin/fleet-apply.js --local <sha>` started only by scheduleLocalApply after its four guards (CTM_DATA_DIR+CTM_PORT set, non-dev CTM_INSTANCE_TAG, synced repo realpath == the repo that ships this file, /readyz build.sha not already current). Separate from the bundle-mode row because this lint keys on the whole line. Covered by tests/landing-sync-push-sites.test.js."
3136
+ },
3137
+ {
3138
+ "key": "lib/fleet-update.js\tprocess-launch\tspawn(\tconst child = spawn(process.execPath, [path.join(repoRoot, 'bin', 'fleet-apply.js'), '--local', to], {",
3139
+ "justification": "Fleet origin-main sync WP-2b (docs/fleet-origin-main-sync-skill-2026-10-31.html §8): the non-systemd LOCAL launch: one detached, unref'd `bin/fleet-apply.js --local <sha>` per `land sync` that moved this box's own main, stdio on <dataDir>/fleet/apply-<to12>.log; reached only through scheduleLocalApply's four guards, so a scratch or foreign repo never restarts a CTM (tests/landing-sync-push-sites.test.js, tests-integration/landing-sync.test.js)."
3140
+ },
3141
+ {
3142
+ "key": "lib/landing/sync-cli.js\tsync-api\tfs.existsSync(\tif (fs.existsSync(ctx.root)) {",
3143
+ "justification": "Fleet origin-main sync WP-0/WP-1 (docs/fleet-origin-main-sync-skill-2026-10-31.html §7): one existence check inside `land doctor`'s state-dir probe, in the `land` CLI process only (never the CTM request path); moved verbatim from bin/land.js (unscanned) when the sync/doctor CLI half moved to this module."
3144
+ },
3145
+ {
3146
+ "key": "lib/systemd-scope.js\tsync-api\treadFileSync(\tconst mine = _cgroupLine(readFileSync('/proc/self/cgroup', 'utf8'));",
3147
+ "justification": "Session-host cgroup survival WP-2 (docs/session-host-cgroup-survival-and-durable-jobs-2026-10-31.html D-5): pidSurvivesServiceStop reads /proc/self/cgroup and /proc/<hostPid>/cgroup (procfs, kernel-generated, a few dozen bytes, never disk I/O) inside the synchronous restart-guard snapshot. Only on a systemd service host; one pair per hosted session per guard snapshot (update-gate polls / restart requests), never on a terminal I/O path. Must be synchronous because summarizeRestartGuard is."
3148
+ },
3149
+ {
3150
+ "key": "lib/systemd-scope.js\tsync-api\treadFileSync(\tconst theirs = _cgroupLine(readFileSync(`/proc/${n}/cgroup`, 'utf8'));",
3151
+ "justification": "Session-host cgroup survival WP-2 (docs/session-host-cgroup-survival-and-durable-jobs-2026-10-31.html D-5): pidSurvivesServiceStop reads /proc/self/cgroup and /proc/<hostPid>/cgroup (procfs, kernel-generated, a few dozen bytes, never disk I/O) inside the synchronous restart-guard snapshot. Only on a systemd service host; one pair per hosted session per guard snapshot (update-gate polls / restart requests), never on a terminal I/O path. Must be synchronous because summarizeRestartGuard is."
3152
+ },
3153
+ {
3154
+ "key": "lib/landing/gate.js\tsync-api\tfs.openSync(\tfd = fs.openSync(full, 'r');",
3155
+ "justification": "Join follow-ups WP-2 (wall-e/docs/shared-memory-join-followups-2026-10-31.html R-8): reads at most DIRT_HEAD_BYTES (160) of one stray .merge_file_* after a gate already failed gate_dirtied_tree, so the next occurrence names the ledger git was merging. One bounded open/read/close per such path, in the land runner process (a CLI child), never on the CTM request path."
3156
+ },
3157
+ {
3158
+ "key": "lib/landing/gate.js\tsync-api\tfs.lstatSync(\tstat = fs.lstatSync(path.join(dir, relPath));",
3159
+ "justification": "Join follow-ups WP-2 (wall-e/docs/shared-memory-join-followups-2026-10-31.html R-8): one lstat per path git status already reported dirty (at most DIRT_EVIDENCE_MAX_PATHS = 20) to record kind/size/mtime/birthtime in the job log after a failed gate, in the land runner process (a CLI child), never on the CTM request path."
3160
+ },
3161
+ {
3162
+ "key": "lib/agent-hooks-shim.js\tsync-api\tfs.readFileSync(\ttry { return fs.readFileSync(target, 'utf8'); }",
3163
+ "justification": "codex-hook-stable-shim-trust-safe-self-repair-2026-11-01 WP-0: the per-port Codex hook shim (~/.walle/bin/ctm-hook-<port>, a few hundred bytes) is read/written once per explicit codex install/uninstall POST or once at the primary boot refresh, synchronously alongside the already-ledgered applyPlan() config write it must precede (a user-triggered / once-per-boot action, not a hot loop)."
3164
+ },
3165
+ {
3166
+ "key": "lib/agent-hooks-shim.js\tsync-api\tfs.mkdirSync(\tfs.mkdirSync(path.dirname(target), { recursive: true });",
3167
+ "justification": "codex-hook-stable-shim-trust-safe-self-repair-2026-11-01 WP-0: the per-port Codex hook shim (~/.walle/bin/ctm-hook-<port>, a few hundred bytes) is read/written once per explicit codex install/uninstall POST or once at the primary boot refresh, synchronously alongside the already-ledgered applyPlan() config write it must precede (a user-triggered / once-per-boot action, not a hot loop)."
3168
+ },
3169
+ {
3170
+ "key": "lib/agent-hooks-shim.js\tsync-api\tfs.writeFileSync(\tfs.writeFileSync(tmpPath, body, { mode: 0o755 });",
3171
+ "justification": "codex-hook-stable-shim-trust-safe-self-repair-2026-11-01 WP-0: the per-port Codex hook shim (~/.walle/bin/ctm-hook-<port>, a few hundred bytes) is read/written once per explicit codex install/uninstall POST or once at the primary boot refresh, synchronously alongside the already-ledgered applyPlan() config write it must precede (a user-triggered / once-per-boot action, not a hot loop)."
3172
+ },
3173
+ {
3174
+ "key": "lib/agent-hooks-shim.js\tsync-api\tfs.renameSync(\tfs.renameSync(tmpPath, target);",
3175
+ "justification": "codex-hook-stable-shim-trust-safe-self-repair-2026-11-01 WP-0: the per-port Codex hook shim (~/.walle/bin/ctm-hook-<port>, a few hundred bytes) is read/written once per explicit codex install/uninstall POST or once at the primary boot refresh, synchronously alongside the already-ledgered applyPlan() config write it must precede (a user-triggered / once-per-boot action, not a hot loop)."
3176
+ },
3177
+ {
3178
+ "key": "lib/agent-hooks-shim.js\tsync-api\tfs.unlinkSync(\ttry { fs.unlinkSync(tmpPath); } catch { /* expected: tmp file may already be gone */ }",
3179
+ "justification": "codex-hook-stable-shim-trust-safe-self-repair-2026-11-01 WP-0: the per-port Codex hook shim (~/.walle/bin/ctm-hook-<port>, a few hundred bytes) is read/written once per explicit codex install/uninstall POST or once at the primary boot refresh, synchronously alongside the already-ledgered applyPlan() config write it must precede (a user-triggered / once-per-boot action, not a hot loop)."
3180
+ },
3181
+ {
3182
+ "key": "lib/agent-hooks-shim.js\tsync-api\tfs.unlinkSync(\ttry { fs.unlinkSync(hookShimPath(port, { homeDir })); return true; }",
3183
+ "justification": "codex-hook-stable-shim-trust-safe-self-repair-2026-11-01 WP-0: the per-port Codex hook shim (~/.walle/bin/ctm-hook-<port>, a few hundred bytes) is read/written once per explicit codex install/uninstall POST or once at the primary boot refresh, synchronously alongside the already-ledgered applyPlan() config write it must precede (a user-triggered / once-per-boot action, not a hot loop)."
3184
+ },
3185
+ {
3186
+ "key": "lib/fleet-origin-follower.js\tprocess-launch\tspawn(\tchild = spawn(process.execPath, [landScriptPath(repoRoot), ...landArgv({ pullOnly })], {",
3187
+ "justification": "Fleet origin-main sync WP-3 (docs/fleet-origin-main-sync-skill-2026-10-31.html §5 R-8, §6.5): the CTM origin follower's one process launch — this repo's coding-task-manager/bin/land.js `sync --pull-only --json` under process.execPath, cwd repoRoot, no shell, 120 s timeout, at most once per publish.followIntervalMs (15 min) from an unref'd interval, skipped while a previous tick runs, never on a dev- tag, without landing.publish, or off main. Not on a request path."
2808
3188
  }
2809
3189
  ]
2810
3190
  }