@defrex/autobuild 1.0.0-beta.2 → 1.0.0-beta.4

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 (145) hide show
  1. package/SPEC.md +342 -23
  2. package/bin/ab-dispatch-generation.ts +93 -0
  3. package/docs/answering-blocked-builds.md +21 -3
  4. package/docs/architecture.md +170 -7
  5. package/docs/configuration.md +173 -5
  6. package/docs/integration-tree.md +91 -4
  7. package/docs/integration.md +54 -0
  8. package/docs/operator-api.md +58 -5
  9. package/docs/remote-store-protocol.md +9 -1
  10. package/docs/remote-ticket-protocol.md +5 -0
  11. package/docs/restacking.md +4 -1
  12. package/docs/setup.md +24 -0
  13. package/docs/spec-standard.md +94 -5
  14. package/docs/ticket-migration.md +50 -4
  15. package/package.json +3 -3
  16. package/packages/core/src/cli/artifact.ts +5 -4
  17. package/packages/core/src/cli/attention.ts +2 -0
  18. package/packages/core/src/cli/binary-direct.ts +190 -0
  19. package/packages/core/src/cli/binary-lifecycle.ts +46 -0
  20. package/packages/core/src/cli/binary.ts +24 -210
  21. package/packages/core/src/cli/build-control.ts +108 -5
  22. package/packages/core/src/cli/context.ts +41 -1
  23. package/packages/core/src/cli/dashboard/hand-pushed.ts +24 -0
  24. package/packages/core/src/cli/dashboard/handoff.ts +64 -0
  25. package/packages/core/src/cli/dashboard/integration-detail.ts +11 -6
  26. package/packages/core/src/cli/dashboard/integration-row.ts +15 -8
  27. package/packages/core/src/cli/dashboard/model.ts +41 -10
  28. package/packages/core/src/cli/dashboard/render.ts +24 -2
  29. package/packages/core/src/cli/dashboard/rollback.ts +30 -0
  30. package/packages/core/src/cli/dispatch-args.ts +53 -0
  31. package/packages/core/src/cli/dispatch-crash-budget.ts +15 -0
  32. package/packages/core/src/cli/dispatch-frontend.ts +57 -5
  33. package/packages/core/src/cli/dispatch-handoff.ts +276 -0
  34. package/packages/core/src/cli/dispatch-launch-contract.ts +170 -0
  35. package/packages/core/src/cli/dispatch-launcher.ts +580 -0
  36. package/packages/core/src/cli/dispatch-parent-watch.ts +44 -0
  37. package/packages/core/src/cli/dispatch-preflight.ts +272 -0
  38. package/packages/core/src/cli/dispatch-presentation-job.ts +46 -0
  39. package/packages/core/src/cli/dispatch-presentation-ownership.ts +9 -0
  40. package/packages/core/src/cli/dispatch-process.ts +22 -90
  41. package/packages/core/src/cli/dispatch-readiness.ts +47 -0
  42. package/packages/core/src/cli/dispatch-repository-feed.ts +6 -1
  43. package/packages/core/src/cli/dispatch-runtime-cache.ts +522 -0
  44. package/packages/core/src/cli/dispatch-runtime-dependencies.ts +291 -0
  45. package/packages/core/src/cli/dispatch-runtime-use.ts +336 -0
  46. package/packages/core/src/cli/dispatch-upgrade-controller.ts +221 -0
  47. package/packages/core/src/cli/dispatch-upgrade-install.ts +258 -0
  48. package/packages/core/src/cli/dispatch-upgrade-source.ts +309 -0
  49. package/packages/core/src/cli/dispatch-upgrade-target.ts +190 -0
  50. package/packages/core/src/cli/dispatch.ts +609 -60
  51. package/packages/core/src/cli/dispatcher-liveness.ts +1 -1
  52. package/packages/core/src/cli/harvest.ts +28 -11
  53. package/packages/core/src/cli/help.ts +7 -3
  54. package/packages/core/src/cli/installation.ts +5 -3
  55. package/packages/core/src/cli/main-checkout.ts +59 -0
  56. package/packages/core/src/cli/main.ts +26 -53
  57. package/packages/core/src/cli/node-verification-provenance.ts +97 -0
  58. package/packages/core/src/cli/repo-state.ts +3 -58
  59. package/packages/core/src/cli/repository-status.ts +74 -4
  60. package/packages/core/src/cli/runtime-spawn.ts +16 -0
  61. package/packages/core/src/cli/status.ts +57 -3
  62. package/packages/core/src/cli/ticket.ts +35 -11
  63. package/packages/core/src/cli/upgrade-followup.ts +25 -0
  64. package/packages/core/src/cli/wait.ts +3 -0
  65. package/packages/core/src/cli/watch.ts +7 -0
  66. package/packages/core/src/config/live.ts +1 -0
  67. package/packages/core/src/config/schema.ts +8 -4
  68. package/packages/core/src/distribution-packaging.ts +116 -0
  69. package/packages/core/src/events/catalog.ts +6 -0
  70. package/packages/core/src/events/payloads.ts +55 -9
  71. package/packages/core/src/events/policy.ts +26 -0
  72. package/packages/core/src/events/repository.ts +205 -4
  73. package/packages/core/src/events/runtime.ts +16 -0
  74. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +6537 -4053
  75. package/packages/core/src/kernel/change-presence.ts +7 -1
  76. package/packages/core/src/kernel/dispatch-capacity.ts +12 -4
  77. package/packages/core/src/kernel/dispatch-drain-recovery.ts +121 -0
  78. package/packages/core/src/kernel/dispatch-status.ts +4 -2
  79. package/packages/core/src/kernel/dispatch-upgrade.ts +171 -0
  80. package/packages/core/src/kernel/dispatcher-liveness.ts +7 -0
  81. package/packages/core/src/kernel/generators/repository-journals.ts +82 -0
  82. package/packages/core/src/kernel/guarded-forge.ts +1 -1
  83. package/packages/core/src/kernel/harvest.ts +98 -4
  84. package/packages/core/src/kernel/integration-attention.ts +20 -0
  85. package/packages/core/src/kernel/integration-completeness.ts +54 -16
  86. package/packages/core/src/kernel/integration-state.ts +80 -11
  87. package/packages/core/src/kernel/landing-readiness.ts +6 -1
  88. package/packages/core/src/kernel/mixed-version.ts +34 -0
  89. package/packages/core/src/kernel/node-parent.ts +35 -10
  90. package/packages/core/src/kernel/node-polling.ts +160 -0
  91. package/packages/core/src/kernel/read-facts.ts +47 -5
  92. package/packages/core/src/kernel/reducer-registry.ts +6 -0
  93. package/packages/core/src/kernel/reducer.ts +75 -14
  94. package/packages/core/src/kernel/service-facts.ts +11 -4
  95. package/packages/core/src/kernel/ticket-migrations.ts +139 -0
  96. package/packages/core/src/operator/presentation.ts +7 -0
  97. package/packages/core/src/operator/query.ts +13 -3
  98. package/packages/core/src/operator/registry.ts +1 -1
  99. package/packages/core/src/operator/tickets.ts +30 -26
  100. package/packages/core/src/plugins/load.ts +4 -1
  101. package/packages/core/src/plugins/runtime-snapshot.ts +128 -0
  102. package/packages/core/src/ports/forge/contract.ts +29 -0
  103. package/packages/core/src/ports/forge/github.ts +189 -61
  104. package/packages/core/src/ports/forge-failure.ts +1 -0
  105. package/packages/core/src/ports/forge-telemetry.ts +3 -0
  106. package/packages/core/src/ports/runner/session-env.ts +1 -0
  107. package/packages/core/src/ports/tickets/linear.ts +180 -12
  108. package/packages/core/src/ports/tickets/migration.ts +92 -9
  109. package/packages/core/src/ports/types.ts +17 -0
  110. package/packages/core/src/ports/workspace/distribution-archive.ts +22 -149
  111. package/packages/core/src/ports/workspace/distribution-release.ts +56 -0
  112. package/packages/core/src/ports/workspace/git-worktree.ts +2 -1
  113. package/packages/core/src/ports/workspace/local-build-execution.ts +37 -17
  114. package/packages/core/src/processes/build-child-exit.ts +5 -26
  115. package/packages/core/src/processes/build-runner.ts +81 -11
  116. package/packages/core/src/processes/dispatcher.ts +418 -59
  117. package/packages/core/src/processes/execution-no-progress.ts +6 -0
  118. package/packages/core/src/processes/execution-relaunch.ts +30 -0
  119. package/packages/core/src/processes/execution-settlement.ts +16 -7
  120. package/packages/core/src/processes/harvest-runner.ts +328 -292
  121. package/packages/core/src/processes/process-group-reaper.ts +17 -10
  122. package/packages/core/src/runtime-identity.ts +22 -3
  123. package/packages/core/src/store/contract.ts +183 -0
  124. package/packages/core/src/store/local/store.ts +197 -72
  125. package/packages/core/src/store/reduced-reads.ts +8 -0
  126. package/packages/core/src/store/reducer-value-shapes.json +8915 -6344
  127. package/packages/core/src/store/remote/client.ts +43 -0
  128. package/packages/core/src/store/repo-state-events.ts +21 -3
  129. package/packages/core/src/store/types.ts +7 -0
  130. package/packages/core/src/testing/dispatch-read-budget.ts +3 -2
  131. package/skills/guide/SKILL.md +234 -24
  132. package/skills/guide/references/integration-tree.md +91 -4
  133. package/skills/guide/references/operator-api.md +53 -4
  134. package/skills/guide/references/plugin-authoring.md +45 -4
  135. package/skills/guide/references/remote-store-protocol.md +9 -1
  136. package/skills/guide/references/remote-ticket-protocol.md +5 -0
  137. package/skills/guide/references/restacking.md +4 -1
  138. package/skills/guide/references/setup.md +24 -0
  139. package/skills/guide/references/spec-standard.md +94 -5
  140. package/skills/guide/references/ticket-migration.md +50 -4
  141. package/skills/harvest/SKILL.md +4 -0
  142. package/skills/harvest-review/SKILL.md +4 -0
  143. package/skills/operate/SKILL.md +78 -8
  144. package/skills/spec/SKILL.md +35 -5
  145. package/skills/tickets/SKILL.md +19 -0
