@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
@@ -187,6 +187,12 @@ Naming inherits `[roles.default]` and can be overridden by `[roles.slug]`.
187
187
 
188
188
  ## Who does what
189
189
 
190
+ The **operator** is the role driving Autobuild through `ab` or MCP, normally
191
+ an agent. The **operator agent** takes that role; a human may drive the same
192
+ interface directly. The human is **you**, or the **maintainer**. Human actor
193
+ identities and session ownership attribute authority to the authorizing account,
194
+ not to the agent driving the tools.
195
+
190
196
  The distinctions that change an administrator's answer:
191
197
 
192
198
  - **Agents supply judgment** — planning, reviewing, implementing, verifying,
@@ -211,8 +217,84 @@ The distinctions that change an administrator's answer:
211
217
  graceful until an open claim tick reaches a recoverable boundary; non-SIGINT
212
218
  termination is replayed only after that drain. Durable normal/forced/abnormal
213
219
  evidence retains available process detail, and parent-death detection prevents
214
- a detached kernel. `--plain`/non-TTY stay on the direct path, and `--once`
215
- remains one tick plus drain.
220
+ a detached kernel. Resident checkout dispatch first runs a filesystem-only
221
+ launcher that snapshots the invoking installation and its installed production
222
+ dependencies offline into `.autobuild/runtime/`. The generation's frontend,
223
+ kernel, later local runners and agent PATH CLI execute from that immutable
224
+ root. The launcher owns no Store/lease and uses only the versioned v1 process
225
+ contract. Automatic upgrades default on: the kernel checks immediately and every
226
+ 60 seconds, resolving a declared Autobuild dependency and Bun lock from the same
227
+ authoritative base-branch commit. Unpinned repositories reread the original
228
+ installation pathname, retained across handoffs. Launching from a source root
229
+ sharing the dispatched repository's Git common directory selects source mode
230
+ first; that eligibility and the initial packaged baseline stay frozen across
231
+ successors. Source mode follows the forge-authoritative base commit, exported
232
+ into private cache staging with a frozen-lockfile, script-free dependency
233
+ install. The immutable runtime records the exact commit. Adoption compares
234
+ actual packaged contents and production-reachable lock records, so same-version
235
+ changes adopt while excluded-file and unrelated workspace-lock advances do not.
236
+ Shipped documentation counts as packaged content. The advisory successful
237
+ target-resolution fact exposes mode/base/SHA independently of the running
238
+ commit and earlier failures or handoffs; identical polls append nothing.
239
+ Feature branches and checkout pins never choose the target. Preparation validates an exact runtime in isolation;
240
+ failures retain the current generation and raise repository attention, suppressed
241
+ for the same input until target or selected-store compatibility evidence changes or a fresh operator launch. The successor
242
+ preflights config, selected-store compatibility and durable protocol writes before
243
+ requesting yield. SQLite compares semantic schema requirements, accepting equivalent
244
+ migrated catalogs without initializing the live store. A failed request cannot be
245
+ accepted or revived by detection; a newly prepared attempt must pass preflight.
246
+ Compatible generations drain: the predecessor releases terminal
247
+ input/rendering and repository authority, then supervises only captured local
248
+ executions while the successor owns ticks and launches. Local and remote runners finish
249
+ their current phase, compare their immutable attach runtime with the accepted
250
+ target using existing boundary facts, and durably request relaunch on mismatch.
251
+ Confirmed teardown has the neutral `relaunch` outcome; the current repository
252
+ owner resumes from durable state on its runtime, even after an ownership gap.
253
+ Equal or absent targets preserve normal execution. Unknown/incompatible
254
+ provider evidence selects immediate-suspension cutover. Rejected protocol writes
255
+ fail preflight and preserve the predecessor. The hot `policy.upgradeDrainSeconds`
256
+ defaults to 900; remaining local sessions suspend at that deadline and resume
257
+ natively where eligible, with reasoned fresh fallback otherwise. Remote runners
258
+ detach with leases and heartbeats intact. Their exact instances and guest runtimes
259
+ are captured separately, authorize boundary relaunch even after local retirement,
260
+ and never delay predecessor exit. Recovery reads only open-execution builds,
261
+ once per build per tick, so ended historical captures add no build reads.
262
+ Re-attachment reinstalls the target archive.
263
+ Cached registry generations resolve and cache their version’s validated GitHub
264
+ release asset on first guest use; local launch requires no GitHub fetch.
265
+ Source generations deliver their exact packed code. Repository-owned harvest/provisioning work joins before lease release.
266
+ Durable takeover and retirement completion are separate; status exposes both
267
+ runtimes, outstanding draining executions and deadline. The launcher keeps live
268
+ runtimes reserved and joins all children on operator stop.
269
+
270
+ With rollback-capable launcher and generation peers, three failed successor exits
271
+ within ten minutes of the original durable takeover restore the immediately previous
272
+ cached runtime. The first two failures restart the same runtime without repeating
273
+ preflight. Preflight failures never count; outside that window ordinary failure
274
+ exit behavior applies. Rollback goes back one runtime only. The launcher opens no
275
+ store: it passes a validated, versioned recovery context to the restored generation,
276
+ which records `dispatcher.runtime-rolled-back` under repository authority and holds
277
+ the failed target for that launcher lineage. Store compatibility changes, resolution
278
+ errors and disabling/re-enabling upgrades do not clear this hold. A successfully
279
+ resolved different target records `dispatcher.rollback-hold-cleared`; a fresh operator
280
+ launch starts a new lineage. Both previous and held runtimes remain protected from
281
+ cache pruning. Existing phase executions keep their leases and continue on the
282
+ restored runtime at the next boundary; unreadable decisive facts defer a build with
283
+ attention before any action. Peers without negotiated rollback capability retain
284
+ existing failure behavior and report that capable runtimes are required.
285
+ `[upgrade] automatic = false` disables preparation. A target or launcher without negotiated preflight/overlap capability, or a changed
286
+ launcher contract, requires manual restart.
287
+
288
+ Local harvest suspends durably before repository lease release on handoff or
289
+ clean stop. The next generation resumes eligible native sessions with fresh
290
+ logical credentials, or records a reasoned `harvest.session.resume-fallback`
291
+ and starts fresh. Orderly suspension spends no recovery attempt; real
292
+ crashes retain recovery accounting.
293
+ Current, distinct previous, held and live-process runtimes survive pruning.
294
+ Cached Bun entries disable auto-install and explicitly pin a neutral compiler
295
+ config. Third-party files remain as installed. `--plain`/non-TTY run directly
296
+ within the generation; `--once`, origin/hosted and hot development paths bypass
297
+ the launcher. `--once` remains one tick plus drain.
216
298
  - **Live configuration** has two explicit contexts. A running dispatcher owns
