@defrex/autobuild 1.11.1 → 1.12.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 (102) hide show
  1. package/README.md +1 -1
  2. package/SPEC.md +177 -54
  3. package/docs/answering-blocked-builds.md +10 -2
  4. package/docs/architecture.md +66 -6
  5. package/docs/assets/headline-wide.png +0 -0
  6. package/docs/configuration.md +13 -11
  7. package/docs/dispatcher.md +1 -1
  8. package/docs/integration-tree.md +28 -16
  9. package/docs/operator-api.md +4 -4
  10. package/docs/operator-surfaces.md +35 -0
  11. package/docs/optimization-nodes.md +3 -2
  12. package/docs/tickets.md +1 -1
  13. package/docs/troubleshooting.md +1 -1
  14. package/package.json +3 -3
  15. package/packages/core/src/cli/ambient-errors.ts +17 -0
  16. package/packages/core/src/cli/bounded-io.ts +174 -0
  17. package/packages/core/src/cli/dashboard/model.ts +81 -23
  18. package/packages/core/src/cli/dashboard/poll.ts +20 -31
  19. package/packages/core/src/cli/dashboard/render.ts +14 -37
  20. package/packages/core/src/cli/dashboard/row-text.ts +24 -7
  21. package/packages/core/src/cli/dashboard/tone-ansi.ts +39 -0
  22. package/packages/core/src/cli/dashboard/vocabulary.ts +161 -20
  23. package/packages/core/src/cli/dispatch-handoff.ts +41 -10
  24. package/packages/core/src/cli/dispatch-launch-contract.ts +5 -0
  25. package/packages/core/src/cli/dispatch-launcher-cadence.ts +80 -0
  26. package/packages/core/src/cli/dispatch-launcher.ts +9 -10
  27. package/packages/core/src/cli/dispatch-preflight.ts +12 -3
  28. package/packages/core/src/cli/dispatch-release-observer.ts +53 -0
  29. package/packages/core/src/cli/dispatch-runtime-cache.ts +204 -82
  30. package/packages/core/src/cli/dispatch-runtime-dependencies.ts +250 -43
  31. package/packages/core/src/cli/dispatch-upgrade-install.ts +36 -16
  32. package/packages/core/src/cli/dispatch-upgrade-source.ts +8 -2
  33. package/packages/core/src/cli/dispatch-yield-observer.ts +82 -0
  34. package/packages/core/src/cli/dispatch.ts +68 -5
  35. package/packages/core/src/cli/env.ts +2 -15
  36. package/packages/core/src/cli/help.ts +5 -4
  37. package/packages/core/src/cli/main.ts +4 -2
  38. package/packages/core/src/cli/production-store.ts +102 -0
  39. package/packages/core/src/cli/repo-state.ts +2 -3
  40. package/packages/core/src/cli/repository-status.ts +28 -22
  41. package/packages/core/src/cli/sessionless-store.ts +26 -0
  42. package/packages/core/src/cli/status.ts +169 -40
  43. package/packages/core/src/cli/store-opening.ts +15 -58
  44. package/packages/core/src/cli/store-ref.ts +6 -1
  45. package/packages/core/src/config/schema.ts +1 -1
  46. package/packages/core/src/distribution-packaging.ts +156 -18
  47. package/packages/core/src/events/catalog-identity.ts +28 -0
  48. package/packages/core/src/events/catalog.ts +3 -9
  49. package/packages/core/src/events/compatibility.ts +2 -30
  50. package/packages/core/src/events/payloads.ts +11 -0
  51. package/packages/core/src/events/policy.ts +3 -0
  52. package/packages/core/src/events/repository.ts +1 -1
  53. package/packages/core/src/events/sessions.ts +1 -1
  54. package/packages/core/src/events/validation-error.ts +12 -0
  55. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +9 -0
  56. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/3064e337cc75f8d6.json +310 -0
  57. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a1e90a969d32a367.json +307 -0
  58. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/da3bc91c49211eab.json +310 -0
  59. package/packages/core/src/kernel/auto-merge-default.ts +2 -1
  60. package/packages/core/src/kernel/capacity-build.ts +21 -0
  61. package/packages/core/src/kernel/discard-in-flight.ts +13 -0
  62. package/packages/core/src/kernel/dispatch-capacity.ts +354 -147
  63. package/packages/core/src/kernel/engine.ts +2 -8
  64. package/packages/core/src/kernel/measurement.ts +24 -0
  65. package/packages/core/src/kernel/read-facts.ts +8 -370
  66. package/packages/core/src/kernel/reducer-registry.ts +40 -125
  67. package/packages/core/src/kernel/reducer-revisions.ts +3 -0
  68. package/packages/core/src/kernel/reducer-value-entry.ts +98 -0
  69. package/packages/core/src/kernel/reducer-value-index.ts +75 -0
  70. package/packages/core/src/kernel/reducer.ts +57 -9
  71. package/packages/core/src/kernel/reopen-state.ts +10 -0
  72. package/packages/core/src/kernel/repository-read-facts.ts +375 -0
  73. package/packages/core/src/kernel/verify-stage-state.ts +145 -3
  74. package/packages/core/src/operator/presentation.ts +13 -0
  75. package/packages/core/src/operator/query.ts +40 -39
  76. package/packages/core/src/operator/registry.ts +3 -3
  77. package/packages/core/src/ports/workspace/fake.ts +15 -3
  78. package/packages/core/src/processes/dispatcher.ts +232 -75
  79. package/packages/core/src/processes/execution-no-progress.ts +1 -0
  80. package/packages/core/src/store/local/capabilities.ts +115 -0
  81. package/packages/core/src/store/local/store.ts +86 -56
  82. package/packages/core/src/store/reduced-reads.ts +9 -1
  83. package/packages/core/src/store/reducer-value-read.ts +235 -0
  84. package/packages/core/src/store/reducer-value-shapes.json +1437 -1349
  85. package/packages/core/src/store/reducer-values.ts +36 -204
  86. package/packages/core/src/store/remote/released-clients.json +11 -0
  87. package/packages/core/src/store/remote/released-reducer-values/1.12.0.json +35806 -0
  88. package/packages/core/src/store/remote/released-reducer-values/index.ts +18 -16
  89. package/packages/core/src/store/rollup-lease.ts +41 -0
  90. package/packages/core/src/store/rollups.ts +7 -38
  91. package/packages/core/src/store/snapshots.ts +1 -1
  92. package/packages/core/src/testing/dispatch-read-budget.ts +265 -4
  93. package/packages/core/src/testing/import-graph.ts +78 -0
  94. package/packages/core/src/testing/reduced-read-budget.ts +221 -22
  95. package/packages/core/src/testing/slot-agreement.ts +52 -0
  96. package/packages/core/src/web/assets/app.js +5 -5
  97. package/skills/guide/SKILL.md +115 -44
  98. package/skills/guide/references/integration-tree.md +28 -16
  99. package/skills/guide/references/operator-api.md +4 -4
  100. package/skills/guide/references/optimization-nodes.md +3 -2
  101. package/skills/operate/SKILL.md +38 -20
  102. package/templates/hosted-service/package.json +2 -2
