@defrex/autobuild 1.0.0-beta.3 → 1.0.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 (168) hide show
  1. package/README.md +1 -1
  2. package/SPEC.md +362 -56
  3. package/bin/ab-dispatch-generation.ts +93 -0
  4. package/docs/agent-runtimes.md +157 -0
  5. package/docs/answering-blocked-builds.md +21 -3
  6. package/docs/architecture.md +166 -7
  7. package/docs/build-store.md +123 -0
  8. package/docs/builds.md +82 -0
  9. package/docs/cli.md +48 -0
  10. package/docs/configuration-overview.md +93 -0
  11. package/docs/configuration.md +1778 -188
  12. package/docs/dispatcher-hosting.md +115 -0
  13. package/docs/dispatcher.md +59 -0
  14. package/docs/forges.md +121 -0
  15. package/docs/getting-started.md +60 -0
  16. package/docs/glossary.md +60 -0
  17. package/docs/hosted-service.md +2 -2
  18. package/docs/intake.md +48 -0
  19. package/docs/integration-overview.md +81 -0
  20. package/docs/integration-tree.md +87 -2
  21. package/docs/integration.md +54 -0
  22. package/docs/operating.md +114 -0
  23. package/docs/operator-api.md +64 -11
  24. package/docs/operator-surfaces.md +90 -0
  25. package/docs/overview.md +49 -0
  26. package/docs/plugin-authoring.md +426 -0
  27. package/docs/remote-store-protocol.md +12 -9
  28. package/docs/restacking.md +4 -1
  29. package/docs/seams.md +66 -0
  30. package/docs/setup.md +28 -6
  31. package/docs/skills.md +119 -0
  32. package/docs/spec-standard.md +23 -5
  33. package/docs/ticket-sources.md +132 -0
  34. package/docs/tickets.md +69 -0
  35. package/docs/troubleshooting.md +111 -0
  36. package/docs/upgrading.md +50 -0
  37. package/docs/verification.md +146 -0
  38. package/docs/website.md +47 -5
  39. package/docs/workspaces.md +152 -0
  40. package/package.json +5 -4
  41. package/packages/core/src/cli/artifact.ts +5 -4
  42. package/packages/core/src/cli/attention.ts +2 -0
  43. package/packages/core/src/cli/binary-direct.ts +190 -0
  44. package/packages/core/src/cli/binary-lifecycle.ts +46 -0
  45. package/packages/core/src/cli/binary.ts +24 -210
  46. package/packages/core/src/cli/build-control.ts +105 -2
  47. package/packages/core/src/cli/context.ts +41 -1
  48. package/packages/core/src/cli/dashboard/hand-pushed.ts +24 -0
  49. package/packages/core/src/cli/dashboard/handoff.ts +64 -0
  50. package/packages/core/src/cli/dashboard/integration-detail.ts +3 -0
  51. package/packages/core/src/cli/dashboard/model.ts +34 -10
  52. package/packages/core/src/cli/dashboard/render.ts +24 -2
  53. package/packages/core/src/cli/dashboard/rollback.ts +30 -0
  54. package/packages/core/src/cli/dispatch-args.ts +53 -0
  55. package/packages/core/src/cli/dispatch-crash-budget.ts +15 -0
  56. package/packages/core/src/cli/dispatch-frontend.ts +52 -5
  57. package/packages/core/src/cli/dispatch-handoff.ts +276 -0
  58. package/packages/core/src/cli/dispatch-launch-contract.ts +170 -0
  59. package/packages/core/src/cli/dispatch-launcher.ts +580 -0
  60. package/packages/core/src/cli/dispatch-parent-watch.ts +44 -0
  61. package/packages/core/src/cli/dispatch-preflight.ts +272 -0
  62. package/packages/core/src/cli/dispatch-presentation-job.ts +46 -0
  63. package/packages/core/src/cli/dispatch-presentation-ownership.ts +9 -0
  64. package/packages/core/src/cli/dispatch-process.ts +22 -90
  65. package/packages/core/src/cli/dispatch-readiness.ts +47 -0
  66. package/packages/core/src/cli/dispatch-repository-feed.ts +5 -1
  67. package/packages/core/src/cli/dispatch-runtime-cache.ts +522 -0
  68. package/packages/core/src/cli/dispatch-runtime-dependencies.ts +291 -0
  69. package/packages/core/src/cli/dispatch-runtime-use.ts +336 -0
  70. package/packages/core/src/cli/dispatch-upgrade-controller.ts +221 -0
  71. package/packages/core/src/cli/dispatch-upgrade-install.ts +258 -0
  72. package/packages/core/src/cli/dispatch-upgrade-source.ts +309 -0
  73. package/packages/core/src/cli/dispatch-upgrade-target.ts +190 -0
  74. package/packages/core/src/cli/dispatch.ts +604 -60
  75. package/packages/core/src/cli/dispatcher-liveness.ts +1 -1
  76. package/packages/core/src/cli/env.ts +1 -1
  77. package/packages/core/src/cli/harvest.ts +28 -11
  78. package/packages/core/src/cli/help.ts +10 -5
  79. package/packages/core/src/cli/installation.ts +5 -3
  80. package/packages/core/src/cli/main-checkout.ts +59 -0
  81. package/packages/core/src/cli/main.ts +15 -45
  82. package/packages/core/src/cli/node-verification-provenance.ts +97 -0
  83. package/packages/core/src/cli/repo-state.ts +3 -58
  84. package/packages/core/src/cli/repository-status.ts +67 -3
  85. package/packages/core/src/cli/runtime-spawn.ts +16 -0
  86. package/packages/core/src/cli/status.ts +57 -3
  87. package/packages/core/src/cli/upgrade-followup.ts +25 -0
  88. package/packages/core/src/cli/wait.ts +3 -0
  89. package/packages/core/src/cli/watch.ts +7 -0
  90. package/packages/core/src/config/landing.ts +8 -0
  91. package/packages/core/src/config/live.ts +1 -0
  92. package/packages/core/src/config/reference-metadata.ts +31 -0
  93. package/packages/core/src/config/reference.ts +342 -0
  94. package/packages/core/src/config/roles.ts +1 -1
  95. package/packages/core/src/config/schema.ts +352 -10
  96. package/packages/core/src/distribution-packaging.ts +116 -0
  97. package/packages/core/src/events/catalog.ts +6 -0
  98. package/packages/core/src/events/payloads.ts +53 -9
  99. package/packages/core/src/events/policy.ts +25 -0
  100. package/packages/core/src/events/repository.ts +184 -4
  101. package/packages/core/src/events/runtime.ts +16 -0
  102. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +2515 -78
  103. package/packages/core/src/kernel/dispatch-drain-recovery.ts +121 -0
  104. package/packages/core/src/kernel/dispatch-status.ts +4 -2
  105. package/packages/core/src/kernel/dispatch-upgrade.ts +171 -0
  106. package/packages/core/src/kernel/dispatcher-liveness.ts +7 -0
  107. package/packages/core/src/kernel/generators/repository-journals.ts +82 -0
  108. package/packages/core/src/kernel/guarded-forge.ts +1 -1
  109. package/packages/core/src/kernel/harvest.ts +98 -4
  110. package/packages/core/src/kernel/integration-attention.ts +20 -0
  111. package/packages/core/src/kernel/integration-state.ts +80 -11
  112. package/packages/core/src/kernel/landing-readiness.ts +6 -1
  113. package/packages/core/src/kernel/mixed-version.ts +34 -0
  114. package/packages/core/src/kernel/node-polling.ts +160 -0
  115. package/packages/core/src/kernel/read-facts.ts +40 -5
  116. package/packages/core/src/kernel/reducer-registry.ts +3 -0
  117. package/packages/core/src/kernel/reducer.ts +75 -14
  118. package/packages/core/src/kernel/service-facts.ts +11 -4
  119. package/packages/core/src/ontology.ts +2 -2
  120. package/packages/core/src/open-map.ts +3 -1
  121. package/packages/core/src/operator/presentation.ts +7 -0
  122. package/packages/core/src/operator/query.ts +6 -2
  123. package/packages/core/src/operator/registry.ts +1 -1
  124. package/packages/core/src/plugins/load.ts +4 -1
  125. package/packages/core/src/plugins/runtime-snapshot.ts +128 -0
  126. package/packages/core/src/ports/forge/contract.ts +29 -0
  127. package/packages/core/src/ports/forge/github.ts +189 -61
  128. package/packages/core/src/ports/forge-failure.ts +1 -0
  129. package/packages/core/src/ports/forge-telemetry.ts +3 -0
  130. package/packages/core/src/ports/runner/session-env.ts +1 -0
  131. package/packages/core/src/ports/types.ts +10 -0
  132. package/packages/core/src/ports/workspace/distribution-archive.ts +22 -149
  133. package/packages/core/src/ports/workspace/distribution-release.ts +56 -0
  134. package/packages/core/src/ports/workspace/git-worktree.ts +2 -1
  135. package/packages/core/src/ports/workspace/local-build-execution.ts +37 -17
  136. package/packages/core/src/processes/build-child-exit.ts +5 -26
  137. package/packages/core/src/processes/build-runner.ts +81 -11
  138. package/packages/core/src/processes/dispatcher.ts +254 -23
  139. package/packages/core/src/processes/execution-no-progress.ts +6 -0
  140. package/packages/core/src/processes/execution-relaunch.ts +30 -0
  141. package/packages/core/src/processes/execution-settlement.ts +16 -7
  142. package/packages/core/src/processes/harvest-runner.ts +328 -292
  143. package/packages/core/src/processes/process-group-reaper.ts +17 -10
  144. package/packages/core/src/runtime-identity.ts +22 -3
  145. package/packages/core/src/store/contract.ts +153 -0
  146. package/packages/core/src/store/local/store.ts +197 -72
  147. package/packages/core/src/store/reduced-reads.ts +8 -0
  148. package/packages/core/src/store/reducer-value-shapes.json +5783 -3305
  149. package/packages/core/src/store/remote/client.ts +43 -0
  150. package/packages/core/src/store/repo-state-events.ts +20 -3
  151. package/packages/core/src/store/types.ts +7 -0
  152. package/skills/finalize/SKILL.md +3 -1
  153. package/skills/guide/SKILL.md +273 -48
  154. package/skills/guide/references/integration-tree.md +87 -2
  155. package/skills/guide/references/operator-api.md +71 -14
  156. package/skills/guide/references/plugin-authoring.md +231 -266
  157. package/skills/guide/references/remote-store-protocol.md +12 -9
  158. package/skills/guide/references/restacking.md +4 -1
  159. package/skills/guide/references/setup.md +28 -6
  160. package/skills/guide/references/spec-standard.md +23 -5
  161. package/skills/harvest/SKILL.md +4 -0
  162. package/skills/harvest-review/SKILL.md +4 -0
  163. package/skills/implement/SKILL.md +4 -2
  164. package/skills/operate/SKILL.md +104 -35
  165. package/skills/plan/SKILL.md +12 -4
  166. package/skills/spec/SKILL.md +20 -2
  167. package/skills/tickets/SKILL.md +20 -1
  168. package/templates/hosted-service/package.json +2 -2