217
299
  the last valid snapshot from the **main checkout**; dispatch, setup, and each
218
300
  pipeline step capture it at their action boundary, without interrupting an
@@ -353,8 +435,8 @@ Rules are strict and blank predicates are rejected with their array index.
353
435
  | `label` | No | Exact, case-sensitive source ticket label sampled at readiness. |
354
436
  | `mode` | Yes | `auto` or `consent`. |
355
437
 
356
- Help the operator choose policy around their release process. A solo team can
357
- use one catch-all `mode = "auto"` rule. A team requiring an operator's review
438
+ Help the human choose policy around their release process. A solo team can
439
+ use one catch-all `mode = "auto"` rule. A team requiring a human's review
358
440
  for every landing can use one catch-all `mode = "consent"` rule. For release
359
441
  nodes that collect work automatically but require a final click, put an
360
442
  `into = "root"`, `mode = "consent"` rule first, followed by a catch-all
@@ -492,6 +574,14 @@ from the repository's actual toolchain, and asks the user about choices source
492
574
  cannot answer; deterministic init code never guesses a language or package
493
575
  manager.
494
576
 
577
+ Setup configures an **acceptance check** in every repository: a repository-owned
578
+ agent verify step that runs the built software, exercises each acceptance
579
+ criterion in the spec, attaches evidence, and returns a typed verdict. It is
580
+ not a test suite and leaves no test files behind. Wire an existing maintained
581
+ end-to-end or browser test suite into an ordinary `check` step. If none exists,
582
+ do not create one during setup. The acceptance check neither substitutes for
583
+ nor seeds a suite.
584
+
495
585
  ### `[verify]`
496
586
 
497
587
  Post-reconcile verification defaults to enabled: `[verify].afterReconcile = true`.
@@ -525,7 +615,7 @@ subtables are part of this section — their fields are listed here.
525
615
  | `steps` | `[]` | array of nonempty strings | Ordered configured universe of verify phases. Each name must have a matching `[verify.<step>]` table. |
526
616
  | `kind` | — | **required**, `"check"` \| `"agent"` | Discriminator. `check` is deterministic (command + pass/fail, never an agent); `agent` runs a skill that returns `pass`, `fail`, or `skip`. |
527
617
  | `command` | — | **required when `kind = "check"`**, nonempty string | Ref into `[commands]` — the key, not a shell string. Pass/fail is the command's exit status. |
528
- | `skill` | — | **required when `kind = "agent"`**, nonempty string | Installed skill name to run (e.g. a repository-authored `"verify-app-e2e"`). |
618
+ | `skill` | — | **required when `kind = "agent"`**, nonempty string | Installed skill name to run (e.g. a repository-authored `"verify-acceptance"`). |
529
619
  | `paths` | — | optional nonempty array of positive repository-relative globs | Makes either step kind apply when any changed path matches any selector. Omitted means unconditional. |
530
620
  | `afterReconcile` | repository: `true`; step: inherited | boolean | Step override wins over `[verify].afterReconcile`; false skips this step after reconciliation only. |
531
621
  | `always` | — | optional boolean | `true` makes the step unconditional and mandatory (a plan cannot deselect it); `false` is equivalent to omission. |
@@ -535,7 +625,7 @@ optional verification it warrants:
535
625
 
536
626
  ```toml
537
627
  +++
538
- verifySteps = ["types", "e2e"]
628
+ verifySteps = ["types", "acceptance"]
539
629
  +++
540
630
  ```
541
631
 
@@ -549,19 +639,33 @@ should treat a `design` asset as part of the contract, a contract on observable
549
639
  visual and reference outcomes, not on implementation, and judge the result
550
640
  against it.
551
641
 
642
+ Node `verify:*` context additionally exposes `nodeVerification`: the frozen
643
+ range, a JSON index path, contribution build slugs, current stored ticket
644
+ identities, event-authorized spec revisions and spec paths, and their commits.
645
+ The index maps every commit in the range using build identity trailers,
646
+ including earlier-cycle contributions and merge side history. Commits without
647
+ an identity are listed as unattributed (a mechanical classification). The manifest
648
+ and index also expose `handPushedCommits: [{sha, originalSha, message}]` for owned
649
+ hand-pushed commits in the frozen range, preserving original identity across restacks.
650
+ Their full messages express maintainer-authorized intent: judge quality and
651
+ consistency, and never fail them solely for lacking a covering spec. Other node
652
+ changes are authorized when covered by the node spec or the spec
653
+ of the contribution introducing it; use the commit mapping to find that spec.
654
+ Missing or ambiguous provenance fails hydration. Leaf context is unchanged.
655
+
552
656
  An agent verify step selects `[roles.<step>]` by its **logical step name** —
553
657
  the name in `[verify].steps`, not the skill it runs. An agent finalize
554
658
  post-step follows the same rule.
555
659
 
556
660
  ```toml
557
661
  [verify]
558
- steps = ["e2e"]
662
+ steps = ["acceptance"]
559
663
 
560
- [verify.e2e]
664
+ [verify.acceptance]
561
665
  kind = "agent"
562
- skill = "verify-app-e2e" # repository-authored skill
666
+ skill = "verify-acceptance" # repository-authored skill
563
667
 
564
- [roles.e2e] # the STEP name — not "verify-app-e2e"
668
+ [roles.acceptance] # the STEP name — not "verify-acceptance"
565
669
  runtime = "pi"
566
670
  model = "openai-codex/gpt-5.6-sol"
567
671
  ```
@@ -608,7 +712,7 @@ Agent verifiers may also use `ab verdict pass`,
608
712
  skip reason is required and
