@defrex/autobuild 1.12.0 → 1.13.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 (159) hide show
  1. package/README.md +1 -1
  2. package/SPEC.md +435 -160
  3. package/bin/ab-build-runner.ts +8 -0
  4. package/docs/answering-blocked-builds.md +25 -3
  5. package/docs/architecture.md +124 -53
  6. package/docs/cli.md +1 -1
  7. package/docs/configuration.md +110 -15
  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 +5 -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 +51 -12
  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 +17 -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 +527 -144
  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/repository.ts +14 -3
  54. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +27 -0
  55. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/0a10010ee5cf2e47.json +577 -0
  56. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/227701361be6d1e0.json +490 -0
  57. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/76e5043bae7a80ab.json +86 -0
  58. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/87a917802870bbed.json +87 -0
  59. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9d85616e5b9e24c1.json +500 -0
  60. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/c7c94fbe7f63cf07.json +84 -0
  61. package/packages/core/src/kernel/clean-restack-policy.ts +40 -0
  62. package/packages/core/src/kernel/dispatch-capacity.ts +243 -107
  63. package/packages/core/src/kernel/done-escalations.ts +269 -0
  64. package/packages/core/src/kernel/engine.ts +28 -9
  65. package/packages/core/src/kernel/integration-landing.ts +24 -4
  66. package/packages/core/src/kernel/integration-stack.ts +39 -0
  67. package/packages/core/src/kernel/janitor-failure.ts +20 -1
  68. package/packages/core/src/kernel/log-index-value.ts +3 -0
  69. package/packages/core/src/kernel/log-index.ts +41 -2
  70. package/packages/core/src/kernel/open-pr-backpressure.ts +3 -3
  71. package/packages/core/src/kernel/reducer-registry.ts +3 -0
  72. package/packages/core/src/kernel/reducer-revisions.ts +15 -0
  73. package/packages/core/src/kernel/reducer.ts +27 -7
  74. package/packages/core/src/kernel/repository-attention.ts +14 -5
  75. package/packages/core/src/kernel/ticket-starts.ts +15 -4
  76. package/packages/core/src/kernel/verify-stages.ts +46 -7
  77. package/packages/core/src/operator/attention.ts +28 -3
  78. package/packages/core/src/operator/done-escalations.ts +38 -0
  79. package/packages/core/src/operator/presentation.ts +1 -1
  80. package/packages/core/src/operator/protocol.ts +8 -5
  81. package/packages/core/src/operator/query.ts +33 -19
  82. package/packages/core/src/operator/registry.ts +17 -13
  83. package/packages/core/src/operator/ticket-start.ts +8 -7
  84. package/packages/core/src/operator/tickets.ts +28 -9
  85. package/packages/core/src/plugin-sdk/index.ts +10 -0
  86. package/packages/core/src/plugins/manifest.ts +14 -1
  87. package/packages/core/src/ports/forge/create.ts +8 -0
  88. package/packages/core/src/ports/forge/github-transport.ts +5 -1
  89. package/packages/core/src/ports/forge/github.ts +3 -0
  90. package/packages/core/src/ports/tickets/contract.ts +147 -76
  91. package/packages/core/src/ports/tickets/create.ts +47 -7
  92. package/packages/core/src/ports/tickets/fake.ts +8 -4
  93. package/packages/core/src/ports/tickets/file-codec.ts +4 -3
  94. package/packages/core/src/ports/tickets/file.ts +7 -3
  95. package/packages/core/src/ports/tickets/github.ts +1 -0
  96. package/packages/core/src/ports/tickets/grants.ts +11 -3
  97. package/packages/core/src/ports/tickets/hosted-index.ts +5 -0
  98. package/packages/core/src/ports/tickets/linear.ts +28 -9
  99. package/packages/core/src/ports/tickets/migration.ts +4 -4
  100. package/packages/core/src/ports/tickets/operations.ts +4 -2
  101. package/packages/core/src/ports/tickets/priority-labels.ts +213 -0
  102. package/packages/core/src/ports/tickets/priority.ts +127 -21
  103. package/packages/core/src/ports/tickets/remote-protocol.ts +10 -0
  104. package/packages/core/src/ports/tickets/remote.ts +104 -11
  105. package/packages/core/src/ports/tickets/revision.ts +5 -3
  106. package/packages/core/src/ports/tickets/search.ts +9 -0
  107. package/packages/core/src/ports/tickets/tree.ts +8 -6
  108. package/packages/core/src/ports/types.ts +30 -15
  109. package/packages/core/src/ports/workspace/build-execution.ts +4 -0
  110. package/packages/core/src/ports/workspace/builtin-capabilities.ts +4 -0
  111. package/packages/core/src/ports/workspace/create.ts +16 -3
  112. package/packages/core/src/ports/workspace/execution-exit-marker.ts +41 -0
  113. package/packages/core/src/ports/workspace/recovery-step.ts +101 -0
  114. package/packages/core/src/ports/workspace/vercel-sandbox.ts +510 -145
  115. package/packages/core/src/processes/build-execution-state.ts +4 -0
  116. package/packages/core/src/processes/build-runner.ts +14 -1
  117. package/packages/core/src/processes/dispatcher.ts +544 -212
  118. package/packages/core/src/processes/execution-settlement.ts +1 -0
  119. package/packages/core/src/processes/harvest-runner.ts +12 -7
  120. package/packages/core/src/processes/infrastructure-failure-budget.ts +7 -2
  121. package/packages/core/src/processes/invocation-budget.ts +176 -0
  122. package/packages/core/src/processes/publication-loss.ts +38 -3
  123. package/packages/core/src/processes/workspace-preservation.ts +86 -15
  124. package/packages/core/src/store/contract.ts +81 -3
  125. package/packages/core/src/store/event-reads.ts +30 -1
  126. package/packages/core/src/store/reduced-reads.ts +23 -0
  127. package/packages/core/src/store/reducer-value-shapes.json +6628 -6469
  128. package/packages/core/src/store/reducer-value-validation.ts +181 -33
  129. package/packages/core/src/store/remote/client.ts +169 -29
  130. package/packages/core/src/store/remote/compatibility.ts +113 -56
  131. package/packages/core/src/store/remote/credentials.ts +4 -1
  132. package/packages/core/src/store/remote/protocol.ts +3 -0
  133. package/packages/core/src/store/remote/released-clients.json +11 -0
  134. package/packages/core/src/store/remote/released-reducer-values/1.13.0.json +35966 -0
  135. package/packages/core/src/store/remote/released-reducer-values/index.ts +18 -16
  136. package/packages/core/src/store/remote/released-value-policy.ts +144 -0
  137. package/packages/core/src/store/remote/retry.ts +406 -0
  138. package/packages/core/src/testing/dispatch-read-budget.ts +144 -10
  139. package/packages/core/src/testing/index.ts +2 -0
  140. package/packages/core/src/testing/invocation-budget.ts +42 -0
  141. package/packages/core/src/testing/reduced-read-budget.ts +381 -18
  142. package/packages/core/src/testing/released-value-coverage.ts +423 -0
  143. package/packages/core/src/web/overview-source.ts +19 -6
  144. package/skills/guide/SKILL.md +138 -67
  145. package/skills/guide/references/integration-tree.md +12 -9
  146. package/skills/guide/references/merge-policy.md +7 -2
  147. package/skills/guide/references/operator-api.md +46 -23
  148. package/skills/guide/references/optimization-nodes.md +7 -6
  149. package/skills/guide/references/plugin-authoring.md +46 -18
  150. package/skills/guide/references/remote-store-protocol.md +51 -12
  151. package/skills/guide/references/remote-ticket-protocol.md +85 -38
  152. package/skills/guide/references/restacking.md +48 -3
  153. package/skills/guide/references/setup.md +2 -1
  154. package/skills/guide/references/ticket-migration.md +2 -2
  155. package/skills/operate/SKILL.md +82 -51
  156. package/skills/plan/SKILL.md +4 -3
  157. package/skills/spec/SKILL.md +9 -5
  158. package/skills/tickets/SKILL.md +25 -17
  159. package/templates/hosted-service/package.json +2 -2