@@ -11,7 +11,7 @@ Every action below is sessionless, records a human-authored fact, and accepts
11
11
  | Try again without guidance | `ab answer <slug>` | Records a bare `retry`; no prose is delivered to an agent. |
12
12
  | Widen an exhausted review loop | `ab answer <slug> [<text>] --review-round-ceiling <n>` | Answers the open `review-round-limit` escalation and replaces the configured cap with absolute ceiling `n` for that loop and spec revision only. |
13
13
  | Retire a review disagreement | `ab answer <slug> --dismiss` | Records `dismiss-finding` for each escalation that cites a real finding id. The next reviewer is told not to re-raise that chain. |
14
- | Replace the build contract from a file | `ab answer <slug> --revise-spec <file>` | Records the replacement as the next spec revision and restarts at `plan`. |
14
+ | Replace the build contract from a file | `ab answer <slug> --revise-spec <file>` | Records the replacement as the next spec revision and restarts leaves at `plan`; nodes recollect and verify. |
15
15
  | Re-import an amended ticket | `ab answer <slug> --revise-spec-from-ticket` | Reads the build's recorded ticket and performs the same revision. |
16
16
  | Abandon the build | `ab abort <slug>` | Irrevocably requests abort; cleanup returns the ticket to Triage. |
17
17
 
@@ -66,14 +66,14 @@ problem in the same file under a new finding id.
66
66
 
67
67
  ## Revising the spec
68
68
 
69
- Revision requires an open escalation because the spec is the contract against
69
+ Leaf revision requires an open escalation because the spec is the contract against
70
70
  which every downstream approval is measured. The replacement must satisfy the
71
71
  same spec-standard quality gate used at dispatch; a non-conforming body is
72
72
  rejected before an artifact or event is recorded, leaving the build blocked on
73
73
  its current revision.
74
74
 
75
75
  A successful answer records a human `escalation.answered` fact naming the exact
76
- replacement artifact, followed by kernel `spec.revised`. The build re-plans and
76
+ replacement artifact, followed by kernel `spec.revised`. The leaf re-plans and
77
77
  pre-revision reviews, verification, and finalize completion do not satisfy the
78
78
  new run. Historical phase runs remain pinned to the revision they saw. An
79
79
  already-open pull request is retained and updated rather than duplicated.
@@ -87,3 +87,21 @@ A build that has already become terminal cannot restart. This includes the
87
87
  short windows where its PR has merged or closed and completion is underway, or
88
88
  where an abort request is pending. Abort is irrevocable; after cleanup, dispatch
89
89
  the returned ticket as a fresh build if work should continue.