609
713
  must be non-blank; no failure report is required. Either kind of skip satisfies
610
714
  that step for the current cycle and advances, but it is not a pass and never
611
- masks another step's failure. Only failures return the build to `implement` and
715
+ masks another step's failure. For leaves, failures return the build to `implement` and
612
716
  consume `[policy].maxVerifyAttempts` once per distinct failed cycle since the
613
717
  latest spec revision. Passing target-movement cycles cost zero; cycle identifiers
614
718
  remain monotonic across restacks and reconciles. Skips retain the cycle's attempt number
@@ -617,6 +721,11 @@ without consuming that budget.
617
721
 
618
722
  Classified session deferrals consume no phase failures. Unsupported decisive
619
723
  facts retain the mixed-version wait gate and durable compatibility diagnostic.
724
+ During an accepted drain, an unsettled build-log authorization suppresses restart
725
+ attention only for the exact predecessor runtime and execution instance. The old
726
+ runner records relaunch intent when the accepted target is known and exits
727
+ without crossing the decisive-fact fence; a later execution never inherits
728
+ authorization.
620
729
  When the scoped `ab context` initial own-build read fails, the CLI best-effort
621
730
  writes `session.build-read-failed` with exact session, phase, round, operation
622
731
  `context`, reason `own-build-read`, and diagnostic. A valid terminal from that
@@ -665,11 +774,11 @@ rule an agent verify step follows, so one convention covers both:
665
774
 