@@ -184,7 +184,7 @@ The operation names and `input` values are:
184
184
  | `list-ready` | `{labels?: string[], state?: string}` | `TicketListing` |
185
185
  | `list-targeting` | `{nodeId: string}` | `TicketListing` of every state |
186
186
  | `list-page` | `{criteria: {labels?, state?}, page: {limit, offset?, order?}}` | `TicketPageListing` (`{tickets, diagnostics, total}`) |
187
- | `search` | `{text, state?, labels?, limit, cursor?}` | `{tickets: {id, title, state?, labels, kind, target?}[], cursor?, diagnostics}` |
187
+ | `search` | `{text, state?, labels?, limit, cursor?}` | `{tickets: {id, title, state?, labels, kind, target?, priority?}[], cursor?, diagnostics}` |
188
188
  | `get` | `{id}` | `Ticket \| null` |
189
189
  | `claim` | `{id}` | `{claimed: boolean}` |
190
190
  | `comment` | `{id, body}` | `{ok: true}` |
@@ -225,11 +225,35 @@ remain unchanged. These rules apply only to hosted tickets, not file or Linear i
225
225
  ## Errors and conformance
226
226
 
227
227
  Errors are JSON `{ "error": string, "kind": "validation" | "not-found" |
228
- "auth" | "conflict" | "internal" }`. Authentication runs before body parsing
229
- or backend construction. Responses never include exception causes, stacks,
230
- environment values, or credentials. Client 401/403 responses become
228
+ "auth" | "conflict" | "internal" | "unavailable" }`. Authentication runs before
229
+ body parsing or backend construction. Responses never include exception causes,
230
+ stacks, environment values, or credentials. Client 401/403 responses become
231
231
  `AuthError`; other backend messages remain actionable.
232
232
 
233
+ A hosted service answers `503` with kind `unavailable` and a `Retry-After`
234
+ header in seconds when its database is saturated (no free connection slots, or
235
+ a pool acquisition timed out) or when the service is shutting down. The
236
+ response carries no backend detail.
237
+
238
+ The client retries transient failures exactly as the store client does: a
239
+ `429`, `502`, `503`, `504`, a `500` with `kind: "internal"` or no protocol body,
240
+ or a transport failure, at most three attempts within one 10 s bound.
241
+
242
+ - **Retried on any transient failure:** `policy`, `list-ready`,
243
+ `list-targeting`, `list-page`, `search`, `states`, `state-counts`, `get`,
244
+ `dependency-states`, `transition`, `update`, `add-blocker`, `remove-blocker`,
245
+ `mutate-if-revision`, and `create` with an idempotency key. Each is a read or
246
+ a set-or-replace write; a repeated revision check fails as a typed conflict.
247
+ - **Never retried after a response:** `claim`, `comment`, `add-state` and an
248
+ unkeyed `create`. They retry only a `429` or a transport failure that
249
+ preceded delivery.
250
+ - **Exhaustion** surfaces as `RemoteUnavailableError` with the service's
251
+ message; `AuthError` and the typed protocol errors keep precedence.
252
+
253
+ A dispatcher publishes `policy` and settles `list-targeting` at its first tick
254
+ boundary rather than while it starts, so a transient failure there fails only
255
+ that tick.
256
+
233
257
  The shared `TicketSource` contract is normative for protocol implementations.
234
258
  Project partitions must be isolated. The direct Linear client retains its
235
259
  separate opt-in GraphQL contract; this protocol does not proxy Linear.
@@ -307,7 +331,7 @@ snapshot of fields, blockers and revision.
307
331
  `POST /tickets/mutate-if-revision` accepts the usual authenticated context and
308
332
  `input: { id, expectedRevision, mutation }`. Mutation is one of
309
333
  `{ kind: "update", patch: { title?, body?, labels?, kind?, target?,
310
- priority?: "urgent" | "normal" } }`,
334
+ priority?: "urgent" | "high" | "normal" | "low" } }`,
311
335
  `{ kind: "transition", state }`, or
312
336
  `{ kind: "blockers", operation: "block" | "unblock", ids: string[] }`.
313
337
  Unknown keys and empty patches are refused. Success returns `{ ok: true }`.
@@ -387,8 +411,12 @@ response without the header, or a `404` or `400` refusal of `list-targeting`
387
411
  without it, means the service predates the operation. Against such a service
388
412
  the client never declares it, and integration observation uses the exhaustive
