@moretea-labs/forge 1.6.0 → 1.7.0

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 (396) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +26 -0
  3. package/CLAUDE.md +2 -0
  4. package/README.md +2 -2
  5. package/README.zh-CN.md +1 -1
  6. package/SKILL.md +2 -2
  7. package/THIRD_PARTY_NOTICES.md +1 -1
  8. package/agents/openai.yaml +1 -1
  9. package/assets/hooks/hook-input.sh +11 -8
  10. package/assets/hooks/lib/session-state.sh +10 -7
  11. package/assets/hooks/lib/workflow-state.sh +13 -177
  12. package/assets/hooks/post-tool-observer.sh +8 -2
  13. package/assets/hooks/prompt-guard.sh +5 -81
  14. package/assets/hooks/session-start-context.sh +56 -1
  15. package/assets/partials/05-workflow.partial.md +1 -1
  16. package/assets/partials-agents/03-orchestration.partial.md +1 -1
  17. package/assets/plugin-registry.v1.json +1 -1
  18. package/assets/reference-configs/document-generation.md +1 -1
  19. package/assets/reference-configs/harness-overview.md +1 -1
  20. package/assets/reference-configs/sprint-contracts.md +3 -3
  21. package/assets/skill-version.json +2 -2
  22. package/assets/templates/contract.template.md +2 -7
  23. package/assets/templates/helpers/capture-plan.sh +2 -2
  24. package/assets/templates/helpers/check-task-workflow.sh +4 -4
  25. package/assets/templates/helpers/contract-worktree.sh +1 -21
  26. package/assets/templates/helpers/ensure-task-workflow.sh +11 -36
  27. package/assets/templates/helpers/migrate-project-template.sh +22 -45
  28. package/assets/templates/helpers/new-plan.sh +1 -1
  29. package/assets/templates/helpers/plan-to-todo.sh +12 -37
  30. package/assets/templates/helpers/ship-worktrees.sh +2 -29
  31. package/assets/templates/helpers/verify-contract.sh +1 -111
  32. package/assets/templates/helpers/verify-sprint.sh +3 -180
  33. package/assets/templates/plan.template.md +1 -1
  34. package/assets/templates/review.template.md +9 -34
  35. package/assets/workflow-contract.v1.json +10 -19
  36. package/docs/README.md +10 -10
  37. package/docs/architecture/CURRENT.md +170 -0
  38. package/docs/architecture/EVOLUTION.md +42 -0
  39. package/docs/architecture/current/README.md +4 -156
  40. package/docs/architecture/decisions/20260803-release-identity-binding-and-exit-policy.md +2 -2
  41. package/docs/architecture/decisions/20260823-immediate-controller-relay.md +53 -0
  42. package/docs/architecture/decisions/20260826-browser-runtime-v2.md +73 -0
  43. package/docs/architecture/history/README.md +7 -0
  44. package/docs/architecture/{chatgpt-handoff-facade.md → history/chatgpt-handoff-facade.md} +4 -0
  45. package/docs/architecture/{global-hook-runtime.md → history/global-hook-runtime.md} +7 -3
  46. package/docs/architecture/{ios-semantic-automation-provider-v2.md → history/ios-semantic-automation-provider-v2.md} +6 -2
  47. package/docs/architecture/history.md +3 -34
  48. package/docs/architecture/index.md +15 -98
  49. package/docs/architecture/modules/controller-runtime/transport-lifecycle.md +1 -1
  50. package/docs/architecture/reviews/2026-08-22-semantic-harness-convergence-acceptance.md +39 -0
  51. package/docs/architecture/versions/1.6.md +38 -0
  52. package/docs/architecture/versions/1.7.md +41 -0
  53. package/docs/forge-chatgpt-browser-engine.md +2 -2
  54. package/docs/forge-chatgpt-mcp-setup.md +4 -28
  55. package/docs/forge-chatgpt-supervised-automation.md +3 -3
  56. package/docs/forge-github-issue-launcher.md +1 -1
  57. package/docs/forge-runtime-self-healing-loop.md +1 -1
  58. package/docs/operations/controller-browser-plugin.md +26 -6
  59. package/docs/operations/controller-performance-and-502.md +124 -0
  60. package/docs/operations/controller-reliability-runbook.md +1 -1
  61. package/docs/operations/features.md +2 -2
  62. package/docs/operations/github-repository.md +1 -1
  63. package/docs/operations/homebrew.md +2 -2
  64. package/docs/operations/mcp-tool-exposure.md +5 -3
  65. package/docs/wiki/Architecture.md +6 -6
  66. package/docs/wiki/Implementation.md +2 -2
  67. package/docs/wiki/Integrations.md +2 -2
  68. package/docs/wiki/Work-Lifecycle.md +1 -1
  69. package/package.json +29 -10
  70. package/scripts/activate-source-baseline.ts +17 -13
  71. package/scripts/benchmark-background-check-overlap.ts +228 -0
  72. package/scripts/benchmark-mcp-host.sh +117 -0
  73. package/scripts/benchmark-mcp-transport.ts +170 -0
  74. package/scripts/benchmark-quality-harness.ts +146 -0
  75. package/scripts/benchmark-route-session-concurrency.ts +207 -6
  76. package/scripts/benchmark-thin-harness-mcp-e2e.ts +7 -1
  77. package/scripts/benchmark-typescript-navigation.ts +186 -0
  78. package/scripts/benchmark-work-efficiency.ts +334 -0
  79. package/scripts/capture-plan.sh +3 -3
  80. package/scripts/check-agent-tooling.sh +8 -35
  81. package/scripts/check-architecture-sync.sh +17 -86
  82. package/scripts/check-mcp-compatibility.ts +14 -0
  83. package/scripts/check-runtime-architecture.mjs +107 -64
  84. package/scripts/check-stable-baseline.ts +92 -0
  85. package/scripts/check-task-workflow.sh +4 -4
  86. package/scripts/contract-worktree.sh +1 -21
  87. package/scripts/ensure-task-workflow.sh +22 -55
  88. package/scripts/host-temporary-cloud-mcp-e2e.sh +265 -0
  89. package/scripts/install-standalone-recovery.ts +24 -0
  90. package/scripts/lib/project-init-lib.sh +15 -44
  91. package/scripts/migrate-project-template.sh +23 -1179
  92. package/scripts/new-plan.sh +1 -1
  93. package/scripts/plan-to-todo.sh +11 -36
  94. package/scripts/run-governed-gate.ts +2 -1
  95. package/scripts/ship-worktrees.sh +2 -29
  96. package/scripts/smoke-ios-physical-device.ts +4 -2
  97. package/scripts/smoke-runtime-recovery.ts +1 -35
  98. package/scripts/smoke-schedule-engine.ts +1 -20
  99. package/scripts/verify-contract.sh +1 -111
  100. package/scripts/verify-forge-runtime.sh +0 -1
  101. package/scripts/verify-sprint.sh +3 -180
  102. package/scripts/workflow-contract.ts +1 -5
  103. package/src/cli/commands/init-hook.ts +3 -3
  104. package/src/cli/commands/mcp.ts +9 -5
  105. package/src/cli/commands/plugin.ts +1 -1
  106. package/src/cli/commands/recovery.ts +25 -3
  107. package/src/cli/commands/runtime.ts +55 -3
  108. package/src/cli/commands/security.ts +12 -1
  109. package/src/cli/commands/setup-profile.ts +31 -21
  110. package/src/cli/controller/check-runner.ts +106 -3
  111. package/src/cli/controller/composite-result.ts +1 -1
  112. package/src/cli/controller/context/focus.ts +51 -0
  113. package/src/cli/controller/context/instruction-context.ts +114 -0
  114. package/src/cli/controller/context/known-paths.ts +76 -0
  115. package/src/cli/controller/context/query-planning.ts +110 -0
  116. package/src/cli/controller/context/rule-resolution.ts +532 -0
  117. package/src/cli/controller/context/source-materializer.ts +278 -0
  118. package/src/cli/controller/context/structural.ts +16 -0
  119. package/src/cli/controller/context/types.ts +286 -0
  120. package/src/cli/controller/context-pack.ts +785 -469
  121. package/src/cli/controller/launch-agents.ts +77 -2
  122. package/src/cli/controller/operational-plan.ts +2 -2
  123. package/src/cli/controller/work-mode.ts +6 -4
  124. package/src/cli/editing/edit-session.ts +60 -7
  125. package/src/cli/github/github.ts +133 -0
  126. package/src/cli/installer/managed-entries.ts +15 -1
  127. package/src/cli/local-bridge/console-automations.ts +54 -78
  128. package/src/cli/local-bridge/console-view-models.ts +1 -35
  129. package/src/cli/local-bridge/facade-api.ts +0 -217
  130. package/src/cli/local-bridge/frontend/src/App.tsx +3 -3
  131. package/src/cli/local-bridge/frontend/src/features/automations/AutomationsView.tsx +23 -13
  132. package/src/cli/local-bridge/frontend/src/features/capabilities/CapabilitiesView.tsx +37 -4
  133. package/src/cli/local-bridge/frontend/src/features/overview/OverviewView.tsx +6 -4
  134. package/src/cli/local-bridge/frontend/src/lib/api.ts +1 -6
  135. package/src/cli/local-bridge/frontend/src/lib/routes.ts +1 -1
  136. package/src/cli/local-bridge/frontend/src/shell/Sidebar.tsx +2 -2
  137. package/src/cli/local-bridge/frontend/src/styles.css +1 -1
  138. package/src/cli/local-bridge/frontend/src/types.ts +5 -8
  139. package/src/cli/local-bridge/job-store.ts +1 -490
  140. package/src/cli/local-bridge/server.ts +0 -513
  141. package/src/cli/local-bridge/ui-dist/app.css +1 -1
  142. package/src/cli/local-bridge/ui-dist/app.js +3703 -3757
  143. package/src/cli/mcp/auth.ts +5 -5
  144. package/src/cli/mcp/instructions.ts +3 -2
  145. package/src/cli/mcp/legacy-tool-service.ts +0 -189
  146. package/src/cli/mcp/multi-repository.ts +16 -5
  147. package/src/cli/mcp/oauth.ts +175 -26
  148. package/src/cli/mcp/repository-tools.ts +247 -107
  149. package/src/cli/mcp/server.ts +537 -111
  150. package/src/cli/mcp/tool-capability-cache.ts +1 -1
  151. package/src/cli/mcp/toolset-selection.ts +1 -1
  152. package/src/cli/mcp/toolset.ts +42 -5
  153. package/src/cli/mcp/transports/http.ts +101 -14
  154. package/src/cli/mcp/transports/session-registry.ts +43 -5
  155. package/src/cli/mcp/types.ts +3 -3
  156. package/src/cli/repositories/command-classifier.ts +101 -19
  157. package/src/cli/repositories/command-executor.ts +55 -521
  158. package/src/cli/repositories/command-process.ts +108 -0
  159. package/src/cli/repositories/command-scope.ts +99 -41
  160. package/src/cli/repositories/controller-home.ts +7 -8
  161. package/src/cli/repositories/git-command-executor.ts +2 -0
  162. package/src/cli/repositories/locks.ts +53 -16
  163. package/src/cli/repositories/repository-snapshot.ts +121 -0
  164. package/src/cli/repositories/selected-path-actions.ts +17 -9
  165. package/src/cli/repositories/structured-git.ts +61 -3
  166. package/src/cli/repository/inspector.ts +553 -63
  167. package/src/cli/repository/session-cache.ts +58 -17
  168. package/src/cli/v81-entry.ts +1 -4
  169. package/src/effects/fs-transaction.ts +85 -17
  170. package/src/runtime/context/codegraph-read-provider.ts +233 -2
  171. package/src/runtime/context/codegraph-sidecar.cjs +74 -40
  172. package/src/runtime/context/generic-lsp-provider.ts +355 -0
  173. package/src/runtime/context/lsp-client.ts +283 -0
  174. package/src/runtime/context/semantic-navigation.ts +275 -0
  175. package/src/runtime/context/swift-navigation.ts +565 -0
  176. package/src/runtime/context/typescript-navigation.ts +226 -0
  177. package/src/runtime/control-plane/dispatch-priority.ts +28 -0
  178. package/src/runtime/control-plane/execution/direct-edit-work-completion.ts +47 -8
  179. package/src/runtime/control-plane/execution/edit-validation-coordinator.ts +86 -24
  180. package/src/runtime/control-plane/execution/session-store.ts +18 -0
  181. package/src/runtime/control-plane/execution/verification-evidence.ts +58 -3
  182. package/src/runtime/control-plane/execution/work-handle-store.ts +27 -2
  183. package/src/runtime/control-plane/execution/work-lifecycle-audit.ts +258 -0
  184. package/src/runtime/control-plane/execution/work-remote-delivery.ts +215 -0
  185. package/src/runtime/control-plane/execution/work-task-receipt.ts +54 -11
  186. package/src/runtime/control-plane/execution/work-terminal-cleanup.ts +143 -8
  187. package/src/runtime/control-plane/execution/work-validation-reconciler.ts +22 -14
  188. package/src/runtime/control-plane/execution/work-verification-snapshot.ts +85 -8
  189. package/src/runtime/control-plane/facade/capability-registry.ts +129 -25
  190. package/src/runtime/control-plane/facade/controller-round-relay.ts +991 -0
  191. package/src/runtime/control-plane/facade/controller-session-store.ts +132 -1
  192. package/src/runtime/control-plane/facade/goal-workloop-access.ts +2 -0
  193. package/src/runtime/control-plane/facade/goal-workloop.ts +686 -129
  194. package/src/runtime/control-plane/facade/index.ts +1 -0
  195. package/src/runtime/control-plane/facade/plan-contract-store.ts +185 -20
  196. package/src/runtime/control-plane/facade/semantic-admission.ts +205 -0
  197. package/src/runtime/control-plane/facade/suggested-actions.ts +5 -1
  198. package/src/runtime/control-plane/facade/types.ts +22 -5
  199. package/src/runtime/control-plane/facade/work-contract-store.ts +175 -73
  200. package/src/runtime/control-plane/generated-cache-retention.ts +271 -0
  201. package/src/runtime/control-plane/global-scheduler/config.ts +44 -0
  202. package/src/runtime/control-plane/global-scheduler/dispatch-capacity.ts +80 -0
  203. package/src/runtime/control-plane/global-scheduler/durable-admission.ts +46 -0
  204. package/src/runtime/control-plane/global-scheduler/maintenance.ts +145 -0
  205. package/src/runtime/control-plane/global-scheduler/projection-refresh.ts +84 -0
  206. package/src/runtime/control-plane/global-scheduler/reconciliation.ts +3 -3
  207. package/src/runtime/control-plane/global-scheduler/scheduler.ts +273 -542
  208. package/src/runtime/control-plane/global-scheduler/source-scan.ts +59 -0
  209. package/src/runtime/control-plane/global-scheduler/state.ts +88 -0
  210. package/src/runtime/control-plane/global-scheduler/worker-attachment.ts +57 -0
  211. package/src/runtime/control-plane/global-scheduler/worker-exit-decision.ts +38 -0
  212. package/src/runtime/control-plane/global-scheduler/worker-exit-reconciler.ts +175 -0
  213. package/src/runtime/control-plane/global-scheduler/worker-launch.ts +111 -0
  214. package/src/runtime/control-plane/global-scheduler/worker-lifecycle-store.ts +64 -0
  215. package/src/runtime/control-plane/global-scheduler/worker-lifecycle.ts +150 -0
  216. package/src/runtime/control-plane/global-scheduler/worker-process.ts +119 -0
  217. package/src/runtime/control-plane/global-scheduler/worker-stderr.ts +60 -0
  218. package/src/runtime/control-plane/launcher/chatgpt-work-binding-store.ts +50 -0
  219. package/src/runtime/control-plane/launcher/chatgpt-work-continuation.ts +355 -116
  220. package/src/runtime/control-plane/launcher/launch-reservation-store.ts +40 -0
  221. package/src/runtime/control-plane/launcher/thin-launcher.ts +194 -10
  222. package/src/runtime/control-plane/persistence/controller-home-migration.ts +487 -0
  223. package/src/runtime/control-plane/persistence/sqlite-store.ts +33 -2
  224. package/src/runtime/control-plane/release-retention.ts +62 -2
  225. package/src/runtime/control-plane/routing/route-policy.ts +7 -16
  226. package/src/runtime/control-plane/runtime-status-client.ts +0 -2
  227. package/src/runtime/diagnostics/mcp-timing.ts +13 -0
  228. package/src/runtime/diagnostics/mcp-transport-benchmark.ts +129 -0
  229. package/src/runtime/diagnostics/performance.ts +24 -1
  230. package/src/runtime/evidence/event-ledger.ts +1 -1
  231. package/src/runtime/execution/jobs/store.ts +58 -4
  232. package/src/runtime/execution/jobs/types.ts +1 -1
  233. package/src/runtime/execution/managed-workspace.ts +203 -1
  234. package/src/runtime/execution/process-runtime/check-facade.ts +51 -4
  235. package/src/runtime/execution/process-runtime/check-result.ts +53 -0
  236. package/src/runtime/execution/process-runtime/check-scheduling.ts +114 -0
  237. package/src/runtime/execution/process-runtime/command-facade.ts +345 -40
  238. package/src/runtime/execution/process-runtime/gc.ts +38 -6
  239. package/src/runtime/execution/process-runtime/lightweight-managed.ts +1184 -0
  240. package/src/runtime/execution/process-runtime/persisted-check.ts +47 -4
  241. package/src/runtime/execution/process-runtime/resource-claims.ts +10 -6
  242. package/src/runtime/execution/process-runtime/runtime.ts +43 -3
  243. package/src/runtime/execution/process-runtime/store.ts +1 -0
  244. package/src/runtime/execution/process-runtime/types.ts +2 -0
  245. package/src/runtime/execution/thin-harness/async-process.ts +12 -2
  246. package/src/runtime/execution/thin-harness/search-worker.ts +54 -5
  247. package/src/runtime/execution/workers/executor.ts +0 -48
  248. package/src/runtime/gateway/mcp/execution-tools.ts +1192 -114
  249. package/src/runtime/gateway/mcp/process-tools.ts +83 -37
  250. package/src/runtime/gateway/mcp/router.ts +184 -82
  251. package/src/runtime/gateway/mcp/runtime-tool-definitions.ts +546 -0
  252. package/src/runtime/gateway/mcp/runtime-tools.ts +2224 -1589
  253. package/src/runtime/plugins/app-store-connect-adapter.ts +123 -19
  254. package/src/runtime/plugins/browser-adapter.ts +2901 -241
  255. package/src/runtime/plugins/browser-automation-service.ts +10 -0
  256. package/src/runtime/plugins/browser-handoff.ts +92 -2
  257. package/src/runtime/plugins/browser-macos-bridge.ts +582 -49
  258. package/src/runtime/plugins/browser-node-bridge.ts +6 -34
  259. package/src/runtime/plugins/browser-provider-registry.ts +109 -0
  260. package/src/runtime/plugins/browser-runtime-contract.ts +152 -0
  261. package/src/runtime/plugins/browser-runtime.ts +183 -0
  262. package/src/runtime/plugins/browser-session-authority.ts +332 -0
  263. package/src/runtime/plugins/capability-authorization-grants.ts +354 -0
  264. package/src/runtime/plugins/desktop-operator-registration.ts +8 -2
  265. package/src/runtime/plugins/external-adapter.ts +324 -3
  266. package/src/runtime/plugins/external-unix-socket.ts +7 -1
  267. package/src/runtime/plugins/first-party-registry.ts +2 -0
  268. package/src/runtime/plugins/github-adapter.ts +125 -0
  269. package/src/runtime/plugins/ios/agent-device-provider.ts +1 -1
  270. package/src/runtime/plugins/ios/agent-device-typed-provider.ts +52 -9
  271. package/src/runtime/plugins/ios/remote-xpc-hid.ts +1171 -0
  272. package/src/runtime/plugins/ios-adapter.ts +106 -16
  273. package/src/runtime/plugins/ios-agent-device.ts +234 -64
  274. package/src/runtime/plugins/ios-physical-device.ts +1143 -392
  275. package/src/runtime/plugins/lightweight-action.ts +153 -0
  276. package/src/runtime/plugins/local-system-adapter.ts +123 -6
  277. package/src/runtime/plugins/macos-capability-broker.ts +55 -9
  278. package/src/runtime/plugins/plugin-action-sidecar.ts +59 -0
  279. package/src/runtime/plugins/plugin-management-adapter.ts +49 -8
  280. package/src/runtime/plugins/resend-adapter.ts +1 -1
  281. package/src/runtime/plugins/store.ts +269 -29
  282. package/src/runtime/plugins/types.ts +35 -2
  283. package/src/runtime/plugins/xiaohongshu-publish.ts +515 -0
  284. package/src/runtime/projections/git-status-sampler.ts +16 -16
  285. package/src/runtime/projections/materialized-view.ts +28 -10
  286. package/src/runtime/recovery/maintenance-executor.ts +393 -28
  287. package/src/runtime/root/mcp-transport.ts +180 -10
  288. package/src/runtime/root/package-connector-service.ts +186 -8
  289. package/src/runtime/root/package-runtime-release.ts +143 -17
  290. package/src/runtime/root/package-runtime-service.ts +430 -22
  291. package/src/runtime/root/release-manifest.ts +7 -2
  292. package/src/runtime/root/release-materialize.ts +19 -0
  293. package/src/runtime/root/release-store.ts +48 -11
  294. package/src/runtime/root/runtime.ts +23 -5
  295. package/src/runtime/root/service.ts +100 -29
  296. package/src/runtime/root/types.ts +2 -0
  297. package/src/runtime/safe-tooling/ios-development.ts +321 -63
  298. package/src/runtime/shared/trusted-executable.ts +62 -0
  299. package/src/runtime/shared/trusted-node-executable.ts +48 -0
  300. package/src/runtime/standalone-recovery/core.ts +700 -92
  301. package/src/runtime/standalone-recovery/entry.ts +99 -23
  302. package/src/runtime/standalone-recovery/installer.ts +19 -3
  303. package/src/runtime/standalone-recovery/service-labels.ts +2 -0
  304. package/src/runtime/standalone-recovery/watchdog-heartbeat.ts +160 -0
  305. package/src/runtime/workflow/schedules/browser-probe.ts +81 -3
  306. package/src/runtime/workflow/schedules/engine.ts +287 -151
  307. package/src/runtime/workflow/schedules/github-issue-watch.ts +158 -0
  308. package/src/runtime/workflow/schedules/settlement.ts +48 -4
  309. package/src/runtime/workflow/schedules/store.ts +131 -10
  310. package/src/runtime/workflow/schedules/types.ts +2 -4
  311. package/src/runtime/workflow/schedules/work-continuation.ts +26 -13
  312. package/src/testing/test-governance.ts +8 -40
  313. package/assets/reference-configs/heartbeat-triage.md +0 -57
  314. package/assets/templates/helpers/harness-trace-grade.sh +0 -150
  315. package/assets/templates/helpers/heartbeat-triage.sh +0 -361
  316. package/assets/templates/helpers/maintenance-triage.sh +0 -167
  317. package/docs/architecture/current/approved-target-architecture.zh-CN.md +0 -1501
  318. package/docs/architecture/current/architecture-invariants.md +0 -331
  319. package/docs/architecture/current/automation-and-schedule-engine.md +0 -459
  320. package/docs/architecture/current/codegraph-context-provider.md +0 -238
  321. package/docs/architecture/current/control-plane-authority-inventory.md +0 -94
  322. package/docs/architecture/current/controller-repository-decoupling.md +0 -148
  323. package/docs/architecture/current/dispatch-and-agent-strategy.md +0 -373
  324. package/docs/architecture/current/entity-model.md +0 -612
  325. package/docs/architecture/current/external-plugin-governance.md +0 -396
  326. package/docs/architecture/current/failure-recovery.md +0 -447
  327. package/docs/architecture/current/governance.md +0 -213
  328. package/docs/architecture/current/human-interaction-plane.md +0 -87
  329. package/docs/architecture/current/implementation-status.md +0 -128
  330. package/docs/architecture/current/job-and-run-lifecycle.md +0 -413
  331. package/docs/architecture/current/legacy-governance.md +0 -58
  332. package/docs/architecture/current/local-workspace-target-grants.md +0 -70
  333. package/docs/architecture/current/migration-roadmap.md +0 -105
  334. package/docs/architecture/current/multi-repository-execution.md +0 -371
  335. package/docs/architecture/current/operations-runbook.md +0 -45
  336. package/docs/architecture/current/peer-supercontroller-runtime.md +0 -32
  337. package/docs/architecture/current/personal-assistant-plugin-baseline.md +0 -206
  338. package/docs/architecture/current/repository-access-modes.md +0 -102
  339. package/docs/architecture/current/route-policy.md +0 -15
  340. package/docs/architecture/current/route-session-concurrency.md +0 -85
  341. package/docs/architecture/current/runtime-architecture-simplification.md +0 -214
  342. package/docs/architecture/current/runtime-directory-map.md +0 -49
  343. package/docs/architecture/current/runtime-health-and-resource-lifecycle.md +0 -85
  344. package/docs/architecture/current/scheduler-and-resource-claims.md +0 -422
  345. package/docs/architecture/current/session-aware-execution-and-authorization.md +0 -77
  346. package/docs/architecture/current/system-overview.md +0 -169
  347. package/docs/architecture/current/target-requirements-traceability.md +0 -202
  348. package/docs/architecture/current/thin-harness-governance-policy.md +0 -32
  349. package/docs/architecture/current/thin-harness-v1.md +0 -321
  350. package/docs/architecture/current/verification-and-release-gates.md +0 -391
  351. package/docs/forge-autonomous-goal-loop.md +0 -9
  352. package/docs/forge-provider-configuration.md +0 -7
  353. package/docs/operations/chatgpt-personal-assistant-runtime.md +0 -93
  354. package/docs/operations/gmail-assistant-routines.md +0 -186
  355. package/docs/operations/personal-assistant-operator-guide.md +0 -61
  356. package/docs/operations/provider-configuration.md +0 -31
  357. package/scripts/harness-trace-grade.sh +0 -150
  358. package/scripts/heartbeat-triage.sh +0 -361
  359. package/scripts/maintenance-triage.sh +0 -167
  360. package/src/cli/local-bridge/frontend/src/features/settings/SettingsView.tsx +0 -2
  361. package/src/cli/repositories/goal-registry.ts +0 -239
  362. package/src/runtime/assistant/action-proposals.ts +0 -279
  363. package/src/runtime/assistant/intent.ts +0 -395
  364. package/src/runtime/assistant/model-provider.ts +0 -460
  365. package/src/runtime/assistant/openapi.ts +0 -223
  366. package/src/runtime/assistant/policy.ts +0 -89
  367. package/src/runtime/assistant/readiness.ts +0 -258
  368. package/src/runtime/assistant/routine-runtime.ts +0 -477
  369. package/src/runtime/assistant/schedule-binding.ts +0 -171
  370. package/src/runtime/assistant/standing-grants.ts +0 -375
  371. package/src/runtime/assistant/store.ts +0 -243
  372. package/src/runtime/assistant/types.ts +0 -135
  373. package/src/runtime/control-plane/goal-loop/config-facade.ts +0 -700
  374. package/src/runtime/control-plane/goal-loop/config-store.ts +0 -570
  375. package/src/runtime/control-plane/goal-loop/config-types.ts +0 -213
  376. package/src/runtime/control-plane/goal-loop/executor-router.ts +0 -109
  377. package/src/runtime/control-plane/goal-loop/failure-taxonomy.ts +0 -149
  378. package/src/runtime/control-plane/goal-loop/goal-contract-store.ts +0 -304
  379. package/src/runtime/control-plane/goal-loop/goal-loop-engine.ts +0 -1001
  380. package/src/runtime/control-plane/goal-loop/handoff-packet.ts +0 -160
  381. package/src/runtime/control-plane/goal-loop/index.ts +0 -13
  382. package/src/runtime/control-plane/goal-loop/local-tools.ts +0 -290
  383. package/src/runtime/control-plane/goal-loop/policy-gates.ts +0 -203
  384. package/src/runtime/control-plane/goal-loop/provider-dispatch.ts +0 -93
  385. package/src/runtime/control-plane/goal-loop/provider-registry.ts +0 -545
  386. package/src/runtime/control-plane/goal-loop/types.ts +0 -378
  387. package/src/runtime/control-plane/startup-recovery.ts +0 -198
  388. package/src/runtime/gateway/mcp/resource-policy.ts +0 -186
  389. package/src/runtime/personal-assistant/gmail-triage-manager.ts +0 -231
  390. package/src/runtime/personal-assistant/reporting-runtime.ts +0 -344
  391. package/src/runtime/personal-assistant/triage-runtime.ts +0 -748
  392. package/src/runtime/workflow/findings/store.ts +0 -204
  393. package/src/runtime/workflow/findings/types.ts +0 -58
  394. package/src/runtime/workflow/portfolio/engine.ts +0 -20
  395. package/src/runtime/workflow/portfolio/store.ts +0 -185
  396. package/src/runtime/workflow/portfolio/types.ts +0 -29