666
775
  ```toml
667
776
  [verify]
668
- steps = ["e2e"]
777
+ steps = ["acceptance"]
669
778
 
670
- [verify.e2e]
779
+ [verify.acceptance]
671
780
  kind = "agent"
672
- skill = "verify-app-e2e" # repository-authored skill
781
+ skill = "verify-acceptance" # repository-authored skill
673
782
 
674
783
  [finalize]
675
784
  steps = ["release-notes"]
@@ -678,7 +787,7 @@ steps = ["release-notes"]
678
787
  kind = "agent"
679
788
  skill = "ab-release-notes"
680
789
 
681
- [roles.e2e] # verify STEP name — not "verify-app-e2e"
790
+ [roles.acceptance] # verify STEP name — not "verify-acceptance"
682
791
  runtime = "pi"
683
792
 
684
793
  [roles.release-notes] # finalize step name
@@ -788,7 +897,11 @@ alternates in order without consuming extra phase attempts. Authentication,
788
897
  permission, and local runtime-configuration failures do not. Every target has
789
898
  its own session/transcript; a continuation fallback starts fresh from durable
790
899
  context. Selection is not sticky, so the next phase, continuation, or retry
791
- starts from the primary. Only chain exhaustion writes the phase failure, and
900
+ starts from the primary. A suspended Harvest turn first retries its recorded
901
+ route, then tries the remaining configured targets in order. Its substitution
902
+ and failure evidence retain configured indexes even when that order starts at
903
+ an alternate; only a successful primary can remain live for producer revisions.
904
+ Only chain exhaustion writes the phase failure, and
792
905
  the final failure controls retry behavior. Substitution starts and exhausted
793
906
  failures retain the targets and verbatim errors durably. Core phases, agent
794
907
  verify/finalize, and Harvest use the chain; tool-free one-shots do not.
@@ -817,6 +930,7 @@ nonnegative integer so zero can disable that trigger.
817
930
 
818
931
  | Field | Default | Allowed / constraints | Effect |
819
932
  |---|---|---|---|
933
+ | `upgradeDrainSeconds` | `900` | positive integer | Local generation drain deadline from handoff start; hot-reloaded while draining. |
820
934
  | `sessionBudgetSeconds` | `3600` | positive integer | Active-time bound for each build agent session unless its logical role overrides it; native continuation retains accumulated time and excludes suspension. |
821
935
  | `stallRounds` | `3` | positive integer | The same finding surviving this many review rounds auto-escalates to a human — the anti-loop guard. |
822
936
  | `maxVerifyAttempts` | `3` | positive integer | Caps distinct failed verify cycles since the latest spec revision; passed and skipped cycles cost zero. |
@@ -827,6 +941,8 @@ nonnegative integer so zero can disable that trigger.
827
941
  | `maxReviewRounds` | `6` | positive integer | Default `maxRounds` for the `plan ⇄ plan-review` and `implement ⇄ code-review` convergence loops. When that cap parks a build, `ab answer <slug> --review-round-ceiling <n>` may replace it for only the escalation's loop and current spec revision. |
828
942
  | `harvestThreshold` | `5` | positive integer | Newly unclaimed `observation.recorded` occurrences required to start one repository harvest run. |
829
943
  | `janitorFailureAttentionSeconds` | `600` | positive integer | Consecutive janitor failure duration before build attention. |
944
+ | `nodeIdleAfterSeconds` | `600` | positive integer | Quiet period before opened integration nodes enter idle polling. |
945
+ | `nodeIdlePollSeconds` | `120` | positive integer | Interval between idle node checks; durable activity wakes the next tick. |
830
946
  | `janitorBackoffMaxSeconds` | `300` | positive integer | Cap on exponential janitor retry delay, starting at 30 seconds. |
831
947
  | `harvestMaxDrift` | `3` | nonnegative integer | Other builds merged after the oldest unclaimed observation required to start a run; `0` disables drift. |
832
948
 
@@ -841,7 +957,8 @@ progress. Execution start/end, runner attachment and workspace lifecycle
841
957
  bookkeeping do not count as progress. Pipeline, session, spec, publication/PR,
842
958
  observation and acknowledged operator facts reset the streak; infrastructure,
843
959
  budget and provider failures do not consume the allowance and retain their own
844
- retry limits. Before a fourth actionable launch, the dispatcher raises one
960
+ retry limits. Phase-boundary relaunch outcomes consume no allowance or failure
961
+ budget and raise no attention. Before a fourth actionable launch, the dispatcher raises one
845
962
  setup-targeted `execution-no-progress` policy escalation naming the count and
846
963
  the next action it expected the runner to take. Waiting, paused and terminal
847
964
  builds are left parked, and pending operator commands remain executable.
@@ -961,7 +1078,7 @@ keeps JSON stdout as one bare valid-ticket array. Tracker-wide safety checks
961
1078
  remain fatal: the same id in two state dirs is a loud error naming both paths,
962
1079
  as are root-level ticket files with no state and filesystem failures. When
963
1080
  `dir` is defaulted, the backlog writes its own `.gitignore` of `*`, so git never sees it; an
964
- explicit `dir` is the user's and is left alone. Agents and operators drive it
1081
+ explicit `dir` is the user's and is left alone. Operator agents and humans drive it
965
1082
  through the source-agnostic `ab ticket` commands rather than running `mv` or
966
1083
  `mkdir` by hand; `ab ticket state create` makes a new state.
967
1084
 
@@ -974,7 +1091,7 @@ environment variable instead and say why.
974
1091
  ### `[orchestrator]`
975
1092
 
976
1093
  Gates the operator-agent feature (AUT-340, AUT-342): the persistent,
977
- **credential-free** sandbox environment per operator × repository that an
1094
+ **credential-free** sandbox environment per session owner × repository that an
978
1095
  operator agent drives through the `sandbox.*` registry tools (`ab mcp`, and
979
1096
  every later binding), and — when the embedded orchestrator is enabled — the
980
1097
  turn runner that answers operator sessions and wakes on build attention
@@ -986,8 +1103,8 @@ changing it requires a dispatcher restart.
986
1103
  | `enabled` | `false` | boolean | Master gate. With the table absent or `enabled = false`, the sandbox tools are absent from every binding, no environment is ever provisioned, and no dispatcher tick or message post ever runs orchestrator code — a local dispatcher is inert even when enabled, because the turn runner exists only in the hosted deployment. |
987
1104
  | `model` | — (required when `enabled = true`) | nonblank provider-qualified string, same vocabulary as `[roles]` | The turn runner's model, resolved through the deployment's gateway credential; a leading `vercel-ai-gateway/` prefix is accepted and stripped. |
988
1105
  | `invocationBudgetSeconds` | `240` | positive integer, clamped to 300 | Wall-clock budget for one turn invocation. A larger value is clamped — not rejected — to the 300-second hosted function limit the runner executes under. |
989
- | `approvals` | `["builds.control:abort", "builds.control:discard", "builds.answer:revise-spec", "sandbox.publish", "tickets.move:ready"]` | array of `tool` or `tool:qualifier` strings | Registry tool calls that suspend a turn until the operator answers. Empty (`[]`) means none — autonomous operation. An entry naming an absent or unknown tool is **inert by design**, never an error. A qualified entry applies to one discriminator value only (`tickets.move:ready` approves moving a ticket to `ready`); for a tool without a discriminator, only the bare form matches. |
990
- | `wake` | inherits the default | array of event-type globs | The attention events a **new** session wakes for. Absent inherits the legacy hosted wake event set, independent of CLI watch defaults; an explicit `[]` means never wake — message-only. Each glob must match at least one build event type. Existing sessions never retroactively inherit; an explicit wake update always wins. |
1106
+ | `approvals` | `["builds.control:abort", "builds.control:discard", "builds.answer:revise-spec", "sandbox.publish", "tickets.move:ready"]` | array of `tool` or `tool:qualifier` strings | Registry tool calls that suspend a turn until the human answers. Empty (`[]`) means none — autonomous operation. An entry naming an absent or unknown tool is **inert by design**, never an error. A qualified entry applies to one discriminator value only (`tickets.move:ready` approves moving a ticket to `ready`); for a tool without a discriminator, only the bare form matches. |
1107
+ | `wake` | inherits the default | array of event-type globs | The attention events a **new** session wakes for. Absent inherits the legacy hosted wake event set including `integration.verification-failed`, independent of CLI watch defaults; an explicit `[]` means never wake — message-only. Each glob must match at least one build event type. Existing sessions never retroactively inherit; an explicit wake update always wins. |
991
1108
  | `sandbox` | — | strict subtable | The sandbox behavior knobs; absence reads as the defaults below. |
992
1109
 
993
1110
  `[orchestrator.sandbox]` fields:
@@ -1007,8 +1124,8 @@ operator tools remain the only route to build state from inside the sandbox.
1007
1124
  Tool bounds an operator agent should know: `sandbox.exec` waits at most **300
1008
1125
  seconds**; stdout and stderr are each truncated at **65,536 bytes** with a
1009
1126
  `[truncated by autobuild: output exceeded 65536 bytes]` marker; `sandbox.reset`
1010
- and archiving an operator's last session are **destructive** (reset re-provisions
1011
- from the current base head); there is at most **one** environment per operator
1127
+ and archiving a session owner's last session are **destructive** (reset re-provisions
1128
+ from the current base head); there is at most **one** environment per session owner
1012
1129
  and repository.
1013
1130
 
1014
1131
  Publication: `sandbox.publish` takes a title (1–200 characters), an optional
@@ -1020,11 +1137,30 @@ recorded when the sandbox was provisioned or last reset — a pre-existing envir
1020
1137
  base head asks you to run `sandbox.reset` first. The rule is PR only, never the
1021
1138
  base branch: the sandbox itself never pushes and holds no credential — the push
1022
1139
  and the PR creation are kernel plumbing through the workspace provider's
1023
- publication capability, to one deterministic operator branch per operator and
1140
+ publication capability, to one deterministic operator branch per session owner and
1024
1141
  repository, so a later publish updates the same PR's head. A publication is a
1025
- repository-journal fact naming the operator, the session, the branch, the
1142
+ repository-journal fact naming the session owner (the `operator` field), the session, the branch, the
1026
1143
  commit, and the PR; a refused or failed attempt is journaled too.
1027
1144
 
1145
+ ### `[upgrade]`
1146
+
1147
+ | Field | Default | Meaning |
1148
+ | --- | --- | --- |
1149
+ | `automatic` | `true` | Check and adopt changed runtime targets automatically. |
1150
+
1151
+ `[upgrade] automatic` is a strict boolean, defaults to `true`, and hot-reloads.
1152
+ Resident checkout dispatchers check every 60 seconds, independently of tick cadence.
1153
+ Exact changed targets can include downgrades. Missing or inconsistent declared-pin
1154
+ metadata never falls back to installed mode. Self-hosting source launches follow
1155
+ the authoritative base commit using packaged-content and production-lock equality,
1156
+ without modifying operator or build worktrees. Equal-content advances still record
1157
+ the latest resolved target SHA. Compatible generations overlap through the durable draining handoff described above. `--once`, origin/hosted and direct hot
1158
+ presentation modes bypass automatic adoption. Operator stop wins over cutover.
1159
+ Repository status exposes per-run resolved target, upgrade target, failure and handoff facts, both
1160
+ generations, takeover, outstanding draining builds and deadline;
1161
+ `dispatcher.upgrade-failed` and `dispatcher.runtime-rolled-back` are actionable attention. Status also exposes the last rollback and current-lineage hold. Unrelated base commits do not
1162
+ retry an unchanged failed target. No registry credentials belong in these facts.
1163
+
1028
1164
  ## Setup and upgrades
1029
1165
 
1030
1166
  For 0.x upgrades, first read the [migration reference](references/migration-1.0.md):
@@ -1053,9 +1189,12 @@ repo path, needs no `AB_*` environment, and is safe to re-run. It:
1053
1189
  setup prompt for the user to run in a coding agent.
1054
1190
  - The setup agent inspects the repository, configures real commands and verify
1055
1191
  steps, independently chooses pipeline role runtimes/models, configures the
1056
- ticket source and environment-only credentials, arranges repository-specific
1057
- end-to-end verification (authoring a repository-owned agent verifier when
1058
- judgment is warranted), and files one groomed dispatchable ticket.
1192
+ ticket source and environment-only credentials, arranges
1193
+ an acceptance check through a repository-owned agent verify skill in every
1194
+ repository. Wire an existing maintained end-to-end or browser test suite into an ordinary `check` step. If none exists, do not create one during setup. The acceptance check neither substitutes for nor seeds a suite. It completes `bun ab init --validate`, fixing failures
1195
+ and reviewing warnings. The human then starts `bun ab dispatch` and opens
1196
+ their operator agent with `ab-operate` to create, groom, and shepherd the
1197
+ first ticket.
1059
1198
  - It never overwrites config once the file exists, even with `--force`; a rerun
1060
1199
  launches or prints a prompt that asks the agent to review and improve it.
1061
1200
  - Idempotently adds the exact `.autobuild/` rule to the target's `.gitignore`,
@@ -1155,7 +1294,7 @@ preserved through self-update handoff. If a replacement child receives the
1155
1294
  handoff marker without the pre-self-update baseline — possible when an older
1156
1295
  parent launches a newer child — it suppresses the entire automatic commit,
1157
1296
  names the cross-version compatibility reason, and leaves all upgrade-owned
1158
- changes uncommitted for the operator. Skill-upgrade results and the report's
1297
+ changes uncommitted for you. Skill-upgrade results and the report's
1159
1298
  existing exit code remain unchanged.
1160
1299
 
1161
1300
  Any content conflict, discovery conflict, pre-existing dirt in an owned path,
@@ -1165,6 +1304,22 @@ cannot snapshot the worktree's Git index, it warns and declines to stage. A
1165
1304
  staging or commit failure restores that exact pre-attempt index and reports the
1166
1305
  original Git failure without touching merged worktree files. The report's
1167
1306
  existing exit code is unchanged; upgrade never pushes or rewrites history.
1307
+ With automatic upgrades enabled, pinned dispatchers adopt the changed version
1308
+ once the commit reaches the configured base branch. Installed-mode dispatchers
1309
+ follow their original installation when its version changes. Source-mode
1310
+ dispatchers follow packaged changes merged to the base, including canonical skills
1311
+ shipped by that distribution, without requiring a version bump. A consuming
1312
+ repository's vendored-skill-only merge does not change the installed runtime.
1313
+ The successor passes config/store and
1314
+ protocol-write preflight before yield; compatible generations drain, otherwise
1315
+ cutover suspends local sessions immediately. Existing runners keep execution leases while the
1316
+ successor owns repository work. At completed phase boundaries local and remote runners
1317
+ request relaunch onto the accepted target; the current owner resumes them from
1318
+ durable state. Remaining local sessions suspend at the hot drain
1319
+ deadline and resume through their durable session records. After an automatic runtime
1320
+ rollback, phase work continues on the restored runtime at the next boundary;
1321
+ unreadable decisive facts defer with attention. The held target waits for a changed
1322
+ resolved target or a fresh operator launch, independently of store compatibility.
1168
1323
 
1169
1324
  The agent gets a fixed per-file deadline of at least ten minutes. While it is
1170
1325
  resolving and stdout is interactive, `ab upgrade` continuously redraws one line
@@ -1404,6 +1559,22 @@ in-session `put|get` still require ambient phase auth.
1404
1559
 
1405
1560
  ## Dispatch dashboard
1406
1561
 
1562
+ Both dashboards also show the current authoritative dispatcher's unresolved
1563
+ rollback: failed and restored runtime (version and commit), held failed runtime,
1564
+ and rollback event timestamp. A matching durable different-target hold clearance
1565
+ removes the notice. An operator restart hides the previous lineage's notice once
1566
+ its new lineage commits an operational tick or accepted takeover. A run-started
1567
+ fact or yielded tick alone cannot hide it; same-lineage generation changes retain
1568
+ it. Historical rollbacks and other lineages' holds are never fallback notices.
1569
+
1570
+ Both dashboards show each accepted unfinished handoff: source and target runtime
1571
+ version and abbreviated commit, mode, and drain deadline (unknown when unrecorded).
1572
+ Outstanding predecessor executions in drain mode carry `(draining)` alongside
1573
+ their lifecycle status. Matching durable settlement clears a build marker;
1574
+ accepted completion clears its handoff banner. Takeover, an overdue deadline
1575
+ and an empty outstanding set do not complete a handoff. Multiple unfinished
1576
+ generations remain visible; cutover does not mark builds draining.
1577
+
1407
1578
  Integration list rows show parent commit distance (current or unknown when appropriate),
1408
1579
  name the destination and show children landed out of the
1409
1580
  known total, with the remainder split into building and queued. Cancelled
@@ -1618,8 +1789,8 @@ to the build's event log and apply the same write-time checks.
1618
1789
  | Answer blockers with guidance | `ab answer <slug> <text> [--store <ref>]` | Select a blocked build, press `r`, enter text, then Enter. | One `escalation.answered` with `resolution: guidance` per applicable blocker. |
1619
1790
  | Retry blockers without guidance | `ab answer <slug> [--store <ref>]` | Open the same `r` field and press Enter empty or whitespace-only. | One `escalation.answered` with `resolution: retry` per applicable blocker. |
1620
1791
  | Dismiss cited finding chains | `ab answer <slug> --dismiss [--store <ref>]` | CLI only; build detail names the command. | One `escalation.answered` with `resolution: dismiss-finding` per blocker that cites a real review finding. |
1621
- | Revise spec from a file | `ab answer <slug> --revise-spec <file> [--store <ref>]` | CLI only; build detail names the command. | Human `escalation.answered` events naming the exact replacement revision, then kernel `spec.revised`. |
1622
- | Re-import revised ticket spec | `ab answer <slug> --revise-spec-from-ticket [--store <ref>]` | CLI only; build detail names the command. | The same `revise-spec` answer and `spec.revised` sequence. |
1792
+ | Revise spec from a file | `ab answer <slug> --revise-spec <file> [--store <ref>]` | CLI only; build detail names the command. | For leaves, human `escalation.answered` then kernel `spec.revised`; eligible nodes publish `spec.revised` with operator provenance. |
1793
+ | Re-import revised ticket spec | `ab answer <slug> --revise-spec-from-ticket [--store <ref>]` | CLI only; build detail names the command. | The same leaf answer or direct node `spec.revised` protocol. |
1623
1794
  | Abort | `ab abort <slug> [--store <ref>]` | Select any non-terminal build and press `a`, then Enter to confirm (Escape cancels). | `build.abort-requested` |
1624
1795
 
1625
1796
  The two `--all` forms and the global-row keys are one walk behind two surfaces.
@@ -1645,8 +1816,10 @@ abort: abort returns the ticket to Triage.
1645
1816
 
1646
1817
  Abort accepts queued, running, paused, or blocked builds. A live turn receives a
1647
1818
  cancellation signal and the runner acknowledges the request. Its execution
1648
- supervisor gracefully stops and reaps the complete process tree, force-terminating
1649
- it after the bounded stop delay when necessary, and only then releases the lease.
1819
+ supervisor signals the local runner leader and waits for it to finish persistence
1820
+ and exit, then reaps remaining descendants with bounded TERM-then-KILL cleanup.
1821
+ Only then does it release the lease. Graceful dispatcher shutdown likewise waits
1822
+ for runner suspension without a wall-clock force-exit deadline.
1650
1823
  The dispatcher defers cleanup while that lease is live, then performs the
1651
1824
  checkpointed, retry-safe cleanup: close an open unmerged PR, release the workspace,
1652
1825
  delete the exact remote and local build branches, preserve existing ticket labels
@@ -1715,21 +1888,39 @@ and must use a fresh id without `persists` if a genuinely different problem
1715
1888
  touches the same code. Dismissal settles a chain, not a file or the reviewer's
1716
1889
  ability to report new problems.
1717
1890
 
1718
- Spec revision requires an open escalation. `--revise-spec` reads a conforming
1891
+ Leaf spec revision requires an open escalation. `--revise-spec` reads a conforming
1719
1892
  replacement from a file; `--revise-spec-from-ticket` re-imports the build's
1720
1893
  recorded ticket after an operator amends it. The human `escalation.answered`
1721
1894
  fact names the exact deposited revision it authorizes, then kernel
1722
1895
  `spec.revised` publishes it. If interrupted between those facts, a retry
1723
1896
  completes the recorded body and does not use a newly supplied one. A
1724
- non-conforming body records nothing. The build restarts from `plan` on the new
1897
+ non-conforming body records nothing. The leaf restarts from `plan` on the new
1725
1898
  revision and keeps any open PR. A build's spec can therefore change under it:
1726
1899
  phase runs after the revision read the new revision, while historical runs
1727
1900
  remain readable at the revision they actually saw.
1728
1901
 
1902
+ Operators may explicitly revise an opened idle collecting node or a node blocked on failed
1903
+ integration verification without an escalation. Use
1904
+ `ab answer <node> --revise-spec replacement.md` or, after amending its ticket,
1905
+ `ab answer <node> --revise-spec-from-ticket`. Ticket edits alone do not revise
1906
+ the build. Both forms enforce the same spec standard as leaf revisions.
1907
+ Each kernel `spec.revised` records the exact artifact and operator identity
1908
+ (with optional transport provenance); earlier revisions remain readable.
1909
+ Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
1910
+ The node recollects and verifies the new revision, including on the same head
1911
+ and parent after a failed cycle. Earlier cycles remain historical evidence
1912
+ and cannot block or authorize landing under the replacement. Children keep
1913
+ their specs, claims and targets; contributions are not restarted.
1914
+ Active verification/reconcile or writer work, restack/reparent work, pause,
1915
+ pending controls, landing intent and ended PRs refuse the no-escalation path.
1916
+ A concurrent state change refuses publication with a retry explanation;
1917
+ uncited artifacts are inert. Leaves still require an open escalation and
1918
+ restart from `plan`.
1919
+
1729
1920
  Every command requires an applicable target in this repository. Pause and
1730
1921
  resume require an active build; abort and hold also accept queued builds.
1731
1922
  Land requires a ready candidate and cannot bypass verification or merge gates;
1732
- `ab answer` additionally requires an open escalation. A stale, missing, done,
1923
+ `ab answer` requires an open escalation except for eligible node spec revisions. A stale, missing, done,
1733
1924
  aborted, or otherwise inapplicable target is an error and gets no new event. Attribution uses `USER`, then `USERNAME`, then the
1734
1925
  same stable fallback on both surfaces. These commands run sessionless and
1735
1926
  accept `--store <ref>` with the usual explicit flag > `AB_STORE` > `[store] url` > repository
@@ -1784,7 +1975,8 @@ object including the canonical `repo`, and `--store` follows the usual explicit
1784
1975
  flag > `AB_STORE` > `[store] url` >
1785
1976
  repository-local precedence. The command uses the same reducer as the
1786
1977
  dispatcher and dashboard, writes no state, claims no ticket, attaches no runner,
1787
- and starts no dispatcher work.
1978
+ and starts no dispatcher work. Dispatcher identity includes the held run’s recorded
1979
+ runtime; historical starts without metadata display `runtime unrecorded`.
1788
1980
 
1789
1981
  **`ab builds`** summarizes this repository's builds, one row each. It reports
1790
1982
  **active** builds by default — `running`, `paused`, `blocked` — because those
@@ -1808,6 +2000,10 @@ or `--all` before concluding a build doesn't exist.
1808
2000
  **`ab build status <slug>`** details one build: unresolved escalations, open
1809
2001
  sessions, chronological durable observations, verify progress for the current
1810
2002
  cycle, PR lifecycle, latest event, durable progress age, heartbeat, and lease.
2003
+ Every runner attach appears chronologically with its recorded runtime (version,
2004
+ commit, source kind/location), or `runtime unrecorded` for historical attaches;
2005
+ JSON exposes nullable runtime in `runnerAttaches`. Phases belong to the preceding
2006
+ attach boundary.
1811
2007
  For an open PR, the current work-owner decision reads the build-owned
1812
2008
  configuration from the store's deposited `build-runner-effective-config`
1813
2009
  artifact — deposited at every runner launch and refreshed on effective-config
@@ -1847,9 +2043,9 @@ ordinary fresh-session recovery applies. Unrelated open sessions are reclaimed
1847
2043
  without inventing transcripts. Dashboard history shows suspended and resumed
1848
2044
  segments separately, with their individual transcript refs and usage.
1849
2045
 
1850
- The phase budget counts active time across interruptions using the original
2046
+ The build phase budget counts active time across interruptions using the original
1851
2047
  ceiling. Suspended intervals do not consume it; abrupt loss is conservatively
1852
- charged through recovery. Pause immediately suspends a live turn with cause
2048
+ charged through recovery. Build pause immediately suspends a live turn with cause
1853
2049
  `pause`, including remote sessions and sessions without a native handle. Resume
1854
2050
  continues the local native session where eligible; otherwise the recorded
1855
2051
  fallback explains the fresh rerun. Pause acknowledgement follows turn stop and
@@ -1868,7 +2064,9 @@ the harvest runner's synthesize and review brackets each get one stream
1868
2064
  (`phase` spelled `harvest:<step>`), with `harvest.session.started` carrying
1869
2065
  the stream id. `ab harvest status` shows each run's sessions the way build
1870
2066
  status does — one row per session with its stream id and open/closed status
1871
- (`session hs_… (harvest, synthesize@1) stream st_… (open)`). Once a stream
2067
+ (`session hs_… (harvest, synthesize@1, open) stream st_… (open)`).
2068
+ Suspended turns show `suspended`, a closed stream and partial transcript evidence.
2069
+ The next dispatcher automatically continues them; the harvest gate remains independent. Once a stream
1872
2070
  closes, its finalized document is a repository-scoped `stream:<id>` artifact,
1873
2071
  and `ab artifact download stream:<id>` retrieves it; the stream form is an
1874
2072
  operator-only read (ambient phase identity fails closed).
@@ -1884,6 +2082,8 @@ With no slugs the repository journal is included; named watches add it with
1884
2082
 
1885
2083
  The default watch reports actionable conditions only:
1886
2084
 
2085
+ - `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.
2086
+
1887
2087
  - `build.janitor-failing`: a build has failed janitor attempts for the configured attention threshold. A successful attempt clears it.