389
413
  listing by that explicit decision. An inconclusive probe (a network failure or
390
- an unmarked gateway error) fails source construction. A targeted read the
391
- service later refuses fails closed, with no fallback within the pass.
414
+ an unmarked gateway error) fails preparation. An ordinary consumer prepares
415
+ while constructing the source, so construction fails. A dispatcher prepares at
416
+ its first tick boundary: exhausted transient unavailability fails that tick and
417
+ preparation runs again at the next one, while any other failure stops the run.
418
+ A targeted read the service later refuses fails closed, with no fallback within
419
+ the pass.
392
420
 
393
421
  ## Issue links
394
422
 
@@ -425,40 +453,57 @@ not establish continuity for in-flight builds; see the migration procedure.
425
453
 
426
454
  ## Priority
427
455
 
428
- Hosted tickets store `priority`, either `"urgent"` or `"normal"`. Create,
429
- update and guarded update accept it as an optional field. A create that omits it
430
- files a normal ticket, and an update that omits it never changes it. Tickets that
431
- existed before the field read as normal. A priority change increments the
432
- revision, and rewriting the same value is a no-op.
433
-
434
- Ticket responses include `priority` on every ticket, `normal` included, only with
435
- `x-autobuild-ticket-priority: 1`, independently of the other capabilities and of
436
- the client version. Without it, priority is projected away for historical strict
437
- decoders, whose writes never name it and so never clear it. Every `/tickets/*`
438
- response, including errors, carries `x-autobuild-ticket-priority: 1`.
439
-
440
- `list-ready` returns urgent tickets first, then normal ones, each class in filing
441
- order, for every client. Ordering happens within the existing listing; it adds no
442
- per-ticket reads. `list-ready` stays exhaustive; paged reads use `list-page`.
443
-
444
- A service whose backing source cannot store priority refuses a write naming
445
- `urgent` with `409 { "kind": "conflict", "code": "priority-unsupported" }` before
446
- anything is written. A service predating priority refuses the unknown field with a
447
- `400` validation error and no capability header. Clients report both as
448
- `TicketPriorityUnsupported`. Current clients omit `normal` on create, so a plain
449
- create still works against such a service.
456
+ Hosted tickets store `priority`: `"urgent"`, `"high"`, `"normal"` or `"low"`.
457
+ Create, update and guarded update accept it as an optional field. A create that
458
+ omits it files a normal ticket, and an update that omits it never changes it.
459
+ Tickets that existed before the field read as normal. A priority change
460
+ increments the revision, and rewriting the same value is a no-op.
461
+
462
+ Ticket responses project priority by the capability headers the client sends,
463
+ independently of the other capabilities and of the client version:
464
+
465
+ | Client sends | Response `priority` |
466
+ |---|---|
467
+ | `x-autobuild-ticket-priority-levels: 1` | the stored level, on every ticket, `normal` included |
468
+ | only `x-autobuild-ticket-priority: 1` | `urgent` stays `urgent`; `high`, `low` and `normal` read as `normal` |
469
+ | neither | absent, for historical strict decoders, whose writes never name it and so never clear it |
470
+
471
+ Search hits carry an optional `priority`, projected the same way and stripped
472
+ for clients without the levels header. Every `/tickets/*` response, including
473
+ errors, carries both `x-autobuild-ticket-priority: 1` and
474
+ `x-autobuild-ticket-priority-levels: 1`.
475
+
476
+ `list-ready` returns urgent tickets first, then high, then normal, then low,
477
+ each level in filing order, for every client. Ordering happens within the
478
+ existing listing; it adds no per-ticket reads. `list-ready` stays exhaustive;
479
+ paged reads use `list-page`.
480
+
481
+ Refusals, all before anything is written:
482
+
483
+ - A service whose backing source cannot store the level answers
484
+ `409 { "kind": "conflict", "code": "priority-unsupported" }`.
485
+ - A service predating priority refuses the unknown field with a `400`
486
+ validation error and no capability header.
487
+ - A service that stores only `urgent` and `normal` refuses `high` or `low`
488
+ with a `400` validation error and no `x-autobuild-ticket-priority-levels`
489
+ header. The client sends the request; the older service rejects it before
490
+ persisting anything.
491
+
492
+ Clients report each as `TicketPriorityUnsupported` naming the `hosted` source.
493
+ Current clients omit `normal` on create, so a plain create still works against
494
+ an older service.
450
495
 
451
496
  ## Paged listing
452
497
 
453
498
  `list-page` answers one window of the tickets matching `criteria`, from the
454
499
  backing source's native paging. `limit` and `offset` are nonnegative integers;
455
- `offset` defaults to 0. `order` is `oldest` (the default), which is dispatch
456
- order: urgent first, then normal, each in filing order. `newest` is newest filed
457
- first, regardless of urgency. Offset and limit apply after ordering, so
500
+ `offset` defaults to 0. `order` is `oldest` (the default), which is priority
501
+ order: urgent, then high, then normal, then low, each in filing order. `newest`
502
+ is newest filed first, regardless of priority. Offset and limit apply after ordering, so
458
503
  consecutive windows traverse the listing with no omissions or duplicates.
459
504
  `total` counts every match before slicing, also for a zero limit or an offset
460
505
  past the end. The service returns the page in the order the source answered;
461
- it does not re-sort it urgent-first. Cost follows the window, not the project's
506
+ it does not re-sort it by priority. Cost follows the window, not the project's
462
507
  ticket count.
463
508
 
464
509
  A backing source without native paging answers `409` with
@@ -469,8 +514,9 @@ ticket grants and harvest delegations receive `403`.
469
514
  Every `/tickets/*` response, including errors, carries
470
515
  `x-autobuild-ticket-paging: 1`. A current client declares `listPage` only after
471
516
  a response from the service has carried that header. It settles the decision on
472
- the response that already finishes source construction (the policy sync or the
473
- targeted-listing probe), with no extra probe. An ok response without the header
517
+ the response that already finishes preparation (the policy sync or the
518
+ targeted-listing probe), with no extra probe, whether preparation runs during
519
+ ordinary source construction or at a dispatcher's first tick. An ok response without the header
474
520
  means the service predates the operation. Against such a service the client
475
521
  never declares `listPage`, and paged operator listings read `list-ready` and
476
522
  slice it, as for any source without native paging. A `list-page` request that the