90
+
91
+ Operators may explicitly revise an opened idle collecting node or a node blocked on failed
92
+ integration verification without an escalation. Use
93
+ `ab answer <node> --revise-spec replacement.md` or, after amending its ticket,
94
+ `ab answer <node> --revise-spec-from-ticket`. Ticket edits alone do not revise
95
+ the build. Both forms enforce the same spec standard as leaf revisions.
96
+ Each kernel `spec.revised` records the exact artifact and operator identity
97
+ (with optional transport provenance); earlier revisions remain readable.
98
+ Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
99
+ The node recollects and verifies the new revision, including on the same head
100
+ and parent after a failed cycle. Earlier cycles remain historical evidence
101
+ and cannot block or authorize landing under the replacement. Children keep
102
+ their specs, claims and targets; contributions are not restarted.
103
+ Active verification/reconcile or writer work, restack/reparent work, pause,
104
+ pending controls, landing intent and ended PRs refuse the no-escalation path.
105
+ A concurrent state change refuses publication with a retry explanation;
106
+ uncited artifacts are inert. Leaves still require an open escalation and
107
+ restart from `plan`.
@@ -89,7 +89,7 @@ remote-store protocol requires matching client and server versions.
89
89
  | `packages/core/src/plugins/` | Strict versioned plugin manifests, dual-root repository/package Bun loading, owner-aware adapter registration, contract/credential metadata, and runtime-factory materialization | §3.2.1, §9 |
90
90
  | `packages/core/src/plugin-sdk/` | The sole supported `@defrex/autobuild/plugin-sdk` barrel: port/manifest types, contract suites, and reference fakes | §3.2.1 |
91
91
  | `packages/core/src/processes/` | build-runner and standalone child composition, durable execution config/diagnostics, dispatcher (+ janitor duty, harvest trigger, and the last-step orchestrator resume/reap/wake pass, origin-mode-gated), orchestrator tick step, harvest deterministic core + runner | §3.3, §7.1.2, §12, §15.7 |
92
- | `packages/core/src/cli/` and `bin/` | The `ab` CLI — the only agent↔store channel — plus the shared presentation-only durable-progress projection, init/upgrade, the Store-only dispatch frontend, its private supervised kernel entry, and `bin/ab-build-runner.ts` (one child per build) | §8, §14, §16.3 |
92
+ | `packages/core/src/cli/` and `bin/` | The `ab` CLI — the only agent↔store channel — plus the shared presentation-only durable-progress projection, init/upgrade, the filesystem-only dispatch launcher and immutable generation cache, the Store-only dispatch frontend, its private supervised kernel entry, and `bin/ab-build-runner.ts` (one child per build) | §8, §14, §16.3 |
93
93
  | `packages/core/src/cli/dashboard/` | `ab dispatch`'s fixed live frame: pure projection, renderer, poll cache, and deterministic image renderer | §14 |
94
94
  | `bin/agent/ab` | Private launcher placed first on agent-session `PATH`; delegates to the canonical `bin/ab.ts` | §8.1 |
95
95
  | `packages/core/src/config/` | `autobuild.toml` parsing and strict validation, plus the pure role-key consumability diagnostics `ab dispatch` reports at startup (`roles.ts`); user reference in `docs/configuration.md` | §9, §16.1 |
@@ -423,7 +423,83 @@ reaps the complete inherited process group, escalating group-wide from SIGTERM
423
423
  through the existing bounded delay to SIGKILL; only then is it a liveness signal
424
424
  and only then does the kernel release the exact lease. Interactive `ab dispatch` runs the kernel owner in the
425
425
  private `bin/ab-dispatch-kernel.ts` child;
426
- `dispatch-frontend.ts` owns only terminal/Store adapters and
426
+ `dispatch-launcher.ts` freezes the invoking distribution and installed production
427
+ dependencies offline under `.autobuild/runtime/`, then starts
428
+ `bin/ab-dispatch-generation.ts` using the pinned v1 process contract. It loads
429
+ only filesystem/process helpers and never opens a Store. The generation's
430
+ frontend, kernel, local runners and agent CLI use one completed immutable root;
431
+ `dispatch-runtime-use.ts` protects current/previous/held/live entries during
432
+ spawn and pruning. Source guest archives are captured at installation. Source generations deliver
433
+ the exact packed source archive; registry generations keep a separate,
434
+ digest-validated GitHub release asset matching the cached manifest version,
435
+ resolved and atomically cached at first guest use. Local launch remains offline.
436
+ Installation provenance uses Bun store/lock evidence across isolated and hoisted
437
+ layouts, preserving source/forge markers before staging.
438
+ The normalized host archive retains its independent compiler boundary. Guest
439
+ archive delivery uses the authenticated provider transport after launcher startup,
440
+ keeping HTTP code outside the resident launcher’s eager filesystem/process graph.
441
+ `--once`, origin/hosted paths and injected hot dashboard rendering remain direct.
442
+ `dispatch-upgrade-target.ts` reads manifest and lock blobs from one authoritative
443
+ base snapshot, or rereads the original install pathname when unpinned. Frozen
444
+ launcher eligibility selects source mode for a source root sharing the dispatched
445
+ repository's Git common directory. `dispatch-upgrade-source.ts` exports exact
446
+ commits into private cache staging and fingerprints actual packed contents and
447
+ the production-reachable Bun lock closure. Source preparation installs with the
448
+ frozen lock and scripts disabled, then publishes through the existing immutable
449
+ runtime cache. Neither resolution nor installation changes an operator/build
450
+ worktree. Excluded-file commits change observed provenance without adoption.
451
+ `dispatch-upgrade-install.ts` stages and validates exact targets;
452
+ `dispatch-upgrade-controller.ts` checks immediately and every 60 seconds, suppresses
453
+ failed target inputs and publishes durable prepared targets. `dispatch-preflight.ts`
454
+ checks target configuration, provider compatibility and actual protocol-write
455
+ admission before requesting yield. `kernel/dispatch-upgrade.ts` folds correlated
456
+ acceptance, terminal release, takeover, per-execution retirement and completion.
457
+ The runtime-owned `dispatch-handoff.ts` reader lets the filesystem-only launcher
458
+ supervise overlapping generations without owning Store or config decisions.
459
+ A runtime-owned repository-record projection binds the journal transport before
460
+ initial spawn and across handoffs, including when later config edits are invalid.
461
+ `dispatch-frontend.ts` acknowledges terminal release only after joining input
462
+ and rendering. The old kernel releases repository authority but retains local
463
+ execution supervision until completion or the hot policy deadline. Build-log
464
+ execution authorization permits expected mixed-version deferral without restart
465
+ attention. Accepted authorization also carries the target runtime.
466
+ `processes/execution-relaunch.ts` compares immutable identities from existing
467
+ boundary facts; local and remote runners finish the phase, record an instance-correlated
468
+ relaunch request and clean up. Confirmed teardown records a neutral relaunch
469
+ outcome. The current owner's ordinary lease sweep resumes durable work promptly,
470
+ including after an ownership gap. Remote captures authorize exact guest runtimes
471
+ independently of local retirement, including late attachment after completion.
472
+ The existing repository execution digests bound recovery and handoff capture reads
473
+ to open executions; multiple historical captures share one read per live build.
474
+ Guests detach without losing leases; re-attachment refreshes their archive before
475
+ the next phase. Deadline suspension applies only to local runners. `kernel/dispatch-drain-recovery.ts` reconstructs unfinished retirement
476
+ after a predecessor dies. Cutover suspends immediately when provider evidence
477
+ cannot establish safe overlap. Automatic upgrades can be disabled; targets
478
+ without preflight capability require manual restart.
479
+
480
+ **Automatic runtime rollback.** The filesystem/process-only launcher in
481
+ `cli/dispatch-launcher.ts` owns the crash budget, anchored to durable takeover.
482
+ `cli/dispatch-crash-budget.ts` counts three failed exits within ten minutes;
483
+ `cli/dispatch-launch-contract.ts` negotiates a separate rollback capability while
484
+ preserving v1 launch/overlap compatibility. Generation-owned readers expose takeover
485
+ and capability evidence. `cli/dispatch-handoff.ts` validates recovery against that
486
+ evidence and deposits the idempotent rollback fact after lease acquisition.
487
+ `kernel/dispatch-upgrade.ts` reduces lineage holds and historical rollback;
488
+ `cli/dispatch-upgrade-controller.ts` clears a hold only after resolving a different
489
+ target. `cli/dispatch-runtime-use.ts` transfers reservations to generation-owned
490
+ hold retention under the pruning lock. Existing runner leases and decisive-read
491
+ deferrals remain the boundary recovery authority.
492
+
493
+ Local harvest suspends durably before repository lease release on handoff or
494
+ clean stop. The next generation resumes eligible native sessions with fresh
495
+ logical credentials, or records a reasoned `harvest.session.resume-fallback`
496
+ and starts fresh. Orderly suspension spends no recovery attempt; real crashes
497
+ retain recovery accounting.
498
+
499
+ The advisory
500
+ `dispatcher.upgrade-target-resolved` fact independently retains each run's latest
501
+ successful mode/base/SHA observation without clearing failure evidence; repeated
502
+ identical observations append nothing. `dispatch-frontend.ts` owns only terminal/Store adapters and
427
503
  `dispatch-process.ts` owns child supervision. SIGINT, SIGHUP, SIGQUIT, and
