@defrex/autobuild 1.4.2 → 1.6.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 (218) hide show
  1. package/README.md +1 -1
  2. package/SPEC.md +512 -101
  3. package/bin/ab-dispatch-kernel.ts +1 -0
  4. package/docs/accounts.md +9 -0
  5. package/docs/agent-runtimes.md +1 -0
  6. package/docs/answering-blocked-builds.md +7 -3
  7. package/docs/architecture.md +313 -130
  8. package/docs/assets/headline-wide.png +0 -0
  9. package/docs/build-store.md +33 -3
  10. package/docs/cli.md +2 -1
  11. package/docs/configuration-overview.md +9 -0
  12. package/docs/configuration.md +217 -106
  13. package/docs/dispatcher-hosting.md +19 -3
  14. package/docs/dispatcher.md +11 -6
  15. package/docs/glossary.md +1 -1
  16. package/docs/integration-overview.md +2 -2
  17. package/docs/integration-tree.md +91 -28
  18. package/docs/merge-policy.md +28 -9
  19. package/docs/operating.md +1 -1
  20. package/docs/operator-api.md +57 -20
  21. package/docs/operator-surfaces.md +1 -1
  22. package/docs/plugin-authoring.md +89 -8
  23. package/docs/remote-store-protocol.md +39 -11
  24. package/docs/remote-ticket-protocol.md +126 -12
  25. package/docs/restacking.md +24 -6
  26. package/docs/seams.md +2 -2
  27. package/docs/setup.md +19 -13
  28. package/docs/spec-standard.md +2 -1
  29. package/docs/ticket-dependencies.md +26 -8
  30. package/docs/ticket-migration.md +70 -7
  31. package/docs/ticket-sources.md +82 -5
  32. package/docs/tickets.md +34 -2
  33. package/docs/troubleshooting.md +3 -3
  34. package/docs/verification.md +5 -5
  35. package/docs/website.md +8 -0
  36. package/docs/workspaces.md +1 -1
  37. package/package.json +4 -3
  38. package/packages/core/src/accounts/hosted-readiness.ts +21 -0
  39. package/packages/core/src/cli/attention.ts +3 -0
  40. package/packages/core/src/cli/build-control.ts +36 -12
  41. package/packages/core/src/cli/connect.ts +9 -18
  42. package/packages/core/src/cli/context.ts +44 -0
  43. package/packages/core/src/cli/dashboard/configuration.ts +11 -0
  44. package/packages/core/src/cli/dashboard/model.ts +51 -11
  45. package/packages/core/src/cli/dashboard/poll.ts +14 -0
  46. package/packages/core/src/cli/dashboard/queue.ts +21 -0
  47. package/packages/core/src/cli/dashboard/render.ts +43 -22
  48. package/packages/core/src/cli/dispatch-frontend.ts +63 -30
  49. package/packages/core/src/cli/dispatch-mode.ts +35 -16
  50. package/packages/core/src/cli/dispatch-preflight.ts +4 -1
  51. package/packages/core/src/cli/dispatch-repository-feed.ts +40 -11
  52. package/packages/core/src/cli/dispatch-tickets.ts +47 -0
  53. package/packages/core/src/cli/dispatch-upgrade-controller.ts +3 -0
  54. package/packages/core/src/cli/dispatch.ts +522 -145
  55. package/packages/core/src/cli/help.ts +63 -24
  56. package/packages/core/src/cli/init-hosted-accounts.ts +54 -0
  57. package/packages/core/src/cli/init-readiness-remote.ts +16 -3
  58. package/packages/core/src/cli/init-validation.ts +144 -42
  59. package/packages/core/src/cli/issue-links.ts +67 -0
  60. package/packages/core/src/cli/main.ts +32 -15
  61. package/packages/core/src/cli/pr-summary-publication.ts +38 -7
  62. package/packages/core/src/cli/publication-settlement.ts +36 -24
  63. package/packages/core/src/cli/repo-lease.ts +225 -0
  64. package/packages/core/src/cli/repository-status.ts +203 -49
  65. package/packages/core/src/cli/status.ts +42 -4
  66. package/packages/core/src/cli/terminals.ts +37 -2
  67. package/packages/core/src/cli/ticket-editor.ts +20 -6
  68. package/packages/core/src/cli/ticket.ts +264 -46
  69. package/packages/core/src/cli/triage-count-sampler.ts +59 -0
  70. package/packages/core/src/cli/wait.ts +4 -1
  71. package/packages/core/src/cli/watch.ts +19 -4
  72. package/packages/core/src/config/live.ts +45 -4
  73. package/packages/core/src/config/load.ts +9 -0
  74. package/packages/core/src/config/pipeline-source.ts +6 -2
  75. package/packages/core/src/config/ready-assignee.ts +86 -0
  76. package/packages/core/src/config/schema.ts +202 -38
  77. package/packages/core/src/distribution-packaging.ts +1 -1
  78. package/packages/core/src/events/catalog.ts +7 -0
  79. package/packages/core/src/events/compatibility.ts +2 -1
  80. package/packages/core/src/events/payloads.ts +85 -0
  81. package/packages/core/src/events/policy.ts +10 -0
  82. package/packages/core/src/events/repository.ts +93 -28
  83. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +237 -230
  84. package/packages/core/src/kernel/build-identity.ts +12 -0
  85. package/packages/core/src/kernel/change-presence.ts +139 -6
  86. package/packages/core/src/kernel/dispatch-capacity.ts +189 -19
  87. package/packages/core/src/kernel/dispatch-status.ts +10 -1
  88. package/packages/core/src/kernel/dispatch-upgrade.ts +104 -5
  89. package/packages/core/src/kernel/engine.ts +17 -8
  90. package/packages/core/src/kernel/finalize-pr-rejection.ts +95 -0
  91. package/packages/core/src/kernel/generators/build-log.ts +9 -0
  92. package/packages/core/src/kernel/generators/repository-journals.ts +15 -1
  93. package/packages/core/src/kernel/harvest.ts +4 -1
  94. package/packages/core/src/kernel/incremental-fixtures.ts +1 -0
  95. package/packages/core/src/kernel/integration-completeness.ts +104 -17
  96. package/packages/core/src/kernel/integration-landing.ts +17 -0
  97. package/packages/core/src/kernel/integration-state.ts +17 -0
  98. package/packages/core/src/kernel/issue-keywords.ts +202 -0
  99. package/packages/core/src/kernel/janitor-failure.ts +96 -5
  100. package/packages/core/src/kernel/kernel-git.ts +87 -0
  101. package/packages/core/src/kernel/landing-readiness.ts +25 -17
  102. package/packages/core/src/kernel/leaf-restack-state.ts +4 -2
  103. package/packages/core/src/kernel/log-index.ts +1 -1
  104. package/packages/core/src/kernel/node-issue-links.ts +142 -0
  105. package/packages/core/src/kernel/node-landing.ts +2 -1
  106. package/packages/core/src/kernel/node-parent.ts +6 -0
  107. package/packages/core/src/kernel/node-restack-transaction.ts +2 -0
  108. package/packages/core/src/kernel/pr-summary.ts +24 -0
  109. package/packages/core/src/kernel/read-deferrals.ts +75 -12
  110. package/packages/core/src/kernel/read-facts.ts +32 -1
  111. package/packages/core/src/kernel/reconcile-restack.ts +1 -1
  112. package/packages/core/src/kernel/reducer-registry.ts +37 -2
  113. package/packages/core/src/kernel/reducer.ts +147 -5
  114. package/packages/core/src/kernel/ticket-preparation.ts +16 -0
  115. package/packages/core/src/kernel/verify-budget.ts +43 -0
  116. package/packages/core/src/operator/index.ts +3 -1
  117. package/packages/core/src/operator/presentation.ts +3 -0
  118. package/packages/core/src/operator/protocol.ts +38 -2
  119. package/packages/core/src/operator/query.ts +69 -29
  120. package/packages/core/src/operator/registry.ts +47 -26
  121. package/packages/core/src/operator/tickets.ts +77 -10
  122. package/packages/core/src/plugin-sdk/index.ts +13 -0
  123. package/packages/core/src/plugins/manifest.ts +1 -1
  124. package/packages/core/src/plugins/registry.ts +1 -0
  125. package/packages/core/src/ports/forge/contract.ts +69 -0
  126. package/packages/core/src/ports/forge/create.ts +5 -0
  127. package/packages/core/src/ports/forge/fake.ts +184 -3
  128. package/packages/core/src/ports/forge/git-rewrite.ts +4 -2
  129. package/packages/core/src/ports/forge/github.ts +175 -38
  130. package/packages/core/src/ports/forge/local-git.ts +14 -0
  131. package/packages/core/src/ports/forge/readiness.ts +10 -0
  132. package/packages/core/src/ports/forge-failure.ts +43 -0
  133. package/packages/core/src/ports/runner/claude.ts +7 -1
  134. package/packages/core/src/ports/runner/codex.ts +7 -2
  135. package/packages/core/src/ports/runner/native-cli-fixture.ts +2 -1
  136. package/packages/core/src/ports/runner/pi.ts +7 -1
  137. package/packages/core/src/ports/runner/runtime.ts +3 -0
  138. package/packages/core/src/ports/runner/start-prompt.ts +37 -0
  139. package/packages/core/src/ports/tickets/contract.ts +320 -7
  140. package/packages/core/src/ports/tickets/create.ts +89 -20
  141. package/packages/core/src/ports/tickets/fake.ts +18 -0
  142. package/packages/core/src/ports/tickets/file-codec.ts +20 -0
  143. package/packages/core/src/ports/tickets/file.ts +43 -1
  144. package/packages/core/src/ports/tickets/github-fake.ts +1123 -0
  145. package/packages/core/src/ports/tickets/github-issues.ts +431 -0
  146. package/packages/core/src/ports/tickets/github-validators.ts +194 -0
  147. package/packages/core/src/ports/tickets/github.ts +2029 -0
  148. package/packages/core/src/ports/tickets/hosted-index.ts +34 -3
  149. package/packages/core/src/ports/tickets/issue-links.ts +86 -0
  150. package/packages/core/src/ports/tickets/lifecycle.ts +60 -4
  151. package/packages/core/src/ports/tickets/linear.ts +66 -6
  152. package/packages/core/src/ports/tickets/migration.ts +290 -68
  153. package/packages/core/src/ports/tickets/operations.ts +98 -12
  154. package/packages/core/src/ports/tickets/priority.ts +55 -0
  155. package/packages/core/src/ports/tickets/remote-protocol.ts +195 -29
  156. package/packages/core/src/ports/tickets/remote.ts +188 -13
  157. package/packages/core/src/ports/tickets/revision.ts +22 -1
  158. package/packages/core/src/ports/tickets/states.ts +43 -0
  159. package/packages/core/src/ports/tickets/tree.ts +58 -12
  160. package/packages/core/src/ports/tickets/update.ts +12 -2
  161. package/packages/core/src/ports/types.ts +194 -9
  162. package/packages/core/src/ports/workspace/commit-preservation.ts +163 -25
  163. package/packages/core/src/ports/workspace/git-worktree.ts +6 -2
  164. package/packages/core/src/ports/workspace/harvest-execution.ts +4 -2
  165. package/packages/core/src/ports/workspace/vercel-sandbox.ts +121 -27
  166. package/packages/core/src/processes/build-runner.ts +101 -22
  167. package/packages/core/src/processes/dispatcher.ts +1046 -372
  168. package/packages/core/src/processes/execution-no-progress.ts +7 -0
  169. package/packages/core/src/processes/harvest-child.ts +4 -2
  170. package/packages/core/src/processes/harvest-execution-state.ts +104 -0
  171. package/packages/core/src/processes/harvest-runner.ts +263 -25
  172. package/packages/core/src/processes/harvest.ts +5 -8
  173. package/packages/core/src/processes/tick-publication.ts +12 -2
  174. package/packages/core/src/processes/ticket-scan-schedule.ts +78 -0
  175. package/packages/core/src/processes/workspace-preservation.ts +36 -1
  176. package/packages/core/src/runtime-identity.ts +10 -2
  177. package/packages/core/src/scenarios/harness.ts +149 -35
  178. package/packages/core/src/store/adapter.ts +7 -1
  179. package/packages/core/src/store/contract.ts +83 -2
  180. package/packages/core/src/store/digest.ts +32 -1
  181. package/packages/core/src/store/reduced-reads.ts +10 -0
  182. package/packages/core/src/store/reducer-value-shapes.json +4471 -3427
  183. package/packages/core/src/store/remote/protocol.ts +2 -0
  184. package/packages/core/src/store/remote/released-clients.json +22 -0
  185. package/packages/core/src/store/remote/released-reducer-values/1.5.0.json +26924 -0
  186. package/packages/core/src/store/remote/released-reducer-values/1.6.0.json +27173 -0
  187. package/packages/core/src/store/remote/released-reducer-values/index.ts +4 -0
  188. package/packages/core/src/store/repo-state-events.ts +2 -0
  189. package/packages/core/src/store/types.ts +5 -0
  190. package/packages/core/src/testing/dispatch-read-budget.ts +729 -123
  191. package/packages/core/src/testing/index.ts +18 -1
  192. package/packages/core/src/testing/presence-history.ts +79 -0
  193. package/packages/core/src/testing/reduced-read-budget.ts +1424 -33
  194. package/packages/core/src/testing/upgrade-generations.ts +77 -0
  195. package/skills/code-review/SKILL.md +4 -3
  196. package/skills/finalize/SKILL.md +18 -2
  197. package/skills/guide/SKILL.md +417 -143
  198. package/skills/guide/references/accounts.md +9 -0
  199. package/skills/guide/references/integration-tree.md +91 -28
  200. package/skills/guide/references/merge-policy.md +28 -9
  201. package/skills/guide/references/operator-api.md +57 -20
  202. package/skills/guide/references/plugin-authoring.md +89 -8
  203. package/skills/guide/references/remote-store-protocol.md +39 -11
  204. package/skills/guide/references/remote-ticket-protocol.md +126 -12
  205. package/skills/guide/references/restacking.md +24 -6
  206. package/skills/guide/references/setup.md +19 -13
  207. package/skills/guide/references/spec-standard.md +2 -1
  208. package/skills/guide/references/ticket-dependencies.md +26 -8
  209. package/skills/guide/references/ticket-migration.md +70 -7
  210. package/skills/harvest-review/SKILL.md +4 -3
  211. package/skills/implement/SKILL.md +20 -1
  212. package/skills/operate/SKILL.md +149 -35
  213. package/skills/plan/SKILL.md +1 -1
  214. package/skills/reconcile/SKILL.md +5 -4
  215. package/skills/spec/SKILL.md +15 -2
  216. package/skills/tickets/SKILL.md +116 -37
  217. package/templates/autobuild.toml +5 -0
  218. package/templates/hosted-service/package.json +2 -2