@@ -498,8 +544,9 @@ for duplicate checks before filing:
498
544
  stable across pages: the PostgreSQL backend answers newest ticket number
499
545
  first. `cursor` is opaque; pass the previous page's `cursor` with the same
500
546
  text and filters. It is absent on the last page.
501
- - **Hits.** `id`, `title`, `state`, `labels`, `kind` and `target` come from the
502
- search read itself. Bodies are never returned, and there is no read per hit.
547
+ - **Hits.** `id`, `title`, `state`, `labels`, `kind`, `target` and `priority`
548
+ come from the search read itself; `priority` follows the
549
+ [priority projection](#priority). Bodies are never returned, and there is no read per hit.
503
550
  - **Refusals.** A backing source without search answers `409` with
504
551
  `code: "search-unsupported"`. A malformed or foreign cursor answers `400` with
505
552
  `code: "search-cursor-invalid"` and the `cursor`. Clients report them as
@@ -513,7 +560,7 @@ for duplicate checks before filing:
513
560
  Every `/tickets/*` response, including errors, carries
514
561
  `x-autobuild-ticket-search: 1`. A current client declares `search` only after a
515
562
  response from the service has carried that header, settled on the response that
516
- already finishes source construction, with no extra probe. Against a service
563
+ already finishes preparation, with no extra probe. Against a service
517
564
  predating the operation (an ok response without the header) the client never
518
565
  declares `search`, so callers refuse with `TicketSearchUnsupported` before any
519
566
  request and nothing is listed. A `search` request that the service later refuses
@@ -89,7 +89,9 @@ waiting leaves restack when the target moves. Node-target finalize contributions
89
89
  are canonicalized before guarded merge even when the target SHA is unchanged.
90
90
  Clean replay starts no agent. A clean awaiting-merge leaf rewrite preserves completed
91
91
  verification when build-owned config is unchanged, even when replay replaces
92
- the pin commit's ancestry. Reports retain their actual cycle base/head.
92
+ the pin commit's ancestry, unless a
93
+ [clean-restack policy](#clean-restack-re-verification) opts steps in for a
94
+ root-targeting leaf. Reports retain their actual cycle base/head.
93
95
  Changed config still starts a fresh verification cycle while waiting. Before
94
96
  running further verification steps, cycles also require known pin ancestry;
95
97
  a future cycle captures fresh config from its checkout. Configuration
@@ -195,7 +197,9 @@ displaced heads and the temporary change, best effort, per commit:
195
197
  before the guarded update landed abandons the reservation, and the next node
196
198
  transaction reserves again from the published branches.
197
199
  - Workspace preservation is strict: archive ref, else a `history-objects-<sha>`
198
- store copy over the preservation base, else release is refused. Store-kept
200
+ store copy over the preservation base, else release is refused. Abort cleanup
201
+ is the one exception: when preservation fails it records
202
+ `workspace.commits-lost` and releases. Store-kept
199
203
  heads go on decisive `workspace.commits-retained`, and replacement
200
204
  provisioning restores them on any host.
201
205
 
@@ -230,6 +234,45 @@ interpretation and supply a promoted contribution base for later replay.
230
234
 
231
235
  Replay retention (`replay-objects-<sha>`) and leaf history retention (`history-objects-<sha>`) store thin Git packs in bounded binary chunks, with a fixed-size completion manifest written only after every chunk is acknowledged. Digest-keyed chunks make interrupted writes retryable; incomplete uploads are never restored. Recovery validates all chunk sizes and the pack digest before installation, and requires the base objects (restoring node prefixes in order). Existing single-artifact base64 packs remain readable. Retained replay and history artifacts are read only when the requested commit is missing locally, never by idle polling.
232
236
 
237
+ ## Clean-restack re-verification
238
+
239
+ A cleanly restacked waiting leaf lands without re-running verification by
240
+ default. To catch semantic drift a clean replay cannot see, such as a new lint
241
+ rule, a tightened type or a changed shared export on the target, opt steps in:
242
+
243
+ ```toml
244
+ [verify.lint]
245
+ kind = "check"
246
+ command = "lint"
247
+ afterCleanRestack = true
248
+ ```
249
+
250
+ | Setting | Default | Effect |
251
+ |---|---|---|
252
+ | `[verify].afterCleanRestack` | `false` (omitted) | Repository default for every step. |
253
+ | `[verify.<step>].afterCleanRestack` | inherited | Overrides the default in either direction. |
254
+
255
+ - **Scope.** Only a root-targeting leaf's clean awaiting-merge restack,
256
+ including a resolved `[[generated]]` regeneration. A leaf targeting an
257
+ integration node relies on the node's own verification before root.
258
+ - **Frozen policy.** When at least one step is enabled, the runner records the
259
+ resolved ordered policy as `cleanRestackPolicy` on
260
+ `restack.publish-intended`, `restack.rewritten` and `restack.completed`.
261
+ Recovery after a crash keeps it, even if configuration changed.
262
+ - **Fresh cycle.** That completion starts a verify cycle at a new attempt on
263
+ the restacked base and head. Opted-in steps run under the usual plan and
264
+ `paths` rules; the others record `skipped` with
265
+ `skipCause = "clean-restack-policy"`. No further restack runs.
266
+ - **Landing.** The leaf does not land until the cycle is satisfied. A failure
267
+ routes to implement, code review and ordinary verification, and counts
268
+ toward `maxVerifyAttempts`. On success, landing consent survives as for any
269
+ clean restack.
270
+ - **Cost.** Every target move under a waiting leaf re-runs the opted-in steps.
271
+ Prefer cheap deterministic checks; an agent step re-runs only when opted in.
272
+
273
+ Omitted or all-false settings record nothing, so existing builds behave
274
+ exactly as before.
275
+
233
276
  ## Node contributions and recovery
234
277
 
235
278
  Node replay enumerates oldest-first first-parent contributions above the last
@@ -271,7 +314,9 @@ committed unchanged.
271
314
  - **Leaf restack.** `restack.regenerated` records the files, the commands and
272
315
  the outcome. A `resolved` replay's head is retained before the fact is
273
316
  written, and then publishes like a clean restack, so verification follows the
274
- clean-restack rules; the configured verify steps still check the result.
317
+ clean-restack rules, including any
318
+ [clean-restack policy](#clean-restack-re-verification) while waiting to merge;
319
+ the configured verify steps still check the result.
275
320
  The regeneration counts as conflict resolution for merge consent: consent
276
321
  given under a `paths` or `within` rule is revoked, with
277
322
  `landing.consent-revoked`, when the regenerated files match it, even though
@@ -504,7 +504,8 @@ Archive refs are a recommendation (WARN or UNKNOWN, never FAIL):
504
504
  build and proceed.
505
505
  - **Workspace preservation** keeps unpublished workspace commits as BuildStore
506
506
  copies where refused, and refuses to release the workspace only when the store
507
- copy fails too.
507
+ copy fails too. Abort cleanup is the exception: it records
508
+ `workspace.commits-lost` and releases.
508
509
 
509
510
  Require **linear history** on protected root and node target branches to prevent
510
511
  merge commits from GitHub's update-branch action. On the configured root, enable
@@ -93,7 +93,7 @@ timestamps remain in the export; imported comments use the target's metadata.
93
93
 
94
94
  Portable records use TOML frontmatter between `+++` fences and an unchanged
95
95
  Markdown body. Alongside `id`, `title`, `labels`, `blockedBy` and `idempotencyKey`,
96
- optional `issueLinks` contain `issue` and `intent` (`closes` or `refs`), optional `priority` is `"urgent"` (absent means normal), optional `comments` contain `body`, `createdAt` and optional `author`. Optional
96
+ optional `issueLinks` contain `issue` and `intent` (`closes` or `refs`), optional `priority` is `"urgent"`, `"high"` or `"low"` (absent means normal), optional `comments` contain `body`, `createdAt` and optional `author`. Optional
97
97
  `attachments` contain `kind`, `name`, `layout` (`file` or `tree`) and `entries`:
98
98
  `{ type = "dir", path = "empty" }` or
99
99
  `{ type = "file", path = "image.png", base64 = "…" }`. Common asset limits and
@@ -109,7 +109,7 @@ no continuous sync, assignee migration, state history or build-history migration
109
109
 
110
110
  Integration-tree `kind` and `target` are preserved in portable frontmatter.
111
111
  Import validates the complete target graph before changing the destination and
112
- refuses a destination that cannot preserve metadata. Issue links and urgent
112
+ refuses a destination that cannot preserve metadata. Issue links and
113
113
  priority are preserved the same way, and a destination that cannot store them is refused before any write. It creates or adopts every
114
114
  identity, establishes node kinds, then applies targets using the durable id map,
115
115
  just like blockers. Input order does not matter. Resuming also restores edges on
@@ -122,7 +122,7 @@ record calls for action. It reports failed node verification, build escalations,
122
122
  harvest escalations/recovery exhaustion, automatic upgrade failures and runtime rollbacks, rejected configuration, reloads needing
123
123
  restart, abnormal dispatcher stops/loss, abandoned ticket preparations, ticket hand-backs (`ticket.handed-back`), single-ticket start settlements (`ticket.start-settled`), ticket-source and forge degradation past reset (15 minutes
124
124
  for ticket sources without reset), forge rate limits outside the dispatcher's credential
125
- (`forge.credential-limited`), configured hook failures and skips (`hook.*`), and five minutes of continuous tick failures. Advertised resets
125
+ (`forge.credential-limited`), configured hook failures and skips (`hook.*`), and five minutes of continuous tick failures across consecutive runs, including one-tick hosted runs. Remote store and hosted ticket requests retry transient unavailability briefly; a blip that outlasts the retries, including in hosted ticket policy sync, fails that tick without an abnormal stop. Advertised resets
126
126
  wait for a post-reset tick to finish before requiring action; ordinary recovery
127
127
  on that retry stays silent. Source grace and cooldown-driven failures do not
128
128
  start the tick-failure clock. When failure writes are unavailable, dispatch watch
@@ -152,8 +152,12 @@ registration identity. A separate unflagged diagnostic watch or wait must never
152
152
  replace the standing monitor or supply its resume cursor.
153
153
  Named diagnostic watches end when all named builds
154
154
  are terminal; add `--repository` for repository attention. With no slugs all
155
- active builds and repository attention are included. Reconcile status after
156
- arming because historical build attention is silently baselined.
155
+ active builds and repository attention are included. Once a build is terminal
156
+ and settled (no pending cleanup, reclaim, open execution or integration audit),
157
+ the watch delivers its events through settlement, then retires it from tracking
158
+ and later cursors, so re-arming never accumulates finished builds; named builds
159
+ are never retired. Reconcile status after arming because historical build
160
+ attention is silently baselined.
157
161
 
158
162
  Add an extra monitor only for an identified need, such as a human asking
159
163
  to hear when a particular build merges or an outcome triggering follow-up work.
@@ -204,6 +208,12 @@ including inside background shells and harness monitors. Do not rely on a
204
208
  shell alias or function that those facilities may lose. Never block a
205
209
  foreground command for their whole duration.
206
210
 
211
+ A watch or wait that exits 1 with `incompatible reducer …` means this CLI and
212
+ the service disagree on a reduced value. Retrying cannot fix it, so do not
213
+ re-arm in a loop. Align them, service first and then the project's Autobuild,
214
+ or run the CLI that matches the service, then re-arm. If you cannot align them,
215
+ report it to the human.
216
+
207
217
  Ticket-source degradation records mean dispatch intake cannot evaluate the source;
208
218
  existing builds may still advance. Inspect `ab repository status --json` for the
209
219
  active cause, operation, message, and expected reset. Reset times are advisory;
@@ -273,7 +283,7 @@ that appear after you arm. Finishing the initially queued set is no reason to st
273
283
  no build slug: inspect repository status. Re-arm from the standing watch's
274
284
  latest cursor, including its trailing cursor after a timeout or count exit.
275
285
  4. Report each merged, closed or aborted outcome and file or move tickets when
276
- warranted. A conflict or escalation requires action. Keep the standing watch
286
+ warranted. An escalation requires action. Keep the standing watch
277
287
  alive and keep discovering work until the human ends or hands off the role.
278
288
 
279
289
  Use `ab wait` and named unflagged watches only as separate diagnostics. They
@@ -296,7 +306,7 @@ is not exposed there, and its
296
306
  and `wait` carries `state` and `tickets`.
297
307
  The `SLOT` column (`slot` in `--json`) says whether the build holds a slot,
298
308
  has requested one (`resume`, `reconcile`, `verification`, `reopen` or
299
- `propose`, maybe urgent) or holds none, by the rules the dispatcher admits
309
+ `propose`, maybe with its `urgent`, `high` or `low` level) or holds none, by the rules the dispatcher admits
300
310
  work by. `unknown`, or no `slot`, means an older server; never read it as none.
301
311
  - `ab build status <slug> [--events N]` — one build's detail, its `slot:` line
302
312
  (`slot` in JSON), chronological runner attaches with runtime identity, and
@@ -332,10 +342,12 @@ Read events with a cursor or a small `--events` count; logs are long.
332
342
  ticket wait's escalation ends the wait early; the dispatcher ends it when its
333
343
  tickets complete (see ticket wait attention). A blocked build holds no slot
334
344
  once nothing is still working on it, and an answer does not give it one: it
335
- waits as a `resume` request ahead of normal ticket claims (urgent work
336
- first) until a slot frees. A build whose other verify steps, launch or
337
- execution still run keeps its slot through the answer and requests nothing. Run
338
- `ab help answer` for the full menu.
345
+ waits as a `resume` request ahead of ticket claims at its level (higher
346
+ levels first) until a slot frees. A build whose other verify steps, launch or
347
+ execution still run keeps its slot through the answer and requests nothing.
348
+ On a done build it only acknowledges open escalations (for example, a
349
+ post-landing integration audit), leaving the build done; other forms are
350
+ refused. Run `ab help answer` for the full menu.
339
351
  - `ab pause <slug>` / `ab resume <slug>`; `ab pause --all` / `ab resume --all`
340
352
  hold and release the whole repository. Pause immediately interrupts live agent
341
353
  sessions and acknowledges after they stop. Resume continues the same native
@@ -343,7 +355,7 @@ Read events with a cursor or a small `--events` count; logs are long.
343
355
  reason recorded in session.resume-fallback. Without a live agent (including
344
356
  check-only verify), pause still takes effect at the next boundary. A paused
345
357
  build holds no slot once the pause is acknowledged; resumed, it waits for a
346
- slot ahead of normal ticket claims like an answered build.
358
+ slot ahead of ticket claims at its level like an answered build.
347
359
  - `ab abort <slug> [--to triage|ready] [--reason <text>]` — destructive:
348
360
  closes the PR, removes branches, and hands the ticket back to triage by
349
361
  default. To send back a build that waits on other work, use
@@ -369,13 +381,14 @@ Read events with a cursor or a small `--events` count; logs are long.
369
381
  blocked one), merged or closed PRs (file a new ticket), and pending abort or
370
382
  discard. Re-run `ab reopen` with the same arguments after an interrupted spec
371
383
  reopen; it completes the recorded one.
372
- - `ab start <ticket-id> [--priority manual|urgent|normal] [--cancel]` — ask
384
+ - `ab start <ticket-id> [--priority manual|urgent|high|normal|low] [--cancel]` — ask
373
385
  the running dispatcher to claim one ticket on its next tick with a free slot,
374
386
  even while intake is off or open-PR backpressure is engaged, and no other.
375
- The default `manual` priority goes ahead of all waiting work, urgent included;
376
- choose `urgent` when urgent waiting builds should still go first (the build
377
- is then urgent), or `normal` when the ticket should wait behind normal
378
- waiting builds and urgent tickets. Repeating it with another priority
387
+ The default `manual` priority goes ahead of all waiting work, urgent included,
388
+ and the build takes its ticket's level. Choose a level (`urgent`, `high`,
389
+ `normal` or `low`) when waiting builds at that level or above, and
390
+ higher-level tickets, should still go first; the build then takes that
391
+ level. Repeating it with another priority
379
392
  updates the pending request. Use it to work a backlog one ticket at a time, or to run a single fix,