package/README.md CHANGED
@@ -26,7 +26,7 @@ From the repository you want built, install Autobuild as a development dependenc
26
26
  <!-- release-install:start -->
27
27
 
28
28
  ```sh
29
- bun add -d --exact @defrex/autobuild@1.11.1
29
+ bun add -d --exact @defrex/autobuild@1.12.0
30
30
  ```
31
31
 
32
32
  <!-- release-install:end -->
package/SPEC.md CHANGED
@@ -315,7 +315,12 @@ manufacturing durable facts. Errors discard conditional state; an unloadable
315
315
  target still uses the healthy predecessor reader with the active query. The
316
316
  launcher retains its filesystem/process-only boundary and polling cadence of
317
317
  1 second idle or 250 ms pending, processing child exits and pending actions on
318
- cached answers too. Legacy peers remain functional with full reads.
318
+ cached answers too. While the active run has a durably detected upgrade with no
319
+ prepared target, failure, yield request or handoff yet, the reader reports that
320
+ correlation as advisory `preparing`, and the launcher checks every 50 ms for at
321
+ most 600 checks per detection before returning to the idle cadence. Readers
322
+ that omit the field keep the ordinary cadence; operator shutdown ends any
323
+ pause. Legacy peers remain functional with full reads.
319
324
 
320
325
  The launcher observes presentation stop/continue liveness so Ctrl-Z returns the
321
326
  shell prompt and `fg` resumes only the presentation; the kernel keeps running.
@@ -334,8 +339,10 @@ pathname retained across handoffs. A launch from a source root in the dispatched
334
339
  repository's Git common-directory topology selects source mode instead. That
335
340
  eligibility and its initial packaged snapshot are frozen across successors. The
336
341
  target is the forge-authoritative base commit, exported into private cache staging
337
- without changing any operator or build worktree. A frozen-lockfile, script-free
338
- Bun install supplies dependencies; the completed immutable runtime records the
342
+ without changing any operator or build worktree. A frozen-lockfile, script-free,
343
+ production-only Bun install of the root package's dependency closure supplies
344
+ dependencies, each resolved inside the export; development-only dependencies and
345
+ workspaces are not materialized. The completed immutable runtime records the
339
346
  exact commit and follows ordinary cache retention and pruning. Source adoption
340
347
  compares packaged contents and production-reachable dependency resolution rather
341
348
  than version or commit: excluded-file advances do not hand off. Included shipped
@@ -373,10 +380,18 @@ retain recovery accounting.
373
380
 
374
381
  The predecessor serializes acceptance with ticks and launch admission, joins
375
382
  repository-owned harvest and provisioning work, and records the exact local
376
- executions, start time and deadline. Its terminal frontend removes and joins
383
+ executions, start time and deadline. While a prepared target is outstanding, the
384
+ predecessor also observes its durable yield request between ticks at a bounded
385
+ cadence, one reduced read per step, and attempts acceptance through the same
386
+ serialization. The observation carries no outcome, and ordinary tick cadence is
387
+ unchanged. Its terminal frontend removes and joins
377
388
  input/render work before acknowledging terminal release. Only after that durable
378
389
  acknowledgement and a successful repository lease claim may the successor draw
379
- or consume input. Only the successor ticks, claims, runs janitor/harvest and
390
+ or consume input. After its yield request, the successor observes the durable
391
+ handoff, release and stop facts through the same reduced reads at a bounded
392
+ cadence: a finite fast window, then backoff to an ordinary 500 ms pause. No
393
+ pause is shorter than the last observation took, and operator abort ends the
394
+ pause. Takeover still requires every check and the atomic lease claim. Only the successor ticks, claims, runs janitor/harvest and
380
395
  launches runners. Execution leases remain with existing local runners; remote
381
396
  executions detach immediately. Their exact instances and recorded guest runtimes
382
397
  are captured separately on `dispatcher.handoff-started.remoteBuilds`. This
@@ -468,7 +483,7 @@ files, including development configs, remain exactly as installed.
468
483
  - **dispatcher** — watches the TicketSource for tickets passing the configured
469
484
  ready gate, claims, establishes the final conforming spec, chooses a short
470
485
  immutable build slug, provisions a workspace, and launches build-runners up
471
- to capacity, which counts builds running work (§12). On process startup it attempts every current build for its
486
+ to capacity, which counts builds holding a slot (§12). On process startup it attempts every current build for its
472
487
  repo, so re-running `ab dispatch` resumes durable work rather than only
473
488
  looking for new tickets. Every ordinary tick also completes queued dispatch
474
489
  records whose pre-run sequence was interrupted: it reconstructs a missing
@@ -669,6 +684,7 @@ One name, used everywhere. Every noun lives in exactly one layer.
669
684
  | **Node ticket** | A named integration point represented by a ticket of kind `node`; its integration build owns a branch collecting child work |
670
685
  | **Build** | One ticket execution with a slug; either a work pipeline or an integration branch lifecycle; the unit the operator sees |
671
686
  | **Integration build** | A node build that opens its branch without a runner or capacity charge, collects child work, verifies its complete head and merges under ordered policy (node consent by default) |
687
+ | **Slot** | One unit of a repository's `capacity`. A build holds one from admission until it waits on a human, another ticket, the forge or its children, or ends (§12 "What holds a slot") |
672
688
  | **Harvest run** | One repository-scoped claimed observation snapshot and staged proposal workflow; never a build |
673
689
  | **Phase** | A named stage of the build pipeline grammar (§5) |
674
690
  | **Round** | One iteration inside a review loop |
@@ -720,8 +736,8 @@ while an auto rule authorizes a complete, verified candidate without a command.
720
736
  Nodes never enter plan, implement, code-review or finalize; they enter
721
737
  reconcile, and optimization nodes also enter `propose`. A node conflict uses
722
738
  source-aware reconcile. Idle collecting nodes own no execution resources;
723
- reconcile, verification and propose use descendant-sensitive execution
724
- capacity (§12). Empty nodes have no PR.
739
+ reconcile, verification and propose take a slot like any other runner work
740
+ (§12 "What holds a slot"). Empty nodes have no PR.
725
741
 
726
742
  The **propose** phase is an optimization node's own agent phase. The
727
743
  dispatcher requests it (`optimization.proposal-requested`) only when the node
@@ -2958,7 +2974,8 @@ The reducer reads a `wait-unresolvable` raise against an open wait as its end:
2958
2974
  wait's own escalation closes as answered `guidance` with the question as its
2959
2975
  answer, and the new escalation carries the wait's `wait: {id}` marker. The