@@ -372,7 +372,7 @@ it to exist. An unknown build returns `404 not-found`.
372
372
 
373
373
  | BuildStore operation | HTTP route | Request | Success |
374
374
  |---|---|---|---|
375
- | `createBuild` | `POST /builds` | `{slug: string, repo: string, repoOrigin?: string, ticket?: TicketRef, branch?: string, created?: event write}`; `slug`, `repo`, and a supplied `branch` are nonempty. `created`, when present, must be a valid `build.created` write; the server appends it as seq 1 atomically with the record (both exist or neither), and an invalid one is `422` with nothing created | `201` + authoritative `BuildRecord`; project credentials receive a fresh random-suffixed slug and matching branch. Owner admin/open mode keeps exact-slug semantics with `409 conflict` for duplicates |
375
+ | `createBuild` | `POST /builds` | `{slug: string, repo: string, repoOrigin?: string, ticket?: TicketRef, branch?: string, created?: event write}`; `slug`, `repo`, and a supplied `branch` are nonempty. `created`, when present, must be a valid `build.created` write; the server appends it as seq 1 atomically with the record (both exist or neither), and an invalid one is `422` with nothing created | `201` + authoritative `BuildRecord`; project credentials receive a fresh random-suffixed slug and a branch in the build kind's namespace (`ab/<slug>`, or `ab-node/<slug>` for a node); a supplied `branch` must be `ab/<requested slug>` or `ab-node/<requested slug>` agreeing with the `build.created` kind, otherwise `400 validation`. Owner admin/open mode keeps exact-slug semantics with `409 conflict` for duplicates |
376
376
  | `listBuilds` | `GET /builds` | none | `200` + `BuildRecord[]`, filtered by the server to the credential project; owner admin may list all projects. List order is unspecified |