@@ -103,6 +103,22 @@ source targets, while build status shows the effective destination.
103
103
 
104
104
  ## Collect, verify and land
105
105
 
106
+ Node `verify:*` context additionally exposes `nodeVerification`: the frozen
107
+ range, a JSON index path, contribution build slugs, current stored ticket
108
+ identities, event-authorized spec revisions and spec paths, and their commits.
109
+ The index maps every commit in the range using build identity trailers,
110
+ including earlier-cycle contributions and merge side history. Commits without
111
+ an identity are listed as unattributed (a mechanical classification). The manifest
112
+ and index also expose `handPushedCommits: [{sha, originalSha, message}]` for owned
113
+ hand-pushed commits in the frozen range, preserving original identity across restacks.
114
+ Their full messages express maintainer-authorized intent: judge quality and
115
+ consistency, and never fail them solely for lacking a covering spec. Other node
116
+ changes are authorized when covered by the current event-authorized node spec or the spec
117
+ of the contribution introducing it; use the commit mapping to find that spec.
118
+ Missing or ambiguous provenance fails hydration. Leaf context is unchanged.
119
+ See [iterating inside a node](#iterating-inside-a-node) for authoring and evolving
120
+ these sources of intent.
121
+
106
122
  Create a node and direct work into it (replace ids with those returned by your
107
123
  source):
108
124
 
@@ -127,8 +143,10 @@ publication; tracker edits cannot be transactional with a forge write.
127
143
 
128
144
  The kernel runs all configured verify steps with normal path applicability on
129
145
  the exact node head and parent. Either moving invalidates eligibility, even a
130
- clean restack. Failed verification blocks the node: file a repair child targeting
131
- it; the repaired landed head permits a new cycle. Historical reports keep their
146
+ clean restack. Failed verification blocks the node and emits `integration.verification-failed` once per prepared cycle. Default watch and new hosted wake settings include it; `ab wait --for attention` also detects the current failure before notification. The fact names failed steps, head, parent and repair guidance. Watch baselines prior failures; reconcile status after arming. A new cycle can notify again, while historical facts do not keep a repaired node blocked. Recovery reports only the latest prepared cycle while its head and parent remain current; superseded failures are not backfilled. Recheck current status before filing a repair, since the node may have advanced after notification. To recover, file a repair child targeting
147
+ it; the repaired landed head permits a new cycle. If the contract changed, an
148
+ operator can explicitly revise the spec instead and verify again on the same head
149
+ (see operator node spec revisions below). Historical reports keep their
132
150
  actual head/base citations. Integration grammar is collect → verify → land →
133
151
  close, with restacking and repair cycles along the way.
134
152
 
@@ -145,6 +163,38 @@ merged head was verified, then completes the ticket. Closing without merge or
145
163
  aborting closes admission and returns the ticket to triage; already claimed
146
164
  children retain their frozen destination.
147
165
 
166
+ ## Iterating inside a node
167
+
168
+ Write the node spec as a finite integration charter: its goal, observable
169
+ completion conditions for the whole, and destination and landing expectations
170
+ under the effective policy. Put feature specifics in spec-standard children.
171
+ An open node supports three ways to iterate:
172
+
173
+ - **Add children.** Create spec-standard tickets targeting the node's ticket id,
174
+ for example `ab ticket create "Account settings" --body settings.md --target <node-id>`.
175
+ Ordinary children run their normal pipeline. Verification uses the provenance
176
+ mapping to judge changes against the introducing child's spec or the current
177
+ event-authorized node charter; a child contribution need not also be promised
178
+ independently by the charter.
179
+ - **Push small maintainer-authorized tweaks.** Push to the node's recorded branch
180
+ with meaningful commit messages describing intent. Verification reads the frozen
181
+ range's owned `handPushedCommits` messages, judges quality and consistency, and
182
+ cannot fail a tweak solely because it lacks a covering spec. This is maintainer
183
+ iteration, not permission for phase agents to bypass their publication boundary.
184
+ - **Revise the charter when the charter itself changes.** Use
185
+ `ab answer <node> --revise-spec replacement.md`, or update the ticket and import
186
+ it with `ab answer <node> --revise-spec-from-ticket`. A ticket edit alone does
187
+ not revise an active build. Children retain their specs, claims and targets;
188
+ the node recollects and verifies the replacement revision, including on the
189
+ same head and parent after failed verification. See
190
+ [operator node spec revisions](#operator-node-spec-revisions) for admission
191
+ restrictions.
192
+
193
+ Open children keep the node incomplete, including triage, backlog and ready
194
+ children. Completion remains finite: landed or otherwise ended nodes close
195
+ admission. Iteration does not relax verification of the exact head and parent,
196
+ or the configured readiness, consent and landing gates described above.
197
+
148
198
  ## Changing a parent
149
199
 
150
200
  `ab ticket update NODE-1 --target NODE-2` reparents an open node;
@@ -194,3 +244,38 @@ verification and landing, for queued dependency presence, on operator request,
194
244
  and after accepted re-parenting. Descendants need independent demand; presence
195
245
  requests follow only the minimal proven ancestor path. See
196
246
  [restacking](restacking.md#timing-and-evidence) for timing, requests and distance.
247
+
248
+ ## Polling and status
249
+
250
+ Opened integration nodes poll every tick until their durable activity has been
251
+ quiet for `policy.nodeIdleAfterSeconds` (default 600 seconds), then poll every
252
+ `policy.nodeIdlePollSeconds` (default 120 seconds). Holds and waiting for consent
253
+ qualify normally. Child claims, PR and landing activity, operator commands
254
+ (including repeated holds), restack requests and answers wake the next tick.
255
+ GitHub-only changes are discovered on the next due check, within the idle
256
+ interval plus normal tick scheduling while the dispatcher is running; failure,
257
+ cooldown and transport-budget gates still apply. Pending operations retain
258
+ active polling and action-time readiness checks remain fresh. Successful
259
+ `node.poll-checked` facts preserve quiet history across restarts; missing facts
260
+ force a fresh check. `ab build status` reports active or idle cadence and the
261
+ last successful check (or unrecorded evidence).
262
+
263
+ ## Operator node spec revisions
264
+
265
+ Operators may explicitly revise an opened idle collecting node or a node blocked on failed
266
+ integration verification without an escalation. Use
267
+ `ab answer <node> --revise-spec replacement.md` or, after amending its ticket,
268
+ `ab answer <node> --revise-spec-from-ticket`. Ticket edits alone do not revise
269
+ the build. Both forms enforce the same spec standard as leaf revisions.
270
+ Each kernel `spec.revised` records the exact artifact and operator identity
271
+ (with optional transport provenance); earlier revisions remain readable.
272
+ Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
273
+ The node recollects and verifies the new revision, including on the same head
274
+ and parent after a failed cycle. Earlier cycles remain historical evidence
275
+ and cannot block or authorize landing under the replacement. Children keep
276
+ their specs, claims and targets; contributions are not restarted.
277
+ Active verification/reconcile or writer work, restack/reparent work, pause,
278
+ pending controls, landing intent and ended PRs refuse the no-escalation path.
279
+ A concurrent state change refuses publication with a retry explanation;
280
+ uncited artifacts are inert. Leaves still require an open escalation and
281
+ restart from `plan`.
@@ -51,9 +51,9 @@ commands; see [owner workflow](setup.md#connected-projects).
51
51
 
52
52
  ## Operator sessions
53
53
 
54
- Operator sessions are the signed-in operator's durable orchestrator
54
+ Operator sessions are the signed-in user's durable orchestrator
55
55
  conversations: a hosted-only third store resource. A session
56
- belongs to the operator who created it; other operators of the same repository
56
+ belongs to the user who created it; other members of the same repository
57
57
  can read it and cannot write to it (`403 auth` on non-owner writes). Every
58
58
  write is attributed to the token's signed user — never a client-supplied
59
59
  identity — and carries no `via` marker: session events are the delegate's own
@@ -62,14 +62,14 @@ archived status is terminal.
62
62
 
63
63
  | Method and path | Result |
64
64
  |---|---|
65
- | `GET …/sessions` | The repository's session records, newest update first. Readable by any operator of the repository. |
66
- | `POST …/sessions` | `{"title"?:"…"}` → `201` + the created `SessionRecord`; the signed-in operator owns it. |
67
- | `GET …/sessions/{sid}` | `{session, state, turns}` where `state` is the reducer's derived state (`status`, `openTurn`, `pendingApproval`, `wakeGlobs`, `wakeCursors`, `turns`) and `turns` the ordered turn list. Readable by any operator of the repository. |
65
+ | `GET …/sessions` | The repository's session records, newest update first. Readable by any member of the repository. |
66
+ | `POST …/sessions` | `{"title"?:"…"}` → `201` + the created `SessionRecord`; the signed-in user owns it. |
67
+ | `GET …/sessions/{sid}` | `{session, state, turns}` where `state` is the reducer's derived state (`status`, `openTurn`, `pendingApproval`, `wakeGlobs`, `wakeCursors`, `turns`) and `turns` the ordered turn list. Readable by any member of the repository. |
68
68
  | `POST …/sessions/{sid}/messages` | `{"text":"…"}` → appends `message.posted`. Owner only. |
69
69
  | `PUT …/sessions/{sid}/wake` | `{"globs":["…"]}` (possibly empty) → appends `session.wake-set`. Owner only. |
70
70
  | `POST …/sessions/{sid}/approvals` | `{"turn":"…","toolCallId":"…","decision":"approve"\|"deny"}` → `approval.answered`. Owner only; `409 refusal` when the reduced state has no matching pending approval. |
71
71
  | `POST …/sessions/{sid}/archive` | Empty body → `session.archived`. Owner only; `409 refusal` when already archived. |
72
- | `GET …/sessions/{sid}/turns/{turn}/stream?since=N&wait=N` | The turn's stream read: `{chunks,status,outcome?,artifact?}` with `since` strictly greater-than and the same bounded-wait semantics as the stream protocol (whole seconds, clamped at 30). Unknown turn is `404 not-found`. Readable by any operator of the repository. |
72
+ | `GET …/sessions/{sid}/turns/{turn}/stream?since=N&wait=N` | The turn's stream read: `{chunks,status,outcome?,artifact?}` with `since` strictly greater-than and the same bounded-wait semantics as the stream protocol (whole seconds, clamped at 30). Unknown turn is `404 not-found`. Readable by any member of the repository. |
73
73
 
74
74
  Session state is a reduction of the session's event log, never a stored
75
75
  column; a `GET …/sessions/{sid}` response therefore always reflects the
@@ -81,8 +81,8 @@ turn runner (a later ticket) is the only producer of turn facts.
81
81
  | Method and path | Result |
82
82
  |---|---|
83
83
  | `GET …/builds?scope=active\|queued\|all` | Build summaries, newest update first. `queued` means active plus queued, matching `ab builds --queued`. |
84
- | `GET …/builds/{slug}` | `{detail, dashboardRow}`; `dashboardRow` remains a `CLEANING` row after `build.aborted` and becomes `null` only when the dashboard stops listing it (after cleanup's `build.completed`). |
85
- | `GET …/dashboard` | `{generatedAt, model, settingsHeader}`. `model` is the dashboard's rows, steps, elapsed timing inputs, harvest row, queue/capacity and settings projection. |
84
+ | `GET …/builds/{slug}` | `{detail, dashboardRow}`; `detail.runnerAttaches` records chronological attach boundaries and their runtime identity (version, commit, source kind/location), with null runtime for unrecorded historical attaches; `dashboardRow` remains a `CLEANING` row after `build.aborted` and becomes `null` only when the dashboard stops listing it (after cleanup's `build.completed`). |
85
+ | `GET …/dashboard` | `{generatedAt, model, settingsHeader}`. `model` is the dashboard's rows, steps, elapsed timing inputs, harvest row, queue/capacity and settings projection. Optional `rollback` contains `correlation`, `lineage`, full `failed` and `restored` runtime identities and rollback event `ts` for the authoritative dispatcher lineage’s unresolved hold. Both dashboards name failed, restored and held runtime plus timestamp. Matching durable different-target hold clearance removes it; a fresh operator lineage hides it only after a committed operational tick or accepted takeover. Run-started and yielded ticks alone cannot replace authority; same-lineage generations retain the notice. Historical rollback records are not fallback notices. Optional `handoffs` lists all accepted unfinished handoffs with predecessor `run`, optional `successor`, `correlation`, full `from`/`to` runtimes, `mode` and optional `deadline`. Outstanding drain-mode builds carry `draining: true`, also on build-detail `dashboardRow`; matching settlement removes it. Accepted completion removes the handoff; neither takeover nor the clock does. Missing historical mode means cutover and missing deadline displays unknown. |
86
86
  | `GET …/status` | Repository intake, pause, and default-auto-merge projection. |
87
87
  | `GET …/harvest/status` | Harvest gate, runs, steps, recovery, and attention projection. |
88
88
  | `GET …/builds/{slug}/artifacts/{kind}?rev=N` | Raw bytes (`application/octet-stream`) plus content-disposition and `X-Autobuild-Artifact-*` metadata headers. Omit `rev` for latest. |
@@ -146,6 +146,24 @@ revision, a trusted caller fetches the current ticket body and supplies it; the
146
146
  build must still have a recorded ticket. Revision conformance, lazy retry,
147
147
  artifact metadata, event ordering, and refusal rules are the same as the CLI.
148
148
 
149
+ Operators may explicitly revise an opened idle collecting node or a node blocked on failed
150
+ integration verification without an escalation. Use
151
+ `ab answer <node> --revise-spec replacement.md` or, after amending its ticket,
152
+ `ab answer <node> --revise-spec-from-ticket`. Ticket edits alone do not revise
153
+ the build. Both forms enforce the same spec standard as leaf revisions.
154
+ Each kernel `spec.revised` records the exact artifact and operator identity
155
+ (with optional transport provenance); earlier revisions remain readable.
156
+ Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
157
+ The node recollects and verifies the new revision, including on the same head
158
+ and parent after a failed cycle. Earlier cycles remain historical evidence
159
+ and cannot block or authorize landing under the replacement. Children keep
160
+ their specs, claims and targets; contributions are not restarted.
161
+ Active verification/reconcile or writer work, restack/reparent work, pause,
162
+ pending controls, landing intent and ended PRs refuse the no-escalation path.
163
+ A concurrent state change refuses publication with a retry explanation;
164
+ uncited artifacts are inert. Leaves still require an open escalation and
165
+ restart from `plan`.
166
+
149
167
  ## The registry's protocol face: `POST …/tools/{tool}`
150
168
 
151
169
  One generic route executes any entry of the agent tool registry (the same
@@ -220,7 +238,8 @@ event reads.
220
238
 
221
239
  Dispatcher liveness is also visible through `ab repository status --json`:
222
240
  `dispatcher.holder` identifies the unexpired repository lease owner, independently
223
- of `latestRun`. Heartbeat age measures attributable renewals; tick age measures
241
+ of `latestRun`. Each run includes its recorded `runtime` (version, commit, and
242
+ source kind/location), or null for unrecorded historical starts. Heartbeat age measures attributable renewals; tick age measures
224
243
  durable progress. Missing historical evidence is null. The liveness query uses
225
244
  bounded repository facts first, with a full-history fallback when a later
226
245
  invocation hides the holder start or the latest stop. Other state reads retain
@@ -238,15 +257,21 @@ record the first signal in the stop fact, and release its lease before exit.
238
257
 
239
258
  The default watch reports actionable conditions only:
240
259
 
260
+ - `integration.verification-failed`: failed node verification, once per prepared cycle, with failed steps, verified head and parent, and guidance to file a repair child targeting the node. Recovery reports only the latest prepared cycle while its head and parent remain current; superseded failures are not backfilled.
261
+
241
262
  - `build.janitor-failing`: a build has reached the configured consecutive-failure threshold; a successful janitor attempt clears it.
242
263
  - `dispatcher.forge-persistent`: forge degradation remains after a completed post-reset retry opportunity; successful recovery clears it.
243
264
 
244
- - Build `escalation.raised`, or `build.merge-decision`: a finalized open PR
245
- with auto-merge off or a current actionable merge-gate deferral. Armed consent
246
- awaiting application is silent. One merge decision is reported per build/PR.
265
+ - Build `escalation.raised`, `integration.landed`, `node.item-conflicted`, or
266
+ conflicted `restack.replayed` events. `build.consent-ready` is the single
267
+ signal for a ready consent or held landing, including first repository-wide
268
+ discovery. Its target has the queue entry shape `{kind, branch, ticket?, build?}`.
269
+ Unready and stale candidates stay silent. `build.merge-decision` remains for
270
+ current actionable merge-gate deferrals and unsafe forge outcomes, once per
271
+ build/PR; it does not duplicate consent or hold attention.
247
272
  - Repository `harvest.escalated`, `harvest.recovery-exhausted`,
248
273
  `dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
249
- `restartRequired`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
274
+ `restartRequired`, `dispatcher.upgrade-failed`, `dispatcher.runtime-rolled-back`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
250
275
  - `dispatcher.ticket-source-persistent`: degradation past its advertised
251
276
  reset time, once a tick started at or after reset has completed or failed
252
277
  with the episode still open; crossing reset alone is silent. Without a reset,
@@ -283,7 +308,9 @@ arming the watch. Named watches still end when every named build is terminal;
283
308
  learn their outcomes from status reconciliation at exit.
284
309
 
285
310
  `ab wait --for attention` is build-only and uses the same build conditions:
286
- an open escalation or a merge decision. Existing conditions return immediately,
311
+ current failed node verification, an open escalation, janitor failure attention,
312
+ consent readiness, landing/conflict attention or a merge decision. Current failed
313
+ verification satisfies attention even before its notification is written. Existing conditions return immediately,
287
314
  even with `--since`; live and backlog matches ignore routine outcomes and
288
315
  self-healing failures. A merge match uses the watch observation with
289
316
  `condition: "attention"`. Explicit `--event` globs remain event-only.
@@ -316,3 +343,33 @@ the original reset, which later rate limits cannot postpone indefinitely.
316
343
  uses the same service as `ab restack <node>`. The receipt contains `slug`,
317
344
  `request`, `coalesced` and `waiting`; execution is asynchronous. It refuses
318
345
  non-node, unopened and terminal builds and enforces repository ownership.
346
+
347
+ Repository status includes `upgrades.runs`, keyed by originating dispatcher run,
348
+ with latest successful `resolved` target, detected target, failure, handoff and
349
+ completion evidence. `dispatcher.upgrade-target-resolved` carries strict
350
+ `{run, lineage, target}` data; the target has mode (`pinned`, `installed`, or
351
+ `source`), content key, source provenance and optional version/base/SHA. Source
352
+ mode names the authoritative base commit, which can advance without changing
353
+ packaged inputs or the running runtime. Status text renders the resolved mode,
354
+ base and SHA separately, so an older handoff cannot hide a newer target. Identical
355
+ observations append nothing; a successful resolution does not clear failures. Facts carry launcher
356
+ lineage, from/to runtimes, resolution mode and authoritative base SHA/ref or original
357
+ installation provenance, plus prepared cache identity. Completion names the successor
358
+ and records completed retirement separately from takeover. During a handoff the
359
+ projection includes both generations, chosen mode, outstanding draining builds
360
+ and deadline. The successor owns repository work after terminal release and lease
361
+ claim, while old local runners retain execution leases until settlement or deadline.
362
+ Remote guests retain independent leases, finish their phase and request neutral
363
+ relaunch; their separate handoff capture never holds retirement open. `dispatcher.upgrade-failed` is immediate repository
364
+ attention; the current generation remains active and identical failed inputs are
365
+ suppressed across native handoff until target or selected-store compatibility evidence changes or a fresh operator launch.
366
+
367
+ Repository status additionally exposes `upgrades.lastRollback` (historical, retained
368
+ when cleared), `upgrades.holds` keyed by launcher lineage, `upgrades.lineages` keyed
369
+ by generation run, optional `upgrades.authoritativeRun` from rollback, accepted takeover or committed operational tick (never startup/yield alone), `upgrades.rollbackIds` for idempotent rollback correlations, and `rollbackHold` for the effective dispatcher lineage.
370
+ `dispatcher.runtime-rolled-back` names failed/restored runtime identities and cache
371
+ roots, target, original handoff/takeover, three failed exits and reason. It is default
372
+ repository attention. `dispatcher.rollback-hold-cleared` records a different
373
+ successfully resolved target. The rollback hold survives store compatibility
374
+ changes, resolution errors and upgrade opt-out; a new operator-launch lineage
375
+ ignores old holds. Preflight failure suppression above remains separate.