1888
2088
  - `dispatcher.forge-persistent`: forge degradation remains after a post-reset retry tick; recovery clears the episode.
1889
2089
 
@@ -1895,7 +2095,7 @@ The default watch reports actionable conditions only:
1895
2095
  authorized landings awaiting application are silent. One merge decision is reported per build/PR.
1896
2096
  - Repository `harvest.escalated`, `harvest.recovery-exhausted`,
1897
2097
  `dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
1898
- `restartRequired`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
2098
+ `restartRequired`, `dispatcher.upgrade-failed`, `dispatcher.runtime-rolled-back`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
1899
2099
  - `dispatcher.ticket-source-persistent`: degradation past its advertised
1900
2100
  reset time, once a tick started at or after reset has completed or failed
1901
2101
  with the episode still open; crossing reset alone is silent. Without a reset,
@@ -1951,7 +2151,8 @@ cursor from a different repository or store is rejected.
1951
2151
 
1952
2152
  Dispatcher liveness is also visible through `ab repository status --json`:
1953
2153
  `dispatcher.holder` identifies the unexpired repository lease owner, independently
1954
- of `latestRun`. Heartbeat age measures attributable renewals; tick age measures
2154
+ of `latestRun`. Each run includes its recorded `runtime` (version, commit, and
2155
+ source kind/location), or null for unrecorded historical starts. Heartbeat age measures attributable renewals; tick age measures
1955
2156
  actual tick completion. Successful unchanged ticks leave no journal pair; bounded,
1956
2157
  lease-fenced repository telemetry still records each actual completion and its
1957
2158
  outcome. Last-tick age refreshes independently of the event cursor and never uses
@@ -2034,7 +2235,7 @@ vocabulary is closed: `blocked`, `paused`, `running`, `collecting`, `done`, `abo
2034
2235
  `terminal` (done or aborted), `pr=open`, `pr=merged`, `pr=closed`,
