@defrex/autobuild 1.12.0 → 1.14.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 (167) hide show
  1. package/README.md +1 -1
  2. package/SPEC.md +465 -163
  3. package/bin/ab-build-runner.ts +8 -0
  4. package/docs/answering-blocked-builds.md +28 -4
  5. package/docs/architecture.md +136 -53
  6. package/docs/cli.md +1 -1
  7. package/docs/configuration.md +120 -17
  8. package/docs/dispatcher.md +19 -8
  9. package/docs/integration-overview.md +1 -1
  10. package/docs/integration-tree.md +12 -9
  11. package/docs/merge-policy.md +7 -2
  12. package/docs/operating.md +13 -3
  13. package/docs/operator-api.md +46 -23
  14. package/docs/operator-surfaces.md +7 -6
  15. package/docs/optimization-nodes.md +7 -6
  16. package/docs/plugin-authoring.md +46 -18
  17. package/docs/remote-store-protocol.md +52 -13
  18. package/docs/remote-ticket-protocol.md +85 -38
  19. package/docs/restacking.md +48 -3
  20. package/docs/setup.md +2 -1
  21. package/docs/ticket-migration.md +2 -2
  22. package/docs/ticket-sources.md +23 -8
  23. package/docs/tickets.md +4 -4
  24. package/docs/troubleshooting.md +32 -2
  25. package/docs/verification.md +3 -1
  26. package/package.json +3 -3
  27. package/packages/core/src/cli/build-control.ts +72 -6
  28. package/packages/core/src/cli/dashboard/actions.ts +4 -0
  29. package/packages/core/src/cli/dashboard/integration-row.ts +43 -19
  30. package/packages/core/src/cli/dashboard/model.ts +14 -8
  31. package/packages/core/src/cli/dashboard/poll.ts +218 -10
  32. package/packages/core/src/cli/dashboard/queue.ts +21 -10
  33. package/packages/core/src/cli/dashboard/row-text.ts +2 -1
  34. package/packages/core/src/cli/dashboard/vocabulary.ts +5 -1
  35. package/packages/core/src/cli/dispatch-frontend.ts +2 -1
  36. package/packages/core/src/cli/dispatch-tickets.ts +33 -12
  37. package/packages/core/src/cli/dispatch.ts +547 -145
  38. package/packages/core/src/cli/help.ts +38 -24
  39. package/packages/core/src/cli/main.ts +7 -5
  40. package/packages/core/src/cli/publication-settlement.ts +4 -0
  41. package/packages/core/src/cli/remote-poll.ts +22 -5
  42. package/packages/core/src/cli/repository-status.ts +19 -9
  43. package/packages/core/src/cli/status.ts +23 -11
  44. package/packages/core/src/cli/store-opening.ts +12 -0
  45. package/packages/core/src/cli/ticket-start.ts +3 -3
  46. package/packages/core/src/cli/ticket.ts +12 -11
  47. package/packages/core/src/cli/wait.ts +8 -28
  48. package/packages/core/src/cli/watch.ts +113 -50
  49. package/packages/core/src/config/reference-metadata.ts +7 -1
  50. package/packages/core/src/config/reference.ts +5 -2
  51. package/packages/core/src/config/schema.ts +51 -16
  52. package/packages/core/src/events/payloads.ts +74 -14
  53. package/packages/core/src/events/policy.ts +1 -0
  54. package/packages/core/src/events/repository.ts +33 -3
  55. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +31 -0
  56. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/be211f0e31a65006.json.gz +0 -0
  57. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/0a10010ee5cf2e47.json +577 -0
  58. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/227701361be6d1e0.json +490 -0
  59. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/312cc4090820a612.json +1078 -0
  60. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/76e5043bae7a80ab.json +86 -0
  61. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/87a917802870bbed.json +87 -0
  62. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9d85616e5b9e24c1.json +500 -0
  63. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a2780567b4989fb6.json +105 -0
  64. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/c7c94fbe7f63cf07.json +84 -0
  65. package/packages/core/src/kernel/clean-restack-policy.ts +40 -0
  66. package/packages/core/src/kernel/dispatch-capacity.ts +243 -107
  67. package/packages/core/src/kernel/done-escalations.ts +273 -0
  68. package/packages/core/src/kernel/engine.ts +28 -9
  69. package/packages/core/src/kernel/integration-landing.ts +24 -4
  70. package/packages/core/src/kernel/integration-stack.ts +39 -0
  71. package/packages/core/src/kernel/janitor-failure.ts +20 -1
  72. package/packages/core/src/kernel/log-index-value.ts +3 -0
  73. package/packages/core/src/kernel/log-index.ts +41 -2
  74. package/packages/core/src/kernel/open-pr-backpressure.ts +3 -3
  75. package/packages/core/src/kernel/reducer-registry.ts +3 -0
  76. package/packages/core/src/kernel/reducer-revisions.ts +19 -0
  77. package/packages/core/src/kernel/reducer.ts +42 -8
  78. package/packages/core/src/kernel/repository-attention.ts +14 -5
  79. package/packages/core/src/kernel/repository-read-facts.ts +9 -0
  80. package/packages/core/src/kernel/ticket-starts.ts +15 -4
  81. package/packages/core/src/kernel/verify-stages.ts +46 -7
  82. package/packages/core/src/operator/attention.ts +28 -3
  83. package/packages/core/src/operator/done-escalations.ts +38 -0
  84. package/packages/core/src/operator/presentation.ts +1 -1
  85. package/packages/core/src/operator/protocol.ts +8 -5
  86. package/packages/core/src/operator/query.ts +33 -19
  87. package/packages/core/src/operator/registry.ts +17 -13
  88. package/packages/core/src/operator/ticket-start.ts +8 -7
  89. package/packages/core/src/operator/tickets.ts +28 -9
  90. package/packages/core/src/plugin-sdk/index.ts +10 -0
  91. package/packages/core/src/plugins/manifest.ts +14 -1
  92. package/packages/core/src/ports/forge/create.ts +8 -0
  93. package/packages/core/src/ports/forge/github-transport.ts +5 -1
  94. package/packages/core/src/ports/forge/github.ts +3 -0
  95. package/packages/core/src/ports/tickets/contract.ts +147 -76
  96. package/packages/core/src/ports/tickets/create.ts +47 -7
  97. package/packages/core/src/ports/tickets/fake.ts +8 -4
  98. package/packages/core/src/ports/tickets/file-codec.ts +4 -3
  99. package/packages/core/src/ports/tickets/file.ts +7 -3
  100. package/packages/core/src/ports/tickets/github.ts +1 -0
  101. package/packages/core/src/ports/tickets/grants.ts +11 -3
  102. package/packages/core/src/ports/tickets/hosted-index.ts +5 -0
  103. package/packages/core/src/ports/tickets/linear.ts +28 -9
  104. package/packages/core/src/ports/tickets/migration.ts +4 -4
  105. package/packages/core/src/ports/tickets/operations.ts +4 -2
  106. package/packages/core/src/ports/tickets/priority-labels.ts +213 -0
  107. package/packages/core/src/ports/tickets/priority.ts +127 -21
  108. package/packages/core/src/ports/tickets/remote-protocol.ts +10 -0
  109. package/packages/core/src/ports/tickets/remote.ts +104 -11
  110. package/packages/core/src/ports/tickets/revision.ts +5 -3
  111. package/packages/core/src/ports/tickets/search.ts +9 -0
  112. package/packages/core/src/ports/tickets/tree.ts +8 -6
  113. package/packages/core/src/ports/types.ts +30 -15
  114. package/packages/core/src/ports/workspace/build-execution.ts +13 -1
  115. package/packages/core/src/ports/workspace/builtin-capabilities.ts +4 -0
  116. package/packages/core/src/ports/workspace/create.ts +16 -3
  117. package/packages/core/src/ports/workspace/execution-exit-marker.ts +41 -0
  118. package/packages/core/src/ports/workspace/recovery-step.ts +101 -0
  119. package/packages/core/src/ports/workspace/vercel-sandbox.ts +596 -144
  120. package/packages/core/src/processes/build-execution-state.ts +4 -0
  121. package/packages/core/src/processes/build-runner.ts +14 -1
  122. package/packages/core/src/processes/dispatcher.ts +841 -230
  123. package/packages/core/src/processes/execution-settlement.ts +25 -3
  124. package/packages/core/src/processes/harvest-runner.ts +12 -7
  125. package/packages/core/src/processes/infrastructure-failure-budget.ts +7 -2
  126. package/packages/core/src/processes/invocation-budget.ts +176 -0
  127. package/packages/core/src/processes/publication-loss.ts +38 -3
  128. package/packages/core/src/processes/tick-publication.ts +1 -0
  129. package/packages/core/src/processes/workspace-preservation.ts +86 -15
  130. package/packages/core/src/store/contract.ts +88 -3
  131. package/packages/core/src/store/event-reads.ts +30 -1
  132. package/packages/core/src/store/reduced-reads.ts +23 -0
  133. package/packages/core/src/store/reducer-value-shapes.json +6759 -6490
  134. package/packages/core/src/store/reducer-value-validation.ts +188 -33
  135. package/packages/core/src/store/remote/client.ts +169 -29
  136. package/packages/core/src/store/remote/compatibility.ts +113 -56
  137. package/packages/core/src/store/remote/credentials.ts +4 -1
  138. package/packages/core/src/store/remote/protocol.ts +3 -0
  139. package/packages/core/src/store/remote/released-clients.json +22 -0
  140. package/packages/core/src/store/remote/released-reducer-values/1.13.0.json +35966 -0
  141. package/packages/core/src/store/remote/released-reducer-values/1.14.0.json +36076 -0
  142. package/packages/core/src/store/remote/released-reducer-values/index.ts +20 -16
  143. package/packages/core/src/store/remote/released-value-policy.ts +144 -0
  144. package/packages/core/src/store/remote/retry.ts +406 -0
  145. package/packages/core/src/store/repo-state-events.ts +1 -0
  146. package/packages/core/src/testing/dispatch-read-budget.ts +155 -11
  147. package/packages/core/src/testing/index.ts +2 -0
  148. package/packages/core/src/testing/invocation-budget.ts +42 -0
  149. package/packages/core/src/testing/reduced-read-budget.ts +589 -19
  150. package/packages/core/src/testing/released-value-coverage.ts +423 -0
  151. package/packages/core/src/web/overview-source.ts +19 -6
  152. package/skills/guide/SKILL.md +147 -67
  153. package/skills/guide/references/integration-tree.md +12 -9
  154. package/skills/guide/references/merge-policy.md +7 -2
  155. package/skills/guide/references/operator-api.md +46 -23
  156. package/skills/guide/references/optimization-nodes.md +7 -6
  157. package/skills/guide/references/plugin-authoring.md +46 -18
  158. package/skills/guide/references/remote-store-protocol.md +52 -13
  159. package/skills/guide/references/remote-ticket-protocol.md +85 -38
  160. package/skills/guide/references/restacking.md +48 -3
  161. package/skills/guide/references/setup.md +2 -1
  162. package/skills/guide/references/ticket-migration.md +2 -2
  163. package/skills/operate/SKILL.md +136 -55
  164. package/skills/plan/SKILL.md +4 -3
  165. package/skills/spec/SKILL.md +9 -5
  166. package/skills/tickets/SKILL.md +25 -17
  167. package/templates/hosted-service/package.json +2 -2