2960
2976
  build is `blocked` on an ordinary policy escalation, in the default attention
2961
- filter, and holds its slot. Because the digest clears on the raise it is never
2977
+ filter, and, like any build blocked on a question, holds no slot (§12 "What
2978
+ holds a slot"). Because the digest clears on the raise it is never
2962
2979
  raised twice. Its answer routes and delivers like a wait answer: a reviewer
2963
2980
  resumes the same review round, the session's `guidance.json` carries the
2964
2981
  `wait` block, and after the answer the ended wait requests its resume slot; a
@@ -3063,8 +3080,9 @@ does not stop, pause or displace a running build.
3063
3080
  **Slot admission order.** Free slots are admitted in five tiers:
3064
3081
 
3065
3082
  1. `manual` single-ticket start requests (the `ab start` default, §11);
3066
- 2. urgent parked work (nodes and parked leaves waiting for verification,
3067
- reconcile, resume or propose);
3083
+ 2. urgent parked work (nodes and leaves that hold no slot and request one:
3084
+ `resume`, `reconcile`, `verification`, `reopen` or `propose`, "What holds
3085
+ a slot" below);
3068
3086
  3. urgent ticket claims: `urgent` start requests, then ordinary urgent ready
3069
3087
  tickets while intake is on;
3070
3088
  4. normal parked work;
@@ -3116,7 +3134,8 @@ urgent tickets count, so an urgent ticket blocked on a dependency never holds
3116
3134
  back normal parked work. Free slots only: priority never interrupts a running
3117
3135
  build or session.
3118
3136
 
3119
- **Open-PR backpressure.** When `[policy].maxOpenPrs` is set, the dispatcher
3137
+ **Open-PR backpressure.** An optional intake throttle, off by default and
3138
+ independent of slots. When `[policy].maxOpenPrs` is set, the dispatcher
3120
3139
  counts open unmerged root PRs: nonterminal builds with an open or conflicted
3121
3140
  PR and no integration-node target, root leaves and root integration nodes
3122
3141
  alike. Children targeting a node do not count. A PR whose active landing
@@ -3134,29 +3153,85 @@ from the reduced build facts each tick already holds. The dispatcher records
3134
3153
  transitions (a cleared fact names `drained`, or `disabled` when the key is
3135
3154
  removed while engaged); the engaged fact is the hysteresis memory a fresh
3136
3155
  process reads. Repository status and both dashboards report the count,
3137
- watermarks and whether normal intake is paused. Unset `maxOpenPrs` disables
3138
- backpressure entirely.
3139
-
3140
- **What holds a slot.** `capacity` counts builds running work. A work build that
3141
- has finished its pipeline (every verify step and every finalize post-step for
3142
- the current spec) holds no slot while it waits for a merge decision, for merge
3143
- gates or the forge, or on hold, and the slot goes to the next ready ticket. The
3144
- dispatcher records the finish as an advisory `pipeline.settled` fact when the
3145
- engine first decides `wait awaiting-pr`. A work build waiting on other tickets
3146
- (an entered ticket wait, §11) with no runner working also holds no slot, and
3147
- keeps its branch, workspace and completed phase work. Any other build that has
3148
- not finished keeps its slot, even while paused, blocked on a question, waiting
3149
- for the dispatcher to check a ticket wait, or interrupted between
3150
- `finalize.completed` and its post-steps. When a finished build must restack,
3151
- re-verify, reconcile or run a requested optimization measurement (§13.1.1), an
3152
- operator reopens it (§15.7), or a ticket wait ends, the build is admitted before normal
3153
- ticket claims, as a node is (urgent work first: "Slot admission order"): intake reserves a slot for it (`reopen` for a
3154
- reopened leaf, `resume` for an ended wait), and its wait records nothing,
3155
- consumes no attempt and raises no attention. A reopened leaf stays a finished
3156
- build until it settles again, so, like a blocked reconcile, it holds no slot
3157
- while it waits on a question. Abort and pause acknowledgements are not gated. A finished or
3158
- waiting build keeps its workspace, so retained workspaces can exceed
3159
- `capacity`; running work cannot.
3156
+ watermarks and whether normal intake is paused. `maxOpenPrs` is unset by
3157
+ default, which disables backpressure entirely.
3158
+
3159
+ **What holds a slot.** `capacity` is the repository's number of slots. A
3160
+ build takes a slot only by admission: a ticket claim, a start request (§11), or
3161
+ an admitted slot request (below). It holds that slot until it waits on
3162
+ something outside Autobuild, or ends. While Autobuild owes the build's next
3163
+ move, the build keeps its slot whether or not a runner is working. That covers:
3164
+
3165
+ - the boundaries between phases and steps;
3166
+ - provisioning its workspace and launching its runner;
3167
+ - relaunching after a crashed runner or an expired lease;
3168
+ - the dispatcher publishing its spec, retrying a forge publication or deciding
3169
+ a requested ticket wait;
3170
+ - a mixed-version deferral or a verify stage holding it;
3171
+ - a requested pause or abort waiting for its runner to stop;
3172
+ - a session a stopped dispatcher suspended;
3173
+ - an escalation that does not stop the build: one verify step's question
3174
+ while other steps of its stage still run, on any runner (§5); a launch
3175
+ recorded before the raise that has not started, failed or been refused by
3176
+ the progress guard's `execution-no-progress` escalation; or an execution
3177
+ launched while the build held its slot that has not ended.
3178
+
3179
+ So a slot is never dropped and picked up again mid-flight, and a build whose
3180
+ runner is working always holds one.
3181
+
3182
+ A build releases its slot as soon as it waits on the outside world:
3183
+
3184
+ | Waiting on | Cases |
3185
+ |---|---|
3186
+ | a human | an open escalation nothing above still carries, an acknowledged pause, a `revise-spec` answer waiting for its revision, a finished pipeline waiting for a merge decision or on hold |
3187
+ | another ticket | an entered ticket wait (§11) |
3188
+ | the forge | a finished pipeline waiting for merge gates or for the forge to merge |
3189
+ | its children | an integration build with no cycle, conflict, measurement or proposal that needs a runner: collecting child work, or waiting for a repair child |
3190
+ | nothing | `done` or `aborted`; abort cleanup holds no slot |
3191
+
3192
+ A pipeline is finished once every verify step and every finalize post-step for
3193
+ the current spec has passed. The dispatcher records the finish as an advisory
3194
+ `pipeline.settled` fact when the engine first decides `wait awaiting-pr`.
3195
+
3196
+ Release follows state; acquisition never does. An answer that lands while the
3197
+ build is still carried releases nothing: the build keeps its slot and requests
3198
+ none. A build whose outside wait ends holds no slot until it is admitted. It is then **parked work**: it requests a
3199
+ slot, and intake reserves one for it ahead of normal ticket claims (urgent work
3200
+ first, "Slot admission order"). The requests are:
3201
+
3202
+ | Request | Raised by |
3203
+ |---|---|
3204
+ | `resume` | an answered escalation that had stopped the build, a resumed pause, an ended ticket wait, or a parked leaf whose target was rewritten |
3205
+ | `reconcile` | a conflicted PR, or a node restack conflict with no open escalation |
3206
+ | `verification` | a finished leaf that must restack or re-verify, a node verification cycle, or a requested optimization measurement (§13.1.1) |
3207
+ | `reopen` | a leaf an operator reopened (§15.7), once any replacement spec is published |
3208
+ | `propose` | an optimization node's open proposal request |
3209
+
3210
+ A request records nothing, consumes no attempt and raises no attention. A paused
3211
+ or blocked build requests nothing until its pause or question ends. Admission is
3212
+ durable. A ticket claim or start request is admitted by its `build.created`.
3213
+ When the dispatcher admits a build that holds no slot, it records an
3214
+ advisory `slot.admitted { request?, need? }` fact before it claims a lease,
3215
+ provisions or launches anything. A node's fact also names the runner need it
3216
+ admitted (`need`), and the node holds its slot while that need remains: a
3217
+ verification cycle, a measurement, a proposal, or an active restack it was
3218
+ admitted to reconcile. For a work build, the dispatcher also records one before
3219
+ every launch that holds its slot, unless a recorded launch is still in flight
3220
+ or another runner's live lease will refuse the launch; a claim's
3221
+ `build.created` is its first launch's record. An acknowledgement launch
3222
+ records none and confers no slot. A runner allocation never admits by itself,
3223
+ so a runner or execution left over from before a release, such as a pause or
3224
+ abort acknowledgement or one still winding down, never takes a slot back. From
3225
+ then on the build holds its slot through relaunches until its next release.
3226
+
3227
+ Occupancy never exceeds `capacity`. Every admission counts every build that
3228
+ holds a slot, node admission included, and no build uses another's slot.
3229
+ Abort and pause acknowledgements are not gated, and neither is an
3230
+ acknowledgement for a build that still waits on the outside world afterwards,
3231
+ such as resuming a paused build that is blocked or finished; none of them
3232
+ confers a slot. A build that holds no slot
3233
+ keeps its branch, workspace and completed phase work, so retained workspaces
3234
+ can exceed `capacity`; slots cannot.
3160
3235
 
3161
3236
  Additional scheduled ingesters such as `ingest:sentry` remain an open design
3162
3237
  thread and have no shipped config surface. Observation harvest is
@@ -3649,19 +3724,16 @@ prepared verification cycle, a restack conflict or an open proposal request,
3649
3724
  with no runner yet. Until the node holds its slot, intake reserves one
3650
3725
  slot for it, and the dispatcher checks its admission every tick regardless of
3651
3726
  idle node polling, so a slot freed in any tick goes to the node, not to a new
3652
- normal claim. Its candidate occupancy excludes itself and capacity-bearing blocked or
3653
- paused descendants, following accepted source-qualified build target ancestry.
3654
- Running descendants and unrelated builds still count; ordinary blocked and
3655
- paused work retains its slot for every other admission, except a work build
3656
- parked by a ticket wait, which holds none. Provisioning reserves
3657
- node occupancy before the runner starts. This exception never raises the budget
3658
- for new claims. Status and both dashboards report actual occupancy, configured
3659
- capacity, effective display capacity and the nodes using descendant-held slots.
3660
- Status, `ab builds` and both dashboards report each node waiting for a slot
3661
- ahead of normal ticket claims, marking urgent waiters, the pending start
3662
- requests of each tier and the urgent ticket claims waiting ahead of normal
3663
- parked work, and report a finished work build waiting to run again the same
3664
- way. Idle collecting nodes remain free.
3727
+ normal claim. A node's admission counts every build that holds a slot, as every
3728
+ admission does. Blocked and paused descendants hold none (§12 "What holds a
3729
+ slot"), so they never stand between a node and the slot it needs to unblock
3730
+ them, and no node uses a descendant's slot. Admission is durable and precedes
3731
+ provisioning; a node's workspace never counts toward occupancy. Status and both dashboards report
3732
+ occupancy against configured capacity. Status, `ab builds` and both dashboards
3733
+ report each node waiting for a slot ahead of normal ticket claims, marking
3734
+ urgent waiters, the pending start requests of each tier and the urgent ticket
3735
+ claims waiting ahead of normal parked work, and report every other parked
3736
+ build waiting to run again the same way. Idle collecting nodes remain free.
3665
3737
 
3666
3738
  An empty node has no PR and reports `integration`, `target`, and `empty`.
3667
3739
  Once it holds commits its current parent lacks, the dispatcher opens or adopts
@@ -4977,8 +5049,50 @@ Triage for human judgment by default, or to Ready when the operator asks. Any se
4977
5049
  the list or detail view with `a`; Enter confirms and Escape cancels, so the first
4978
5050
  keypress never writes destructive intent. CLI and dashboard both append the same
4979
5051
  `build.abort-requested` fact through the shared control service. The concrete
4980
- presentation — layout, key bindings, colors — is owned by the dashboard
4981
- implementation and its tests.
5052
+ presentation (layout, key bindings, exact colors) is owned by the dashboard
5053
+ implementation and its tests. The status words and their tones are not: they
5054
+ are fixed below.
5055
+
5056
+ **Status words.** Every nonterminal build row shows one status word from a
5057
+ closed vocabulary. Both dashboards, `ab builds` and build status render the
5058
+ same words from the shared dashboard projection. A word's tone is its color
5059
+ (`DESIGN.md`, "The Color Is State Rule"), and tones nest inside the slot model
5060
+ (§12 "What holds a slot"): each tone falls wholly on one side of it. Every
5061
+ green word holds a slot. Every other word holds none. Words refine their
5062
+ tone's category and never cross it, so the color tells whether a build is
5063
+ using a slot and the word tells why.
5064
+
5065
+ | Tone | Slot | Word | Shown when |
5066
+ |---|---|---|---|
5067
+ | green (`ok`) | held | `RUNNING` | a runner is working |
5068
+ | | held | `STARTING` | no runner is working yet: provisioning, a relaunch, spec publication, a publication retry, a pending ticket-wait decision, an upgrade drain, a suspended session |
5069
+ | | held | `PAUSING` | a pause was requested and the runner is still stopping |
5070
+ | | held | `ABORTING` | an abort was requested and the runner is still stopping |
5071
+ | teal (`live`) | requested | `QUEUED` | parked work waiting for admission; the note names the request (`resume`, `reconcile`, `verification`, `reopen`, `propose`) and marks urgent waiters |
5072
+ | amber (`held`) | none | `WAITING` | a finished pipeline waiting for a merge decision or on hold, an entered ticket wait, or a `revise-spec` answer waiting for its revision; the note says which (`merge decision`, `on hold`, `on <tickets>`, `spec revision`) |
5073
+ | | none | `MERGING` | a finished pipeline with merge consent, waiting for merge gates or for the forge to merge |
5074
+ | | none | `PAUSED` | an acknowledged pause |
5075
+ | | none | `COLLECTING` | an integration build collecting child work |
5076
+ | red (`alert`) | none | `BLOCKED` | an open escalation, other than a ticket wait's own, or a failed node verification waiting for a repair child |
5077
+ | dim (`pending`) | none | `CLEANING` | abort cleanup |
5078
+
5079
+ A build's slot state picks its tone first, then the word within that tone.
5080
+ `BLOCKED` outranks `PAUSED` for a paused build with an open question.
5081
+ `PAUSING` and `ABORTING` describe a runner winding down, so only a build
5082
+ holding a slot shows them. A build without a slot keeps its word until the
5083
+ acknowledgement, which is not gated. A resumed pause is `QUEUED` until it is
5084
+ admitted again; there is no separate resuming word. The reducer's `queued` and
5085
+ `running` statuses are lifecycle facts, not display words: a newly claimed
5086
+ build shows `STARTING`, and a settled build shows `WAITING` or `MERGING`.
5087
+
5088
+ A harvest run is never a build and never holds a slot. Its row shows
5089
+ `HARVESTING` (teal) while it works, `PAUSED` or `SUSPENDED` (amber) while it is
5090
+ stopped, and `ESCALATED` or `FAILED` (red) when it needs a human. Finished rows
5091
+ show their outcome (`MERGED`, `CLOSED`, `ABORTED`) in their own section, and
5092
+ step marks keep their own tones. The capacity line reads
5093
+ `<occupied>/<capacity>`, where occupied equals the number of green build rows,
5094
+ followed by the parked work and start requests waiting for a slot, in
5095
+ admission order.
4982
5096
 
4983
5097
  ## 15. Event vocabulary
4984
5098
 
@@ -5083,7 +5197,7 @@ with illustrative members:
5083
5197
 
5084
5198
  | Family | Examples |
5085
5199
  |---|---|
5086
- | Build lifecycle | `build.created` (carrying `assets`, the claim-time pin, §6.3), `workspace.provisioned`, `workspace.cleanup-required`, `workspace.fenced`, `workspace.commits-preserved`, decisive `workspace.commits-retained` (the same receipt when some head is a BuildStore copy, §15.7), `workspace.commits-lost`, `workspace.released`, `execution.started`, `execution.ended`, `infrastructure.failed`, `infrastructure.cleanup-attempted`, `dispatch.comment-posted`, `dispatch.failed`, `runner.attached`, `runner.runtime-recorded`, `runner.setup-failed`, `abort.remote-branch-deleted`, `abort.local-branch-deleted`, `abort.ticket-returned`, `build.ticket-returned`, `build.completed` |
5200
+ | Build lifecycle | `build.created` (carrying `assets`, the claim-time pin, §6.3), `workspace.provisioned`, `workspace.cleanup-required`, `workspace.fenced`, `workspace.commits-preserved`, decisive `workspace.commits-retained` (the same receipt when some head is a BuildStore copy, §15.7), `workspace.commits-lost`, `workspace.released`, `execution.started`, `execution.ended`, `infrastructure.failed`, `infrastructure.cleanup-attempted`, `dispatch.comment-posted`, `dispatch.failed`, `runner.attached`, `runner.runtime-recorded`, `runner.setup-failed`, `abort.remote-branch-deleted`, `abort.local-branch-deleted`, `abort.ticket-returned`, `build.ticket-returned`, advisory `slot.admitted {request?, need?}` (§12), `build.completed` |
5087
5201
  | Operator commands [D2] | `build.abort-requested {reason?, to?, origin?: {kind: optimization-stop, node}}` → `build.aborted` (a human, or the dispatcher for an attempt of a stopped optimization node, §13.1.1); `build.pause-requested` → `build.paused`; `build.discard-requested`; `build.hold-requested {reason?}`; `build.priority-set {priority}` (advisory slot-admission priority, §12); `build.land-requested` → `landing.command-acknowledged`; decisive human `build.reopened {feedback?, spec?: {artifact, assets?}}` (§15.7); `escalation.answered` (optionally carrying a validated `reviewRoundCeiling`, or the `assets` sampled with a revise-from-ticket authorization) |
5088
5202
  | Merge policy | `landing.decided` (candidate, matched rule/default, labels, target, mode, matched `paths?` summary); advisory `landing.deferred` (candidate, reason, rule, policy); kernel `landing.consent-revoked {commandSeq, source, rule, previousHead, head, consentedHead?, paths}`; `landing.native-enable-started`; `landing.native-applied`; advisory dispatcher `landing.polling-selected {candidate, decisionSeq, commandSeq?, detail}` and `landing.human-merge-required {candidate, decisionSeq, commandSeq?, cause: merge-queue-rule \| merge-queue-activity \| merge-refused, detail}` |
5089
5203
  | Spec | `spec.imported`, `spec.authored`, `spec.revised` (either positive `escalation` sequence or exclusive `operator: {user, via?}` provenance for an idle node or a settled leaf's reopen, §15.7; optionally carrying `assets`, a re-pin of the ticket's assets, §6.3) |
@@ -5303,8 +5417,9 @@ remain readable with explicit unavailable-title/file fallbacks; display metadata
5303
5417
  never authorizes collection or merge.
5304
5418
  A rewrite receipt alone never promotes the boundary; only completed settlement
5305
5419
  does. CLI status exposes pending/active work, reachable build identities and
5306
- node-owned foreign changes. A node stays `collecting` while its narrow reconcile
5307
- runner is attached; it does not acquire a leaf pipeline.
5420
+ node-owned foreign changes. A node's lifecycle status stays `collecting` while
5421
+ its narrow reconcile runner is attached, and its row shows `RUNNING` (§14
5422
+ "Status words"); it does not acquire a leaf pipeline.
5308
5423
 
5309
5424
  **Declined attempts.** `implement.declined` completes the implement phase
5310
5425
  and sets `declined {round, reason, seq}`. The engine decides
@@ -5890,6 +6005,14 @@ no pipeline decision reads it (§12). A leaf counts as finished when its latest
5890
6005
  settlement follows the spec restart, or when that restart published its reopen's
5891
6006
  spec (§15.5).
5892
6007
 
6008
+ `slot.admitted { request?, need? }` is advisory capacity evidence: the
6009
+ dispatcher appends it when its slot gate admits a build that holds no slot
6010
+ (§12), with `need` naming a node's admitted runner need; no pipeline decision
6011
+ reads it. A node whose runner was started before node admissions were recorded
6012
+ (its log has none naming a need) keeps counting as holding its slot; the
6013
+ dispatcher records that runner's admission once, so new intake never
6014
+ overcommits it.
6015
+
5893
6016
  ### 15.7 Post-PR lifecycle [D1 — confirmed]
5894
6017
 
5895
6018
  Walking the happy path exposed a gap in the grammar: `finalize` creates the
@@ -6613,7 +6736,7 @@ also carries the hook's `command` or `url`.
6613
6736
 
6614
6737
  ```toml
6615
6738
  baseBranch = "main"
6616
- capacity = 3 # builds running work at once; builds parked for a merge decision hold no slot
6739
+ capacity = 3 # slots; a build waiting on a human, another ticket or a merge holds none
6617
6740
  ticketScanIntervalSeconds = 60 # positive integer; ready scans, with tick spacing as floor
6618
6741
  forge = "github" # builtin: github | local-git; or a plugin name
6619
6742
  plugins = ["./plugins/local.ts", "@acme/autobuild-plugin"]
@@ -5,6 +5,14 @@ A build is **blocked** while one or more escalations are open. Inspect them with
5
5
  Every action below is sessionless, records a human-authored fact, and accepts
6
6
  `--store <ref>`.
7
7
 
8
+ A blocked build holds no capacity slot once nothing is still working on it.
9
+ Answering doesn't give it one: it waits as a `resume` request ahead of normal
10
+ ticket claims, urgent work first, and runs once a slot frees. A build whose
11
+ work goes on keeps its slot through the answer and requests nothing: another
12
+ step of its verify stage still running, a launch in flight, or a running
13
+ execution launched with the slot. A `--revise-spec` answer requests nothing
14
+ until the revision lands.
15
+
8
16
  | Need | Command | Effect |
9
17
  |---|---|---|
10
18
  | Give the phase a decision or missing information | `ab answer <slug> <text>` | Records `guidance`. In a review loop it feeds the next producer round; a ticket wait's answer instead resumes the phase that declared it, including the same review round. |
@@ -76,14 +84,14 @@ refusal as guidance.
76
84
  Once accepted, the build's escalation question begins `Waiting on`,
77
85
  `ab build status <slug>` shows a `waiting on:` line naming the tickets, its
78
86
  ticket lists those tickets in `blockedBy`, and the build holds no capacity
79
- slot. `ab builds` and both dashboards show it as `waiting` on those tickets
87
+ slot. `ab builds` and both dashboards show it as `WAITING` on those tickets
80
88
  rather than as a blocked question; in `ab builds --json` its `status` stays
81
89
  `blocked` and a `wait` field names the tickets. On either dashboard, `r` or
82
90
  RESUME on a waiting build answers it. The dispatcher ends the wait on its
83
91
  first tick after every named ticket completes; a wait with some tickets still
84
92
  open stays in place. To end it early, for example when the work landed another
85
93
  way, `ab answer <slug> <text>` or a bare `ab answer <slug>` ends the wait.
86
- Either way the build takes the next free slot ahead of normal ticket claims (urgent work first; `ab priority <slug> urgent` expedites it). If its target
94
+ Either way the build waits as a `resume` request and takes the next free slot ahead of normal ticket claims (urgent work first; `ab priority <slug> urgent` expedites it). If its target
87
95
  branch has moved past the base the build's work sits on, the build first
88
96
  restacks onto the target's current head so the resumed phase sees the merged blockers; a conflicting
89
97
  restack shows as `reconcile` and resolves first. The phase that declared the
@@ -605,10 +605,27 @@ worktree. Excluded-file commits change observed provenance without adoption.
605
605
  `dispatch-upgrade-controller.ts` checks immediately and every 60 seconds, suppresses
606
606
  failed target inputs and publishes durable prepared targets. `dispatch-preflight.ts`
607
607
  checks target configuration, provider compatibility and actual protocol-write
608
- admission before requesting yield. `kernel/dispatch-upgrade.ts` folds correlated
608
+ admission before requesting yield. `dispatch-yield-observer.ts` watches the reduced
609
+ upgrade value at a fixed cadence and step limit while the run has a prepared
610
+ target, and queues acceptance through the tick serialization.
611
+ `dispatch-release-observer.ts` holds the successor's two-read post-yield
612
+ observation step and its pause schedule: 25 ms for at most 240 observations,
613
+ doubling to 500 ms, never shorter than the last observation.
614
+ `kernel/dispatch-upgrade.ts` folds correlated
609
615
  acceptance, terminal release, takeover, per-execution retirement and completion.
610
616
  The runtime-owned `dispatch-handoff.ts` reader lets the filesystem-only launcher
611
617
  supervise overlapping generations without owning Store or config decisions.
618
+ Each reader is a fresh process, so it initializes only what its operation uses:
619
+ `dispatch-handoff.ts` loads store, reducer and argument modules at first use; a
620
+ journal-bound reader opens through `cli/production-store.ts` without
621
+ repository configuration, and a local journal reference also avoids the remote
622
+ adapter, which HTTP(S) references load when opened; `store/local/capabilities.ts`
623
+ loads write validation and the other unused local-store capabilities on first
624
+ use, before the write's transaction; and `kernel/reducer-value-index.ts` loads
625
+ only the requested module for the indexed reader reducers (`dispatchUpgrade`,
626
+ `repositoryReadFacts` and `dispatcherRunFacts`), while any other name loads the
627
+ full `REDUCERS` registry on first demand. Both paths build entries with the same
628
+ `valueReadEntry`.
612
629
  A runtime-owned repository-record projection binds the journal transport before
613
630
  initial spawn and across handoffs, including when later config edits are invalid.
614
631
  The optional conditional `--read-upgrade` environment extension in
@@ -625,6 +642,11 @@ conditional state; a separate predecessor-reader cache uses the active run's
625
642
  journal context when the target cannot load. Old peers keep full v1 responses.
626
643
  Polling stays at 1 second idle / 250 ms pending, and cached projections still
627
644
  pass through ordinary child-exit, pending-preflight and recovery handling.
645
+ `dispatch-launcher-cadence.ts` paces supervision: while the active run's
646
+ durably detected upgrade has no prepared target, failure, request or handoff,
647
+ the reader's advisory `preparing` correlation earns 50 ms checks, at most 600
648
+ per detection, before the idle cadence resumes. Older readers omit the field
649
+ and keep the ordinary cadence; operator shutdown ends any pause.
628
650
  `dispatch-frontend.ts` acknowledges terminal release only after joining input
629
651
  and rendering. The old kernel releases repository authority but retains local
630
652
  execution supervision until completion or the hot policy deadline. Build-log
@@ -825,8 +847,45 @@ build-owned identity and source ancestry at settled stage boundaries. Typed
825
847
  `verify.config-captured` and `verify.config-superseded` facts advance the result
826
848
  boundary in the reducer and log index, independently of reconcile identity.
827
849
  The advisory `pipeline.settled` fact records that the engine reached a leaf's
828
- `wait awaiting-pr`; `kernel/dispatch-capacity.ts` reads it so a finished build
829
- parked for its merge decision holds no slot.
850
+ `wait awaiting-pr`. Leaf slots (SPEC §12 "What holds a slot") are durable
851
+ facts: the build reducer folds `slotAdmittedSeq` (`build.created`, or the
852
+ advisory `slot.admitted` the dispatcher's `leafAdmission` appends with
853
+ `appendIfCurrent` before any lease, provisioning or launch) and
854
+ `slotReleasedSeq` (`pipeline.settled`, an answer closing an open escalation
855
+ or a `wait.ended` while the build is not carried, `build.paused`).
856
+ `kernel/dispatch-capacity.ts`'s `leafHoldsSlot` holds a leaf admitted since
857
+ its last release that does not wait on the outside world (`leafOutsideWait`:
858
+ blocked, an acknowledged pause, a pending `revise-spec`, or a finished
859
+ pipeline with no epilogue work due), or whose only wait is open escalations
860
+ that `escalationCarried` (`kernel/verify-stage-state.ts`) carries: (A) a
861
+ verify stage member's question while another member runs, the engine's stage
862
+ exemption; (E) an open execution whose launch record precedes it, with no launch
863
+ failure or refusal between them; (L) a launch
864
+ record newer than the latest `execution.started`, launch failure and open
865
+ `execution-no-progress` refusal; or (B) an execution older than the earliest
866
+ open raise. Apart from (L)'s refusal, which the progress guard raises in place
867
+ of a launch, only (A) looks at escalations.
868
+ The answer fold applies the same predicate. Runner liveness never enters; only
869
+ launch records and execution facts do. Every other leaf without a slot
870
+ requests one, `resume` unless an epilogue reason names another.
871
+ `leafAdmission` admits a leaf that holds its slot at once, appending
872
+ `slot.admitted {}` as its launch record unless one is in flight or a live
873
+ lease will refuse the launch; it neither gates nor records for a leaf that
874
+ still waits on the outside world or acknowledges a pause or abort.
875
+ Node slots use the same seqs. The dispatcher's `nodeAdmission` appends
876
+ `slot.admitted {request, need}` before provisioning, where `need` is the
877
+ runner need's key from `nodeRunnerNeeds` (an active restack, a measurement, a
878
+ proposal or an integration cycle); the reducer keeps it as `slotAdmittedNeed`.
879
+ `nodeHoldsSlot` holds a node admitted since its last release, not waiting on
880
+ the outside world (`nodeOutsideWait`), whose admitted need is still current, so
881
+ finished work releases the slot with no write and a workspace, lease or
882
+ provisioning marker never counts. `nodeAdmission` admits a holder at once and
883
+ sends every other request (`nodeSlotNeed`) through the same tiers as leaves;
884
+ `nodeRunnerWork` finds holders whose runner must be relaunched. The version
885
+ transition is `legacyNodeRunner`: a node runner an older dispatcher launched
886
+ without an admission counts as holding its slot, and
887
+ `adoptLegacyNodeRunners` records its admission once. Node admission counts
888
+ every slot holder.
830
889
  Reopening a settled leaf (SPEC §15.7) spans the same seams. The shared
831
890
  `cli/build-control.ts` control appends the human `build.reopened` and, for a
832
891
  spec, publishes the kernel's operator `spec.revised`; `ab reopen` and the
@@ -845,11 +904,12 @@ also the urgent reservations, urgent requests and the latest admission scan's
845
904
  `urgentWaiting` ahead of a normal waiter, `intakeCapacity` gives ordinary urgent
846
905
  and normal claims separate budgets, and `startCapacity` gives each start tier
847
906
  its own. The
848
- dispatcher's `leafAdmission`, `nodeHasCapacity` and proposer admission defer a
907
+ dispatcher's `leafAdmission`, `nodeAdmission` and proposer admission defer a
849
908
  normal waiter that fits while claims can run; `dispatch` forces that tick's
850
909
  admission scan once per deferral key, and `admitDeferredParked` retries the
851
- deferred admissions through their generic paths only after the scan completed
852
- its urgent decision.
910
+ deferred admissions only after the scan completed its urgent decision: a leaf
911
+ through the build sweep, a node reconcile through `cascadeNode`, any other node
912
+ need through `admitNode`, and a proposal through `admitProposers`.
853
913
  Ticket waits (SPEC §11) span four seams. `cli/terminals.ts` (`waitOn`, routed
854
914
  as `ab wait-on`) appends the agent's terminal `wait.requested`; the build
855
915
  digest marks it pending. The dispatcher's lease-sweep pass validates a pending
Binary file
@@ -585,7 +585,7 @@ any table header.
585
585
  - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
586
586
  - **Local override:** Allowed in .autobuild/local.toml.
587
587
 
588
- **Description:** Builds running work at once for this repository. A build that finished its pipeline holds no slot while it waits for a merge decision, nor does a build waiting on other tickets; either is admitted ahead of normal ticket claims when it must run again, urgent work first (see [slot admission order](dispatcher.md#slot-admission-order)). Other unfinished paused and blocked work retains slots. Node reconcile and verification exclude their own blocked/paused descendants at admission; new claims use total occupancy. See [integration capacity](integration-tree.md).
588
+ **Description:** Slots for this repository. A build holds one from admission (a ticket claim, a start request or an admitted slot request) until it waits on a human, another ticket, the forge or its children, or ends. A build whose outside wait ends is admitted again ahead of normal ticket claims, urgent work first (see [slot admission order](dispatcher.md#slot-admission-order)). Occupancy never exceeds capacity.
589
589
 
590
590
  **Constraints:** safe integer; > 0
591
591
 
@@ -4581,7 +4581,7 @@ poll. Editing TOML cannot change them.
4581
4581
  | Setting | Fresh-repository default | Controls | Scope |
4582
4582
  |---|---:|---|---|
4583
4583
  | Ticket intake | on | `ab dispatch --intake` / `--no-intake`; `i` on the dashboard's global row, and `p` (pause all) / `r` (resume all) on that row or their sessionless equivalents `ab pause --all` / `ab resume --all`, which turn intake off and on as part of quiescing the repository | When off, skip only ordinary ready-queue listing, claims, and dispatch. A pending `ab start` (`tickets.start`) request still claims its one named ticket while intake is off, subject to repository pause, capacity, and the usual ticket gates. Janitor work, lease recovery, in-flight builds, and harvesting continue. Turning intake off does not hold builds the repository has already accepted — that is the repository pause below. |
4584
- | Repository pause | off | `p` (pause all) / `r` (resume all) on the dashboard's global row, or `ab pause --all` / `ab resume --all` | While on, the dashboard controls line shows `repository PAUSED`, and each held queued row shows `(held)` while retaining its literal `QUEUED` status. No dispatcher tick attaches a runner to such a build — recovery, startup resume, and the lease sweep all skip them. Running builds are parked by the per-build pauses the same command writes; the janitor still settles aborts and discards. |
4584
+ | Repository pause | off | `p` (pause all) / `r` (resume all) on the dashboard's global row, or `ab pause --all` / `ab resume --all` | While on, the dashboard controls line shows `repository PAUSED`, and each held queued row shows `(held)` beside its `STARTING` status. No dispatcher tick attaches a runner to such a build — recovery, startup resume, and the lease sweep all skip them. Running builds are parked by the per-build pauses the same command writes; the janitor still settles aborts and discards. |
4585
4585
  | Harvest gate | on | `h` on the dashboard's global row | Pauses or resumes repository observation harvesting. The header shows the kernel-acknowledged gate, not merely a pending keypress. |
4586
4586
 
4587
4587
  The opposite flag forms for each dispatch setting are mutually exclusive.
@@ -4714,7 +4714,7 @@ action. Check the gates in this order:
4714
4714
  `ab watch`.
4715
4715
  2. **Repository pause:** a pause all holds every queued build, so the dashboard
4716
4716
  controls line shows `repository PAUSED` and an existing held build shows
4717
- `(held)` beside its literal `QUEUED` status. Intake off alone shows neither
4717
+ `(held)` beside its `STARTING` status. Intake off alone shows neither
4718
4718
  pause indication. `r` on the dashboard's global row or `ab resume --all`
4719
4719
  releases the hold and restores intake.
4720
4720
  3. **Ready state:** the ticket must be in exactly `tickets.readyState`. Linear
@@ -4725,12 +4725,12 @@ action. Check the gates in this order:
4725
4725
  5. **Dependencies:** every `blockedBy` ticket must exist and be complete in the
4726
4726
  same source. This includes harvest proposals filed directly into the ready
4727
4727
  state. Plain dispatch output reports unresolved ids and cycles.
4728
- 6. **Capacity:** every unfinished build for this repository—including paused
4729
- builds and builds blocked on a question—uses a slot. A build that has
4730
- finished its pipeline and waits for a merge decision holds none, and neither
4731
- does a build waiting on other tickets. One that must re-verify or reconcile,
4732
- or whose ticket wait ended, is admitted ahead of normal claims and reserves a
4733
- slot while it waits; urgent work goes first (see
4728
+ 6. **Capacity:** a build holds a slot from admission while Autobuild owes its
4729
+ next move, runner or not. Paused builds, builds blocked on a question once
4730
+ nothing is still working on them, builds waiting for a merge decision or
4731
+ merge gates, and builds waiting on other tickets hold none. An answered or resumed build, one whose ticket wait ended,
4732
+ and one that must re-verify or reconcile reserve a slot ahead of normal
4733
+ claims until admitted; urgent work goes first (see
4734
4734
  [slot admission order](dispatcher.md#slot-admission-order)). Inspect `ab repository status`, `ab builds --queued` and
4735
4735
  `ab build status <slug>` rather than looking only for a live process.
4736
4736
  7. **Duplicate work:** a ready ticket already represented by an active build is
@@ -4982,8 +4982,10 @@ freezes that eligibility and the initial packaged-content baseline across
4982
4982
  successors; changing the operator checkout cannot change what a generation runs.
4983
4983
  Source targets use the forge-authoritative base commit. Installation exports that
4984
4984
  exact commit into private cache staging, requires the committed Bun lock, and runs
4985
- `bun install --frozen-lockfile --ignore-scripts --no-progress`. The immutable
4986
- cached distribution records that commit and follows normal cache pruning.
4985
+ `bun install --frozen-lockfile --ignore-scripts --no-progress --production --filter ./`.
4986
+ Only the root package's production dependencies are materialized, and each must
4987
+ resolve inside the export; the frozen lock still covers every workspace. The
4988
+ immutable cached distribution records that commit and follows normal cache pruning.
4987
4989
 
4988
4990
  Source equality compares actual packed contents and production-reachable lock
4989
4991
  records, including nested dependencies, rather than version or SHA. An excluded
@@ -55,7 +55,7 @@ Others stay queued. Urgent tickets are claimed before normal ones, each in the s
55
55
 
56
56
  To start one ticket without turning intake on for the whole ready queue, run `ab start <ticket-id> [--priority manual|urgent|normal]` (or the `tickets.start` operator tool). The running dispatcher, local or hosted, claims just that ticket on its next tick with a free slot in the request's tier and records the outcome as a `ticket.start-settled` event shown by `ab watch` and `ab repository status`. The default `manual` tier goes ahead of all waiting work; `urgent` and `normal` wait their turn as described below. The ticket must still be in the ready state, meet the spec standard, have no unresolved blockers and a destination that accepts work, and is deduplicated against existing builds; capacity and repository pause still apply. Listing labels and the ready assignee are not applied, because the ticket is named. Every tier bypasses intake off and open-PR backpressure for that ticket only. See `ab help start`.
57
57
 
58
- Each build gets its own workspace (local git worktree or remote sandbox) and a build-runner that owns its pipeline. Capacity caps the builds running work: a work build holds a slot until it finishes its pipeline (verification and finalize), even while paused or blocked on a question. Once it waits for a merge decision it holds none; if its target moves or its PR conflicts, it waits for a slot ahead of normal ticket claims to restack, re-verify or reconcile. A work build waiting on other tickets (`ab wait-on`) also holds none, and when the wait ends it waits for a slot ahead of normal ticket claims to resume. Finished and waiting builds keep their workspaces, so retained workspaces can exceed `capacity` while running work cannot. An integration node holds a slot only while it verifies, not while collecting children. See [the integration tree](integration-overview.md).
58
+ Each build gets its own workspace (local git worktree or remote sandbox) and a build-runner that owns its pipeline. Capacity is the repository's number of slots. A build takes a slot only by admission (a ticket claim, a start request or an admitted slot request) and holds it while Autobuild owes its next move, runner or not: between phases, while provisioning, across a crashed runner or expired lease, while a requested pause or abort winds down, and while work it started outlasts a question: other steps of a verify stage, or a recorded launch and its execution. The dispatcher records `slot.admitted` before every such launch. It releases the slot as soon as it waits on the outside world: an open question nothing is still working past, an acknowledged pause, a merge decision or merge gates, or other tickets (`ab wait-on`). When that wait ends (an answer, a resume, a moved target, a conflicted PR, an ended ticket wait) the build holds no slot until it is admitted again, ahead of normal ticket claims. Occupancy never exceeds `capacity`. Builds without a slot keep their workspaces, so retained workspaces can exceed `capacity`. An integration node takes a slot only when admitted to verify, reconcile or propose, and holds it until that work is done; it holds none while collecting children, waiting for a repair child, or blocked. See [the integration tree](integration-overview.md). `ab builds`, `ab build status` and `ab repository status` report each build's slot state; see [Operator surfaces](operator-surfaces.md).
59
59
 
60
60
  ## Slot admission order
61
61