@defrex/autobuild 1.5.0 → 1.7.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 (126) hide show
  1. package/README.md +1 -1
  2. package/SPEC.md +192 -24
  3. package/docs/agent-runtimes.md +1 -1
  4. package/docs/answering-blocked-builds.md +7 -4
  5. package/docs/architecture.md +100 -32
  6. package/docs/configuration-overview.md +10 -0
  7. package/docs/configuration.md +340 -10
  8. package/docs/dispatcher.md +2 -2
  9. package/docs/forges.md +1 -0
  10. package/docs/glossary.md +1 -1
  11. package/docs/operating.md +1 -1
  12. package/docs/operator-api.md +33 -10
  13. package/docs/operator-surfaces.md +6 -3
  14. package/docs/plugin-authoring.md +48 -6
  15. package/docs/remote-store-protocol.md +33 -10
  16. package/docs/restacking.md +16 -7
  17. package/docs/ticket-sources.md +34 -6
  18. package/docs/tickets.md +7 -1
  19. package/docs/troubleshooting.md +1 -1
  20. package/docs/workspaces.md +1 -1
  21. package/package.json +3 -3
  22. package/packages/core/src/cli/attention.ts +3 -0
  23. package/packages/core/src/cli/binary-direct.ts +1 -0
  24. package/packages/core/src/cli/dashboard/model.ts +14 -4
  25. package/packages/core/src/cli/dashboard/poll.ts +14 -0
  26. package/packages/core/src/cli/dashboard/render.ts +3 -0
  27. package/packages/core/src/cli/dispatch-frontend.ts +10 -14
  28. package/packages/core/src/cli/dispatch-preflight.ts +5 -1
  29. package/packages/core/src/cli/dispatch-repository-feed.ts +145 -109
  30. package/packages/core/src/cli/dispatch-tickets.ts +47 -0
  31. package/packages/core/src/cli/dispatch-upgrade-controller.ts +3 -0
  32. package/packages/core/src/cli/dispatch.ts +377 -101
  33. package/packages/core/src/cli/help.ts +15 -6
  34. package/packages/core/src/cli/init-validation.ts +14 -1
  35. package/packages/core/src/cli/repo-lease.ts +225 -0
  36. package/packages/core/src/cli/repository-status.ts +40 -3
  37. package/packages/core/src/cli/status.ts +21 -13
  38. package/packages/core/src/cli/ticket.ts +22 -4
  39. package/packages/core/src/cli/wait.ts +4 -1
  40. package/packages/core/src/cli/watch.ts +17 -4
  41. package/packages/core/src/config/live.ts +4 -0
  42. package/packages/core/src/config/profiles.ts +96 -0
  43. package/packages/core/src/config/ready-assignee.ts +43 -11
  44. package/packages/core/src/config/roles.ts +33 -10
  45. package/packages/core/src/config/schema.ts +204 -26
  46. package/packages/core/src/events/catalog.ts +2 -0
  47. package/packages/core/src/events/compatibility.ts +3 -1
  48. package/packages/core/src/events/forge-degradation-policy.ts +16 -2
  49. package/packages/core/src/events/payloads.ts +23 -0
  50. package/packages/core/src/events/policy.ts +3 -0
  51. package/packages/core/src/events/repository.ts +19 -0
  52. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +267 -352
  53. package/packages/core/src/kernel/build-creation.ts +29 -0
  54. package/packages/core/src/kernel/dispatch-capacity.ts +134 -30
  55. package/packages/core/src/kernel/engine.ts +13 -6
  56. package/packages/core/src/kernel/forge-health.ts +47 -0
  57. package/packages/core/src/kernel/generators/build-log.ts +9 -0
  58. package/packages/core/src/kernel/guarded-forge.ts +76 -18
  59. package/packages/core/src/kernel/incremental-fixtures.ts +1 -0
  60. package/packages/core/src/kernel/janitor-failure.ts +85 -5
  61. package/packages/core/src/kernel/leaf-restack-state.ts +4 -2
  62. package/packages/core/src/kernel/log-index.ts +1 -1
  63. package/packages/core/src/kernel/node-landing.ts +2 -1
  64. package/packages/core/src/kernel/node-parent.ts +2 -0
  65. package/packages/core/src/kernel/read-facts.ts +9 -1
  66. package/packages/core/src/kernel/reducer-registry.ts +6 -1
  67. package/packages/core/src/kernel/reducer.ts +75 -4
  68. package/packages/core/src/kernel/ticket-preparation.ts +15 -8
  69. package/packages/core/src/operator/protocol.ts +10 -0
  70. package/packages/core/src/operator/query.ts +16 -13
  71. package/packages/core/src/operator/registry.ts +25 -5
  72. package/packages/core/src/operator/sandbox-host.ts +3 -0
  73. package/packages/core/src/operator/tickets.ts +15 -3
  74. package/packages/core/src/plugin-sdk/index.ts +4 -0
  75. package/packages/core/src/ports/forge/create.ts +6 -0
  76. package/packages/core/src/ports/forge/github-transport.ts +40 -3
  77. package/packages/core/src/ports/forge/github.ts +12 -1
  78. package/packages/core/src/ports/forge/workspace-ancestry.ts +60 -0
  79. package/packages/core/src/ports/forge-failure.ts +31 -2
  80. package/packages/core/src/ports/runner/routing.ts +66 -5
  81. package/packages/core/src/ports/tickets/assignees.ts +54 -0
  82. package/packages/core/src/ports/tickets/contract.ts +164 -4
  83. package/packages/core/src/ports/tickets/create.ts +35 -7
  84. package/packages/core/src/ports/tickets/github-fake.ts +18 -2
  85. package/packages/core/src/ports/tickets/github.ts +247 -29
  86. package/packages/core/src/ports/tickets/hosted-index.ts +1 -0
  87. package/packages/core/src/ports/tickets/operations.ts +6 -1
  88. package/packages/core/src/ports/tickets/tree.ts +12 -2
  89. package/packages/core/src/ports/tickets/update.ts +6 -2
  90. package/packages/core/src/ports/types.ts +37 -3
  91. package/packages/core/src/ports/workspace/commit-preservation.ts +28 -12
  92. package/packages/core/src/ports/workspace/git-worktree.ts +3 -1
  93. package/packages/core/src/ports/workspace/harvest-execution.ts +4 -2
  94. package/packages/core/src/ports/workspace/vercel-sandbox.ts +12 -0
  95. package/packages/core/src/processes/build-child.ts +28 -7
  96. package/packages/core/src/processes/build-execution-state.ts +4 -1
  97. package/packages/core/src/processes/build-runner.ts +17 -2
  98. package/packages/core/src/processes/dispatcher.ts +329 -59
  99. package/packages/core/src/processes/execution-no-progress.ts +2 -0
  100. package/packages/core/src/processes/harvest-child.ts +8 -2
  101. package/packages/core/src/processes/harvest-execution-state.ts +104 -0
  102. package/packages/core/src/processes/harvest-runner.ts +251 -17
  103. package/packages/core/src/processes/repo-view.ts +2 -0
  104. package/packages/core/src/scenarios/harness.ts +160 -36
  105. package/packages/core/src/store/reduced-reads.ts +10 -0
  106. package/packages/core/src/store/reducer-value-shapes.json +3339 -2898
  107. package/packages/core/src/store/remote/client.ts +21 -8
  108. package/packages/core/src/store/remote/index.ts +4 -0
  109. package/packages/core/src/store/remote/protocol.ts +7 -0
  110. package/packages/core/src/store/remote/released-clients.json +22 -0
  111. package/packages/core/src/store/remote/released-reducer-values/1.6.0.json +27173 -0
  112. package/packages/core/src/store/remote/released-reducer-values/1.7.0.json +27366 -0
  113. package/packages/core/src/store/remote/released-reducer-values/index.ts +4 -0
  114. package/packages/core/src/store/repo-state-events.ts +1 -0
  115. package/packages/core/src/store/types.ts +11 -0
  116. package/packages/core/src/testing/dispatch-read-budget.ts +84 -58
  117. package/packages/core/src/testing/index.ts +2 -0
  118. package/packages/core/src/testing/reduced-read-budget.ts +411 -11
  119. package/skills/guide/SKILL.md +166 -35
  120. package/skills/guide/references/operator-api.md +33 -10
  121. package/skills/guide/references/plugin-authoring.md +48 -6
  122. package/skills/guide/references/remote-store-protocol.md +33 -10
  123. package/skills/guide/references/restacking.md +16 -7
  124. package/skills/operate/SKILL.md +79 -14
  125. package/skills/tickets/SKILL.md +22 -4
  126. package/templates/hosted-service/package.json +2 -2