2035
2236
  `pr=conflicted`, `phase=<phase>` (a core phase — `plan`, `plan-review`,
2036
2237
  `implement`, `code-review`, `finalize`, `reconcile` — or `verify:<step>`), and
2037
- `attention` (an open escalation, janitor failure attention, or a build waiting for a merge decision). Repeatable `--event`
2238
+ `attention` (current failed node verification, an open escalation, janitor failure attention, or a build waiting for a merge decision). Repeatable `--event`
2038
2239
  globs follow the `ab watch` rules. Multiple values are alternatives: the first
2039
2240
  one satisfied ends the wait — all `--for` values in supply order, then all
2040
2241
  globs in supply order — and the record names what matched.
@@ -2045,9 +2246,9 @@ means an open escalation exactly as everywhere else. In the manner of `kubectl
2045
2246
  wait`, a condition that already holds when the command starts returns
2046
2247
  immediately with that build's latest event (`--since` does not suppress this);
2047
2248
  otherwise the first later event whose reduction produces it ends the wait.
2048
- `attention` is also a current-state condition: existing janitor failure attention, an already open escalation or
2249
+ `attention` is also a current-state condition: current failed node verification, existing janitor failure attention, an already open escalation or
2049
2250
  merge decision returns immediately, including with `--since`. Merge matches