@@ -86,18 +86,20 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
86
86
  because grooming the node's objective and budget is the dispatch decision for
87
87
  them (see [optimization nodes](references/optimization-nodes.md#proposer-phase)). The dispatcher
88
88
  claims tickets that pass the `[tickets]` ready
89
- gate — urgent tickets first, then normal ones, each in the source's order —
89
+ gate — by level, `urgent`, `high`, `normal`, then `low`, each level in the
90
+ source's order —
90
91
  chooses a short immutable slug from the final conforming spec, and
91
92
  starts builds up to the top-level `capacity` bound, after slots reserved for
92
93
  integration nodes awaiting verification, reconcile or propose, for finished builds
93
94
  waiting to re-verify or reconcile, and for builds resuming after an answered
94
95
  escalation, a resumed pause or an ended ticket wait.
95
- Free slots go to `manual` start requests, then urgent waiting work, then
96
- urgent start requests and urgent tickets, then normal waiting work, then
97
- normal start requests and normal tickets; a build takes its ticket's priority at
98
- claim, and `ab priority <slug> urgent|normal` changes an active build's
99
- priority. An optimization node's attempts claim at the node's current
100
- priority instead, so `ab priority <node> urgent` speeds up its attempts
96
+ Free slots go to `manual` start requests, then, for each level from
97
+ urgent to low, that level's waiting work, then its start requests and
98
+ ready tickets. A build takes its ticket's level, decided at claim (a
99
+ non-`manual` start request sets the request's level instead), and
100
+ `ab priority <slug> urgent|high|normal|low` changes an active build's
101
+ level. An optimization node's attempts claim at the node's current
102
+ level instead, so `ab priority <node> urgent` speeds up its attempts
101
103
  claimed afterwards. Priority orders free slots only.
102
104
  `capacity` counts slots. A build takes one by admission and holds it while
103
105
  Autobuild owes its next move, runner or not. It holds none while it waits on
@@ -106,10 +108,10 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
106
108
  question does not release the slot while work Autobuild started goes on:
107
109
  other steps of its verify stage, or a recorded launch and its execution.
108
110
  Such a build keeps its slot through the answer and requests nothing. When
109
- a wait ends it waits for a slot again ahead of normal ticket claims, so
111
+ a wait ends it waits for a slot again ahead of ticket claims at its level, so
110
112
  occupancy never exceeds `capacity`. Priority never preempts a running build.
111
113
  With `[policy].maxOpenPrs` set, open-PR backpressure pauses new ordinary
112
- normal-priority claims (not `ab start` requests) once that many root PRs are open and unmerged, until
114
+ claims of `high`, `normal` and `low` tickets (not `ab start` requests) once that many root PRs are open and unmerged, until
113
115
  the count drains to `resumeOpenPrs` (below `maxOpenPrs` when the two are
114
116
  equal); urgent claims and in-flight work continue, and capacity is
115
117
  unchanged.
@@ -135,7 +137,7 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
135
137
  filter, and its answer resumes the declaring phase like a wait answer. An
136
138
  operator may still end a wait early by answering its escalation (cause
137
139
  `operator`). A build whose runner has stopped then waits as a `resume`
138
- request and takes a slot ahead of normal ticket claims (urgent work first). If its target moved, it first restacks onto the
140
+ request and takes a slot ahead of ticket claims at its level (higher levels first). If its target moved, it first restacks onto the
139
141
  target's current head (published work is replayed as one change, and a
140
142
  conflict reconciles first unless it is confined to declared `[generated]`
141
143
  files, which the kernel regenerates; with nothing published, the branch fast-forwards
@@ -200,7 +202,9 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
200
202
  starts no agent; conflicts enter `reconcile`, then verification, except
201
203
  that conflicts only in declared [`[generated]`](#generated) files are
202
204
  regenerated by their commands with no agent. A clean
203
- replay after a verify or finalize wait re-verifies on the restacked base. The leaf
205
+ replay after a verify or finalize wait re-verifies on the restacked base, and
206
+ a clean awaiting-merge restack of a root-targeting leaf re-runs the steps
207
+ opted in by `afterCleanRestack` before it lands. The leaf
204
208
  terminates **merged** or **closed**. Transient leaf publication failures park
205
209
  on a durable six-retry schedule, independently of agent phase attempts.
206
210
  See the [replay reference](references/restacking.md).
@@ -541,7 +545,11 @@ The distinctions that change an administrator's answer:
541
545
  before constructing any further member. Already launched siblings settle first.
542
546
  A waiting leaf with completed verification retains its receipts after a clean
543
547
  rewrite when build-owned config is unchanged, even when the rewrite replaces
544
- the pin commit's ancestry. Changed config still supersedes while waiting; a
548
+ the pin commit's ancestry. Two clean restacks instead start a new cycle that
549
+ the earlier receipts cannot satisfy: a root-targeting leaf's clean landing
550
+ restack whose frozen `afterCleanRestack` policy enables any step re-verifies
551
+ on the restacked base and head, and a clean wait-resume restack after a
552
+ verify or finalize ticket wait re-verifies on the resumed base. Changed config still supersedes while waiting; a
545
553
  future verification cycle always captures fresh config before running steps.
546
554
  Old pass/skip receipts cannot satisfy that cycle, and supersession creates no
547
555
  failure or failure-budget charge. Unchanged config on a descendant head retains
@@ -571,7 +579,9 @@ The distinctions that change an administrator's answer:
571
579
  per build, and the write proceeds; `history.retained` (leaf) and
572
580
  `node.history-retained` (node) record the non-forge outcomes. Workspace
573
581
  preservation of unpublished commits is strict: archive ref, else store copy
574
- (`workspace.commits-retained`), else the release is refused.
582
+ (`workspace.commits-retained`), else the release is refused. Abort cleanup
583
+ is the one exception: when preservation fails it records
584
+ `workspace.commits-lost` and releases.
575
585
  `github` publishes through GitHub. `local-git` performs no remote/network/`gh`
576
586
  operation: durable PR records live under private Git refs, and the review
577
587
  locator is `refs/heads/ab/<slug>`. Once merge authorization (auto or consent;
@@ -881,6 +891,13 @@ must not be repeated. An implement round with no commits over its contribution
881
891
  base escalates at `implement` instead of requesting publication. After VM stop and lease release, the local kernel
882
892
  publishes the exact SHA/branch through a temporary narrow firewall transform,
883
893
  verifies it, and performs PR work locally. Ordinary completion deletes the VM.
894
+ The guest runner records its exit on the sandbox filesystem, so a session that
895
+ finished before its VM stopped still settles and publishes: recovery resumes a
896
+ stopped sandbox explicitly, with `recoveryTimeoutMs` (default 120000, the cold
897
+ resume plus guest git and push) as its ceiling. A hosted invocation starts it
898
+ only while a realistic resume (about 45 s) plus the cleanup reserve fits, never
899
+ runs it past the deadline, and never stops a sandbox the provider already
900
+ reports stopped. `operationTimeoutMs` bounds each metadata acknowledgement.
884
901
  Branch config, installed skills, relative/package plugins, setup, and phase CLI
885
902
  commands resolve from the guest checkout, never dispatcher paths.
886
903
 
@@ -974,6 +991,19 @@ and a reason naming the setting. Dashboards and PR summaries call this
974
991
  checks and branch protections still gate merge. For excluded steps, merged code
975
992
  is not re-verified, so breakage that only exists in the combination can merge.
976
993
 
994
+ Clean-restack re-verification defaults to disabled: omitting
995
+ `[verify].afterCleanRestack` means `false`. An optional boolean
996
+ `[verify.<step>].afterCleanRestack` overrides it in either direction. When a
997
+ root-targeting leaf waiting to land restacks cleanly (including a
998
+ `[[generated]]` regeneration), opted-in steps re-run on the restacked head
999
+ before it lands; the rest record `skipped` with
1000
+ `skipCause = "clean-restack-policy"` ("skipped by clean-restack policy").
1001
+ A failure routes through the ordinary repair loop. Opt in per step on cheap
1002
+ deterministic checks, for example `afterCleanRestack = true` in
1003
+ `[verify.lint]`: every target move under a waiting leaf re-runs them. Leaves
1004
+ targeting an integration node rely on the node's verification instead. See
1005
+ [Restacking](references/restacking.md#clean-restack-re-verification).
1006
+
977
1007
 
978
1008
  `steps` orders stages: a name is a singleton, an array groups concurrent
979
1009
  members. Every name becomes a `verify:<step>` phase with its own table. Those
@@ -988,6 +1018,7 @@ subtables are part of this section — their fields are listed here.
988
1018
  | `skill` | — | **required when `kind = "agent"`**, nonempty string | Installed skill name to run (e.g. a repository-authored `"verify-acceptance"`). |
989
1019
  | `paths` | — | optional nonempty array of positive repository-relative globs | Makes either step kind apply when any changed path matches any selector. Omitted means unconditional. |
990
1020
  | `afterReconcile` | repository: `true`; step: inherited | boolean | Step override wins over `[verify].afterReconcile`; false skips this step after reconciliation only. |
1021
+ | `afterCleanRestack` | repository: `false`; step: inherited | boolean | Step override wins over `[verify].afterCleanRestack`; true re-runs this step on the restacked head after a clean awaiting-landing restack of a root-targeting leaf, false records it skipped. |
991
1022
  | `always` | — | optional boolean | `true` makes the step unconditional and mandatory (a plan cannot deselect it); `false` is equivalent to omission. |
992
1023
 
993
1024
  ### Choosing verify stages
@@ -1107,9 +1138,10 @@ reconcile reuses it.
1107
1138
  If the approved selection later names any step absent from the cycle's pinned
1108
1139
  configured universe, the entire selection falls back to all configured optional
1109
1140
  steps. The kernel records one observation per cycle and plan revision naming
1110
- the unknown steps. Mandatory steps, path applicability and post-reconcile policy
1111
- still apply. A valid selection continues to skip genuinely omitted optional
1112
- steps. Strict validation when depositing a new plan is unchanged.
1141
+ the unknown steps. Mandatory steps, path applicability and post-reconcile and
1142
+ clean-restack policies still apply. A valid selection continues to skip
1143
+ genuinely omitted optional steps. Strict validation when depositing a new plan
1144
+ is unchanged.
1113
1145
 
1114
1146
  Cross-field rules the validator actually enforces — each is an **error**:
1115
1147
 
@@ -1220,14 +1252,24 @@ SHAs could not be inspected. An environment that never started executing holds
1220
1252
  no unpublished work: objects its checkout lacks mean nothing to preserve, so
1221
1253
  cleanup records `workspace.commits-preserved` (or `workspace.commits-retained`)
1222
1254
  carrying forward earlier preserved heads, then releases and replaces it. Unknown fencing, inspection, transport, or
1223
- receipt-write outcomes leave the workspace and snapshots intact. A workspace
1255
+ receipt-write outcomes leave the workspace and snapshots intact, except under
1256
+ abort cleanup, which records `workspace.commits-lost` and tears the workspace
1257
+ down. A workspace
1224
1258
  flagged by `workspace.cleanup-required` is never launched into: the dispatcher
1225
1259
  releases it and provisions the next generation. Provisioning cut off by a
1226
1260
  recorded dispatcher teardown is the exception: the next invocation asks the
1227
1261
  provider to verify and finish the same generation, and if it cannot, the
1228
1262
  replacement consumes no infrastructure attempt. A preservation or release
1229
1263
  failure is recorded against its build, as an infrastructure failure or janitor
1230
- attention, and never stops the dispatcher from advancing other builds.
1264
+ attention, and never stops the dispatcher from advancing other builds. The
1265
+ recorded error and the infrastructure-limit escalation name the failed recovery
1266
+ step: `resume`, `fence`, `preserve` or `cleanup`. Work a hosted invocation's
1267
+ deadline cuts short or cannot fit charges no infrastructure attempt: a resume it
1268
+ cut short is stopped or left uncertain for a later fence. The tick counts the
1269
+ build as `recoveryDeferred` (or `provisioningDeferred` for a provision that
1270
+ needs about 150 s), logs `build <slug>: <step> deferred by the invocation
1271
+ budget`, never reports idle, and records it in `dispatcher.work-deferred`, so
1272
+ the next invocation runs that build first.
1231
1273
  Fencing is revalidated after restart; a saved receipt alone never authorizes
1232
1274
  cleanup of a newer execution. Current recovery notes are linked by the session
1233
1275
  manifest's `workspaceRecovery` field. Recovery notes apply to the next session
@@ -1575,8 +1617,8 @@ backpressure keys `maxOpenPrs` (no default; unset disables backpressure),
1575
1617
  | `nodeIdlePollSeconds` | `120` | positive integer | Interval between idle node checks; durable activity wakes the next tick. |
1576
1618
  | `janitorBackoffMaxSeconds` | `300` | positive integer | Cap on exponential janitor retry delay, starting at 30 seconds. |
1577
1619
  | `harvestMaxDrift` | `3` | nonnegative integer | Other builds merged after the oldest unclaimed observation required to start a run; `0` disables drift. |
1578
- | `maxOpenPrs` | unset | positive integer | Open unmerged root PRs (leaves and integration nodes, not children of a node) at which the dispatcher stops claiming `normal`-priority tickets. Urgent claims, in-flight builds, reconciles and landings continue. Unset disables open-PR backpressure. |
1579
- | `resumeOpenPrs` | `maxOpenPrs - 1` | nonnegative integer, at most `maxOpenPrs` | Once engaged, normal claims stay paused until the open root PR count is at or below this. Reaching `maxOpenPrs` takes precedence, so when this equals `maxOpenPrs` claims resume once the count falls below it. Inert without `maxOpenPrs`. |
1620
+ | `maxOpenPrs` | unset | positive integer | Open unmerged root PRs (leaves and integration nodes, not children of a node) at which the dispatcher stops claiming `high`, `normal` and `low` tickets. Urgent claims, in-flight builds, reconciles and landings continue. Unset disables open-PR backpressure. |
1621
+ | `resumeOpenPrs` | `maxOpenPrs - 1` | nonnegative integer, at most `maxOpenPrs` | Once engaged, high, normal and low claims stay paused until the open root PR count is at or below this. Reaching `maxOpenPrs` takes precedence, so when this equals `maxOpenPrs` claims resume once the count falls below it. Inert without `maxOpenPrs`. |
1580
1622
  | `excludeHeldOpenPrs` | `false` | boolean | Leave PRs whose active landing command is `hold` out of the count. Inert without `maxOpenPrs`. |
1581
1623
 
1582
1624
  Dispatch failures share one budget across stages until runner attachment. At
@@ -2400,12 +2442,12 @@ repository's `[tickets]` table selects. These forms therefore work unchanged
2400
2442
  with the file tracker, Linear, hosted tickets and GitHub issues, without
2401
2443
  provider-specific API/MCP calls:
2402
2444
 
2403
- - `ab ticket create <title> --body <file> [--state <state>] [--labels a,b] [--blocked-by id,id] [--issues N[:refs],...] [--priority urgent|normal] [--assignees a,b] [--json]`
2445
+ - `ab ticket create <title> --body <file> [--state <state>] [--labels a,b] [--blocked-by id,id] [--issues N[:refs],...] [--priority urgent|high|normal|low] [--assignees a,b] [--json]`
2404
2446
  files a ticket. Without `--state`, the source uses `[tickets].createState` or
2405
2447
  its own default. A named state is passed through unchanged and the selected
2406
2448
  source validates it before creating anything. Blocker ids belong to the same
2407
2449
  source and are also checked before the single create call.
2408
- - `ab ticket update <id> [--title <title>] [--body <file>] [--labels a,b] [--issues N[:refs],...] [--priority urgent|normal] [--assignees a,b] [--json]`
2450
+ - `ab ticket update <id> [--title <title>] [--body <file>] [--labels a,b] [--issues N[:refs],...] [--priority urgent|high|normal|low] [--assignees a,b] [--json]`
2409
2451
  partially replaces editable fields. At least one editable flag is required;
2410
2452
  `--json` alone is not an update.
2411
2453
  - `ab ticket block <id> <blocker-id[,blocker-id...]> [--json]` adds one or more
@@ -2484,19 +2526,29 @@ when it claims the ticket and turns them into PR and commit keywords; see
2484
2526
  [issue links in builds](#issue-links-in-builds). On update `--issues` is a
2485
2527
  complete replacement and `--issues ''` clears it. A source that cannot store
2486
2528
  issue links refuses any write naming them, names itself, and writes nothing.
2487
- `--priority urgent` makes the dispatcher claim the ticket before normal ready
2488
- work, each class in source order, and ahead of normal builds waiting for a
2489
- slot; blockers and every other gate still apply, and it never preempts a
2490
- running build. The claimed build keeps that priority; `ab priority <slug>
2491
- urgent|normal` changes an existing build's priority without touching its ticket.
2492
- An optimization attempt ignores its ticket's priority and claims at its node's
2493
- current priority. `--priority normal` (the default)
2494
- removes urgency. The file, hosted and Linear sources store priority (Linear as
2495
- its native Urgent; `normal` clears only Urgent and leaves other Linear priorities
2496
- alone); plugin sources without the capability read every ticket as normal,
2497
- refuse `urgent` naming themselves and writing nothing, and accept `normal`
2498
- as a no-op. JSON
2499
- ticket output always includes `priority`, and list output marks urgent tickets.
2529
+ `--priority` takes `urgent`, `high`, `normal` (the default) or `low`; any
2530
+ other value is refused before anything is written, and an update without it
2531
+ leaves the level alone. Harvest files proposals at `normal`.
2532
+
2533
+ - **Dispatch.** Ready work is claimed by level, `urgent` first and `low`
2534
+ last, each level in source order, and each level goes ahead of lower-level
2535
+ builds waiting for a slot. Blockers and every other gate still apply, and
2536
+ nothing preempts a running build. Only urgent bypasses open-PR backpressure.
2537
+ - **Builds.** A build takes its ticket's level.
2538
+ `ab priority <slug> urgent|high|normal|low` changes an existing build's
2539
+ level without touching its ticket. An optimization attempt ignores its
2540
+ ticket's priority and claims at its node's current level.
2541
+ - **Storage.** File frontmatter `priority = "<level>"` (no key for normal);
2542
+ hosted stores all four. Linear maps Urgent, High and Low to the matching
2543
+ levels and Medium or No priority to `normal`; writing `normal` sets No
2544
+ priority only on an Urgent, High or Low issue. GitHub and plugin sources
2545
+ without the capability store one label, `priority:urgent`, `priority:high`
2546
+ or `priority:low` (none for normal), matched case-insensitively, highest
2547
+ wins. Priority labels show as `priority`, never in `labels`; `--labels`,
2548
+ label filters and `readyLabels`/`createLabels` entries naming one are
2549
+ refused, and labels replacements keep them.
2550
+ - **Output.** JSON ticket output always names one of the four levels, and
2551
+ list output marks every level other than normal.
2500
2552
  `--assignees a,b` names usernames, or `me` for the owner of the source's
2501
2553
  credential, on a source that stores assignees (GitHub). On create it replaces
2502
2554
  the `[tickets].createAssignee` default and `--assignees ''` files the ticket
@@ -2706,7 +2758,7 @@ verification progress or failure and the merge mode in parentheses. Before
2706
2758
  a policy decision, label-dependent modes may read `policy pending`. A current
2707
2759
  verified node adds `verified`. Only restack conflicts, current verification
2708
2760
  failures (file a repair child targeting the node), a node waiting for a runner
2709
- slot ahead of normal ticket claims, and readiness awaiting consent add a list
2761
+ slot ahead of ticket claims at its level, and readiness awaiting consent add a list
2710
2762
  alert. Consent names `l` and `ab merge <slug>`. Branch,
2711
2763
  restack state and conflicting files remain in detail, along with every child's
2712
2764
  ticket id, title and live phase (or queued/merged), open-first counts, verification
@@ -2735,12 +2787,12 @@ parenthesized note beside it (`merge decision`) says which case. The header's
2735
2787
  | green | held | `STARTING` | no runner works yet: provisioning a newly claimed build, a relaunch, spec publication, an upgrade drain, a suspended session |
2736
2788
  | green | held | `PAUSING` | a pause was requested and the runner is still stopping |
2737
2789
  | green | held | `ABORTING` | an abort was requested and the runner is still stopping |
2738
- | teal | requested | `QUEUED` | parked work waiting for admission; the note names the request (`resume`, `reconcile`, `verification`, `reopen`, `propose`) and marks urgent waiters |
2790
+ | teal | requested | `QUEUED` | parked work waiting for admission; the note names the request (`resume`, `reconcile`, `verification`, `reopen`, `propose`) and marks urgent, high and low waiters |
2739
2791
  | amber | none | `WAITING` | a finished pipeline waiting for a merge decision (`merge decision`) or on hold (`on hold`), an entered ticket wait (`on <ids>`), or a `revise-spec` answer waiting for its revision (`spec revision`) |
2740
2792
  | amber | none | `MERGING` | a finished pipeline with merge consent, waiting for merge gates or the forge |
2741
2793
  | amber | none | `PAUSED` | an acknowledged pause |
2742
2794
  | amber | none | `COLLECTING` | an integration build collecting child work |
2743
- | red | none | `BLOCKED` | an open escalation other than a ticket wait's own, or a failed node verification waiting for a repair child |
2795
+ | red | none | `BLOCKED` | an open escalation other than a ticket wait's own, or a failed node verification waiting for a repair child; the note `done` marks a completed build whose open escalation awaits acknowledgement |
2744
2796
  | dim | none | `CLEANING` | abort cleanup |
2745
2797
 
2746
2798
  `BLOCKED` outranks `PAUSED`. Only a build holding a slot shows `PAUSING` or
@@ -2817,7 +2869,10 @@ from the builds by one blank line. The duplicate startup banner is
2817
2869
  suppressed; `--plain` and non-TTY output remain line-oriented and unchanged. A
2818
2870
  satisfied verify skip carries the literal `skipped` qualifier, so it remains
2819
2871
  distinct from a pass without color. Every nonterminal build has a row,
2820
- including `queued` builds that have not attached a runner. A newly claimed
2872
+ including `queued` builds that have not attached a runner. A done build with an
2873
+ open escalation (a post-landing integration audit, or an escalation raised
2874
+ during abort cleanup) also has a row, red `BLOCKED` with the note
2875
+ `done` and its question, holding no slot, until `ab answer` acknowledges it. A newly claimed
2821
2876
  build holds its slot from the claim, so its row shows its ticket, slug, green
2822
2877
  `STARTING` status, and either the pending dispatch boundary or the latest
2823
2878
  durable `dispatch.failed` stage, attempt, and error.
@@ -3005,7 +3060,7 @@ to the build's event log and apply the same write-time checks.
3005
3060
  | Stop an optimization node | `ab objective <node> --stop [--drain\|--abort] [--json] [--store <ref>]` | CLI/tool request (`optimization.stop`). Without a flag the objective's stop mode applies (abort by default). Final, and not merge consent. | `optimization.stopped`; dispatcher `build.abort-requested` per aborted attempt, then `attempt.settled` |
3006
3061
  | Settle an unmeasured merge | `ab objective <node> --settle-unmeasured <proposal\|build> --policy release-unmeasured [--note <text>] [--json] [--store <ref>]` | CLI/tool request (`optimization.settle-unmeasured`). Only for an attempt listed as an unmeasured merge; releases its slot once, never as accepted. | `attempt.settled {outcome: merged-unmeasured}` |
3007
3062
  | Hold merge | `ab hold <slug> [--reason <text>] [--store <ref>]` | Select a build and press `o`, including before readiness. | `build.hold-requested` (optional `reason`), then `landing.command-acknowledged` after native cancellation |
3008
- | Set build priority | `ab priority <slug> urgent\|normal [--store <ref>]` | CLI/tool request (`builds.control` action `priority`); changes only the build's slot-admission order, never its ticket, and never preempts running work. On an optimization node it also sets the tier its attempts claim in afterwards. A build priority is only `urgent` or `normal`; `ab start`'s `manual` tier is admission-only. | `build.priority-set` |
3063
+ | Set build priority | `ab priority <slug> urgent\|high\|normal\|low [--store <ref>]` | CLI/tool request (`builds.control` action `priority`); changes only the build's slot-admission level, never its ticket, and never preempts running work. On an optimization node it also sets the level its attempts claim at afterwards. `ab start`'s `manual` tier is admission-only, never a build level. | `build.priority-set` |
3009
3064
  | Answer blockers with guidance | `ab answer <slug> <text> [--store <ref>]` | Select a blocked build, press `r`, enter text, then Enter. | One `escalation.answered` with `resolution: guidance` per applicable blocker. |
3010
3065
  | Retry blockers without guidance | `ab answer <slug> [--store <ref>]` | Open the same `r` field and press Enter empty or whitespace-only. | One `escalation.answered` with `resolution: retry` per applicable blocker. |
3011
3066
  | Dismiss cited finding chains | `ab answer <slug> --dismiss [--store <ref>]` | CLI only; build detail names the command. | One `escalation.answered` with `resolution: dismiss-finding` per blocker that cites a real review finding. |
@@ -3013,7 +3068,7 @@ to the build's event log and apply the same write-time checks.
3013
3068
  | Revise spec from a file | `ab answer <slug> --revise-spec <file> [--store <ref>]` | CLI only; build detail names the command. | For leaves, human `escalation.answered` then kernel `spec.revised`; eligible nodes publish `spec.revised` with operator provenance. |
3014
3069
  | Re-import revised ticket spec | `ab answer <slug> --revise-spec-from-ticket [--store <ref>]` | CLI only; build detail names the command. | The same leaf answer or direct node `spec.revised` protocol. |
3015
3070
  | Reopen a finished leaf | `ab reopen <slug> [--feedback <text>] [--revise-spec <file> \| --revise-spec-from-ticket] [--store <ref>]` | CLI/tool request (`builds.reopen`); only for a leaf waiting for its merge decision. Feedback alone returns to implement; a spec revision restarts from plan; the PR and branch are kept. | `build.reopened`; with a spec, kernel `spec.revised` with operator provenance |
3016
- | Start one ticket | `ab start <ticket-id> [--priority manual\|urgent\|normal] [--cancel] [--json] [--store <ref>]` | CLI/tool request (`tickets.start`, optional `priority`); works while intake is off or open-PR backpressure is engaged, takes a free slot in its priority's admission tier, and claims no other ticket. | `ticket.start-requested {priority}` (or `ticket.start-cancelled`), then one dispatcher `ticket.start-settled` with its outcome and priority |
3071
+ | Start one ticket | `ab start <ticket-id> [--priority manual\|urgent\|high\|normal\|low] [--cancel] [--json] [--store <ref>]` | CLI/tool request (`tickets.start`, optional `priority`); works while intake is off or open-PR backpressure is engaged, takes a free slot in its priority's admission tier, and claims no other ticket. | `ticket.start-requested {priority, level?}` (or `ticket.start-cancelled`), then one dispatcher `ticket.start-settled` with its outcome and tier |
3017
3072
  | Abort | `ab abort <slug> [--to triage\|ready] [--reason <text>] [--store <ref>]` | Select any non-terminal build and press `a`, then Enter to confirm (Escape cancels); the dashboard aborts to triage. | `build.abort-requested`, then repository `ticket.handed-back` after cleanup moves the ticket (an optimization attempt instead settles `aborted` and its ticket moves to the rejected role) |
3018
3073
 
3019
3074
  `ab start <ticket-id>` is for working one ticket while intake stays off — a
@@ -3037,15 +3092,15 @@ say why it could not start. While pending, the request is listed by
3037
3092
  withdraws it.
3038
3093
 
3039
3094
  `--priority` picks the request's slot-admission tier. `manual`, the default, goes
3040
- ahead of every waiting build and ticket claim, urgent ones included. `urgent`
3041
- waits for urgent parked work (nodes and finished or waiting builds that must
3042
- run again), then goes ahead of urgent ready tickets and all normal work.
3043
- `normal` waits for normal parked work and urgent claims, then goes ahead of
3044
- normal ready tickets. A pending request reserves its slot ahead of the tiers it
3095
+ ahead of every waiting build and ticket claim, urgent ones included. A level
3096
+ tier, `urgent`, `high`, `normal` or `low`, waits for waiting work at that level
3097
+ or above (nodes and finished or waiting builds that must run again) and for
3098
+ every higher level's claims, then goes ahead of that level's ready tickets and
3099
+ all lower-level work. A pending request reserves its slot ahead of the tiers it
3045
3100
  outranks until it settles or is cancelled. Every tier bypasses intake off and
3046
3101
  open-PR backpressure for the named ticket only, and none preempts a running
3047
- build. The claimed build is `urgent` when the request was `urgent` and
3048
- otherwise keeps its ticket's priority; `manual` is never a build priority.
3102
+ build. The claimed build takes the request's level, or its ticket's level for
3103
+ a `manual` request; `manual` is never a build level.
3049
3104
 
3050
3105
  The two `--all` forms and the global-row keys are one walk behind two surfaces.
3051
3106
  The repository pause is written first and intake second, both absolutely —
@@ -3074,12 +3129,19 @@ cancellation signal and the runner acknowledges the request. Its execution
3074
3129
  supervisor signals the local runner leader and waits for it to finish persistence
3075
3130
  and exit, then reaps remaining descendants with bounded TERM-then-KILL cleanup.
3076
3131
  Only then does it release the lease. Graceful dispatcher shutdown likewise waits
3077
- for runner suspension without a wall-clock force-exit deadline.
3132
+ for runner suspension without a wall-clock force-exit deadline. A queued, paused
3133
+ or blocked build with no live execution is acknowledged by the dispatcher
3134
+ directly, without provisioning a workspace or starting a runner. Acknowledging
3135
+ the abort (`build.aborted`) closes every escalation then open, unanswered, so
3136
+ nothing needs acknowledging afterwards unless cleanup or a later audit raises a
3137
+ new one.
3078
3138
  The dispatcher defers cleanup while that lease is live, then performs the
3079
3139
  checkpointed, retry-safe cleanup: close an open unmerged PR, release the workspace,
3080
3140
  delete the exact remote and local build branches, preserve existing ticket labels
3081
3141
  while adding `autobuild:aborted`, hand the ticket back, and post an abort notice
3082
- before completing as `abandoned`. The ticket moves once, straight to its
3142
+ before completing as `abandoned`. Releasing the workspace tries to preserve
3143
+ unpublished commits; when it cannot, it records them as lost
3144
+ (`workspace.commits-lost`) instead of stalling. The ticket moves once, straight to its
3083
3145
  destination: configured Triage by default, or `[tickets].readyState` with
3084
3146
  `ab abort --to ready` (or the registry's `to: "ready"`), with its `blockedBy`
3085
3147
  list unchanged, so a build waiting on other work gives up its slot and
@@ -3216,8 +3278,11 @@ Merge requires a ready candidate and cannot bypass verification or merge gates;
3216
3278
  a merge that is not ready is refused with code `merge-not-ready` (or
3217
3279
  `node-incomplete` for an incomplete node) and a reason. A refusal records no
3218
3280
  merge consent and no landing; a node's live completeness check may still save
3219
- an `integration.observed` diagnostic before it refuses. `ab answer` requires an open escalation except for eligible node spec revisions. A stale, missing, done,
3220
- aborted, or otherwise inapplicable target is an error and gets no new event. Attribution uses `USER`, then `USERNAME`, then the
3281
+ an `integration.observed` diagnostic before it refuses. `ab answer` requires an open escalation except for eligible node spec revisions. On a done
3282
+ build with an open escalation, such as a post-landing integration audit, guidance or a bare
3283
+ answer only acknowledges it: status stays done, nothing resumes, and every other answer form is
3284
+ refused. A stale, missing, aborted, or otherwise inapplicable target, or a done build with nothing
3285
+ open, is an error and gets no new event. Attribution uses `USER`, then `USERNAME`, then the
3221
3286
  same stable fallback on both surfaces. These commands run sessionless and
3222
3287
  accept `--store <ref>` with the usual explicit flag > `AB_STORE` > `[store] url` > repository
3223
3288
  local precedence. If nonblank `AB_SESSION` and matching `AB_BUILD` identify the
@@ -3281,9 +3346,9 @@ runtime; historical starts without metadata display `runtime unrecorded`.
3281
3346
  With `[policy].maxOpenPrs` configured and a dispatcher holding the
3282
3347
  repository, an `open-PR backpressure:` line (`capacity.backpressure` in JSON:
3283
3348
  `active`, `openPrs`, `maxOpenPrs`, `resumeOpenPrs`, `excludeHeld`) says whether
3284
- normal intake is paused. With a readable held configuration, a `slots:` line
3349
+ high, normal and low intake is paused. With a readable held configuration, a `slots:` line
3285
3350
  after `capacity:` groups the builds the dispatcher counts as `held`,
3286
- `requested` (with each request and an `urgent` marker) and `none`
3351
+ `requested` (with each request and an `urgent`, `high` or `low` marker) and `none`
3287
3352
  (`capacity.slots` in JSON, by slug); `occupied` counts the held entries. The
3288
3353
  dispatcher records
3289
3354
  `dispatcher.open-pr-backpressure-engaged` and `-cleared` only on transitions.
@@ -3305,7 +3370,7 @@ liveness; `PROGRESS` is the age of the latest durable event. A literal
3305
3370
  heartbeat is at least one hour newer than its latest event. It is a visibility
3306
3371
  signal, not a stalled/dead verdict. `SLOT` (`slot` in JSON) is the build's
3307
3372
  slot state by the rules the dispatcher admits work by: `held`,
3308
- `requested <request>` with an `urgent` suffix for urgent work, or `none`; `—`
3373
+ `requested <request>` with an `urgent`, `high` or `low` suffix, or `none`; `—`
3309
3374
  for a done build. `unknown`, or no `slot` in JSON, is an older server's answer;
3310
3375
  never read it as `none`. `STATUS` prints the build's status word with its note
3311
3376
  (see "Status words"), and JSON adds it as `statusWord` while `status` stays
@@ -3467,7 +3532,9 @@ The default watch reports actionable conditions only:
3467
3532
  `dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
3468
3533
  `restartRequired`, `dispatcher.upgrade-failed`, `dispatcher.runtime-rolled-back`,
3469
3534
  `dispatcher.kernel-git-unavailable`, `forge.credential-limited`, abnormal
3470
- `dispatcher.run-stopped`, and `dispatcher.lost`. A `forge.credential-limited`
3535
+ `dispatcher.run-stopped`, and `dispatcher.lost`. A one-tick run whose tick
3536
+ failed and was reported stops normally, with exit code 1 and the error, so a
3537
+ single blip is not attention. A `forge.credential-limited`
3471
3538
  line names the process whose GitHub request was rate-limited outside the
3472
3539
  dispatcher's credential (unauthenticated, with why, or on that process's own
3473
3540
  credential) and its reset; dispatcher forge work continues.
@@ -3502,9 +3569,12 @@ The default watch reports actionable conditions only:
3502
3569
  with the episode still open; crossing reset alone is silent. Without a reset,
3503
3570
  the deadline is 15 minutes after onset. Repeated evidence never postpones
3504
3571
  the deadline; recovery ends the episode.
3505
- - `dispatcher.tick-failure-persistent`: continuously failing completed ticks
3506
- for five minutes in one run. A successful tick, new run, or matching stop
3507
- ends the episode. Source grace and cooldown-driven failures do not start
3572
+ - `dispatcher.tick-failure-persistent`: continuously failing ticks for five
3573
+ minutes, across consecutive runs, including one-tick hosted runs. Any
3574
+ completed tick ends the episode, as does a clean, abnormal or forced stop of
3575
+ the run that last failed. A new run does not, nor does a one-tick run's normal
3576
+ stop after its failed tick. The observation keeps the first failure's time and
3577
+ names the latest failing run and error. Source grace and cooldown-driven failures do not start
3508
3578
  this clock; after grace, the first qualifying failure starts a new five-minute
3509
3579
  interval. Each persistence episode is reported once. Repository read failures
3510
3580
  fail the watch tick and retry on the next tick; repeated failures use this
@@ -3541,7 +3611,11 @@ silently baselines historical direct events and merge decisions, but retains
3541
3611
  active repository timers. A no-slug watch follows each build announced in the
3542
3612
  journal after its position from the build's first event; cursors carry
3543
3613
  creations still in preparation, and a cursor from an earlier release, which
3544
- carries none, baselines a build whose creation was selected before it. Reconcile existing conditions through status after
3614
+ carries none, baselines a build whose creation was selected before it. A watch retires a terminal, settled build (no pending cleanup, reclaim, open
3615
+ execution or integration audit) once its events through settlement are
3616
+ delivered: it leaves tracking and every later cursor, so a re-armed cursor
3617
+ stays proportional to active builds. Named builds are never retired. Following
3618
+ a build reads only events after its position, with no per-poll reduced read. Reconcile existing conditions through status after
3545
3619
  arming the watch. Named watches still end when every named build is terminal;
3546
3620
  learn their outcomes from status reconciliation at exit.
3547
3621
 
@@ -3602,7 +3676,10 @@ before any record. A store read that fails after the watch has started is
3602
3676
  reported on stderr once per failing read source — locally the poll cycle is
3603
3677
  one source, while against an `http(s)` store each tracked stream and the
3604
3678
  discovery pass carries its own failure streak — and retried without
3605
- duplicating or skipping any event.
3679
+ duplicating or skipping any event. A reducer incompatibility
3680
+ (`incompatible reducer …`: this CLI cannot represent the service's reduced
3681
+ value) is never retried: the watch exits 1 at once with upgrade advice and
3682
+ never reconstructs the value from history.
3606
3683
  Against a local store the default cadence polls every 1 second. Against an
3607
3684
  `http(s)` store each tracked stream long-polls instead — one held request per
3608
3685
  stream waits up to 25 seconds for the next event, requests run concurrently,
@@ -3696,7 +3773,9 @@ cursor behavior as 3). The default poll interval and `--interval` match
3696
3773
  per failing read source — locally the poll cycle is one source, while
3697
3774
  against an `http(s)` store each tracked build and the discovery pass carries
3698
3775
  its own failure streak — and retried without missing or duplicating a
3699
- condition. The command is
3776
+ condition. A reducer incompatibility (`incompatible reducer …`) is not
3777
+ retried: the wait exits 1 at once with upgrade advice and never reconstructs
3778
+ the value from history. The command is
3700
3779
  read-only — it appends no event, takes no lease, and creates no record — and
3701
3780
  deciding what to do about a match stays with the caller's skill.
3702
3781
 
@@ -3738,8 +3817,8 @@ sequence positions, inclusive at head minus 1,000. Keep the cursor on normal
3738
3817
  re-arms and ordinary reducer upgrades. Typed `cursor-too-old` names the oldest
3739
3818
  servable cursor: re-arm without `--since`, reconcile repository/build status,
3740
3819
  and acknowledge the lost historical gap. Never fall back to cursor zero.
3741
- Checkpoint integrity errors are terminal; retired seed generations require an
3742
- upgrade/restart and fresh attachment. Explicit MCP `builds.events` history is
3820
+ Checkpoint integrity errors and reducer incompatibilities are terminal; retired
3821
+ seed generations require an upgrade/restart and fresh attachment. Explicit MCP `builds.events` history is
3743
3822
  paged at 256 events with `cursor` and `hasMore`; follow every continuation.
3744
3823
  MCP `repository.events` is a connected agent's repository attention watch: it
3745
3824
  reads at most 256 journal positions after its cursor, with an optional wait of
@@ -3747,7 +3826,8 @@ at most 30 seconds, and by default returns exactly the repository records this
3747
3826
  default watch reports. Its cursor advances past filtered events; omit it once
3748
3827
  for a baseline, and treat `cursor-too-old` as above. MCP `repository.attention`
3749
3828
  returns the current attention digest, every item naming its resolving tool,
3750
- with the same cursor rules.
3829
+ with the same cursor rules. Its escalations include done builds whose
3830
+ open escalation awaits acknowledgement.
3751
3831
 
3752
3832
  **`ab harvest status [--events N] [--json] [--store <ref>]`** projects the
3753
3833
  **`ab harvest status [--events N] [--json] [--store <ref>]`** projects the
@@ -3914,8 +3994,8 @@ absolute file path containing the edited text. Read the current ticket and
3914
3994
  reapply the intended changes before retrying; conflicts are never merged.
3915
3995
 
3916
3996
  File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets,
3917
- state and urgent priority; file revisions also cover nonempty issue links. GitHub revisions
3918
- fingerprint kind, target, title, body, canonical label/blocker sets, state and issue links,
3997
+ state and any priority other than normal; file revisions also cover nonempty issue links. GitHub revisions
3998
+ fingerprint kind, target, title, body, canonical label/blocker sets (priority labels included), state and issue links,
3919
3999
  including the ticket's own issue; GitHub tickets carry no comments. Reverting
3920
4000
  identical content restores its fingerprint. File checks
3921
4001
  re-read immediately before writing, with the existing no-lock race window.
@@ -13,7 +13,9 @@ See [restacking](restacking.md) for change identity and replay.
13
13
  Presence is checked only at claim, never to interrupt existing work. The newest
14
14
  build generation supplies evidence; ambiguous or unavailable evidence leaves the
15
15
  dependent queued. Confirmed merge SHA reachability can prove presence without
16
- a trailer, and a merged node transports its whole owned contribution. Empty
16
+ a trailer, and a merged node transports its whole owned contribution. A child
17
+ whose commit became empty and was dropped by a forge rebase merge still counts as
18
+ landed through that contribution. Empty
17
19
  completed nodes contribute nothing. Sibling work waits for merge into the common
18
20
  ancestor and demand the minimal restack path; same-node merges satisfy presence directly.
19
21
 
@@ -101,11 +103,12 @@ has commits its current parent lacks; parent-only advancement remains empty.
101
103
  A node takes a slot only by admission for runner work: `reconcile` for a
102
104
  restack conflict, `verification` for an integration cycle or a measurement, and
103
105
  `propose` for an optimization node's open proposal request. The request is
104
- durable and is admitted before normal ticket claims, urgent work first. Until
105
- the node holds its slot, intake reserves one slot for it, and the dispatcher
106
- checks its admission every tick regardless of idle node polling, so a slot
107
- freed in any tick goes to the node, not to a new normal claim. Admission counts
108
- every build that holds a slot, as every admission does.
106
+ durable and is admitted before ticket claims at its level, higher levels first. Until
107
+ the node holds its slot, intake reserves one slot for it ahead of claims at its
108
+ own level and below, and the dispatcher checks its admission every tick
109
+ regardless of idle node polling. A slot freed in any tick goes to the node, not
110
+ to a new claim at its level or below; higher-level demand can take it first.
111
+ Admission counts every build that holds a slot, as every admission does.
109
112
 
110
113
  - **Recorded before provisioning.** Admission is a durable `slot.admitted`
111
114
  fact naming the work it admitted.
@@ -122,8 +125,8 @@ every build that holds a slot, as every admission does.
122
125
  slot it needs to unblock them.
123
126
 
124
127
  Status and both dashboards report occupancy against configured capacity, and
125
- each node waiting for a slot ahead of normal ticket claims, marking urgent
126
- ones.
128
+ each node waiting for a slot ahead of ticket claims at its level, marking
129
+ urgent, high and low ones.
127
130
  Status also reports every build's slot state (`slot`, `capacity.slots`):
128
131
  an admitted node reports `held`; a node awaiting admission reports its request.
129
132
 
@@ -263,7 +266,7 @@ An optimization node follows `branch opening → starting measurement →
263
266
  (propose → collecting)*`, then completes, verifies and merges like any node.
264
267
  Once the starting value is measured, the dispatcher requests a `propose`
265
268
  session whenever the node has room within its concurrency and attempts budget.
266
- The request takes a slot ahead of normal ticket claims, like node reconcile and
269
+ The request takes a slot ahead of ticket claims at the node's level, like node reconcile and
267
270
  verification. The session runs the `ab-propose` skill on the node head, reads
268
271
  the attempt ledger and deposits proposals with `ab propose`; it never creates
269
272
  tickets. The dispatcher files each proposal as a work ticket targeting the
@@ -188,7 +188,10 @@ Node-to-GitHub-root merge uses PR rebase merge guarded on verified head after
188
188
  a final parent freshness read. Enforced up-to-date protection provides a fenced
189
189
  merge; uncertainty is recorded as unfenced and requires immutable merged-tree
190
190
  audit. A mismatch raises operator attention without rewriting the shared parent.
191
- Pending audits survive completion and retry until settled.
191
+ A verified empty child commit that the rebase merge dropped is accounted for when
192
+ the merged tree matches; a missing non-empty commit or a duplicate identity still
193
+ raises attention. Answer it with `ab answer`, which acknowledges it without
194
+ reopening the build. Pending audits survive completion and retry until settled.
192
195
 
193
196
  Root leaves land by one of three routes. Behind a real merge-blocking gate,
194
197
  Autobuild arms GitHub-native auto-merge. An authoritatively ungated root
@@ -259,7 +262,9 @@ displaced history under immutable exact archive refs
259
262
  them. Where it refuses, they keep a BuildStore copy (`history-objects-<sha>`),
260
263
  or record one `history-unretained` warning and proceed.
261
264
  - **Workspace preservation** keeps unpublished workspace commits under archive
262
- refs, else as BuildStore copies. When neither holds them, release is refused.
265
+ refs, else as BuildStore copies. When neither holds them, release is refused,
266
+ except under abort cleanup, which records `workspace.commits-lost` and
267
+ releases.
263
268
  - There is never a branch or tag fallback. When an environment refuses non-branch
264
269
  Git pushes, as Claude Code on the web's GitHub proxy does, the GitHub adapter
265
270
  creates the same archive ref through REST ref creation and confirms it by exact