@@ -35,6 +35,12 @@ service publishes `>=1.2.0 <1.4.0` until later publication facts permit retireme
35
35
  The service reads the clock for each decision, so retirement needs no redeploy. Health needs no credentials, version
36
36
  headers, or available backend. On the service’s own line, both its runtime protocol and its published ledger protocol are admitted. Health advertises a fully validated same-line request’s admitted protocol. Otherwise it advertises the service line’s published protocol, or its runtime protocol when that line is unpublished. Thus default 1.3 health advertises 6 anonymously and to published clients, and 7 to admitted source clients; explicit 1.4/7 services default to 7. The package version and support range remain truthful. Health performs no store reads.
37
37
 
38
+ Every current service advertises `build-creation-key-v1` in health `capabilities`:
39
+ keyed project creation lands at the derived slug described under `POST /builds`.
40
+ Clients send a creation key only after seeing it. A client treats a service without
41
+ it as allocating, so an unkeyed creation whose response was lost there is reported
42
+ as an unknown outcome rather than as absence.
43
+
38
44
 
39
45
  ## Hosted dispatch placement
40
46
 
@@ -372,7 +378,7 @@ it to exist. An unknown build returns `404 not-found`.
372
378
 
373
379
  | BuildStore operation | HTTP route | Request | Success |