2050
- use the same observation as watch. During replay, only new escalation events
2251
+ use the same observation as watch. During replay, only new failed-node verification or escalation events
2051
2252
  or undelivered eligible merge decisions satisfy attention. `--event` conditions
2052
2253
  fire only on new events or a cursor-resumed backlog.
2053
2254
 
@@ -2109,7 +2310,9 @@ run plus relevant open/latest context from the same journal the runner resumes.
2109
2310
  Each section distinguishes recoverable from terminal and shows that run's
2110
2311
  automatic attempts/limit, stopped step/round, attention, exact retained snapshot
2111
2312
  before exhaustion or released observation/proposal keys afterward, workflow
2112
- occurrences, review rounds, and filed ticket refs. Repository event history is
2313
+ occurrences, review rounds, and filed ticket refs. A durably suspended local turn
2314
+ shows `suspended` in status and both dashboards, with timing frozen and no human
2315
+ resume action: continuation is automatic when a dispatcher next runs. Repository event history is
2113
2316
  shown once. It is read-only and also reports an idle or paused repository with
2114
2317
  no run. The dispatch header always shows its acknowledged `harvest ON/OFF` gate
2115
2318
  and global `h` controls it. The optional, non-color-only `Harvest` row omits the
@@ -2206,7 +2409,7 @@ default, when you need to know what this repo's version says).
2206
2409
  | `ab-code-review` | `code-review` phase | Fresh skeptic: review the implementation diff against spec and plan, same verdict vocabulary. |