380
393
  instead of turning intake on or moving other tickets out of ready. Every gate
381
394
  still applies (ready state, spec standard, resolved blockers, no active
@@ -433,27 +446,30 @@ filed from a forge issue carries it with `--issues N` (`closes`), or
433
446
  ticket into the ready state sends it to dispatch — do that only when the
434
447
  ticket genuinely conforms and the human's intent is clear.
435
448
 
436
- The dispatcher claims urgent ready tickets before normal ones, each in source
437
- order, and ahead of normal builds waiting for a slot to re-verify, reconcile or
438
- resume. To expedite a ticket, such as a fix for a stuck build, mark it urgent
439
- with `--priority urgent` on create or update; never move other ready tickets
440
- out of ready to make room. A claimed ticket's priority becomes its build's,
441
- except that an optimization node's attempts claim at the node's current
442
- priority; a claimed attempt keeps its own.
449
+ Ticket priority is `urgent`, `high`, `normal` (the default) or `low`. The
450
+ dispatcher claims ready tickets by level, urgent first and low last, each
451
+ level in source order and ahead of lower-level builds waiting for a slot to
452
+ re-verify, reconcile or resume. To expedite a ticket, such as a fix for a
453
+ stuck build, mark it `urgent` (an emergency) or `high` (ahead of routine work)
454
+ with `--priority` on create or update; mark background work `low`. Never move
455
+ other ready tickets out of ready to make room. A build takes its ticket's
456
+ level, except that an optimization node's attempts claim at the node's
457
+ current level; a claimed attempt keeps its own.
443
458
  To expedite a build that already exists — a waiting reconcile or re-verify
444
- that now blocks other work — run `ab priority <slug> urgent` (MCP:
459
+ that now blocks other work — run `ab priority <slug> urgent` or `high` (MCP:
445
460
  `builds.control` with action `priority` and `priority: "urgent"`); `normal`
446
- returns it to normal order. Free slots go to `manual` start requests, urgent
447
- waiting work, urgent tickets (urgent start requests first), normal waiting
448
- work, then normal tickets (normal start requests first); an `ab start`
449
- request goes ahead per its tier. Urgency never preempts a
450
- running build, and a blocked urgent ticket still waits on its blockers. A
451
- source that cannot store priority refuses `urgent` and names itself; tell the
452
- human.
461
+ returns it to normal order and `low` defers it. Free slots go to `manual`
462
+ start requests, then for each level from urgent to low, that level's waiting
463
+ work, then its start requests and ready tickets; an `ab start` request goes
464
+ ahead per its tier. Priority never preempts a running build, and a blocked
465
+ ticket still waits on its blockers. A
466
+ priority refusal comes only from a hosted service too old to store the
467
+ level; tell the human.
453
468
 
454
469
  When ready tickets sit unclaimed with free slots, check
455
470
  `capacity.backpressure` in `ab repository status --json`. While `active` is
456
- true, `[policy].maxOpenPrs` open-PR backpressure is pausing normal claims
471
+ true, `[policy].maxOpenPrs` open-PR backpressure is pausing claims of
472
+ `high`, `normal` and `low` tickets
457
473
  until the open root PR count drains to `resumeOpenPrs` (below `maxOpenPrs`
458
474
  when the two are equal); urgent tickets still dispatch. Relieve it by getting PRs merged or closed (or, where the repository
459
475
  sets `excludeHeldOpenPrs`, by holding them), not by raising `capacity`.
@@ -547,7 +563,9 @@ external harness belongs to that harness. Protocol session approval answers are
547
563
  ### Each round
548
564
 
549
565
  Begin every operator round with `repository.attention`. One call returns
550
- everything waiting on you: blocked builds with their open escalation questions,
566
+ everything waiting on you: blocked builds with their open escalation questions
567
+ (including done builds with an open escalation, which `builds.answer`
568
+ acknowledges while the build stays done),
551
569
  merges awaiting consent or held, repository attention events after your cursor,
552
570
  builds paused, stalled or failing verification, and dispatcher attention. Each
553
571
  item's `resolve` names the tool call that acts on it, primary first; `by:
@@ -595,7 +613,9 @@ that does the job, and say what you are doing before you do it:
595
613
  verifies; leaves require an escalation and restart from plan after any unfinished reconcile
596
614
  resumes under the revised spec and its publication is confirmed. Answering a
597
615
  ticket wait's escalation ends the wait early; the dispatcher ends it when its
598
- tickets complete.
616
+ tickets complete. On a done build it only acknowledges open escalations
617
+ (guidance or retry, for example a post-landing integration audit), leaving the
618
+ build done; other resolutions are refused.
599
619
  - `builds.reopen` — send a finished, unmerged leaf back with `feedback`, a spec
600
620
  `revision` (`{origin: "body" | "ticket", body}`, destructive — it replaces the
601
621
  spec), or both, exactly as `ab reopen` does. Feedback returns to implement; a
@@ -610,14 +630,16 @@ that does the job, and say what you are doing before you do it:
610
630
  - `tickets.create` — file a new ticket from a conversation. A ticket filed
611
631
  from a forge issue carries it in `issueLinks` as `{issue}` (intent `closes`,
612
632
  the default) or `{issue, intent: "refs"}` when the work only partly
613
- addresses it. `priority: "urgent"` dispatches it before normal ready work
614
- and normal waiting builds. Its `labels` are unioned with the repository's
633
+ addresses it. `priority` is `urgent`, `high`, `normal` (the default) or
634
+ `low`; ready work dispatches by level, urgent first, each level ahead of
635
+ lower-level waiting builds. Its `labels` are unioned with the repository's
615
636
  `[tickets].createLabels`, and harvest proposals carry them too.
616
637
  - `tickets.update`, `tickets.block`, `tickets.unblock` — edit fields and
617
638
  blocker relations. `issueLinks` on update replaces the whole set;
618
- `priority` (`urgent` or `normal`) expedites a ticket instead of moving other
619
- ready tickets aside, and a source that cannot store it refuses `urgent` with
620
- `code: "priority-unsupported"`.
639
+ `priority` (`urgent`, `high`, `normal` or `low`; omitted leaves it alone)
640
+ expedites a ticket instead of moving other ready tickets aside. Any other
641
+ value is refused. `code: "priority-unsupported"` comes only from a hosted
642
+ service, or a raw source, that cannot store the level.
621
643
  - `tickets.move` — move a ticket between workflow states, by native `state`
622
644
  or by lifecycle `role` (`triage`, `ready`, `backlog`, `rejected`; give
623
645
  exactly one). Use `role` for deferring and declining work, with the same
@@ -626,7 +648,7 @@ that does the job, and say what you are doing before you do it:
626
648
  genuinely conforms and the human's intent is clear.
627
649
  - `tickets.start` — ask the running dispatcher to start one ticket even while
628
650
  intake is off, as `ab start` does, with optional `priority` (`manual` by
629
- default, `urgent` or `normal`, chosen as for `ab start`); `cancel: true`
651
+ default, or `urgent`, `high`, `normal` or `low`, chosen as for `ab start`); `cancel: true`
630
652
  withdraws a pending request. The outcome arrives as `ticket.start-settled` in `repository.events`.
631
653
  - `tickets.asset.attach`, `tickets.asset.get`, `tickets.asset.remove` — attach,
632
654
  read and remove ticket assets with base64 bytes, as `ab ticket attach`,
@@ -722,9 +744,9 @@ Treat every default-watch record as a call to act:
722
744
  dispatcher.
723
745
  - Dispatcher loss, abnormal stop, restart-required reload, rejected config, or
724
746
  persistent tick failure: diagnose through repository status and report the
725
- condition to the human. Repository read failures fail the watch tick and
726
- retry on the next tick, using the existing five-minute persistent-failure
727
- attention. For validation failures, inspect the stored tick error for reducer,
747
+ condition to the human. Repository read failures and exhausted transient
748
+ store or ticket-service failures fail the tick and retry on the next tick,
749
+ using the existing five-minute persistent-failure attention. For validation failures, inspect the stored tick error for reducer,
728
750
  scope, cursor, field path, and running version/commit. Follow the ownership rules below before considering a new dispatcher.
729
751
  - Persistent source degradation: inspect the source cause and reset evidence,
730
752
  diagnose and report the continuing intake problem.
@@ -867,10 +889,10 @@ verification receipts and node children/completeness. Unknown completeness is
867
889
  not zero children. A changed head or parent must regain current verification;
868
890
  unfinished or automatically authorized candidates do not ask for attention.
869
891
  Queued and held candidates hold no capacity slot; one that must re-verify or
870
- reconcile waits for a slot ahead of normal ticket claims (urgent work first), so
892
+ reconcile waits for a slot ahead of ticket claims at its level (higher levels first), so
871
893
  a full repository delays it without failing it. A build waiting on other
872
894
  tickets, paused, or blocked on a question with nothing still working on it
873
- holds no slot either, and takes one ahead of normal claims once its wait ends.
895
+ holds no slot either, and takes one ahead of claims at its level once its wait ends.
874
896
 
875
897
  Select a queue build in the terminal and use `l merge` or `o hold`, or run
876
898
  `ab merge <slug>` / `ab hold <slug>`. MCP uses `builds.control` with action `merge`
@@ -888,18 +910,22 @@ the rejected role no longer does. When integration
888
910
  verification fails, file a repair child targeting that node and let it merge
889
911
  before retrying the node cycle.
890
912
 
891
- Watch for decisions and conflicts with `ab watch --operator --json`; save its opaque cursor
913
+ Watch for decisions and escalations with `ab watch --operator --json`; save its opaque cursor
892
914
  and resume with `ab watch --operator --since <watch-cursor> --json`. On
893
915
  `cursor-too-old`, re-arm without `--since`, reconcile status and acknowledge the
894
916
  unavailable historical gap. Default attention includes
895
- failed node verification (`integration.verification-failed`), node merges, node item conflicts, conflicted leaf replays, revoked protected consent (`landing.consent-revoked`), failing forge CI on a finished leaf (`pr.checks-failed`), optimization noise above ε (`optimization.noise-exceeded`) and derived
917
+ failed node verification (`integration.verification-failed`), node merges, revoked protected consent (`landing.consent-revoked`), failing forge CI on a finished leaf (`pr.checks-failed`), optimization noise above ε (`optimization.noise-exceeded`) and derived
896
918
  `build.consent-ready` observations, including already-ready merges on first
897
919
  repository-wide discovery. Readiness is identified by its durable
898
920
  entry position: resuming suppresses the same episode, while a new candidate or
899
921
  exit/re-entry can notify again. Explicit `--event` globs remain event-only.
922
+ Routine restack conflicts (node item conflicts, conflicted leaf replays) are
923
+ resolved automatically and stay silent; an unresolvable one arrives as an
924
+ escalation or `landing.consent-revoked`. Follow them explicitly with
925
+ `--event restack.replayed` or `--event node.item-conflicted`.
900
926
  Use `ab wait --for consent --for node-merged --for restack-conflicted --json`
901
927
  for one wake; state waits return immediately when already satisfied. `--for
902
- attention` also includes current failed node verification, consent readiness, janitor failure attention, an open janitor escalation and merge/conflict attention.
928
+ attention` also includes current failed node verification, consent readiness, janitor failure attention, an open janitor escalation and merge attention.
903
929
  Resume event backlogs with `--since <cursor>`; keep handling emitted records
904
930
  before interpreting terminal completion.
905
931
 
@@ -926,7 +952,7 @@ first tick after every named ticket completes, with no answer needed, and a
926
952
  wait with some tickets still open stays in place. Answer sooner only when the
927
953
  needed work landed another way or the wait is mistaken; any answer ends the
928
954
  wait early. Either way the build then waits as a `resume` request and takes a
929
- slot ahead of normal ticket claims (urgent work first). If its target moved, it first restacks onto the
955
+ slot ahead of ticket claims at its level (higher levels first). If its target moved, it first restacks onto the
930
956
  target's current head, so the resumed phase sees the merged blockers;
931
957
  `ab build status` shows a `restack:` line with trigger `wait-resume`, and a
932
958
  conflicting restack shows as `reconcile` before the phase resumes (a conflict
@@ -1012,9 +1038,9 @@ when to stop, and landing the result.
1012
1038
  The dispatcher applies the change on its next tick, with no replanning and
1013
1039
  running attempts untouched. Lowering the threshold to the current value, or a
1014
1040
  budget to what is already spent, stops the node on that tick.
1015
- - **Speed up its attempts** with `ab priority <node> urgent`: attempts claimed
1016
- afterwards take the urgent tier. No slot is reserved and nothing running is
1017
- preempted; attempts already claimed keep their priority.
1041
+ - **Speed up or defer its attempts** with `ab priority <node> urgent|high|normal|low`:
1042
+ attempts claimed afterwards take that level. No slot is reserved and nothing
1043
+ running is preempted; attempts already claimed keep their level.
1018
1044
  - **Stop it** with `ab objective <node> --stop` to take the progress so far.
1019
1045
  Without a flag the objective's stop mode applies, `abort` unless the objective
1020
1046
  says otherwise. `--stop --abort` cancels queued attempts and aborts running
@@ -1054,6 +1080,11 @@ required by proven history. This reconstruction consumes no infrastructure
1054
1080
  attempt and no additional conflict occurrence; it needs no operator guidance.
1055
1081
  A bare retry also clears an existing infrastructure-limit escalation through
1056
1082
  ordinary retry semantics. Unavailable inspection defers rather than proving loss.
1083
+ An infrastructure-limit escalation that says `at step resume` usually means a
1084
+ slow cold resume of a stopped sandbox: retry, or suggest raising
1085
+ `recoveryTimeoutMs` within the hosted invocation budget. `at step fence` or
1086
+ `at step cleanup` points at sandbox or provider state worth checking before a
1087
+ retry; `at step preserve` at the checkout, forge credentials or branch.
1057
1088
 
1058
1089
  Leaf restack and reconcile publication retry classified transient forge or transport
1059
1090
  failures six times after the initial attempt, waiting 30, 60, 120, 240, 300 and
@@ -124,9 +124,10 @@ verdict.
124
124
  If the approved selection later names any step absent from the cycle's pinned
125
125
  configured universe, the entire selection falls back to all configured optional
126
126
  steps. The kernel records one observation per cycle and plan revision naming
127
- the unknown steps. Mandatory steps, path applicability and post-reconcile policy
128
- still apply. A valid selection continues to skip genuinely omitted optional
129
- steps. Strict validation when depositing a new plan is unchanged.
127
+ the unknown steps. Mandatory steps, path applicability and post-reconcile and
128
+ clean-restack policies still apply. A valid selection continues to skip
129
+ genuinely omitted optional steps. Strict validation when depositing a new plan
130
+ is unchanged.
130
131
 
131
132
  ## What a plan contains
132
133