377
377
  | `getBuild` | `GET /builds/{slug}` | none | `200` + `BuildRecord`; absent is `404` (the shipped client maps this to `null`) |
378
378
  | `append` | `POST /builds/{slug}/events` | event write | `201` + build event envelope |
@@ -529,7 +529,7 @@ client version window are unchanged.
529
529
  | Scope | Reducers with no arguments |
530
530
  | --- | --- |
531
531
  | Build | `executionNoProgress`, `summaryRequests`, `build`, `buildDigest`, `currentPrAttachments`, `pendingPrAttachmentReclaims`, `openExecution`, `lastExecutionOutcome`, `infrastructureFailureReset`, `openWorkspace`, `setupStreak`, `openBuildWorkspace`, `currentDeferralObservation`, `dashboardFacts`, `pinnedAssets`, `buildDelegation` |
532
- | Repository | `dispatchPlacement`, `ticketPreparation`, `harvest`, `dispatchSettings`, `sandboxStates`, `openHarvestExecutions`, `autoMergeDefault`, `effectiveConfig`, `harvestDelegation` |
532
+ | Repository | `dispatchPlacement`, `ticketPreparation`, `harvest`, `dispatchSettings`, `sandboxStates`, `openHarvestExecutions`, `hostedHarvestAuthority`, `autoMergeDefault`, `effectiveConfig`, `harvestDelegation` |
533
533
 
534
534
  | Reducer | Scope | Required arguments |
535
535
  | --- | --- | --- |
@@ -542,7 +542,12 @@ another's accumulator. `effectiveConfig` returns an object with optional `run`
542
542
  and `reference: {kind, rev}`. Absence is distinct from an unreadable referenced
543
543
  artifact. Delegation values contain semantic lifecycle facts indexed by prefixed
544
544
  identifiers, not authorization decisions; request time and grace expiry are
545
- always evaluated against those facts on the service.
545
+ always evaluated against those facts on the service. `hostedHarvestAuthority`
546
+ returns `{current?: {execution, run, leaseHolder, released}}`: the latest
547
+ `harvest.execution.authorized` and whether that execution has since ended or
548
+ been released. Its size does not grow with harvest history; a hosted harvest
549
+ guest re-reads it at durable boundaries to decide whether it still holds
550
+ authority, and a server that does not serve it stops the guest.
546
551
 
547
552
  Each remaining registered reducer is explicitly excluded:
548
553
 
@@ -687,7 +692,7 @@ seconds (the stream/session wait ceiling) and 25 seconds. A held request's authe
687
692
  are identical to the immediate form: a `401`, `403`, or `409` identity failure
688
693
  is answered immediately, never held.
689
694
 
690
- The parameter is purely additive in the version it merged in (protocol `2`,
695
+ The parameter is purely additive in the protocol version that introduced it (protocol `2`,
691
696
  where the event-wait rules were introduced): a server
692
697
  that ignores `wait` remains conforming — its immediate empty answers only raise
693
698
  the client's request rate — and a client that sends `wait` to such a server
@@ -748,7 +753,8 @@ from one build's log:
748
753
  "head": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
749
754
  "base": "cccccccccccccccccccccccccccccccccccccccc",
750
755
  "identities": ["build:child"]
751
- }
756
+ },
757
+ "nodeTargets": ["ab-node-auth"] // node builds the build's target or parent moves ever named, sorted; [] when none
752
758
  }