2207
2410
  | `ab-reconcile` | `reconcile` phase (epilogue) | Resolve a kernel-prepared single-change replay onto a frozen refreshed base; the kernel archives evidence and publishes with an exact expected-head guard. |
2208
2411
  | `ab-finalize` | `finalize` phase | Write the PR description for a green build; the kernel opens the PR. |
2209
- | `ab-operate` | outside the pipeline; model-invocable | The orchestrator role's operating manual, for any agent: file and groom tickets, watch builds with a resumable `ab watch` / `ab wait` loop, answer escalations, pause, resume, abort, control landing consent and holds, and keep going until every shepherded build is merged, closed, or aborted. Also read by the hosted turn runner as its system prompt (registry tools, approval and budget suspension, wake turns). |
2412
+ | `ab-operate` | outside the pipeline; model-invocable | The operator agent’s operating manual, for any agent: file and groom tickets, watch builds with a resumable `ab watch` / `ab wait` loop, answer escalations, pause, resume, abort, control landing consent and holds, and keep going until every shepherded build is merged, closed, or aborted. Also read by the hosted turn runner as its system prompt (registry tools, approval and budget suspension, wake turns). |
2210
2413
 
2211
2414
  Autobuild installs 12 skills. Everything except `ab-spec`, `ab-tickets`,
2212
2415
  `ab-guide`, and `ab-operate` carries `disable-model-invocation: true` — do not
@@ -2216,7 +2419,7 @@ description is exactly what the flag prevents. Those four exceptions drive no
2216
2419
  build phase, which is the criterion for membership (§16.3): `ab-spec` and
2217
2420
  `ab-tickets` are human/agent-facing pre-build surfaces, `ab-guide` is
2218
2421
  read-only reference including the setup handoff guidance, and `ab-operate` is
2219
- the manual for the orchestrator role, which any agent may take on.
2422
+ the manual for the operator-agent role, which any agent may take on.
2220
2423
 
2221
2424
  ## Revision-checked ticket writes
2222
2425
 
@@ -2283,6 +2486,28 @@ ordered by descending count then build name; repository requests are unattribute
2283
2486
  Repository status names a hotspot only when one build makes at least two requests
2284
2487
  and more than half of attributed requests. Telemetry never controls workflow.
2285
2488
 
2489
+ GitHub shares in-flight and completed PR, branch/ref and comparison observations
2490
+ across builds within one dispatcher tick. Opened nodes prime their tips and
2491
+ commit distance with at most two reads: PR plus comparison, or parent branch
2492
+ plus reversed comparison without a PR. Priming is best-effort: failures add a
2493
+ diagnostic and ordinary parent/target observations continue, so a deleted parent
2494
+ can still be replaced. Forge cooldowns and rate limits retain their gates.
2495
+ Each admitted poll revalidates mutable resources
2496
+ using exact-resource ETags; authenticated 304s spare the REST primary quota.
2497
+ Adapter caches are bounded and restart/eviction falls back to fresh reads.
2498
+ Writes, including Git publication and rewrites, invalidate observations before
2499
+ attempting the mutation so acknowledgement reads remain fresh. Leaf PR polling
2500
+ keeps its existing cadence. Readiness and landing inspections remain fresh.
2501
+
2502
+ For node cadence, durable wakes, restart behavior and CLI evidence, see
2503
+ [node polling and status](references/integration-tree.md#polling-and-status).
2504
+
2505
+ The total includes all attempted requests. Optional `restPrimary`,
2506
+ `restNotModified` and `graphql` counts distinguish REST responses charged to the
2507
+ primary quota, REST 304s and GraphQL calls. Transport failures and historical or
2508
+ legacy observations can remain unclassified; absent fields never imply zero.
2509
+ Shared requests are attributed to their first requester; cache hits count zero.
2510
+
2286
2511
  ### Requesting node freshness
2287
2512
 
2288
2513
  `ab restack <node>` and `builds.restack {repo, slug}` record durable demand.