@@ -1,38 +1,7 @@
1
- # Architecture Evolution History
1
+ # Architecture History
2
2
 
3
3
  > **Historical Design — Not Runtime Authority**
4
- >
5
- > Current architecture: [`docs/architecture/current/README.md`](current/README.md).
6
4
 
7
- This document is the compact history of the Controller Runtime architecture. Detailed superseded V5–V8 design and verification documents were removed from the current tree after their useful decisions were consolidated here. Their exact contents remain recoverable from Git history.
5
+ The maintained architecture evolution log is [`EVOLUTION.md`](EVOLUTION.md), and the current contract is [`CURRENT.md`](CURRENT.md).
8
6
 
9
- ## V5 — Durable execution and closure
10
-
11
- V5 separated durable Issue and Task intent from individual Run attempts. It introduced explicit run failure semantics, evidence-gated progress, direct local execution, governance diagnostics, and terminal Issue archiving. The lasting rule is that a failed attempt must not silently cancel the underlying task and that completion must be supported by durable evidence.
12
-
13
- ## V6 — Direct change first
14
-
15
- V6 made bounded Direct Edit the default for known, low-to-medium-risk changes. It added stale-write guards, explicit allowed paths, atomic patch operations, persisted diffs, targeted checks, rollback, and finalization. The lasting rule is that a small change should not require an agent worktree when a transactional edit can prove exactly what changed.
16
-
17
- ## V7 — Execution first and task-local policy
18
-
19
- V7 classified execution by task scope and risk, selected workspace or worktree isolation deliberately, and tightened task-local verification and lifecycle handling. The lasting rule is that execution mode is chosen from current task evidence rather than from a global one-size-fits-all workflow.
20
-
21
- ## V8 — ChatGPT facade and visual controller
22
-
23
- V8 established the compact ChatGPT-facing facade, Direct Edit as the common path, optional agent execution, recovery projections, and a visual Local Controller. Later revisions moved heavy reads off the Gateway hot path, bounded default responses, and retained atomic typed tools behind the facade.
24
-
25
- ## Legacy ChatGPT Controller and Local Bridge
26
-
27
- The earlier Controller and Local Bridge documents described recovery projections, compact MCP capabilities, Local Job tickets, visual review, diagnostics, and optional Codex or Claude sessions. Their current contracts now live in executable code, `docs/architecture/current/`, and `docs/operations/`; these older documents are no longer separate product surfaces.
28
-
29
- ## Verification records
30
-
31
- V5, V6, and V8 verification files were snapshots of checks performed against specific historical revisions and environments. They are not current release evidence. Current verification is produced by repository checks, durable Evidence records, and exact-revision test output.
32
-
33
- ## Preservation policy
34
-
35
- - Current architecture belongs only in `docs/architecture/current/`.
36
- - Important superseded decisions are summarized here instead of keeping many competing design documents.
37
- - Detailed removed documents remain available in Git history.
38
- - Historical text never overrides executable behavior, persisted schemas, accepted ADRs, or the current architecture set.
7
+ Older V4–V8, Supervisor, Local Bridge, Issue/Task/Job, recovery, routing and migration documents remain available through Git history. They are intentionally not maintained as parallel architecture surfaces.
@@ -1,100 +1,20 @@
1
1
  # Architecture Index