753
759
  ```
754
760
 
@@ -759,6 +765,16 @@ recording or recovering a contribution advances `readinessChangeSeq`. These
759
765
  members are additive: older peers can omit them, leaving presence unproven rather
760
766
  than substituting source completion. They do not change the protocol version.
761
767
 
768
+ `nodeTargets` lists every node build named by the build's `build.created`
769
+ target or by either side of a `node.parent-requested` or
770
+ `node.parent-accepted` move. The set only grows, so it is a superset of the
771
+ nodes the build relates to, and a dispatcher finds a node's child builds from
772
+ digests, reading full facts only for builds that name that node. Current
773
+ services always send it, possibly empty. The field is additive and keeps the
774
+ protocol version: older clients ignore it. A client that needs it and gets an
775
+ answer without it, from an older service, fails with a typed error instead of
776
+ reading each build's facts.
777
+
762
778
  The digest is derived from the event log on every call — the server persists
763
779
  nothing and there is no refresh step. Protocol version `3` reshaped the
764
780
  digest's `observations` from bare sequence numbers to `{seq, ts}` pairs and
@@ -1110,7 +1126,7 @@ by this rule (their retention belongs to the open archival thread), and open
1110
1126
  streams are never pruned. A read of a stream whose chunks were pruned returns
1111
1127
  no chunks, `status: "closed"`, and the artifact reference.
1112
1128
 
1113
- These additions were purely additive in the version they merged in (protocol
1129
+ These additions were purely additive in the protocol version that introduced them (protocol
1114
1130
  `2`, where the stream routes were introduced), and a
1115
1131
  conforming server implements the stream routes together with this document's
1116
1132
  rules exactly as it does for the event and artifact routes.
@@ -1175,7 +1191,14 @@ streams must also belong to the addressed parent.
1175
1191
 
1176
1192
  `GET /builds` is filtered by the server to the credential's project. Project
1177
1193
  `POST /builds` always allocates a fresh random-suffixed slug from the requested
1178
- base and a matching `ab/<slug>` branch, even when the base is unused. The
1194
+ base, even when the base is unused, and a matching branch in the build kind's
1195
+ namespace: `ab-node/<slug>` when the `build.created` payload has `kind: "node"`,
1196
+ otherwise `ab/<slug>`. Without `created`, a supplied `branch` prefix decides the
1197
+ kind. A supplied `branch` must be exactly `ab/<requested slug>` or
1198
+ `ab-node/<requested slug>` and agree with the `build.created` kind; only its
1199
+ namespace is used. The base (the requested slug's first 60 characters, trailing
1200
+ hyphens removed) must be a kebab build slug. A malformed or conflicting branch,
1201
+ or an invalid base, is `400 validation` with nothing created. The
1179
1202
  returned BuildRecord slug and branch are authoritative for all subsequent
1180
1203
  work. A foreign or missing base returns null on GET; it neither reveals
1181
1204
  collisions nor blocks creation. Owner admin retains exact-slug creation and
@@ -1248,12 +1271,17 @@ or invoke operator APIs. Harvest writes require the exact run in event payloads
1248
1271
  and artifact metadata; artifacts use the harvest kinds. Every artifact in an
1249
1272
  atomic deposit is checked before writing. Harvest streams have an immutable
1250
1273
  `harvest:<run>:<execution>:` label namespace. Addressed streams resolve their actual owner;
1251
- a guessed ID cannot bypass the boundary. Only the runner can heartbeat or re-acquire its exact
1252
- adopted repository lease holder; another current holder still fences it. Recovery acknowledgements remain dispatcher-side.
1274
+ a guessed ID cannot bypass the boundary. A harvest-runner grant may heartbeat or re-acquire
1275
+ only its exact adopted repository lease holder, and another current holder fences those lease
1276
+ calls. That lease permission is not the prepared guest's execution authority: the guest neither
1277
+ heartbeats, reclaims nor releases the invocation lease, so routine `--once` teardown or a
1278
+ successor invocation's lease acquisition alone does not fence it. The guest instead reads
1279
+ `hostedHarvestAuthority` at durable boundaries and stops when its execution authorization is
1280
+ released or replaced, or when that verification fails. Recovery acknowledgements remain dispatcher-side.
1253
1281
 
1254
1282
  Hosted ticket access is gated by grant kind. Build-runner and build-phase grants
1255
- cannot call ticket routes. Harvest-phase grants may call only list-ready, get
1256
- and dependency-states; harvest-runner grants may additionally create proposals.
1283
+ cannot call ticket routes. Harvest-phase grants may call only list-ready,
1284
+ list-targeting, get and dependency-states; harvest-runner grants may additionally create proposals.
1257
1285
  Other ticket mutations require project or admin authority. A denied operation
1258
1286
  returns 403 naming the grant kind and operation before parsing or source construction.
1259
1287
  Ticket admission and repository-keyed assets use the authenticated project;
@@ -99,8 +99,9 @@ The strict request envelope is:
99
99
  loads the project's durable independent ticket policy. Project authority publishes
100
100
  version 1 policy through `POST /tickets/policy`, using the usual context/input
101
101
  envelope. The input contains only `version` and `tickets`: source, teamKey,
102
- readyState, triageState, claimedState, doneState, createState, proposalState and
103
- optional readyLabels. URL, secrets, and pipeline configuration are rejected.
102
+ readyState, triageState, claimedState, doneState, createState, proposalState,
103
+ optional readyLabels, and the optional backlogState and rejectedState roles. URL,
104
+ secrets, and pipeline configuration are rejected.
104
105
  Only project or owner authority can publish. This does not append BuildStore
105
106
  history. Registration removal invalidates policy and grants from that registration.
106
107
 
@@ -114,6 +115,28 @@ State lookup prefers an exact match, then a unique case-insensitive match;
114
115
  unknown or ambiguous names are refused. Lists order configured triage, ready,
115
116
  doing, done first (deduplicated), then other names alphabetically.
116
117
 
118
+ `backlogState` and `rejectedState` have no defaults: an unset role holds no state,
119
+ and a policy that names neither behaves exactly as before. Each must differ,
120
+ case-insensitively, from the ready, claimed, done, triage and proposal states and
121
+ from the other; a publish that overlaps is refused with `400` naming the keys.
122
+ A named role's state is created when missing. Role names match existing states
123
+ case-insensitively, so `backlogState = "icebox"` next to an existing `icebox` (or
124
+ `Icebox`) state creates nothing: that state and its tickets now hold the role.
125
+ Removing a role leaves its state in place as a custom state. Operator and MCP
126
+ ticket tools resolve role moves through these policy names.
127
+
128
+ Clients that understand the roles send `x-autobuild-ticket-policy-roles: 1`. With
129
+ it, a publish is the complete policy, and omitting a role clears it. Without it,
130
+ as from released 1.2–1.4 clients, each omitted role keeps its saved value for the
131
+ same registration, so an older client never erases a newer client's mapping. If
132
+ a kept role would then name the same state as a lifecycle name that publish
133
+ sets, the service keeps the whole saved policy unchanged, answers
134
+ `200 { "ok": true }`, and records a diagnostic naming the colliding keys. A
135
+ policy read (`input: null`) includes the roles only with the header. Every
136
+ `/tickets/*` response, including errors, carries
137
+ `x-autobuild-ticket-policy-roles: 1`; a client publishing a role that receives
138
+ `400` without it reports that the service predates policy roles.
139
+
117
140
  `[tickets] url` selects the ticket service independently of the build store;
118
141
  otherwise the selected remote build store is used. A local build store requires
119
142
  an explicit ticket URL. Credentials are resolved for that selected service.
@@ -129,10 +152,14 @@ AB_TOKEN. Revocation, expiry, parent revocation and registration changes invalid
129
152
  grants. Existing combined-service BuildStore delegation remains supported.
130
153
 
131
154
  The service never contacts Linear or relays external trackers. If the project's
132
- source is Linear, file or another non-hosted source, machine HTTP, operator and
155
+ source is Linear, GitHub, file or another non-hosted source, machine HTTP, operator and
133
156
  MCP ticket surfaces refuse with a message naming that project and source: its
134
157
  tickets live in its own source, accessed directly by its dispatcher. This is a
135
158
  409 conflict, not an empty queue. The dispatcher's direct adapters are unchanged.
159
+ Configuration refusals carry a `code`: `external-ticket-source` for a non-hosted
160
+ source, `no-dispatcher-run` when a project has neither a published ticket policy
161
+ nor any recorded dispatcher run, and `effective-config-unavailable` for other
162
+ missing or unreadable configuration.
136
163
 
137
164
  ## Operations
138
165
 
@@ -142,7 +169,9 @@ The operation names and `input` values are:
142
169
  |---|---|---|
143
170
  | `states` | `{}` | `{name, tickets, about?}[]`, including empty states |
144
171
  | `add-state` | `{name, about?: string}` | `{state: {name,tickets,about?}, created: boolean}` |
172
+ | `state-counts` | `{names: string[]}` (1–16) | `{name, tickets}[]` for the names that resolve |
145
173
  | `list-ready` | `{labels?: string[], state?: string}` | `TicketListing` |
174
+ | `list-targeting` | `{nodeId: string}` | `TicketListing` of every state |
146
175
  | `get` | `{id}` | `Ticket \| null` |
147
176
  | `claim` | `{id}` | `{claimed: boolean}` |
148
177
  | `comment` | `{id, body}` | `{ok: true}` |
@@ -207,8 +236,8 @@ current required resolution fields; domain and storage types are unchanged.
207
236
  Build and harvest runners exchange project authority for signed, project-bound
208
237
  execution and phase credentials through `/credentials/delegate` (see the remote
209
238
  store protocol). Build-runner and build-phase credentials cannot call any ticket
210
- operation. Harvest-phase credentials permit only list-ready, get and
211
- dependency-states. Harvest-runner credentials permit those reads plus create
239
+ operation. Harvest-phase credentials permit only list-ready, list-targeting, get
240
+ and dependency-states. Harvest-runner credentials permit those reads plus create
212
241
  for filing proposals. Claim, comment, transition, update, add-blocker and
213
242
  remove-blocker require project or admin authority; their access is unchanged.
214
243
  Denied delegated calls return 403 with an error naming the grant kind and
@@ -222,6 +251,10 @@ Custom state creation uses `/^[a-z][a-z0-9-]{0,39}$/`; an optional purpose must
222
251
  be one nonblank line. A duplicate in any letter case is refused without
223
252
  changing purpose. `add-state` requires project or owner machine authority;
224
253
  ticket grants and harvest delegations can read states but cannot create them.
254
+ `state-counts` returns bounded per-state totals only, never ticket rows, with
255
+ each name resolved exactly or by one case-insensitive match. It requires project
256
+ or owner authority, not ticket grants or harvest delegations. A source without
257
+ state counts answers 409 conflict, with no listing fallback.
225
258
  Request context cannot supply lifecycle policy or insert another project's
226
259
  states. These operations use the existing wire version and strict envelopes.
227
260
 
@@ -232,13 +265,15 @@ Every ticket read includes an opaque `revision`. Pass it as `expectedRevision`
232
265
  `move`, `block` and `unblock`. A stale write fails without changing anything and
233
266
  reports the current revision. Omission preserves unguarded behavior. Blocker
234
267
  checks cover the entire batch. Dispatcher moves remain unguarded and change the
235
- revision. Sources without guarded writes, including Linear, refuse supplied
236
- revisions rather than ignoring them.
268
+ revision. Sources without guarded writes, including Linear and GitHub, refuse
269
+ supplied revisions rather than ignoring them.
237
270
 
238
271
  `ab ticket edit <id>` opens `$VISUAL`, falling back to `$EDITOR`, using TOML
239
272
  frontmatter and a Markdown body. Only title, body and labels are editable;
240
273
  id, blockers, creation key and reference comments are read-only. It saves only
241
- changed fields with the opening revision. Unchanged or formatting-only edits
274
+ changed fields with the opening revision. Sources without guarded writes,
275
+ including Linear and GitHub, re-read the ticket immediately before an
276
+ unguarded write and refuse a changed revision, with the no-lock race window of file checks. Unchanged or formatting-only edits
242
277
  write nothing. On conflict, invalid input or editor failure, the error names an
243
278
  absolute file path containing the edited text. Read the current ticket and
244
279
  reapply the intended changes before retrying; conflicts are never merged.
@@ -258,7 +293,8 @@ snapshot of fields, blockers and revision.
258
293
 
259
294
  `POST /tickets/mutate-if-revision` accepts the usual authenticated context and
260
295
  `input: { id, expectedRevision, mutation }`. Mutation is one of
261
- `{ kind: "update", patch: { title?, body?, labels?, kind?, target? } }`,
296
+ `{ kind: "update", patch: { title?, body?, labels?, kind?, target?,
297
+ priority?: "urgent" | "normal" } }`,
262
298
  `{ kind: "transition", state }`, or
263
299
  `{ kind: "blockers", operation: "block" | "unblock", ids: string[] }`.
264
300
  Unknown keys and empty patches are refused. Success returns `{ ok: true }`.
@@ -280,8 +316,11 @@ BuildStore protocol version.
280
316
 
281
317
  Create options accept optional `requestedId: string` alongside `state` and
282
318
  `idempotencyKey`. Older clients omit it and responses are unchanged. Unsupported
283
- sources reject supplied ids; Linear is not an import target. File sources keep
284
- filesystem-safe ids exactly and never overwrite an occupied id.
319
+ sources reject supplied ids. Linear is not an import target. GitHub rejects
320
+ supplied ids but is an import target: it allocates every issue number itself and
321
+ import remaps each ticket to the number GitHub returns, as described in the
322
+ migration procedure's GitHub section. File sources keep filesystem-safe ids
323
+ exactly and never overwrite an occupied id.
285
324
 
286
325
  Hosted sources preserve only literal own-team `<teamKey>-<n>` ids, where `n` is a
287
326
  positive canonical decimal within PostgreSQL bigint bounds. For example,
@@ -312,11 +351,86 @@ Effective metadata changes increment the revision; equivalent aliases are no-ops
312
351
  Ticket responses include these fields only with `x-autobuild-ticket-tree: 1`.
313
352
  This capability is independent of revision and comment capabilities and of the
314
353
  client version. Without it, both fields are projected away, preserving historical
315
- strict decoders. Current hosted clients send all three capability headers and
354
+ strict decoders. Current hosted clients send every capability header and
316
355
  default absent kind to `work`. Unfiltered listing includes all ticket states and
317
356
  empty nodes for `ab ticket tree`; dispatch and merge behavior are unchanged.
318
357
 
358
+ ### Targeted listing
359
+
360
+ `list-targeting` returns every ticket in every state whose `target` is exactly
361
+ `nodeId`, equal to unfiltered `list-ready` filtered by target, read through the
362
+ project's target index so its cost follows the node's children rather than the
363
+ project's ticket count. An unknown id returns an empty listing. A backing source
364
+ without targeted listing answers `409` with `code: "targeting-unsupported"`; the
365
+ service never filters a full listing instead. Ticket grants and harvest
366
+ delegations may call it wherever they may call `list-ready`.
367
+
368
+ Every `/tickets/*` response, including errors, carries
369
+ `x-autobuild-ticket-targeting: 1`. A current client declares `listTargeting`
370
+ only after a response from the service has carried that header, and settles the
371
+ decision before use: from the policy sync, or else from one `list-targeting`
372
+ probe for the reserved id `~negotiate`, which never names a ticket. An ok
373
+ response without the header, or a `404` or `400` refusal of `list-targeting`
374
+ without it, means the service predates the operation. Against such a service
375
+ the client never declares it, and integration observation uses the exhaustive
376
+ listing by that explicit decision. An inconclusive probe (a network failure or
377
+ an unmarked gateway error) fails source construction. A targeted read the
378
+ service later refuses fails closed, with no fallback within the pass.
379
+
380
+ ## Issue links
381
+
382
+ Hosted tickets store forge issue links as `issueLinks`, an array of
383
+ `{ "issue": N, "intent": "closes" | "refs" }` with unique positive issue numbers.
384
+ Create, update and guarded update accept the field; intent is required on the
385
+ wire. Update replaces the whole set and `[]` clears it. The service stores links
386
+ sorted by issue number. Effective changes increment the revision, and rewriting
387
+ an identical set is a no-op.
388
+
389
+ Ticket responses include nonempty `issueLinks` only with
390
+ `x-autobuild-ticket-issue-links: 1`, independently of the other capabilities and
391
+ of the client version. Without it, links are projected away for historical strict
392
+ decoders, and stored links survive their writes. Every `/tickets/*` response,
393
+ including errors, carries `x-autobuild-ticket-issue-links: 1`.
394
+
395
+ `dependency-states` entries for existing tickets include `state`, the blocker's
396
+ native state name, only with `x-autobuild-ticket-dependency-state: 1`. Without
397
+ it the field is projected away for historical strict decoders. A service that
398
+ predates the capability ignores the header and omits the field, which is
399
+ optional. Clients apply the configured rejected role to it; the service never
400
+ interprets it.
401
+
402
+ A service whose backing source cannot store links refuses a write naming them,
403
+ including `[]`, with `409 { "kind": "conflict", "code": "issue-links-unsupported" }`
404
+ before anything is written. A service predating issue links refuses the unknown
405
+ field with a `400` validation error and no capability header. Clients report both
406
+ as `TicketIssueLinksUnsupported`.
407
+
319
408
  Completed ticket imports record `tickets.migration-recorded` in the selected
320
409
  BuildStore repository journal, with export identity, origin/destination adapter
321
410
  names and the actual complete ID mapping. Requested-ID preservation alone does
322
411
  not establish continuity for in-flight builds; see the migration procedure.
412
+
413
+ ## Priority
414
+
415
+ Hosted tickets store `priority`, either `"urgent"` or `"normal"`. Create,
416
+ update and guarded update accept it as an optional field. A create that omits it
417
+ files a normal ticket, and an update that omits it never changes it. Tickets that
418
+ existed before the field read as normal. A priority change increments the
419
+ revision, and rewriting the same value is a no-op.
420
+
421
+ Ticket responses include `priority` on every ticket, `normal` included, only with
422
+ `x-autobuild-ticket-priority: 1`, independently of the other capabilities and of
423
+ the client version. Without it, priority is projected away for historical strict
424
+ decoders, whose writes never name it and so never clear it. Every `/tickets/*`
425
+ response, including errors, carries `x-autobuild-ticket-priority: 1`.
426
+
427
+ `list-ready` returns urgent tickets first, then normal ones, each class in filing
428
+ order, for every client. Ordering happens within the existing listing; it adds no
429
+ per-ticket reads.
430
+
431
+ A service whose backing source cannot store priority refuses a write naming
432
+ `urgent` with `409 { "kind": "conflict", "code": "priority-unsupported" }` before
433
+ anything is written. A service predating priority refuses the unknown field with a
434
+ `400` validation error and no capability header. Clients report both as
435
+ `TicketPriorityUnsupported`. Current clients omit `normal` on create, so a plain
436
+ create still works against such a service.
@@ -84,8 +84,11 @@ pending while ancestors restack or reconcile. A durable availability observation
84
84
  allows unchanged idle ticks, including after restart, to skip repository preparation
85
85
  and native auto-merge cancellation. Exact node/parent heads, contribution base,
86
86
  request contents, accepted ancestry, foreign aliases and confirmed landing evidence
87
- invalidate that observation when they change; polling timestamps do not. Failed
88
- assessments never establish unavailability. Availability is not proof of destination
87
+ invalidate that observation when they change; polling timestamps do not. Confirmed
88
+ landing evidence comes from every repository build, including mixed-version deferred
89
+ builds whose own decisions stay withheld, so the dispatcher check and the node
90
+ transaction assess the same fingerprint. Failed assessments never establish
91
+ unavailability. Availability is not proof of destination
89
92
  coverage. Moving to another destination branch explicitly settles obsolete requests
90
93
  with `destination-changed`; losing identities on the same branch leaves them waiting.
91
94
  Native auto-merge is suspended with confirmed, reusable receipts only when replay
@@ -126,8 +129,10 @@ Before replacement the kernel publishes retained tips, displaced heads and the
126
129
  temporary change under immutable exact archive refs. Remote archives also publish
127
130
  commits present only on the remote: GitHub uses create-only Git-reference REST creation
128
131
  when the workspace lacks the commit, retaining guarded Git pushes for local objects.
129
- Exact remote readback confirms publication, then a depth-one fetch by the archive ref
130
- (without tags or configured refmap expansion) restores missing commits and verifies them
132
+ Exact remote readback confirms publication, then a non-shallow fetch of only that exact
133
+ archive ref (without tags, configured refmap expansion or a depth limit) restores
134
+ missing commits and their missing ancestry, writes no shallow boundary, leaves an
135
+ already-shallow repository's existing boundaries unchanged, and verifies the commits
131
136
  locally before returning. `restack.*` facts record
132
137
  preparation, replay, intent, archived replacement, contention and completion.
133
138
  Unpublished request/loss records alone cannot preserve objects from a released
@@ -221,7 +226,11 @@ retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
221
226
  errors retain their existing behavior.
222
227
 
223
228
  Preserved restoration checkpoints survive repeated replacement; a published
224
- reconcile or restack rewrite retires the old checkpoint.
229
+ reconcile or restack rewrite retires the old checkpoint. Node, restack and
230
+ reconcile rewrites also supersede a branch checkpoint that the build's bounded
231
+ record of its latest 64 replaced heads covers: provisioning keeps its archived
232
+ objects but never restores it over the branch. Coverage older than that bound
233
+ falls back to refusing divergent branch work.
225
234
  Recovery context applies to the following session and its repeated hydration; later
226
235
  sessions do not inherit obsolete reconstruction instructions.
227
236
 
@@ -244,7 +253,16 @@ external ticket state, missing ticket/state, or conflicting slug ownership termi
244
253
  automatic recovery with an `abandoned` resolution and diagnostic reason. The
245
254
  ticket is left unchanged; an operator can leave it finished or cancelled, or
246
255
  inspect ownership and explicitly return it to Ready for another attempt. These
247
- cases stop provider polling and diagnostic appends. Recovery failures are
256
+ cases stop provider polling and further durable diagnostic appends. The tick
257
+ that records the abandonment reports one dispatcher diagnostic naming the
258
+ ticket and attempt, whether the claim was confirmed or its provider outcome is
259
+ unknown, and the recorded reason. If that tick fails for any reason, its
260
+ failure error carries the diagnostics instead. Later ticks do not repeat it.
261
+ The `abandoned` resolution event records whether the claim was confirmed, and
262
+ default `ab watch` repository attention reports the same line once as it lands,
263
+ whether or not its tick failed; a fresh watch does not replay historical
264
+ abandonments.
265
+ Recovery failures are
248
266
  reported without preventing janitor, lease sweep, or other dispatch recovery.
249
267
  This is not general process
250
268
  crash recovery. Confirmed Ready/Triage transitions settle idempotently, so a
@@ -126,7 +126,9 @@ exits nonzero on failure. Then:
126
126
  alternate. The runtime that launched setup and the temporary fresh-skeleton
127
127
  default do not constrain the final arrangement.
128
128
  3. Choose the ticket source and workflow states. Confirm account/team facts and
129
- required environment credentials. Author a repository-owned acceptance-check skill and select it from an agent
129
+ required environment credentials. The `github` source needs no new secret:
130
+ it uses the forge's `GITHUB_TOKEN`, `GH_TOKEN` or `gh auth login`, which must
131
+ read and write the repository's issues. Author a repository-owned acceptance-check skill and select it from an agent
130
132
  verify step in every repository. An **acceptance check** is a repository-owned agent verify step that runs the built software, exercises each acceptance criterion in the spec, attaches evidence, and returns a typed verdict. Every repository must configure one. It is not a test suite and leaves no test files behind.
131
133
  Wire an existing maintained end-to-end or browser test suite into an ordinary `check` step. If none exists, do not create one during setup. The acceptance check neither substitutes for nor seeds a suite.
132
134
  4. Preserve an existing `autobuild.toml` and unrelated repository choices on a
@@ -391,14 +393,10 @@ manifest-directed artifact paths remain authoritative. Never commit scratch.
391
393
  1. Run `ab context` and read `"$AB_CONTEXT_DIR/context.json"`. The verifier receives
392
394
  `$AB_CONTEXT_DIR/spec.md`, the configured step,
393
395
  the commit range, and, after escalation is answered, `$AB_CONTEXT_DIR/guidance.json`.
394
- Node verify sessions also receive `nodeVerification` in the context manifest:
395
- contribution specs and a provenance index mapping commits to the builds that
396
- introduced them. Read those specs through the manifest's allocated paths.
397
- Also read `handPushedCommits: [{sha, originalSha, message}]` from the manifest
398
- and index. These hand-pushed node commit messages express maintainer-authorized
399
- intent; judge quality and consistency, and never fail them solely for lacking
400
- a covering spec. Other node changes are authorized when the node spec or the introducing
401
- contribution's spec covers it; use the commit index to find that spec.
396
+ Node verify sessions also receive `nodeVerification`: contribution specs,
397
+ a commit provenance index and owned `handPushedCommits`, read through the
398
+ manifest's allocated paths. Judge them as described in
399
+ [node verification context](integration-tree.md#node-verification-context).
402
400
  2. Exercise each applicable acceptance criterion through the repository's real
403
401
  application lifecycle. Prefer the narrowest honest flow that catches a
404
402
  regression.
@@ -434,7 +432,7 @@ Owner admin requests require an explicit registered context.repo; project creden
434
432
  cannot select another project. See [local builds with hosted tickets](#local-builds-with-hosted-tickets).
435
433
 
436
434
  The service never contacts Linear. Projects with external sources (including
437
- file and Linear) keep using those sources directly through their dispatcher;
435
+ file, Linear and GitHub) keep using those sources directly through their dispatcher;
438
436
  service ticket HTTP and operator surfaces refuse with project/source
439
437
  feedback rather than returning an empty queue.
440
438
 
@@ -463,6 +461,9 @@ To retain earlier names configure `triageState = "Backlog"`,
463
461
  `claimedState = "Doing"`, `doneState = "Done"`, and the desired `readyState`.
464
462
  Existing ticket rows are never renamed. Older combined-service clients continue
465
463
  using the uploaded dispatcher configuration until independent policy is published.
464
+ Also set the recommended `backlogState` and `rejectedState` so agents can defer
465
+ and decline work by role; role moves create a missing state on first use.
466
+ Published policy carries both roles, and publishes from older clients keep them.
466
467
 
467
468
  ## Forge readiness
468
469
 
@@ -522,9 +523,11 @@ with hosted ticket numbering reset to 1. See
522
523
  ## Hosted dispatch and local viewing
523
524
 
524
525
  A plain `ab dispatch` reads dispatch placement once before starting local execution.
525
- For a hosted project it opens the Store-only viewer automatically, displaying
526
+ For a hosted project it opens the viewer automatically, displaying
526
527
  `viewer · dispatched by <host>` from the placement origin (including a nondefault
527
528
  port). `--once`, `--plain`, and `--interval` retain their viewer meanings.
529
+ The viewer reads its dashboard from the Store; its one ticket-source read is
530
+ the header's triage count, through the source's optional `countStates`.
528
531
  `--takeover` explicitly dispatches locally, with a warning that it can displace
529
532
  the hosted dispatcher; it cannot be combined with `--viewer`. Startup intake
530
533
  flags require `--takeover` when placement selects viewer.
@@ -533,6 +536,9 @@ An unreadable placement fails closed with a typed error naming the cause:
533
536
  use `--viewer` to watch or `--takeover` to dispatch locally. Both explicit modes
534
537
  skip placement discovery. Older services without the capability and projects
535
538
  with unknown or nonhosted placement retain local dispatch behavior. Local stores
536
- need no placement request. Origin mode (`--repository` or `AB_REPOSITORY`) and
537
- hosted cron dispatch bypass this check. Placement is a startup snapshot, not a
539
+ need no placement request. Failing to resolve the checkout's store selection
540
+ (for example, a malformed `autobuild.toml`) is not a placement failure: default
541
+ startup reports it as a repository resolution error naming its cause, and
542
+ neither explicit mode bypasses it. Origin mode (`--repository` or
543
+ `AB_REPOSITORY`) and hosted cron dispatch bypass this check. Placement is a startup snapshot, not a
538
544
  liveness probe or a polling input.
@@ -164,7 +164,8 @@ order.
164
164
  The spec is the build's contract artifact (kind `spec`, revision 0).
165
165
  Every downstream reviewer approves conformance to its pinned revision.
166
166
  For leaves, a phase that discovers the spec itself is wrong raises an
167
- escalation (`ab escalate`); a human answers, the spec gets revision N+1,
167
+ escalation (`ab escalate`); your operator agent, within your instructions and
168
+ authority, or you answer it with a revised spec. The spec gets revision N+1,
168
169
  and the leaf restarts from `plan` after any unfinished reconcile resumes under
169
170
  the revised spec and its publication is confirmed.
170
171
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  `ab ticket create --blocked-by` validates prerequisite ids and records blocking
4
4
  relationships, but a single CLI command is **not an atomic publication guarantee**.
5
- In particular, direct Linear creates the issue first and adds
5
+ In particular, direct Linear and GitHub create the issue first and add
6
6
  its blocker relationships in separate requests. If the issue is already in the
7
7
  ready state, a dispatcher can see it before those relationships exist. A
8
8
  successful create response containing every blocker does not prove that no build
@@ -19,6 +19,8 @@ before publishing it. Use the repository's triage state when it differs from its
19
19
  ready state. This temporary staging does not require another placement approval.
20
20
  If no non-ready state can be established, resolve that before creating the
21
21
  dependent; never guess that a name such as "Backlog" is safe in every repository.
22
+ A configured backlog role is a known non-ready state: `ab ticket move <id>
23
+ --role backlog` reaches it without knowing its native name.
22
24
 
23
25
  1. Create prerequisites in dependency order and extract each new `.ref.id` from
24
26
  the complete `--json` response, never the human confirmation line.
@@ -28,7 +30,12 @@ dependent; never guess that a name such as "Backlog" is safe in every repository
28
30
  non-ready and every expected blocker is present. Repair missing relationships
29
31
  through `ab ticket block`, then read back again.
30
32
  4. Only after verification, move it to the intended final state with
31
- `ab ticket move <id> <state> --json`. Verify the final state and blockers.
33
+ `ab ticket move <id> <state> --json`, or by role with
34
+ `ab ticket move <id> --role ready --json`. Verify the final state and blockers.
35
+
36
+ A blocker in the configured rejected state never resolves: its dependents stay
37
+ unclaimed until the blocker leaves that state or is removed with
38
+ `ab ticket unblock`.
32
39
 
33
40
  For a repository whose configured triage and ready states are `Triage` and
34
41
  `Ready`, respectively, and whose human requested ready placement:
@@ -77,13 +84,24 @@ parent history. An empty completed contribution is satisfied; missing evidence,
77
84
  an open or aborted node, or ambiguous newest build generations remain queued.
78
85
  Older successful generations are never substituted for the newest build.
79
86
 
80
- Destination observations retain versioned, head-bound Git witnesses (reachable
81
- commit SHAs and direct build trailers) and a fixed-length evidence digest. Current
87
+ Destination observations record a head-bound, query-scoped probe rather than
88
+ the destination's history: only the commit SHAs and direct build trailers in the
89
+ proof closure of the identities being decided (blocker identities, plus the
90
+ landings and confirmed foreign aliases that could transport them), which of those
91
+ are reachable from the sampled head, presence answers for only those identities,
92
+ and a fixed-length evidence digest. Observation size is bounded by that closure,
93
+ independent of the destination's reachable commit count and of repository history.
94
+ While the head is unchanged and the probe covers the current questions, current
82
95
  confirmed landings and aliases from only the destination's accepted ancestry are
83
- reapplied before reuse. Unrelated merged history and ready destinations do not
84
- invalidate this proof. Head changes require a fresh Git sample; legacy observations
85
- without witnesses refresh once rather than replaying repository history. Current
86
- readiness and newest-generation checks still apply before claim.
96
+ reapplied without Git; unrelated merged history and ready-set changes neither
97
+ invalidate it nor append events. A moved head requires a fresh Git sample. A
98
+ newly relevant landing or a new question needs only a new probe: a dispatcher
99
+ still holding the full in-memory witness for that branch and head compacts one
100
+ without Git, and otherwise samples Git once. Observations without a probe,
101
+ including older full-history witnesses, are never trusted for admission: they
102
+ are re-derived once the same way, and an unavailable sample leaves the dependent
103
+ queued; neither replays repository history. Current readiness and
104
+ newest-generation checks still apply before claim.
87
105
 
88
106
  - Same node: the blocking change merges directly into the target.
89
107
  - Ancestor: the change merges into an ancestor, then presence demand restacks only the required path to the target.