428
504
  SIGTERM restore terminal modes immediately and begin one supervised drain;
429
505
  persistent frontend and child handlers keep repeated signals graceful until the
@@ -459,7 +535,7 @@ appends transcriptless reclaimed `session.ended` facts for unrelated open
459
535
  sessions before `runner.attached` cites that same boundary. Partial closure is
460
536
  retry-safe; historical orphan-only logs keep their
461
537
  old projection until an actual takeover records those facts. The supervisor
462
- rechecks kernel-child liveness at the force boundary
538
+ waits for graceful kernel-child teardown without a force-kill deadline
463
539
  and projects the same normal, forced, or abnormal result (with available
464
540
  process/error detail) that the repository run-stopped evidence records. Ordinary
465
541
  kernel teardown stops and reaps all build groups. Every build-child terminal
@@ -902,7 +978,10 @@ alternate targets, and independently inherited build-session budget.
902
978
  `build-runner.ts` and `harvest-runner.ts` own the deterministic
903
979
  primary-first attempt loop: each substitution opens a new session bracket,
904
980
  records provenance on its start, and only complete-chain exhaustion consumes an
905
- existing phase/session attempt. This keeps runtime availability routing out of
981
+ existing phase/session attempt. A suspended harvest turn first tries its recorded
982
+ route, then the remaining targets in configured order; provider evidence retains
983
+ configured indexes, and only the primary stays live for producer revisions.
984
+ This keeps runtime availability routing out of
906
985
  agent judgment while preserving transcript and artifact actor attribution.
907
986
 
908
987
  A normal `bun test` runs the memory/fake/local registrations, including a fake
@@ -923,12 +1002,39 @@ A claim freezes the ticket's current assets into the build (SPEC §6.3):
923
1002
  `spec.revised.assets`) record the pinned revisions, `state.pinnedAssets` in the
924
1003
  reducer projects them, `getPinnedTicketAsset` reads them back by pinned revision,
925
1004
  and `ab context` writes them under `.ab/assets/`.
1005
+
926
1006
  For hosted tickets, `store/ticket-asset-snapshots.ts` copies exact revisions
927
1007
  into chunked immutable repository artifacts in the build store before pinning.
928
1008
  Reads use explicit manifest/chunk revisions without a ticket connection. Old
929
1009
  pins retain ticket-row reads; existing service attachments need no migration,
930
1010
  and attachments in old local stores are not moved.
931
1011
 
1012
+ In node `verify:*` context, `nodeVerification` in the manifest identifies the frozen
1013
+ `range`, `indexPath`, `contributions`, `handPushedCommits` and `unattributedCommits`. Each contribution
1014
+ has `build`, its current stored `ticket` identity, `spec: {kind: 'spec', rev}`,
1015
+ `specPath` and `commits`. The JSON index repeats this metadata and adds the
1016
+ exhaustive ordered `commits: [{sha, build?}]` mapping. Paths are workspace-relative
1017
+ and reflect scratch allocation, including legacy tracked-file collisions.
1018
+ Contribution specs normally live at `.ab/contributions/<build>/spec.md`; the index
1019
+ normally lives at `.ab/node-verification.json`. These files are marked `derived`
1020
+ in `materialized`, with their source build and revision recorded in the metadata.
1021
+
1022
+ Membership comes from build identity trailers on every commit reachable in the
1023
+ frozen parent-to-head range, including earlier cycles and merge side history.
1024
+ Specs use the current event-authorized revision, never an unsanctioned latest
1025
+ deposit or mutable ticket body. Unknown identities, ambiguous or invalid trailers,
1026
+ and missing source data fail hydration. Commits without a build trailer are
1027
+ listed as unattributed, a mechanical absence of a trailer rather than an authorization verdict.
1028
+ `handPushedCommits: [{sha, originalSha, message}]` identifies node-owned hand-pushed
1029
+ commits in the frozen range. Ownership uses the durable first-parent contribution
1030
+ boundary; inherited and merge-side history are not automatically owned. Confirmed
1031
+ rewrite aliases preserve original identity, and `message` is the full commit message.
1032
+ These messages express maintainer-authorized intent: judge quality and consistency;
1033
+ never fail these commits solely for lacking a covering spec.
1034
+ Other node changes are authorized when the node spec or the spec of the contribution
1035
+ that introduced it covers it; use the commit mapping to find that spec.
1036
+ Leaf verification context is unchanged.
1037
+
932
1038
  Both `ab dispatch` and sessionless `ab ticket` load the repository's plugins