2
2
 
3
- > Controller Runtime architecture entry point.
3
+ > Architecture request index and compatibility entry point. **Runtime Authority:** [`CURRENT.md`](CURRENT.md).
4
4
 
5
- ## Runtime Authority
5
+ The canonical documentation model is intentionally small:
6
6
 
7
- **`docs/architecture/current/` is the only Runtime Authority for the current and target Forge Controller Runtime architecture.**
7
+ - [`CURRENT.md`](CURRENT.md) — sole maintained current architecture authority.
8
+ - [`../ROADMAP.md`](../ROADMAP.md) — current and next architecture/product priorities.
9
+ - [`EVOLUTION.md`](EVOLUTION.md) — append-only historical architecture change log.
10
+ - [`versions/`](versions/) — per-version architecture snapshots.
11
+ - [`history/`](history/) and [`history.md`](history.md) — archived historical evidence, never runtime authority.
12
+ - [`../../CHANGELOG.md`](../../CHANGELOG.md) — release history.
13
+ - `decisions/` — accepted ADR rationale; accepted invariants are folded into `CURRENT.md` when they become ordinary current architecture.
14
+ - `requests/` — pending architecture drift/change requests only.
15
+ - `researches/`, plans and Work records — evidence, not architecture authority.
8
16
 
9
- Start here:
10
-
11
- - [Current architecture map and reading order](current/README.md)
12
- - [Architecture governance contract](current/governance.md)
13
-
14
- When current implementation, the consolidated architecture history, a research note, and a document under `current/` disagree, the following precedence applies:
15
-
16
- 1. executable code and persisted schemas describe **Current Implementation** facts;
17
- 2. `docs/architecture/current/` defines the approved **Target Architecture** and mandatory **Migration Rules**;
18
- 3. accepted ADRs may amend the target architecture until their conclusions are merged into `current/`;
19
- 4. the consolidated history, snapshots, plans, research reports, and diagrams are historical or exploratory evidence only.
20
-
21
- A target rule is not evidence that the implementation already satisfies it. Every current architecture document must distinguish:
22
-
23
- - **Current Implementation** — behavior verified in code, tests, or persisted schemas;
24
- - **Target Architecture** — the approved end state that future work must converge toward;
25
- - **Migration Rule** — constraints that apply while moving from the current implementation to the target.
26
-
27
- ## Current Controller Runtime Scope
28
-
29
- Forge is a repository engineering control plane. It includes:
30
-
31
- - MCP and local UI entry points;
32
- - a multi-repository registry and per-repository runtime storage;
33
- - Issue, Task, Job, Run, Direct Edit, Verification, and evidence lifecycles;
34
- - optional Codex, Claude, and GitHub Copilot execution;
35
- - workspace and worktree isolation, integration, checks, recovery, and governance;
36
- - future schedule-driven bounded occurrences and cross-repository orchestration.
37
-
38
- It is not the product runtime of the repositories it manages. It must not replace repository-owned build, test, deployment, or release systems as the final authority.
39
-
40
- ## Architecture Document Classes
41
-
42
- | Class | Location | Authority |
43
- | --- | --- | --- |
44
- | Current architecture | `docs/architecture/current/` | Runtime Authority |
45
- | Architecture decisions | `docs/architecture/decisions/` | Binding until merged or superseded |
46
- | Pending drift requests | `docs/architecture/requests/` | Proposed change only |
47
- | Architecture snapshots | `docs/architecture/snapshots/` | Historical evidence |
48
- | Consolidated architecture history | `docs/architecture/history.md` | Historical Design / Not Runtime Authority |
49
- | Research reports | `docs/researches/` | Hypothesis and supporting evidence |
50
- | Plans and task records | `plans/`, `tasks/` | Execution intent and progress, not architecture authority |
51
- | Diagrams | `docs/architecture/diagrams/` | Explanatory projection; semantic Markdown source wins |
52
-
53
- ## Current Architecture Set
54
-
55
- The maintained current architecture set contains:
56
-
57
- - `README.md` — map, status labels, and reading order;
58
- - `governance.md` — authority, ownership, ADR, and drift rules;
59
- - `system-overview.md` — system boundary and process topology;
60
- - `personal-assistant-plugin-baseline.md` — concrete assistant/plugin/provider boundary, threat model, capability matrix, and migration baseline;
61
- - `architecture-invariants.md` — rules implementations must not violate;
62
- - `entity-model.md` — Issue, Task, Job, Run, Edit Session, Verification, Schedule, Occurrence, Claim, and Lease semantics;
63
- - `job-and-run-lifecycle.md` — durable execution and retry state machines;
64
- - `dispatch-and-agent-strategy.md` — Direct Edit, Quick Agent, durable Task, and role selection;
65
- - `scheduler-and-resource-claims.md` — repository actors, resource claims, leases, and conflict behavior;
66
- - `multi-repository-execution.md` — quotas, fairness, failure isolation, and portfolio workflows;
67
- - `automation-and-schedule-engine.md` — bounded occurrences, budgets, backoff, deduplication, and stop conditions;
68
- - `failure-recovery.md` — process boundaries, orphan handling, reconciliation, and fencing;
69
- - `verification-and-release-gates.md` — exact-revision evidence, integration gates, release freeze, and human authorization;
70
- - `implementation-status.md` — verified implementation coverage and explicit migration gaps;
71
- - `migration-roadmap.md` — evidence-driven implementation convergence order;
72
- - `runtime-architecture-simplification.md` — single-owner services, canonical authority/config, immutable activation, Recovery boundary, invariants, and deletion map;
73
- - ADR [`decisions/20260803-release-identity-binding-and-exit-policy.md`](decisions/20260803-release-identity-binding-and-exit-policy.md) — captured release identity binding for managed children and Supervisor vs launchd failure domains.
74
-
75
- A missing or proposed rule must be recorded in an accepted architecture request or ADR and must not be inferred from historical material.
76
-
77
- ## Architecture Change Flow
78
-
79
- 1. Identify whether the proposed change alters a boundary, entity semantic, lifecycle, resource rule, safety invariant, or public execution contract.
80
- 2. Record the change as an architecture request or ADR before implementation when the answer is yes.
81
- 3. Update the affected `current/` documents in the same change or explicitly record the temporary drift and its owner.
82
- 4. Update tests and architecture checks that enforce the changed rule.
83
- 5. Consolidate useful superseded decisions in `history.md`, then remove duplicate detailed documents from the current tree while preserving them in Git history.
84
- 6. Close the request only after the current architecture and executable behavior no longer contradict each other, or the difference is explicitly labeled as a migration gap.
85
-
86
- See [Architecture governance contract](current/governance.md) for the full rule.
87
-
88
- ## Existing Domain Documentation
89
-
90
- The following domain pages describe the earlier repo-local workflow-harness architecture. They remain useful implementation history but are not the current Controller Runtime authority:
91
-
92
- - [Public Surface](domains/public-surface.md)
93
- - [Workflow Engine](domains/workflow-engine.md)
94
- - [Runtime Harness](domains/runtime-harness.md)
95
- - [Verification](domains/verification.md)
96
- - [Transactional Adoption Planner](transactional-adoption-planner.md)
97
- - [Global Hook Runtime](global-hook-runtime.md)
17
+ Executable code and persisted schemas are authoritative for implementation facts. `CURRENT.md` defines the architecture contract; a version snapshot or historical note never overrides it.
98
18
 