374
380
  |---|---|---|---|
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 |
381
+ | `createBuild` | `POST /builds` | `{slug: string, repo: string, repoOrigin?: string, ticket?: TicketRef, branch?: string, created?: event write, creationKey?: string}`; `slug`, `repo`, and a supplied `branch` are nonempty; a supplied `creationKey` matches `^[A-Za-z0-9_-]{1,128}$`. `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, or with `creationKey` the slug that key derives (a repeated key is `409 conflict`), 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
382
  | `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
383
  | `getBuild` | `GET /builds/{slug}` | none | `200` + `BuildRecord`; absent is `404` (the shipped client maps this to `null`) |
378
384
  | `append` | `POST /builds/{slug}/events` | event write | `201` + build event envelope |
@@ -529,7 +535,7 @@ client version window are unchanged.
529
535
  | Scope | Reducers with no arguments |
530
536
  | --- | --- |
531
537
  | 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` |
538
+ | Repository | `dispatchPlacement`, `ticketPreparation`, `harvest`, `dispatchSettings`, `sandboxStates`, `openHarvestExecutions`, `hostedHarvestAuthority`, `autoMergeDefault`, `effectiveConfig`, `harvestDelegation` |
533
539
 
534
540
  | Reducer | Scope | Required arguments |
535
541
  | --- | --- | --- |
@@ -542,7 +548,12 @@ another's accumulator. `effectiveConfig` returns an object with optional `run`
542
548
  and `reference: {kind, rev}`. Absence is distinct from an unreadable referenced
543
549
  artifact. Delegation values contain semantic lifecycle facts indexed by prefixed
544
550
  identifiers, not authorization decisions; request time and grace expiry are
545
- always evaluated against those facts on the service.
551
+ always evaluated against those facts on the service. `hostedHarvestAuthority`
552
+ returns `{current?: {execution, run, leaseHolder, released}}`: the latest
553
+ `harvest.execution.authorized` and whether that execution has since ended or
554
+ been released. Its size does not grow with harvest history; a hosted harvest
555
+ guest re-reads it at durable boundaries to decide whether it still holds
556
+ authority, and a server that does not serve it stops the guest.
546
557
 
547
558
  Each remaining registered reducer is explicitly excluded:
548
559
 
@@ -1185,8 +1196,12 @@ Remote clients continue mapping addressed GET 404 responses to null. Nested
1185
1196
  streams must also belong to the addressed parent.
1186
1197
 
1187
1198
  `GET /builds` is filtered by the server to the credential's project. Project
1188
- `POST /builds` always allocates a fresh random-suffixed slug from the requested
1189
- base, even when the base is unused, and a matching branch in the build kind's
1199
+ `POST /builds` without `creationKey` allocates a fresh random-suffixed slug from
1200
+ the requested base, even when the base is unused. With `creationKey` it creates at
1201
+ most once at `<base>-<first 24 hex of sha256("autobuild-build-creation\0" + repo +
1202
+ "\0" + requested slug + "\0" + creationKey)>` and answers a repeated key with
1203
+ `409 conflict`, never a second identity; `creationBuildSlug` in the client package
1204
+ computes it. Either way it creates a matching branch in the build kind's
1190
1205
  namespace: `ab-node/<slug>` when the `build.created` payload has `kind: "node"`,
1191
1206
  otherwise `ab/<slug>`. Without `created`, a supplied `branch` prefix decides the
1192
1207
  kind. A supplied `branch` must be exactly `ab/<requested slug>` or
@@ -1266,8 +1281,13 @@ or invoke operator APIs. Harvest writes require the exact run in event payloads
1266
1281
  and artifact metadata; artifacts use the harvest kinds. Every artifact in an
1267
1282
  atomic deposit is checked before writing. Harvest streams have an immutable
1268
1283
  `harvest:<run>:<execution>:` label namespace. Addressed streams resolve their actual owner;
1269
- a guessed ID cannot bypass the boundary. Only the runner can heartbeat or re-acquire its exact
1270
- adopted repository lease holder; another current holder still fences it. Recovery acknowledgements remain dispatcher-side.
1284
+ a guessed ID cannot bypass the boundary. A harvest-runner grant may heartbeat or re-acquire
1285
+ only its exact adopted repository lease holder, and another current holder fences those lease
1286
+ calls. That lease permission is not the prepared guest's execution authority: the guest neither
1287
+ heartbeats, reclaims nor releases the invocation lease, so routine `--once` teardown or a
1288
+ successor invocation's lease acquisition alone does not fence it. The guest instead reads
1289
+ `hostedHarvestAuthority` at durable boundaries and stops when its execution authorization is
1290
+ released or replaced, or when that verification fails. Recovery acknowledgements remain dispatcher-side.
1271
1291
 
1272
1292
  Hosted ticket access is gated by grant kind. Build-runner and build-phase grants
1273
1293
  cannot call ticket routes. Harvest-phase grants may call only list-ready,
@@ -1766,14 +1786,17 @@ The commands use the saved owner credential, even if an ambient build token exis
1766
1786
  ### Forge cooldown admission and explicit recovery
1767
1787
 
1768
1788
  Hosted repository event appends and atomic artifact deposits validate
1769
- `dispatcher.forge-degraded` before any durable mutation. The payload must match
1770
- its event schema, with a finite ISO `resetAt` at most 24 hours after server time
1789
+ `dispatcher.forge-degraded` and `forge.credential-limited` before any durable
1790
+ mutation. The payload must match its event schema, with a finite ISO `resetAt` at most 24 hours after server time
1771
1791
  (inclusive). Already-expired deadlines are accepted. Invalid or out-of-horizon
1772
1792
  writes return `400 validation` (the remote adapter exposes `EventValidationError`);
1773
1793
  the server never clamps or invents a provider reset. Historical decoding has no clock-relative restriction.
1774
1794
 
1775
1795
  Build-runner and build-phase grants may POST only the kernel-authored
1776
- `dispatcher.forge-degraded` repository fact through the events route. The
1796
+ `forge.credential-limited` and `dispatcher.forge-degraded` repository facts
1797
+ through the events route. Current runners and phase sessions record only
1798
+ `forge.credential-limited` attention; the `dispatcher.forge-degraded` exception
1799
+ remains for runners pinned to older releases. The
1777
1800
  preceding `requireProject` check binds this exception to the exact repository
1778
1801
  in the delegated claim. A hosted project identifies one repository. Delegates
1779
1802
  cannot write recovery, deposits or other repository facts, regardless of the
@@ -17,7 +17,7 @@ node fast-forwards preserve ordered contributing identities.
17
17
 
18
18
  Destination heads come only from the authoritative forge branch; dispatcher-host
19
19
  refs are never a fallback. Failed remote reads retain the accepted observation;
20
- classified rate limits use repository forge degradation and cooldown. Changed
20
+ dispatcher-classified rate limits use repository forge degradation and cooldown. Changed
21
21
  heads require immutable commit ancestry proof against the accepted target and
22
22
  the destination base already used by replay. Missing capability or failed proof
23
23
  defers new replay. A non-descendant without kernel lineage records
@@ -221,7 +221,7 @@ not consume `maxPhaseAttempts`. A seventh transient failure records
221
221
  error and six retries. Answering that escalation opens a fresh publication episode
222
222
  for the same retained intent without resetting agent phase failures. Pending
223
223
  publication keeps its workspace through backoff and unresolved exhaustion.
224
- Classified rate limits retain repository cooldown and consume no publication
224
+ Dispatcher-classified rate limits retain repository cooldown and consume no publication
225
225
  retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
226
226
  errors retain their existing behavior.
227
227
 
@@ -237,11 +237,14 @@ sessions do not inherit obsolete reconstruction instructions.
237
237
  ## Ticket preparation before build creation
238
238
 
239
239
  Before claiming, the dispatcher journals a repository-scoped preparation intent;
240
- a won claim and the exact selected creation slug are durable boundaries. Caught
240
+ a won claim, the selected creation slug and, when the build store attests keyed
241
+ creation, the attempt's creation key are durable boundaries. Caught
241
242
  asset-copy, spec-authoring, naming, and build-creation failures return the ticket
242
243
  to configured Ready; a nonconforming spec goes to configured Triage. Recovery
243
- checks the exact selected build first: a matching record and atomic
244
- `build.created` retain ownership even if creation threw after committing.
244
+ point-reads the selected slug and, for a keyed attempt, the canonical slug derived
245
+ from the repository, selected slug and key: one matching record and atomic
246
+ `build.created` retain ownership even if creation threw after committing or its
247
+ response was lost.
245
248
  Unavailable or conflicting readback never authorizes release or a replacement
246
249
  build. Pending attempts retain the original failure, latest recovery error and
247
250
  retry deadline in the canonical repository reduced value; resolved attempts
@@ -249,8 +252,10 @@ leave that value. Under repository ownership, each tick admits at most eight
249
252
  due recovery attempts, before intake and independently of capacity or intake
250
253
  settings, with a 30-second durable retry delay after recovery failure. Unresolved
251
254
  ticket identities remain withheld. An uncertain claim outcome or unrelated
252
- external ticket state, missing ticket/state, or conflicting slug ownership terminates
253
- automatic recovery with an `abandoned` resolution and diagnostic reason. The
255
+ external ticket state, missing ticket/state, conflicting slug ownership, builds at
256
+ both identities, or an unknown creation outcome (an unkeyed attempt on a store
257
+ that allocates slugs, where absence is not evidence) terminates automatic
258
+ recovery with an `abandoned` resolution and diagnostic reason. The
254
259
  ticket is left unchanged; an operator can leave it finished or cancelled, or
255
260
  inspect ownership and explicitly return it to Ready for another attempt. These
256
261
  cases stop provider polling and further durable diagnostic appends. The tick
@@ -258,6 +263,10 @@ that records the abandonment reports one dispatcher diagnostic naming the
258
263
  ticket and attempt, whether the claim was confirmed or its provider outcome is
259
264
  unknown, and the recorded reason. If that tick fails for any reason, its
260
265
  failure error carries the diagnostics instead. Later ticks do not repeat it.
266
+ The `abandoned` resolution event records whether the claim was confirmed, and
267
+ default `ab watch` repository attention reports the same line once as it lands,
268
+ whether or not its tick failed; a fresh watch does not replay historical
269
+ abandonments.
261
270
  Recovery failures are
262
271
  reported without preventing janitor, lease sweep, or other dispatch recovery.
263
272
  This is not general process
@@ -116,10 +116,11 @@ Credential/process changes remain subject to the Boundaries below.
116
116
  ### Watch for attention events
117
117
 
118
118
  `ab watch --operator --json` is the standing monitor. Keep its default filter: every
119
- record calls for action. It reports failed node verification, build escalations, persistent janitor failures and merge decisions,
119
+ record calls for action. It reports failed node verification, build escalations, persistent janitor failures and their escalations, merge decisions,
120
120
  harvest escalations/recovery exhaustion, automatic upgrade failures and runtime rollbacks, rejected configuration, reloads needing
121
- restart, abnormal dispatcher stops/loss, ticket-source and forge degradation past reset (15 minutes
122
- for ticket sources without reset), and five minutes of continuous tick failures. Advertised resets
121
+ restart, abnormal dispatcher stops/loss, abandoned ticket preparations, ticket-source and forge degradation past reset (15 minutes
122
+ for ticket sources without reset), forge rate limits outside the dispatcher's credential
123
+ (`forge.credential-limited`), and five minutes of continuous tick failures. Advertised resets
123
124
  wait for a post-reset tick to finish before requiring action; ordinary recovery
124
125
  on that retry stays silent. Source grace and cooldown-driven failures do not
125
126
  start the tick-failure clock. When failure writes are unavailable, dispatch watch
@@ -224,7 +225,10 @@ use process lists to decide whether a dispatcher owns this repository. The
224
225
  identity resolves a yield message to run, pid, host, start time, and heartbeat
225
226
  age. Historical identity and a new holder's heartbeat may be unknown until its
226
227
  first attributable renewal. Source degradation or an old tick alone does not
227
- establish loss: a healthy lease can accompany a slow tick.
228
+ establish loss: a healthy lease can accompany a slow tick. `lost` can also be
229
+ transient: a dispatcher that stalled past `policy.dispatchLeaseTimeoutSeconds`
230
+ with no successor reclaims its lease on waking and returns to `held`, while one
231
+ that finds another holder stops as `superseded`.
228
232
 
229
233
  An unscoped watch, or a named watch with `--repository`, reports loss as a
230
234
  read-only observation: `{repo, build:null, state:null, observation:{type:
@@ -308,8 +312,10 @@ Read events with a cursor or a small `--events` count; logs are long.
308
312
  build status before acting. Work the consent queue by checking completeness
309
313
  and current verification, then issuing merge for the chosen merge. A merge
310
314
  acknowledgement accepts consent; it never promises that gates passed. A
311
- `merge-not-ready` or `node-incomplete` refusal records nothing; re-read
312
- status and act on the stated reason.
315
+ `merge-not-ready` or `node-incomplete` refusal records no consent and no
316
+ landing, though a node's completeness check may save an
317
+ `integration.observed` diagnostic; re-read status and act on the stated
318
+ reason.
313
319
  - Configure ordered `[[merge]]` rules for project policy through ab-guide.
314
320
  Repository auto-merge defaults and per-build auto-merge toggles are retired.
315
321
 
@@ -334,6 +340,11 @@ out of ready to make room. Urgency never preempts a running build, and a blocked
334
340
  urgent ticket still waits on its blockers. A source that cannot store priority
335
341
  refuses `urgent` and names itself; tell the human.
336
342
 
343
+ On GitHub tickets, `--assignees` on create or update sets who a ticket is
344
+ assigned to (`me` is the credential owner; on update it replaces the set). Under
345
+ `[tickets].readyAssignee` only the assigned person's dispatcher claims a ticket,
346
+ so reassign to hand work to someone else rather than moving it between states.
347
+
337
348
  Move tickets by lifecycle role rather than by native state name:
338
349
  `ab ticket move <id> --role triage|ready|backlog|rejected`. "Ice it",
339
350
  "icebox" and "backlog" mean `--role backlog` (deferred work); "reject" and
@@ -439,6 +450,8 @@ Treat every default-watch record as a call to act:
439
450
  - `integration.verification-failed`: inspect the failed steps, verified head and parent, then recheck current status. If the node still needs that repair, file a repair child targeting it. Each current failed cycle reports once; recovery does not backfill superseded failures. The node may have advanced after notification.
440
451
  - `escalation.raised`: inspect the question and evidence, then resolve it using
441
452
  the shared rules.
453
+ - `build.janitor-escalated`: a janitor failure outlasted its escalation limit;
454
+ handle it as described under janitor escalation attention.
442
455
  - `build.consent-ready`: inspect the one consent queue, then merge or hold the
443
456
  selected candidate under the human's policy. Unready or stale candidates
444
457
  do not produce this observation.
@@ -471,6 +484,14 @@ Treat every default-watch record as a call to act:
471
484
  scope, cursor, field path, and running version/commit. Never start or run a dispatcher.
472
485
  - Persistent source degradation: inspect the source cause and reset evidence,
473
486
  diagnose and report the continuing intake problem.
487
+ - Abandoned ticket preparation (`ticket-preparation.resolved`, outcome
488
+ `abandoned`): automatic recovery stopped and left the ticket unchanged.
489
+ Inspect the named ticket and attempt and the recorded reason. A confirmed
490
+ claim may have left the ticket in its claimed state; an unconfirmed claim's
491
+ provider outcome is unknown, so check the ticket's actual state rather than
492
+ assuming it sits in Doing. Decide whether to leave it finished or cancelled,
493
+ or return it to Ready for another attempt. Each abandonment reports once;
494
+ history does not replay.
474
495
 
475
496
  Do not re-derive history the build's events already tell you; read events
476
497
  with a cursor and keep it short.
@@ -565,6 +586,9 @@ candidates. Entries include the target, branch preview, candidate head/parent,
565
586
  verification receipts and node children/completeness. Unknown completeness is
566
587
  not zero children. A changed head or parent must regain current verification;
567
588
  unfinished or automatically authorized candidates do not ask for attention.
589
+ Queued and held candidates hold no capacity slot; one that must re-verify or
590
+ reconcile waits for a slot ahead of new ticket claims, so a full repository
591
+ delays it without failing it.
568
592
 
569
593
  Select a queue build in the terminal and use `l merge` or `o hold`, or run
570
594
  `ab merge <slug>` / `ab hold <slug>`. MCP uses `builds.control` with action `merge`
@@ -586,7 +610,7 @@ entry position: resuming suppresses the same episode, while a new candidate or
586
610
  exit/re-entry can notify again. Explicit `--event` globs remain event-only.
587
611
  Use `ab wait --for consent --for node-merged --for restack-conflicted --json`
588
612
  for one wake; state waits return immediately when already satisfied. `--for
589
- attention` also includes current failed node verification, consent readiness, janitor failure attention and merge/conflict attention.
613
+ attention` also includes current failed node verification, consent readiness, janitor failure attention, an open janitor escalation and merge/conflict attention.
590
614
  Resume event backlogs with `--since <cursor>`; keep handling emitted records
591
615
  before interpreting terminal completion.
592
616
 
@@ -599,6 +623,16 @@ Repeated classified read failures park immediately again; they do not consume
599
623
  the phase failure allowance. Default watch and attention waits deliver the new
600
624
  raise with its own event type.
601
625
 
626
+ ### Janitor escalation attention
627
+
628
+ `build.janitor-escalated` is ordinary blocked attention for a janitor failure
629
+ episode that outlasted `policy.janitorFailureEscalationSeconds`. Its question
630
+ names the failing operation, the last error, the failed attempt count and when
631
+ the episode started. Diagnose and fix the cause within the Boundaries, then
632
+ answer with a bare retry so the janitor attempts on its next tick. The janitor
633
+ keeps retrying underneath, so the escalation may also close on its own when an
634
+ attempt succeeds; reconcile current status before acting on it.
635
+
602
636
  ## Forge failure recovery
603
637
 
604
638
  A historical `publication.lost` does not prove that every copy of its candidate
@@ -624,7 +658,7 @@ not consume `maxPhaseAttempts`. A seventh transient failure records
624
658
  error and six retries. Answering that escalation opens a fresh publication episode
625
659
  for the same retained intent without resetting agent phase failures. Pending
626
660
  publication keeps its workspace through backoff and unresolved exhaustion.
627
- Classified rate limits retain repository cooldown and consume no publication
661
+ Dispatcher-classified rate limits retain repository cooldown and consume no publication
628
662
  retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
629
663
  errors retain their existing behavior.
630
664
 
@@ -642,18 +676,30 @@ build. An implement round with no commits over its base escalates at
642
676
  Janitor failures are durable per-build episodes. Eligible failures retry after
643
677
  30, 60, 120, 240 seconds, then at the configured cap (300 seconds by default).
644
678
  A classified forge rate limit is repository cooldown, not a janitor failure:
645
- neither the first limited response nor the cooldown that follows starts or ages
646
- an episode. Skipped polls preserve the episode across restart. After
647
- `policy.janitorFailureAttentionSeconds` (600 by default), `build.janitor-failing`
648
- notifies default watchers and appears on the build row. A successful attempt
649
- clears it. `policy.janitorBackoffMaxSeconds` sets the positive integer cap.
679
+ neither the first limited response nor the cooldown that follows starts an
680
+ episode or records an attempt, so a build that only waits out cooldown never
681
+ escalates. Skipped polls preserve the episode across restart. Both thresholds
682
+ below are wall-clock from the episode's first failed attempt and are checked
683
+ when an attempt fails, so cooldown inside an episode that already started still
684
+ counts. After `policy.janitorFailureAttentionSeconds` (600 by default),
685
+ `build.janitor-failing` notifies default watchers and appears on the build row.
686
+ After `policy.janitorFailureEscalationSeconds` (3600 by default), the build
687
+ raises one escalation through `build.janitor-escalated`, naming the failing
688
+ operation, the last error, the failed attempt count and when the episode
689
+ started. The build is then blocked and shows wherever open escalations show.
690
+ The janitor keeps retrying on its backoff underneath; a successful attempt
691
+ clears the attention, closes the escalation unanswered and the build continues.
692
+ Answering it with a bare retry makes the janitor attempt on its next tick. An
693
+ episode raises at most one escalation; a new episode after recovery can raise
694
+ another. `policy.janitorBackoffMaxSeconds` sets the positive integer cap.
650
695
  A dispatcher that cannot execute Git for kernel node work (a missing or
651
696
  unloadable `git` for the bare clone) records no janitor failures. It records
652
697
  one durable `dispatcher.kernel-git-unavailable` repository condition, node work
653
698
  waits, and `dispatcher.kernel-git-recovered` closes the condition once a clone
654
699
  succeeds.
655
700
 
656
- A classified forge rate limit records repository degradation with `resetAt`.
701
+ A rate limit the dispatcher classifies on its own authenticated request
702
+ records repository degradation with `resetAt`.
657
703
  Forge work waits during cooldown; passing the deadline permits a recovery
658
704
  request; a successful probe records automatic recovery. An authorized operator
659
705
  may explicitly override erroneous recorded state with
@@ -664,6 +710,25 @@ success. A subsequent actual limit records a fresh cooldown. Hosted admission
664
710
  requires a schema-valid finite ISO `resetAt` no later than server time plus
665
711
  24 hours, inclusive; past deadlines remain valid. Rejection never clamps or
666
712
  invents a provider reset, and historical events remain readable.
713
+
714
+ Only the dispatcher's own forge pauses the repository. A limit on a request
715
+ that carried no credential, or one seen by a build runner or phase session,
716
+ says nothing about the dispatcher's credential: that process waits out its own
717
+ reset locally (a dispatcher defers that work instead), and records one advisory
718
+ `forge.credential-limited` fact per episode naming the process, whether the
719
+ request was `unauthenticated` (with why) or used the process's own credential,
720
+ and the reset. It is `ab watch` attention and appears as
721
+ `forgeCredentialLimits` in `ab repository status` until its reset;
722
+ `forge-clear` does not apply. Remote guests receive no forge credential: their
723
+ GitHub API requests fail with a typed error naming `GITHUB_TOKEN or GH_TOKEN`
724
+ instead of going out anonymously, and they prove ancestry through their
725
+ workspace's Git. An unauthenticated limit therefore points at a process missing
726
+ `GITHUB_TOKEN`/`GH_TOKEN` or a `gh` login, or at guest-side forge use that must
727
+ run kernel-side. Runners and sessions still wait out a dispatcher-recorded
728
+ cooldown, but a limit they hit on a shared token no longer pauses the
729
+ dispatcher in advance; the dispatcher records it on its own next limited
730
+ request.
731
+
667
732
  Native merge application failures keep candidate-specific retry eligibility,
668
733
  including automatic decisions without a human command. Retries recheck consent,
669
734
  holds, verification and the exact candidate. Uncertain enables remain pending
@@ -93,7 +93,7 @@ the spec.
93
93
  ## Create a ticket
94
94
 
95
95
  ```
96
- ab ticket create "Rate-limit auth endpoints" --body spec.md [--labels bug,api] [--blocked-by file-1,file-2] [--issues 824,820:refs] [--priority urgent]
96
+ ab ticket create "Rate-limit auth endpoints" --body spec.md [--labels bug,api] [--blocked-by file-1,file-2] [--issues 824,820:refs] [--priority urgent] [--assignees alice,me]
97
97
  ```
98
98
 
99
99
  It lands in `triage/` and prints the new id. `--body` is a file, and its
@@ -106,6 +106,11 @@ succeeds. When the ticket originates from a forge issue, attach it with
106
106
  `--issues`: `N` (intent `closes`, the default) when the ticket fully resolves
107
107
  the issue, `N:refs` when it only partly addresses it. `--priority urgent` makes
108
108
  the dispatcher claim it before normal ready work; omit it for normal.
109
+ `--assignees` assigns the ticket on a source that stores assignees (GitHub):
110
+ usernames, or `me` for the owner of the GitHub credential. Without it, a
111
+ configured `[tickets].createAssignee` assigns the ticket, and `--assignees ''`
112
+ files it unassigned. Under `[tickets].readyAssignee` an unassigned ticket never
113
+ becomes ready, so assign a ticket to whoever's dispatcher should build it.
109
114
 
110
115
  For dependencies on any source, follow the
111
116
  [safe blocker-filing workflow](../ab-guide/references/ticket-dependencies.md).
@@ -125,6 +130,7 @@ ab ticket update file-3 --title "New title" --labels bug,api
125
130
  ab ticket update file-3 --labels ''
126
131
  ab ticket update file-3 --issues 824:refs
127
132
  ab ticket update file-3 --priority urgent
133
+ ab ticket update 412 --assignees octocat,me
128
134
  ab ticket block file-3 file-1
129
135
  ab ticket unblock file-3 file-1
130
136
  ```
@@ -134,10 +140,20 @@ Update is partial: omitted fields stay untouched, while an explicitly empty
134
140
  `--issues ''` clears it. `--priority urgent|normal` sets the dispatch class;
135
141
  the file tracker writes `priority = "urgent"` and removes the key for normal. A
136
142
  source that cannot store priority refuses `urgent`, names itself, and writes
137
- nothing; `normal` succeeds there. It cannot change state. For block/unblock the first
143
+ nothing; `normal` succeeds there. `--assignees` replaces the whole set of
144
+ assignees, `--assignees ''` clears it, and omitting it leaves them alone;
145
+ `ab ticket show` prints them and JSON reads carry an `assignees` array. Hand a
146
+ GitHub ticket to someone else this way. A source that cannot store assignees
147
+ (file, hosted, Linear) refuses the option, names itself, and writes nothing. It cannot change state. For block/unblock the first
138
148
  id is the ticket being edited; the second is its blocker. Both are safe to
139
149
  retry, and adding validates the blocker exists and is not the ticket itself.
140
150
 
151
+ A label can also select one of the repository's `[profiles]` (role overrides
152
+ for that ticket's build, defined in `autobuild.toml`; see the `ab-guide`
153
+ skill). Give a ticket at most one profile label: a ready ticket carrying two
154
+ profiles' labels is not claimed until one is removed. The profile is fixed when
155
+ the ticket is claimed, so relabelling a ticket whose build exists has no effect.
156
+
141
157
  ## Report the backlog
142
158
 
143
159
  ```
@@ -192,8 +208,10 @@ bounces. A caught failure before build creation returns it to configured Ready
192
208
  after safe ownership checks; unfinished recovery stays durably tracked and
193
209
  withheld from another claim. Uncertain ownership or externally changed/missing
194
210
  tickets end automatic recovery with an `abandoned` resolution, reported once
195
- in that tick's dispatcher diagnostics, leaving the ticket unchanged for
196
- operator inspection. See [preparation recovery](../ab-guide/references/restacking.md#ticket-preparation-before-build-creation).
211
+ in that tick's dispatcher diagnostics and once as default `ab watch`
212
+ repository attention, leaving the ticket unchanged for operator inspection.
213
+ The resolution records whether the claim was confirmed; an unconfirmed claim's
214
+ provider outcome is unknown, so the ticket may or may not sit in `doing/`. See [preparation recovery](../ab-guide/references/restacking.md#ticket-preparation-before-build-creation).
197
215
 
198
216
  **Don't hand-move anything out of `doing/`** — dispatch preparation or a build owns it. If you need to
199
217
  stop a build, that's `ab` (or a human), not `mv`.
@@ -4,8 +4,8 @@
4
4
  "build": "ab-hosted-service-build"
5
5
  },
6
6
  "dependencies": {
7
- "@defrex/autobuild-hosted-store-service": "1.5.0",
8
- "@defrex/autobuild": "1.5.0",
7
+ "@defrex/autobuild-hosted-store-service": "1.7.0",
8
+ "@defrex/autobuild": "1.7.0",
9
9
  "next": "16.1.6",
10
10
  "react": "19.2.4",
11
11
  "react-dom": "19.2.4"