933
1039
  before selecting their TicketSource; dispatch passes that one adapter instance
934
1040
  through readiness, dependency, harvest, and completion paths. The Linear,
@@ -1263,7 +1369,8 @@ columns. Reservations live in the event stream and survive lease expiry.
1263
1369
  The contribution boundary advances only on completed restacks. Reachable build
1264
1370
  identities include inherited parent changes; foreign counts include only the
1265
1371
  node's own contribution, preventing a parent rewrite from inflating descendants'
1266
- foreign inventory. Status text and JSON expose both inventory and active items.
1372
+ hand-pushed inventory (node-owned foreign commits). Status text and JSON expose
1373
+ both inventory and active items, retaining original identities after rewrites.
1267
1374
 
1268
1375
 
1269
1376
  Integration completion is sampled by `kernel/integration-completeness.ts` from
@@ -1315,8 +1422,10 @@ SIGINT/SIGTERM. A conditional artifact deposit records `session.suspended`
1315
1422
  with cause `shutdown`, the native handle, active milliseconds, partial transcript
1316
1423
  and any known incremental usage. A terminal fact that lands first prevents
1317
1424
  suspension; suspension fences the old session's terminal credentials permanently.
1318
- The process supervisor retains its existing bounded force-stop path if provider
1319
- cleanup or persistence cannot complete.
1425
+ Graceful shutdown waits for provider cleanup and durable suspension without a
1426
+ wall-clock force-exit deadline. Only after the runner leader exits does bounded
1427
+ process-group cleanup reap remaining descendants. Abnormal parent loss retains
1428
+ the detached reaper recovery path.
1320
1429
 
1321
1430
  On attachment the runner retains an eligible current phase/round session and
1322
1431
  records takeover. Matching host, workspace and runtime permit native resume;
@@ -1395,3 +1504,57 @@ unavailable for uninstrumented adapters. Attribution retains at most ten builds
1395
1504
  ordered by descending count then build name; repository requests are unattributed.
1396
1505
  Repository status names a hotspot only when one build makes at least two requests
1397
1506
  and more than half of attributed requests. Telemetry never controls workflow.