99
19
  ## Pending Architecture Requests
100
20
 
@@ -104,11 +24,8 @@ The following domain pages describe the earlier repo-local workflow-harness arch
104
24
 
105
25
  ## Accepted Architecture Decisions
106
26
 
107
- - [Controller-home SQLite state authority](decisions/20260801-controller-home-sqlite-state.md) — versioned controller-owned runtime facts, one-way JSON import, audit records, and phased migration.
108
- - [MCP Session Lifecycle and Stable Ingress Isolation](decisions/20260718-mcp-session-lifecycle-and-ingress-isolation.md) — one global transport-capacity authority, bounded stream leases, capacity-aware `/ready`, and a supervised ingress child process.
27
+ Existing accepted ADRs remain under [`decisions/`](decisions/). Once a decision becomes ordinary current architecture, its durable rule should be folded into `CURRENT.md`; the ADR remains historical rationale.
109
28
 
110
- ## Review Backlog
29
+ ## Change discipline
111
30
 
112
- - Continue converging P0 runtime behavior with the gaps recorded in `current/implementation-status.md`.
113
- - Add link validation and exact-revision release-manifest checks to the final release gate.
114
- - Keep diagrams as projections of the Markdown semantic source; a diagram must not introduce architecture rules absent from `current/`.
31
+ Do not create another current-architecture page for each refactor. Architecture-root Markdown is limited to `CURRENT.md`, `EVOLUTION.md`, `history.md`, and this index; historical pages belong under `history/`. Update `CURRENT.md` only when the architecture contract changes, update `ROADMAP.md` when priorities change, append `EVOLUTION.md` for material architecture transitions, and create/update a version snapshot only at a release/version boundary. Implementation phases, pending manual work, operator-local paths, and other execution status belong in durable Work/Plan evidence rather than maintained current architecture.
@@ -1,7 +1,7 @@
1
1
  # MCP HTTP Transport Lifecycle
2
2
 
3
3
  > Capability: `mcp-http-transport-lifecycle`
4
- > Runtime Authority: `docs/architecture/current/architecture-invariants.md` and `docs/architecture/current/failure-recovery.md`
4
+ > Runtime Authority: `docs/architecture/../../CURRENT.md` and `docs/architecture/../../CURRENT.md`
5
5
 
6
6
  ## Responsibility
7
7
 
@@ -0,0 +1,39 @@
1
+ # Semantic harness convergence acceptance — 2026-08-22
2
+
3
+ ## Scope
4
+
5
+ This is the S4 exact-main acceptance record for `PLAN-FORGE-SEMANTIC-HARNESS-CONVERGENCE-20260821-V3R2`. The evaluation snapshot is `f69ad7d1282a8de2335ffe12adb2e54f01fd1b10`, the S3-integrated main revision.
6
+
7
+ ## Explicit evaluation ground truth
8
+
9
+ The isolated evaluation catalog now has dedicated scenarios for:
10
+
11
+ - semantic context plus root-to-nearest `AGENTS.md` / `CLAUDE.md` instruction recognition;
12
+ - Scale coordination through approved Plan steps and independent bounded Work;
13
+ - Direct/Lightweight execution with zero durable lifecycle side effects on the fast path.
14
+
15
+ Each scenario freezes intended behavior, affected domains, invariants, regression risks, an immutable Git snapshot, and an executable focused validator. These scenarios do not create a second runtime or semantic authority.
16
+
17
+ ## Performance acceptance
18
+
19
+ The Plan references the controller-recorded `03121020` baseline. That identifier is not stored as a repository artifact, so this repository record does not invent missing historical sample values. The durable comparison point available from the Plan is the historical 4–5 second public-gateway spike that motivated S3. Current exact-main measurements are materially below that failure mode:
20
+
21
+ | Path | Current evidence | Acceptance |
22
+ | --- | ---: | --- |
23
+ | MCP file-read facade | p50 0.8 ms, p95 15.4 ms | no multi-second gateway tax |
24
+ | MCP bounded readonly commands | p50 24.9–28.5 ms, p95 27.2–36.7 ms | no multi-second gateway tax |
25
+ | MCP async Process handle admission | p50 13.9 ms, p95 14.4 ms | bounded and zero legacy Job/Worker side effects |
26
+ | Context steady cold | p50 11.96 ms, p95 12.14 ms | stable after startup |
27
+ | Context hot | p50 0.85 ms, p95 0.93 ms | session cache reuse proven |
28
+ | Context startup cold | 221.79 ms | isolated startup cost, not steady-state |
29
+ | Lightweight pre-spawn harness | p95 15 ms | zero durable Process writes and zero Lease operations |
30
+
31
+ The gateway benchmark separately attributes classification and routing at approximately 0 ms; observed command time is in the concrete operation. The historical 4–5 second spike was not reproduced.
32
+
33
+ ### Concurrent semantic admission tail
34
+
35
+ The 32-controller admission stress test remains semantically correct: one shared Requirement resolves to one authority, while 32 independent Requirements resolve to 32 authorities. Holder CPU p95 remains bounded (about 4 ms shared and 9 ms independent in the latest exact-main-aligned run), while wall-clock holder p95 can rise under simultaneous 32-process host scheduling. That divergence is attributed to OS scheduling/preemption rather than additional canonical persistence CPU. The correctness race discovered during S3 (`LOCK_OWNERSHIP_MISMATCH`) was repaired by identity-checked stale-lock reaping, with regression coverage. The benchmark deliberately keeps the wall-clock 10 ms assertion visible rather than hiding host-scheduling variance.
36
+
37
+ ## Architecture outcome
38
+
39
+ The final contract remains: ChatGPT owns semantic judgement; Forge owns deterministic repository/runtime mechanisms; Plan/Work are the semantic lifecycle authorities; Scale coordinates existing authorities; Direct/Lightweight paths avoid unnecessary durable machinery; `rh_context` returns bounded source and applicable guidance evidence without turning guidance into scope authority.
@@ -0,0 +1,38 @@
1
+ # Forge 1.6 Architecture Snapshot
2
+
3
+ Status: **Version Snapshot — Not Runtime Authority**
4
+
5
+ This is the release-family architecture record for Forge 1.6. The live architecture contract is [`../CURRENT.md`](../CURRENT.md).
6
+
7
+ ## Architecture shape
8
+
9
+ ```text
10
+ ChatGPT / semantic controller
11
+ -> stable 19-tool MCP facade
12
+ -> Context Engine / repository primitives / plugin dispatcher
13
+ -> Ephemeral or Lightweight local execution
14
+ -> optional Work + Durable Process for continuity
15
+ -> immutable Canonical Runtime release + standalone recovery
16
+ ```
17
+
18
+ ## Key contracts
19
+
20
+ - Default MCP surface: 19 stable tools; `core` and `advanced` are the same bounded default surface.
21
+ - Explicit `full` profile preserves historical compatibility definitions but is not used to construct the default schema.
22
+ - `rh_context` supports progressive raw-source retrieval with exact-known-path reservation, symbol materialization, session caching, CodeGraph hints and changed-file overlays.
23
+ - Ordinary local command execution is Direct/Lightweight by default after command/effect policy admission.
24
+ - Work is selected for continuity, scheduling, external effects, independent deliverables, recoverability or multi-controller coordination—not predicted file/line complexity.
25
+ - Runtime availability/release recovery is separated from ordinary command recovery semantics.
26
+ - Git/worktree, Edit Session, validation evidence, optional Work and optional durable Process each own one concern; compatibility projections are not current mutable authorities.
27
+ - Canonical Runtime activates one immutable whole release and retains the previous release for rollback.
28
+
29
+ ## 1.6 simplification work
30
+
31
+ The 1.6 line introduced the quality-first executable-harness direction, removed unreachable Local Bridge execution code, detached the stable Controller schema from legacy full-profile definitions, and added an internal TypeScript Language Service navigation prototype for compiler-backed references/definitions/implementations without a new dependency or durable index.
32
+
33
+ ## Known compatibility boundaries
34
+
35
+ - `toolset=full` remains available for legacy consumers.
36
+ - Some legacy Issue/Task/Job and Runtime modules remain for persisted-state or compatibility reads.
37
+ - Several large modules still need responsibility-based decomposition.
38
+ - TypeScript navigation remains internal until broader repository/project-config behavior is proven.
@@ -0,0 +1,41 @@
1
+ # Forge 1.7 Architecture Snapshot
2
+
3
+ This is the release-family architecture record for Forge 1.7. The live architecture contract is [`../CURRENT.md`](../CURRENT.md); this file is historical release evidence and must not become parallel runtime authority.
4
+
5
+ ## Controller and execution model
6
+
7
+ - ChatGPT remains the sole semantic controller. Forge supplies deterministic repository, Work/Plan, Process, Schedule, provider, evidence, recovery, and release mechanisms.
8
+ - Direct/Ephemeral execution remains the default for bounded understood work. Durable Work/Plan state is reserved for continuity, isolation, scheduling, recovery, independent delivery, external effects, or real dependency decomposition.
9
+ - Work, Plan, Schedule, Handoff, Runtime, and Git are the existing durable authorities; Forge 1.7 does not add a second semantic scheduler, agent database, or completion engine.
10
+
11
+ ## Persistent Autonomous Continuation
12
+
13
+ - Schedule wake resolves an existing durable Work and reuses its bound ChatGPT conversation; a new Controller round reconstructs authority from Forge state rather than chat memory.
14
+ - Round disposition is explicit (`wait`, `continue_immediately`, `wait_for_user`, or `goal_complete`). Forge-owned ChatGPT tabs settle only after the round disposition/release boundary; immediate continuation is fenced against duplicate prompt/Work creation.
15
+ - Local/remote effect Work is distinct from repository-change Work, so runtime/schedule effects can be durably verified and finalized without manufacturing a Git diff.
16
+ - Retryable readiness failures use bounded backoff while user-action/security boundaries stay fail-closed. Stable release acceptance requires real timer-origin continuation evidence, not schedule configuration alone.
17
+
18
+ ## Browser Runtime V3
19
+
20
+ - Controller Home BrowserSession is the sole durable browser-session authority. Stable provider/resource target identity is distinct from mutable URL/title.
21
+ - Common native/DOM operations are background-safe when capability permits; user-owned tabs are preserved. Physical foreground input is an explicit last-resort provider and still requires independent postcondition verification.
22
+ - Native replacement waits for the exact replacement tab to settle to HTTP(S), rejects transitional `about:*` state as success, preserves strict concrete-resource URL validation, and authorizes cross-origin navigation against the destination origin.
23
+ - Transport, Apple Events, Accessibility, Desktop Operator, or CGEvent success alone is not factual completion; postconditions remain authoritative, and unknown non-idempotent outcomes are never blindly replayed.
24
+
25
+ ## Typed capabilities and global provider profiles
26
+
27
+ - The ChatGPT facade remains stable while typed domain capability discovery can rank relevant plugin actions from natural intent. Discovery is read-only; `plugin_action_execute` remains the plugin execution authority.
28
+ - Controller-global plugin profiles provide reusable provider configuration with repository overlays/restrictions. App Store Connect configuration carries credential references rather than private-key contents.
29
+ - iOS build automation supports simulator and explicit physical-device destinations plus opt-in provisioning updates using file-backed App Store Connect authentication references, with redacted evidence.
30
+
31
+ ## Runtime, recovery, and release boundary
32
+
33
+ - Canonical Runtime is activated as one immutable compatible release. Independent Recovery owns restart/rollback and verifies Runtime, Gateway, MCP, Scheduler, and release identity after activation.
34
+ - Source and Runtime coherence remain explicit; advancing source does not silently mutate a pinned Runtime. Release/rollback scope is the complete compatible Runtime rather than individual components.
35
+ - Finalization, target advancement, verification receipts, process/session identity, and lifecycle cleanup remain fenced so unrelated branch/source changes are not attributed to the wrong Work.
36
+
37
+ ## 1.7 release acceptance
38
+
39
+ - `package:check:main` and `package:check:release` must pass on the exact candidate.
40
+ - Persistent Autonomous Continuation must be demonstrated with real timer-origin Work/conversation reuse and a stabilization-only Continuous Evolution Supervisor soak before stable publication.
41
+ - The immutable `v1.7.0` Git tag, npm `latest` package, published tarball evidence, and active Canonical Runtime must resolve to the accepted release candidate.
@@ -5,7 +5,7 @@ Forge exposes browser automation through the bundled `browser` capability, the s
5
5
  Authoritative references:
6
6
 
7
7
  - [Browser plugin operations](operations/controller-browser-plugin.md)
8
- - [Human Interaction Plane](architecture/current/human-interaction-plane.md)
9
- - [Plugin baseline](architecture/current/personal-assistant-plugin-baseline.md)
8
+ - [Human Interaction Plane](architecture/CURRENT.md)
9
+ - [Plugin baseline](architecture/CURRENT.md)
10
10
 
11
11
  The browser engine is not a second controller, Runtime, plugin marketplace, or lifecycle owner.
@@ -27,40 +27,16 @@ The Package Runtime does not require a Forge Git checkout, Bun compilation, Code
27
27
 
28
28
  ## Local boundaries
29
29
 
30
- Forge keeps two MCP boundaries on loopback by default:
30
+ Forge MCP remains loopback-only, normally at:
31
31
 
32
32
  ```text
33
- ChatGPT OAuth Gateway: http://127.0.0.1:8767/mcp
34
- Canonical Runtime: http://127.0.0.1:8765/mcp
33
+ http://127.0.0.1:8765/mcp
35
34
  ```
36
35
 
37
- The OAuth Gateway is the endpoint for Secure Tunnel or HTTPS connectors. It proxies authenticated controller traffic to the bearer-only Canonical Runtime; remote clients should never target the internal Runtime directly. `forge mcp setup chatgpt --user-level` records the actual OAuth endpoint, so custom ports remain supported.
38
-
39
- Fresh user-level setup keeps the repository-centric Utility Console disabled until a repository/workbench target is configured. When enabled later it uses a separate loopback port (normally 8766). Never expose it to the internet.
36
+ The local Utility Console uses a separate loopback port (normally 8766). Never expose the Utility Console to the internet.
40
37
 
41
38
  Service-level MCP configuration lives below `Controller Home/mcp/`. OAuth credentials and bearer fallback tokens are local secrets and must not be pasted into chat or committed. Repository-specific `.forge/mcp.policy.json` can narrow access when a repository is later adopted.
42
39
 
43
- ## App identity vs. transport
44
-
45
- The ChatGPT App/connector is the application identity and owns the visible Forge tool schema. **Secure MCP Tunnel is the transport.** Switching an existing Forge App from a public HTTPS/Cloudflare route to Tunnel changes how commands reach Forge; it does not create a second Forge tool schema.
46
-
47
- Default path:
48
-
49
- ```text
50
- ChatGPT App -> OpenAI Secure MCP Tunnel -> tunnel-client
51
- -> Forge loopback OAuth Gateway -> Canonical Runtime
52
- ```
53
-
54
- A fresh chat is useful for isolated A/B testing, but Forge does not require a new conversation merely because transport changed when the same App is already connected and its tool schema is unchanged. If published tool definitions change, use ChatGPT's current app refresh/re-publish workflow.
55
-
56
- Upgrade existing Forge installs with:
57
-
58
- ```bash
59
- npm install -g @moretea-labs/forge@latest
60
- forge --version
61
- forge setup next
62
- ```
63
-
64
40
  ## Remote controller connection
65
41
 
66
42
  The setup profile owns the connection choice. Supported paths are:
@@ -71,7 +47,7 @@ The setup profile owns the connection choice. Supported paths are:
71
47
  4. **Existing HTTPS** — user-managed reverse proxy/tunnel ending in `/mcp`.
72
48
  5. **None** — local setup only; remote connectivity can be configured later.
73
49
 
74
- For OpenAI Secure MCP Tunnel, setup uses the official managed runtime surface and considers a matching local alias ready only when `tunnel-client` reports the configured `tunnel_id` running, healthy, and ready. Alias names are not tunnel identity.
50
+ For OpenAI Secure MCP Tunnel, setup uses the official supervised runtime surface and considers it ready only when `tunnel-client runtimes status forge --json` reports the runtime running, healthy, and ready.
75
51
 
76
52
  For public HTTPS paths, the configured connector URL is:
77
53
 
@@ -4,8 +4,8 @@ Forge models recurring or delegated work as bounded Schedules, Occurrences, Work
4
4
 
5
5
  Authoritative references:
6
6
 
7
- - [Automation and Schedule Engine](architecture/current/automation-and-schedule-engine.md)
8
- - [Dispatch and Agent Strategy](architecture/current/dispatch-and-agent-strategy.md)
9
- - [Failure Recovery](architecture/current/failure-recovery.md)
7
+ - [Automation and Schedule Engine](architecture/CURRENT.md)
8
+ - [Dispatch and Agent Strategy](architecture/CURRENT.md)
9
+ - [Failure Recovery](architecture/CURRENT.md)
10
10
 