1507
+
1508
+ GitHub shares in-flight and completed PR, branch/ref and comparison observations
1509
+ across builds within one dispatcher tick. Opened nodes prime their tips and
1510
+ commit distance with at most two reads: PR plus comparison, or parent branch
1511
+ plus reversed comparison without a PR. Priming is best-effort: failures add a
1512
+ diagnostic and ordinary parent/target observations continue, so a deleted parent
1513
+ can still be replaced. Forge cooldowns and rate limits retain their gates.
1514
+ Each admitted poll revalidates mutable resources
1515
+ using exact-resource ETags; authenticated 304s spare the REST primary quota.
1516
+ Adapter caches are bounded and restart/eviction falls back to fresh reads.
1517
+ Writes, including Git publication and rewrites, invalidate observations before
1518
+ attempting the mutation so acknowledgement reads remain fresh. Leaf PR polling
1519
+ keeps its existing cadence. Readiness and landing inspections remain fresh.
1520
+
1521
+ For node cadence, durable wakes, restart behavior and CLI evidence, see
1522
+ [node polling and status](integration-tree.md#polling-and-status).
1523
+
1524
+ The total includes all attempted requests. Optional `restPrimary`,
1525
+ `restNotModified` and `graphql` counts distinguish REST responses charged to the
1526
+ primary quota, REST 304s and GraphQL calls. Transport failures and historical or
1527
+ legacy observations can remain unclassified; absent fields never imply zero.
1528
+ Shared requests are attributed to their first requester; cache hits count zero.
1529
+
1530
+ Ticket-source continuity is reduced by `kernel/ticket-migrations.ts` from durable
1531
+ repository `tickets.migration-recorded` facts. Import publishes only complete
1532
+ mappings; current-operation resolvers leave build records and old events intact.
1533
+
1534
+ ## Integration verification reporting
1535
+
1536
+ A failed node verification cycle records `integration.verification-failed` with its prepared cycle id, failed steps, exact head and parent, and guidance to file a repair child targeting the node. The kernel reports durable failed receipts; dispatcher housekeeping recovers missing reports for the current cycle using a per-cycle CAS guard. Superseded cycles are never backfilled with repair instructions: recovery requires the latest prepared cycle to match the node’s observed head and parent. This fact is decisive evidence and bookkeeping, and does not change verification or leaf routing.
1537
+
1538
+ Default watch and new hosted wake settings include this event. Watch cursors deliver each failed cycle once and baseline failures when first armed; reconcile build status after arming. `ab wait --for attention` also detects a current failed node cycle before the report is written. Historical facts remain queryable after repair without retaining current attention. Explicit event globs and existing stored wake choices are preserved.
1539
+
1540
+ `packages/core/src/kernel/integration-state.ts` retains reported cycle identities and selects missing failures from exact receipts. `kernel/integration-attention.ts` owns their CAS append; `processes/build-runner.ts` reports after verification and `processes/dispatcher.ts` recovers missing facts before per-build janitor gates. The shared `cli/dashboard/model.ts` projects current failure as blocked attention for both frontends.
1541
+
1542
+ ## Operator node spec revisions
1543
+
1544
+ Operators may explicitly revise an opened idle collecting node or a node blocked on failed
1545
+ integration verification without an escalation. Use
1546
+ `ab answer <node> --revise-spec replacement.md` or, after amending its ticket,
1547
+ `ab answer <node> --revise-spec-from-ticket`. Ticket edits alone do not revise
1548
+ the build. Both forms enforce the same spec standard as leaf revisions.
1549
+ Each kernel `spec.revised` records the exact artifact and operator identity
1550
+ (with optional transport provenance); earlier revisions remain readable.
1551
+ Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
1552
+ The node recollects and verifies the new revision, including on the same head
1553
+ and parent after a failed cycle. Earlier cycles remain historical evidence
1554
+ and cannot block or authorize landing under the replacement. Children keep
1555
+ their specs, claims and targets; contributions are not restarted.
1556
+ Active verification/reconcile or writer work, restack/reparent work, pause,
1557
+ pending controls, landing intent and ended PRs refuse the no-escalation path.
1558
+ A concurrent state change refuses publication with a retry explanation;
1559
+ uncited artifacts are inert. Leaves still require an open escalation and
1560
+ restart from `plan`.
@@ -223,6 +223,7 @@ These fields hot-reload:
223
223
  | `[verify]` and `[finalize]` | Next engine step selection for a build whose OWN branch carries it. Dispatcher readiness, resume, and recovery use the same pin. An approved plan's stored verify selection remains authoritative, and a base-branch reload does not retarget an in-flight build. |
224
224
  | `[workspace]` provider and config (including `provisioning`) | Next launch of a build whose OWN branch carries it. A base-branch reload never re-provisions an in-flight build. |
225
225
  | `[roles]` | Next agent invocation for that role. Runtime, model, args, alternates, and the session budget are captured together and delivered live. |
226
+ | `[upgrade]` | Cancels preparation when disabled; automatic target checks every 60 seconds. |
226
227
  | `[policy]` | Next policy, convergence, or agent-session boundary, delivered live. A running session keeps its captured budget. |
227
228
  | `tickets.readyLabels`, `tickets.readyState`, `tickets.readyAssignee` | Next ready-ticket scan. |
228
229
  | `tickets.triageState`, `tickets.proposalState` | Next dispatcher handback or harvest filing boundary. |
@@ -672,12 +673,14 @@ checkout-only hooks such as Husky are not provisioning dependencies. A Bun
672
673
  install or verification failure identifies the configured image and expected
673
674
  universal-image capabilities, deletes the partial environment, and leaves no
674
675
  readiness marker. A retry also deletes any named sandbox without that marker
675
- instead of adopting partial setup. The installed distribution's identity — package version and remote-store
676
- protocol version — is recorded in the guest's
676
+ instead of adopting partial setup. The installed distribution's identity — package version, remote-store
677
+ protocol version and SHA256 of the exact installed archive — is recorded in the guest's
677
678
  `/opt/autobuild/.distribution-version` marker; a reused sandbox whose marker
678
679
  no longer matches the identity the current system would deliver is refreshed
679
680
  by reinstalling the archive before reuse, so an upgraded dispatcher retrofits
680
- its persistent guests (see "Guest distribution version selection and delivery"
681
+ its persistent guests. Cached registry generations deliver their own manifest
682
+ version’s validated GitHub release asset, resolved on first guest use and cached
683
+ separately from the normalized host archive. Local launches need no asset fetch; source generations deliver exact packed source bytes (see "Guest distribution version selection and delivery"
681
684
  in docs/setup.md for the release-and-upgrade delivery path and the hosted
682
685
  store's supported client window). Immediately
683
686
  before every build-child launch, the adapter verifies the
@@ -882,6 +885,32 @@ Cross-field validation rejects:
882
885
  selectors are validated even though the mandatory step will not use them for
883
886
  applicability.
884
887
 
888
+ In node `verify:*` context, `nodeVerification` in the manifest identifies the frozen
889
+ `range`, `indexPath`, `contributions`, `handPushedCommits` and `unattributedCommits`. Each contribution
890
+ has `build`, its current stored `ticket` identity, `spec: {kind: 'spec', rev}`,
891
+ `specPath` and `commits`. The JSON index repeats this metadata and adds the
892
+ exhaustive ordered `commits: [{sha, build?}]` mapping. Paths are workspace-relative
893
+ and reflect scratch allocation, including legacy tracked-file collisions.
894
+ Contribution specs normally live at `.ab/contributions/<build>/spec.md`; the index
895
+ normally lives at `.ab/node-verification.json`. These files are marked `derived`
896
+ in `materialized`, with their source build and revision recorded in the metadata.
897
+
898
+ Membership comes from build identity trailers on every commit reachable in the
899
+ frozen parent-to-head range, including earlier cycles and merge side history.
900
+ Specs use the current event-authorized revision, never an unsanctioned latest
901
+ deposit or mutable ticket body. Unknown identities, ambiguous or invalid trailers,
902
+ and missing source data fail hydration. Commits without a build trailer are
903
+ listed as unattributed, a mechanical absence of a trailer rather than an authorization verdict.
904
+ `handPushedCommits: [{sha, originalSha, message}]` identifies node-owned hand-pushed
905
+ commits in the frozen range. Ownership uses the durable first-parent contribution
906
+ boundary; inherited and merge-side history are not automatically owned. Confirmed
907
+ rewrite aliases preserve original identity, and `message` is the full commit message.
908
+ These messages express maintainer-authorized intent: judge quality and consistency;
909
+ never fail these commits solely for lacking a covering spec.
910
+ Other node changes are authorized when the node spec or the spec of the contribution
911
+ that introduced it covers it; use the commit mapping to find that spec.
912
+ Leaf verification context is unchanged.
913
+
885
914
  ### Role routing for an agent verify step
886
915
 
887
916
  An agent verify step selects `[roles.<step>]` by its **logical step name** —
@@ -1200,6 +1229,7 @@ Optional. Every field receives its own default. All are positive integers except
1200
1229
 
1201
1230
  | Field | Default | Constraints | Purpose |
1202
1231
  |---|---:|---|---|
1232
+ | `upgradeDrainSeconds` | `900` | positive integer | Deadline for a retiring generation, relative to handoff start; hot-reloaded during drain. |
1203
1233
  | `sessionBudgetSeconds` | `3600` | positive integer | Active-time bound for each build agent session unless its logical role overrides it. Native continuation retains the original ceiling; suspension does not consume it. |
1204
1234
  | `stallRounds` | `3` | positive integer | Escalate when the same review finding survives this many rounds. |
1205
1235
  | `maxVerifyAttempts` | `3` | positive integer | Bound failure-driven verify → implement retry cycles. |
@@ -1210,6 +1240,8 @@ Optional. Every field receives its own default. All are positive integers except
1210
1240
  | `maxReviewRounds` | `6` | positive integer | Default bound for each plan/review and implement/review convergence loop. An operator may replace it for one parked build loop and current spec revision with `ab answer --review-round-ceiling`; other builds are unaffected. |
1211
1241
  | `harvestThreshold` | `5` | positive integer | New unclaimed observation occurrences needed to start one harvest run. |
1212
1242
  | `janitorFailureAttentionSeconds` | `600` | positive integer | Consecutive janitor failure duration before build attention. |
1243
+ | `nodeIdleAfterSeconds` | `600` | positive integer | Quiet period before opened integration nodes enter idle polling. |
1244
+ | `nodeIdlePollSeconds` | `120` | positive integer | Interval between idle node checks; durable activity wakes the next tick. |
1213
1245
  | `janitorBackoffMaxSeconds` | `300` | positive integer | Cap on exponential janitor retry delay, starting at 30 seconds. |
1214
1246
  | `harvestMaxDrift` | `3` | nonnegative integer | Other builds merged after the oldest unclaimed observation needed to start a run; `0` disables drift. |
1215
1247
 
@@ -1484,7 +1516,7 @@ restart-classified as a whole.
1484
1516
  | `model` | — | nonblank string, required when `enabled = true` | Provider-qualified model string for the turn runner, in the same vocabulary as `[roles]` model strings (a leading `vercel-ai-gateway/` prefix is accepted and stripped). Resolved through the deployment's gateway credential. |
1485
1517
  | `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 (`ORCHESTRATOR_ROUTE_LIMIT_SECONDS`, the same number the operator route pins as `maxDuration`). |
1486
1518
  | `approvals` | see below | array of `tool` or `tool:qualifier` strings | Registry tool names whose calls suspend a turn until the operator answers. Default: `["builds.control:abort", "builds.control:discard", "builds.answer:revise-spec", "sandbox.publish", "tickets.move:ready"]`. Empty (`[]`) means none — autonomous operation. An entry naming an absent or unknown tool is **inert by design**, never a config error: the list stays stable while the registry grows, and a tool's removal cannot break parsing. A `tool:qualifier` entry applies to the named discriminator value only (for example `tickets.move:ready` approves moving a ticket to `ready`); for a tool without a discriminator, only the bare form matches. |
1487
- | `wake` | inherits the default | array of event-type globs | The attention events a **new** session wakes for. Kept schema-optional so absent (inherit the default attention set — the build events `ab watch` filters on by default plus the repository-journal events `ab watch` follows) and `[]` (never wake; message-only) stay distinct. Each glob must match at least one build or repository-journal event type, validated with the same compiler `ab watch` uses. Existing sessions never retroactively inherit; an explicit `PUT .../wake` always wins. |
1519
+ | `wake` | inherits the default | array of event-type globs | The attention events a **new** session wakes for. Kept schema-optional so absent (inherit the legacy hosted wake set including `integration.verification-failed`, independently of CLI watch defaults) and `[]` (never wake; message-only) stay distinct. Each glob must match at least one build or repository-journal event type, validated with the same compiler `ab watch` uses. Existing sessions never retroactively inherit; an explicit `PUT .../wake` always wins. |
1488
1520
  | `sandbox` | — | strict subtable; absence reads as the defaults | Sandbox behavior knobs. |
1489
1521
 
1490
1522
  `[orchestrator.sandbox]` fields:
@@ -2024,7 +2056,7 @@ attention. Autobuild never rewrites the target to undo either outcome. Merge
2024
2056
  gates and the serialized node-writer publication rules remain authoritative.
2025
2057
  ### Failure budgets and own-build read deferrals
2026
2058
 
2027
- `policy.maxVerifyAttempts` counts distinct failed logical verify cycles after
2059
+ For leaves, `policy.maxVerifyAttempts` counts distinct failed logical verify cycles after
2028
2060
  the latest spec revision. Passing and skipped cycles, including target movement
2029
2061
  through restack or reconcile, consume zero. Cycle identifiers remain monotonic;
2030
2062
  pass, pass, pass, fail at cycle 4 spends one failure. Duplicate completion
@@ -2051,3 +2083,139 @@ execution and unchanged-base progress budgets retain their existing accounting.
2051
2083
 
2052
2084
  Default `ab watch` and `ab wait --for attention` include
2053
2085
  `phase.deferral-escalated`; explicit event filters replace the default set.
2086
+
2087
+ ## Integration verification attention
2088
+
2089
+ A failed node verification cycle records `integration.verification-failed` with its prepared cycle id, failed steps, exact head and parent, and guidance to file a repair child targeting the node. The kernel reports durable failed receipts; dispatcher housekeeping recovers missing reports for the current cycle using a per-cycle CAS guard. Superseded cycles are never backfilled with repair instructions: recovery requires the latest prepared cycle to match the node’s observed head and parent. This fact is decisive evidence and bookkeeping, and does not change verification or leaf routing.
2090
+
2091
+ Default watch and new hosted wake settings include this event. Watch cursors deliver each failed cycle once and baseline failures when first armed; reconcile build status after arming. `ab wait --for attention` also detects a current failed node cycle before the report is written. Historical facts remain queryable after repair without retaining current attention. Explicit event globs and existing stored wake choices are preserved.
2092
+
2093
+ ## Immutable dispatcher generations
2094
+
2095
+ Resident checkout dispatch runs from an immutable generation snapshot under the
2096
+ main checkout's `.autobuild/runtime/` cache. Configuration and plugin selection
2097
+ still use the checkout. A launcher freezes the currently installed distribution
2098
+ and production dependencies offline; all later local runners and agent CLIs use
2099
+ that same snapshot. Automatic adoption is enabled by default through `[upgrade]`
2100
+ below; a manual restart is required when automatic upgrades are disabled or the
2101
+ launcher contract changes. `--once`, origin mode and hosted cron retain their
2102
+ direct execution paths.
2103
+
2104
+ ## `[upgrade]`
2105
+
2106
+ `[upgrade]` is a strict, hot-reloaded table:
2107
+
2108
+ | Field | Default | Meaning |
2109
+ | --- | --- | --- |
2110
+ | `automatic` | `true` | Check and adopt changed runtime targets automatically. |
2111
+
2112
+
2113
+ <!-- config-fragment -->
2114
+ ```toml
2115
+ [upgrade]
2116
+ automatic = true
2117
+ ```
2118
+
2119
+ `automatic` defaults to true, including for older saved configuration. Resident
2120
+ checkout dispatchers check immediately and every **60 seconds**, independently
2121
+ of ticket scans. A dependency or devDependency declaration of
2122
+ `@defrex/autobuild` on the authoritative forge base branch selects **pinned**
2123
+ mode. Manifest and `bun.lock` must agree at the same commit. Working-tree pins,
2124
+ feature branches and stale tracking refs never select a runtime. Unsupported or
2125
+ missing declared-dependency metadata raises attention rather than switching modes.
2126
+ Without a declaration, **installed** mode rereads the original installation
2127
+ pathname across handoffs. A launch from a source root sharing the dispatched
2128
+ repository's Git common directory selects **source** mode first. The launcher
2129
+ freezes that eligibility and the initial packaged-content baseline across
2130
+ successors; changing the operator checkout cannot change what a generation runs.
2131
+ Source targets use the forge-authoritative base commit. Installation exports that
2132
+ exact commit into private cache staging, requires the committed Bun lock, and runs
2133
+ `bun install --frozen-lockfile --ignore-scripts --no-progress`. The immutable
2134
+ cached distribution records that commit and follows normal cache pruning.
2135
+
2136
+ Source equality compares actual packed contents and production-reachable lock
2137
+ records, including nested dependencies, rather than version or SHA. An excluded
2138
+ RFC, website or test change does not hand off; documentation included by the
2139
+ package's files rules does. Unrelated workspace lock records do not trigger an
2140
+ upgrade. Unsupported reachable dependency metadata raises attention.
2141
+
2142
+ A successor first validates configuration and the actual selected store without
2143
+ starting repository work or terminal input/output. Provider compatibility evidence
2144
+ chooses drain when sharing is safe and cutover otherwise. SQLite compares its
2145
+ untouched catalog with target requirements; HTTP uses the live service's client
2146
+ and protocol admission. Missing evidence chooses cutover. A target outside the hosted client overlap
2147
+ window also requires cutover; target admission and successful protocol writes
2148
+ are still mandatory. Cutover never makes a rejected target runnable. Successful durable
2149
+ protocol writes are also required: a service that admits the client but rejects
2150
+ a new yield fact fails preflight, leaving the predecessor active with target and
2151
+ reason in repository attention. Failed targets are not retried every tick; a change in selected-store compatibility
2152
+ evidence allows the normal target-check cadence to retry.
2153
+
2154
+ Local harvest suspends durably before repository lease release on handoff or
2155
+ clean stop. The next generation resumes eligible native sessions with fresh
2156
+ logical credentials, or records a reasoned `harvest.session.resume-fallback`
2157
+ and starts fresh. Orderly suspension spends no recovery attempt; real crashes
2158
+ retain recovery accounting.
2159
+
2160
+ The predecessor serializes acceptance with ticks and launch admission, joins
2161
+ repository-owned harvest and provisioning work, and records the exact local
2162
+ executions, start time and deadline. Its terminal frontend removes and joins
2163
+ input/render work before acknowledging terminal release. Only after that durable
2164
+ acknowledgement and a successful repository lease claim may the successor draw
2165
+ or consume input. Only the successor ticks, claims, runs janitor/harvest and
2166
+ launches runners. Execution leases remain with existing local runners; remote
2167
+ executions detach immediately. Their exact instances and recorded guest runtimes
2168
+ are captured separately on `dispatcher.handoff-started.remoteBuilds`. This
2169
+ authorization work survives local retirement completion and late attachment;
2170
+ it never adds to local drain counts or delays predecessor exit. Guests retain
2171
+ their leases and heartbeats and request neutral relaunch after their current
2172
+ phase completes. The successor re-attaches with refreshed guest bytes.
2173
+
2174
+ A draining predecessor supervises its captured local executions until they settle
2175
+ or `policy.upgradeDrainSeconds` (900 seconds by default) elapses. The deadline
2176
+ tracks accepted live policy changes relative to the original start. Remaining
2177
+ local sessions suspend through the normal durable native-resume path before
2178
+ process-group cleanup. Cutover uses this suspension path immediately and waits
2179
+ for predecessor stop before takeover. Retirement completion records drained and
2180
+ suspended counts separately from takeover. A successor reconstructs unfinished
2181
+ retirement from execution leases and durable build facts after predecessor death.
2182
+ An unrelated dispatcher taking the lease still causes ordinary supersession and
2183
+ teardown.
2184
+
2185
+ With rollback-capable launcher and generation peers, three failed successor exits
2186
+ within ten minutes of the original durable takeover restore the immediately previous
2187
+ cached runtime. The first two failures restart the same runtime without repeating
2188
+ preflight. Preflight failures never count; outside that window ordinary failure
2189
+ exit behavior applies. Rollback goes back one runtime only. The launcher opens no
2190
+ store: it passes a validated, versioned recovery context to the restored generation,
2191
+ which records `dispatcher.runtime-rolled-back` under repository authority and holds
2192
+ the failed target for that launcher lineage. Store compatibility changes, resolution
2193
+ errors and disabling/re-enabling upgrades do not clear this hold. A successfully
2194
+ resolved different target records `dispatcher.rollback-hold-cleared`; a fresh operator
2195
+ launch starts a new lineage. Both previous and held runtimes remain protected from
2196
+ cache pruning. Existing phase executions keep their leases and continue on the
2197
+ restored runtime at the next boundary; unreadable decisive facts defer a build with
2198
+ attention before any action. Peers without negotiated rollback capability retain
2199
+ existing failure behavior and report that capable runtimes are required.
2200
+
2201
+ Repository status exposes per-run resolved target, handoff and failure details.
2202
+ `dispatcher.upgrade-target-resolved` records the first successful resolution and
2203
+ later changed observations, including equal-content advances. Its source mode,
2204
+ base and target SHA remain visible separately from the running commit and earlier
2205
+ handoff/failure facts. Repeated identical polls append no resolution facts.
2206
+
2207
+ Repository status exposes both generations, mode, takeover, outstanding draining executions and deadline, plus per-run target and failure details. Upgrade
2208
+ failure is repository attention, naming the target and reason. Resolution/install
2209
+ failure leaves the running generation active and suppresses the same failed input
2210
+ until target or selected-store compatibility evidence changes or a fresh operator launch. Unrelated base advances do not
2211
+ retry failed installs. Operator stop always wins over replacement startup.
2212
+
2213
+ Set `automatic = false` to cancel pending preparation and retain manual restart
2214
+ behavior. A launcher contract change also requires a manual restart. A legacy v1 launcher
2215
+ without overlap supervision requires restart before another automatic adoption. `--once`,
2216
+ origin/hosted dispatch and direct development presentation modes do not auto-upgrade.
2217
+ `ab upgrade` still updates the pin/installation and merges skills locally, commits
2218
+ when eligible, and never pushes. Pinned dispatchers follow after that commit
2219
+ reaches the base branch; installed-mode dispatchers follow their replaced install.
2220
+ Source-mode dispatchers follow changes to packaged inputs merged to the base,
2221
+ including shipped canonical skills, without a version bump.