11
11
  Automation does not gain permission to publish, deploy, merge, send, or perform destructive effects without the required authorization.
@@ -4,4 +4,4 @@ GitHub is an optional first-party Forge provider for repository collaboration an
4
4
 
5
5
  Remote writes require explicit authorization and idempotent provider evidence. Configure the provider through the Forge CLI or plugin action surface and verify repository mapping before mutation.
6
6
 
7
- See [Integrations](wiki/Integrations.md), [Plugin baseline](architecture/current/personal-assistant-plugin-baseline.md), and [Verification and Release Gates](architecture/current/verification-and-release-gates.md).
7
+ See [Integrations](wiki/Integrations.md), [Plugin baseline](architecture/CURRENT.md), and [Verification and Release Gates](architecture/CURRENT.md).
@@ -4,4 +4,4 @@ The canonical Forge Runtime reconciles durable Work, Process, Lease, projection,
4
4
 
5
5
  The OS service manager automatically starts and restarts the single `forge-runtime` process. Standalone Recovery remains independently installable for diagnostics, service repair, tunnel repair, and offline whole-Runtime rollback when the primary Runtime cannot start.
6
6
 
7
- See [Failure Recovery](architecture/current/failure-recovery.md), [Reliability runbook](operations/controller-reliability-runbook.md), and [Standalone disaster recovery](operations/standalone-disaster-recovery.md).
7
+ See [Failure Recovery](architecture/CURRENT.md), [Reliability runbook](operations/controller-reliability-runbook.md), and [Standalone disaster recovery](operations/standalone-disaster-recovery.md).
@@ -34,8 +34,8 @@ Interactions that can mutate remote state still require `confirm_authorization=t
34
34
 
35
35
  The browser mode is explicit:
36
36
 
37
- - `managed_persistent` is the default and preserves the previous behavior: each action launches a visible persistent Playwright context, restores the target URL, performs one bounded operation, persists session metadata, then closes the context.
38
- - `attach_preferred` uses a strict order: configured loopback CDP endpoints; then an already-running, scriptable macOS Vivaldi or Google Chrome instance; then `cdpAttachFallback`. CDP inventory reuses a previously owned matching tab. Apple Events uses the active browser only for discovery, creates a plugin-owned background tab for a new session, preserves the user's active tab, and reattaches directly to the saved window/tab identity on later actions.
37
+ - `attach_preferred` is the default. It uses a strict order: configured loopback CDP endpoints; then an already-running, scriptable macOS Google Chrome or Vivaldi instance; then `cdpAttachFallback`. The default fallback is `managed_persistent`, so Forge only launches its own Playwright browser after attach paths are unavailable. CDP inventory reuses a previously owned matching tab. Apple Events prefers the frontmost supported browser, otherwise Chrome before Vivaldi; it can reuse a unique existing tab at the requested URL, otherwise creates a plugin-owned background tab while preserving the user's active tab, and reattaches directly to the saved window/tab identity on later actions.
38
+ - `managed_persistent` is the explicit managed-browser mode: each action uses a visible persistent Playwright context, restores the target URL, performs one bounded operation, persists session metadata, then closes the context.
39
39
  - `isolated` launches a visible persistent context with a per-session repo-local profile under `.forge/browser/profiles/isolated/<session_id>`. It does not share the default plugin profile or a configured custom profile.
40
40
 
41
41
  Session metadata is reusable across actions via `session_id`. Any action that returns a generated `sessionId` persists that session before returning, so the identifier is immediately valid for follow-up actions. Transient navigation failures can retry with `retries` (1–3).
@@ -43,13 +43,30 @@ Session metadata is reusable across actions via `session_id`. Any action that re
43
43
  ### Reliability and safety notes
44
44
 
45
45
  - Domain allowlist is checked before navigation and after interactive URL changes.
46
- - Selector failures include repair hints (`repairHint`) when possible. Selector snapshots prefer unique `data-*`, role/ARIA, name, and non-generated id anchors; structural `nth-of-type` paths are only a last resort and are derived from the actual DOM sibling position rather than result order.
46
+ - Selector failures include repair hints (`repairHint`) when possible. Selector snapshots prefer unique `data-*`, role/ARIA, name, and non-generated id anchors; structural `nth-of-type` paths are only a last resort and are derived from the actual DOM sibling position rather than result order. Open Shadow DOM can be traversed explicitly with bounded `host >>> descendant` selectors; closed shadow roots remain inaccessible.
47
+ - Reusing a saved macOS native session is fail-closed: if the stable plugin-owned tab identity disappears, Forge returns `PLUGIN_BROWSER_SESSION_STATE_LOST` instead of silently creating a replacement tab that could discard unsaved form/editor state.
47
48
  - Console errors and failed requests are captured for Playwright/CDP cycles. Apple Events attachment reports empty console/network diagnostics because those streams are not exposed by the browser scripting dictionary.
48
49
  - Artifacts stay under `.forge/browser/**` (not arbitrary local paths).
49
50
  - CDP attach is bounded to configured loopback endpoints only; the plugin does not scan arbitrary ports or remote hosts. Native discovery checks only the configured Chrome/Vivaldi candidates and does not launch them.
50
51
  - CDP browsers are disconnected after the action; Apple Events keeps plugin-owned session tabs open until `close_session`/`close_page` while preserving user-owned tabs; managed contexts are closed after the action. Standard native DOM reads/interactions do not foreground the owned tab and return DOM evidence instead of attempting a screenshot.
51
52
  - Health `userFacingStatus` reports `ready`, `session active`, or setup states.
52
53
 
54
+ ## Browser Runtime V3 contract
55
+
56
+ Browser Runtime V3 is the current Browser authority. The V2 ADR in [`../architecture/decisions/20260826-browser-runtime-v2.md`](../architecture/decisions/20260826-browser-runtime-v2.md) remains historical rationale; it is not a second runtime contract. Public Browser action IDs remain stable.
57
+
58
+ - controller-home BrowserSession state is the only durable browser-session authority;
59
+ - exact provider/resource identity is stable while URL/title are mutable observations and are refreshed after persisted reads;
60
+ - provider routing is capability-based instead of fallback-by-exception;
61
+ - a warm provider handle is reusable across bounded actions and full rediscovery is exceptional;
62
+ - cold native rebind uses the saved exact `windowId` + `tabId`; losing optional global tab inventory does not authorize guessing a user tab;
63
+ - mutations compile to provider-local `observe -> act -> verify` transactions;
64
+ - raw Apple Events / AX / socket / CGEvent success is not accepted as mutation success without postcondition evidence;
65
+ - typed browser-internal capabilities are preferred for bookmarks/tabs/downloads instead of driving `chrome://` UI;
66
+ - foreground physical input is explicit and separate. Browser `trusted_input` does not silently foreground a tab or reuse Desktop coordinates; use an explicitly authorized Desktop Operator foreground/physical action when that is the intended capability.
67
+
68
+ The warm-path performance targets remain p95 <= 350 ms for reads, <= 600 ms for DOM interaction plus verification, and <= 700 ms for typed browser-internal-resource operations. Explicit physical-input fallback targets p95 <= 1500 ms and is foreground-capable only when requested. Current-source live evidence is emitted by `tests/live/browser-runtime-v3.e2e.ts`; Work/Plan evidence owns measured p50/p95 values rather than this maintained runbook.
69
+
53
70
  ## Configuration
54
71
 
55
72
  The source of truth is `.forge/plugins/browser.json`.
@@ -170,13 +187,16 @@ Apple Events attachment treats silence as the default execution contract:
170
187
  - native tab ownership is the stable window/tab reference itself. CDP keeps its separate owner-token mechanism;
171
188
  - only explicitly foreground-dependent operations such as screenshot capture or human handoff may require visible foreground presentation. They fail closed rather than activating implicitly.
172
189
 
173
- The live macOS acceptance test covers background replacement, DOM fill/click, click-driven navigation, session URL refresh, `go_back`, `reload`, explicit screenshot refusal, session close, and verifies both the user's active Chrome tab and the system frontmost application remain unchanged.
174
- Run it explicitly on a macOS workstation with a running Chrome instance:
190
+ The legacy macOS acceptance test remains available through `bun run test:browser-live`. Browser Runtime V3 adds `tests/live/browser-runtime-v3.e2e.ts`, which uses loopback fixtures and exact owned refs to cover Chrome/Vivaldi lifecycle, competing-foreground preservation, same-origin URL drift plus cold rebind, failed replacement postconditions, Chrome internal-resource adoption, cleanup, and per-operation p50/p95 reporting. Run the V3 gate explicitly on a macOS workstation with the target browsers already running:
175
191
 
176
192
  ```bash
177
- bun run test:browser-live
193
+ bun tests/live/browser-runtime-v3.e2e.ts
178
194
  ```
179
195
 
196
+ Set `FORGE_BROWSER_V3_REQUIRE_COMPETING_FOREGROUND=1` when a non-browser application is already frontmost to make foreground preservation a hard precondition. Set `FORGE_BROWSER_V3_REQUIRE_DOM_ALL=1` only when JavaScript-from-Apple-Events permission is expected for every requested native browser. Without that strict flag, a browser whose lifecycle is available but DOM automation is blocked is reported as `external_permission_required` with `PLUGIN_BROWSER_JAVASCRIPT_PERMISSION_REQUIRED`; the harness still verifies exact-ref cleanup and active-user-tab preservation for that product.
197
+
198
+ The stable Desktop Operator broker may omit global `list_tabs` or Browser `trusted_input`. Forge treats inventory absence as a loss of reuse optimization, not as permission to inspect or adopt unknown user tabs: new sessions create a Forge-owned tab, saved sessions validate exact refs, and close/reconcile operate on exact refs. Missing native trusted input remains a typed Browser capability limitation; explicit Desktop Operator foreground/physical interaction is a separate, visually verified path.
199
+
180
200
  ## Tab Resume And Diagnostics
181
201
 
182
202
  When attaching through CDP, the plugin inventories existing tabs by index, URL, and title. Selection is deterministic:
@@ -39,6 +39,130 @@ Call `GET /health` on the local MCP endpoint. The response includes:
39
39
 
40
40
  A growing `rejectedOverload` value with no matching capacity-eviction or close activity means clients are submitting protected work faster than the Controller can accept it. A pool full of stream-only sessions should now self-recover. Retrying with backoff is preferable to increasing every limit.
41
41
 
42
+ ## Runtime Activation Failure Looks Like a 502 (2026-08-23 incident)
43
+
44
+ When a new Runtime release activation fails, the public MCP path can return
45
+ HTTP `500` on `initialize`, which the tunnel surfaces as a `502`-style
46
+ connection failure. The chain observed on 2026-08-23:
47
+
48
+ 1. A Runtime release activation started a new `mcp serve` process while the
49
+ launchd gateway already owned `127.0.0.1:8767`. The new process failed to
50
+ bind (`Failed to start server. Is port 8767 in use?`) but did **not exit**;
51
+ it kept running as an orphan (`PPID 1`) spinning at ~98% CPU.
52
+ 2. The canonical Runtime (port 8765) failed to start for the new release
53
+ (`RUNTIME_RELEASE_AUTHORITY_MISMATCH` in
54
+ `runtime/service/logs/stderr.log`), so the gateway could not complete MCP
55
+ `initialize` and returned HTTP 500.
56
+ 3. `tunnel-client` posted the upstream error to the control plane
57
+ (`dispatcher received MCP upstream error`, `upstream_status=500`,
58
+ `rpc_method=initialize`), which the remote client saw as a failed
59
+ connection / 502.
60
+
61
+ Diagnostic fingerprint:
62
+
63
+ - `gateway.stderr.log` contains `Failed to start server. Is port 8767 in use?`
64
+ - `runtime/service/logs/stderr.log` contains repeated
65
+ `RUNTIME_RELEASE_AUTHORITY_MISMATCH`
66
+ - recovery watchdog log shows `restart_primary_runtime` attempts followed by
67
+ `action":"rollback"` restoring the previous release
68
+ - a stray `bun ... mcp serve` process with `PPID 1` and high `%CPU`
69
+
70
+ Remediation:
71
+
72
+ - The standalone Recovery watchdog automatically rolls back after the bounded
73
+ restart budget is exhausted; wait for `action":"healthy"` in
74
+ `recovery/audit/watchdog.log` before doing anything else.
75
+ - Kill the orphaned `mcp serve` child of the failed release (verify it holds no
76
+ listening sockets first); it only burns CPU after a failed port bind.
77
+ - Verify the canonical Runtime answers `initialize` on its own port and that
78
+ the tunnel log shows no new `upstream_status=500` entries.
79
+
80
+ Known code defect to fix: `mcp serve` should exit with a non-zero status when
81
+ the requested port is already in use instead of staying alive in a hot loop.
82
+
83
+ ## Connector/Activation Recovery Gaps Behind Intermittent 502 (2026-08-27)
84
+
85
+ A second class of intermittent `502` was traced to release/Connector coherence rather
86
+ than to a permanently dead Recovery service.
87
+
88
+ Observed evidence:
89
+
90
+ - a live Forge MCP request returned `502` while independent Recovery observed the
91
+ Canonical Runtime briefly as `RUNTIME_NOT_RUNNING`; the Runtime became ready again
92
+ a few seconds later after release authority reverted to the prior package release;
93
+ - separate MCP connection failures also occurred while independent Recovery still
94
+ observed the Canonical Runtime as ready, proving that not every `502` is a whole-
95
+ Runtime failure;
96
+ - the persistent package Connector health probe accepted any received HTTP status,
97
+ so `500`/`502` could be classified as healthy and the broken service reused;
98
+ - detached macOS package activation scheduled the Runtime switch and then rebound the
99
+ Connector to the candidate release before the activation helper committed the
100
+ Runtime service. If helper activation failed, Runtime authority/service rolled back
101
+ while Connector authority/plist could remain on the candidate generation;
102
+ - standalone Recovery's Connector action previously restarted the already-installed
103
+ launchd service. A stale/mutable launch spec therefore remained stale after restart.
104
+
105
+ Corrected invariants:
106
+
107
+ 1. Connector reuse accepts only the expected MCP/OAuth endpoint semantics (`200` or
108
+ the unauthenticated `401` Bearer challenge); `5xx` is always unhealthy.
109
+ 2. Detached activation does not switch the Connector in the installer. The activation
110
+ helper installs the Runtime service first and only then commits the Connector to the
111
+ same immutable package release. A Runtime activation failure therefore leaves the
112
+ prior Connector generation untouched.
113
+ 3. Connector-only Recovery first reconciles the canonical package Connector against
114
+ the active immutable Runtime release, then verifies local ownership/public MCP, and
115
+ only then decides whether a launchd/tunnel restart is still required.
116
+ 4. Whole-Runtime rollback remains deliberately stricter than Connector recovery. A
117
+ known-good Runtime is not rolled back merely because its Connector or external
118
+ tunnel drifted; those hops must be repaired independently.
119
+ 5. Recovery `runtime_status` reports bounded Watchdog decision evidence (last action,
120
+ reason and restart/failure counters) so incident review can distinguish "Recovery
121
+ never fired" from "Recovery fired and the client observed the bounded outage".
122
+
123
+ ## Session Continuation Fails With 404 MCP_TOOL_SURFACE_CHANGED (2026-08-23)
124
+
125
+ Second incident on the same day, different failure mode. After a session is
126
+ created, every follow-up (`notifications/initialized`, `tools/call`) returned
127
+ HTTP 404 with:
128
+
129
+ ```json
130
+ {"error":"session_not_found","code":"MCP_TOOL_SURFACE_CHANGED",
131
+ "message":"MCP Runtime tool surface changed; initialize a new session so tools/list is refreshed.",
132
+ "recoverable":true,"action":"reinitialize",
133
+ "previousFingerprint":"<session>","currentFingerprint":"<published>"}
134
+ ```
135
+
136
+ Root cause: the Gateway session fence compares the **live** Runtime schema
137
+ fingerprint captured at `initialize` (`readCanonicalRuntimeToolSchema` ->
138
+ `proxy.listTools()`) against the **published** fingerprint in
139
+ `runtime/status.json`. The Runtime publishes `status.json` once at startup and
140
+ does not republish when its live tool surface changes at runtime (e.g. a
141
+ plugin registers or code edits change the tool set). Once the two values
142
+ diverge, every session continuation is rejected as a tool-surface change, so
143
+ the tunnel/connector appears broken even though `/health` shows both
144
+ fingerprints matching the published value.
145
+
146
+ Diagnostic fingerprint:
147
+
148
+ - Gateway `/health` shows `toolSurfaceFingerprint` equal to
149
+ `runtimeToolSurfaceFingerprint` (both read the published value), but a real
150
+ `initialize` session stores a different fingerprint.
151
+ - Follow-up requests get the `MCP_TOOL_SURFACE_CHANGED` 404 with
152
+ `previousFingerprint != currentFingerprint`.
153
+
154
+ Remediation:
155
+
156
+ - Restart the canonical Runtime service
157
+ (`launchctl kickstart -k gui/$UID/com.moretea.forge.runtime.<suffix>`) so it
158
+ republishes `status.json` from its current surface, then verify
159
+ `initialize` -> `notifications/initialized` (202) -> `tools/call` (200) with
160
+ a valid OAuth token.
161
+ - Known code defect to fix: the Runtime should republish `status.json`
162
+ whenever its live tool surface changes (tool list changed), and/or the
163
+ Gateway fence should prefer the live fingerprint for the current-schema
164
+ comparison instead of trusting a stale publication.
165
+
42
166
  Call `GET /ready` separately. A 503 from `/ready` with `/health` still returning 200 means the Runtime is live but cannot safely admit another initialize. `sessionCapacity.recoveryRecommended=false` preserves active work and waits; `true` is evidence for standalone Recovery's bounded whole-Runtime restart policy after the configured stall limit.
43
167
 
44
168
  ## Diagnostic Order
@@ -68,7 +68,7 @@ A release change is performed only as an explicitly authorized whole-Runtime ope
68
68
  1. validate one immutable release manifest, configuration, database compatibility range, and Worker protocol;
69
69
  2. quiesce admission and stop the complete Runtime;
70
70
  3. atomically select the candidate as the one active whole release;
71
- 4. let the single Forge Runtime service start `forge-runtime` from that complete release;
71
+ 4. atomically mirror the selected release's signed `forge-runtime` entrypoint to the fixed physical service path `runtime/service/active-forge-runtime`, then let the single Forge Runtime service start that stable path with the selected release manifest/environment;
72
72
  5. require binary whole-Runtime readiness;
73
73
  6. on failure, stop the service, restore the previous release and its bound local SQLite backup, then start and verify the complete previous Runtime.
74
74