@defrex/autobuild 1.6.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 (97) hide show
  1. package/README.md +1 -1
  2. package/SPEC.md +107 -10
  3. package/docs/agent-runtimes.md +1 -1
  4. package/docs/architecture.md +62 -22
  5. package/docs/configuration-overview.md +10 -0
  6. package/docs/configuration.md +285 -5
  7. package/docs/forges.md +1 -0
  8. package/docs/operator-api.md +19 -8
  9. package/docs/operator-surfaces.md +6 -3
  10. package/docs/plugin-authoring.md +44 -6
  11. package/docs/remote-store-protocol.md +19 -6
  12. package/docs/restacking.md +12 -7
  13. package/docs/ticket-sources.md +34 -6
  14. package/docs/tickets.md +6 -0
  15. package/docs/workspaces.md +1 -1
  16. package/package.json +3 -3
  17. package/packages/core/src/cli/attention.ts +1 -0
  18. package/packages/core/src/cli/binary-direct.ts +1 -0
  19. package/packages/core/src/cli/dispatch-frontend.ts +10 -14
  20. package/packages/core/src/cli/dispatch-preflight.ts +1 -0
  21. package/packages/core/src/cli/dispatch-repository-feed.ts +145 -109
  22. package/packages/core/src/cli/dispatch.ts +9 -3
  23. package/packages/core/src/cli/help.ts +11 -4
  24. package/packages/core/src/cli/init-validation.ts +14 -1
  25. package/packages/core/src/cli/repository-status.ts +37 -2
  26. package/packages/core/src/cli/status.ts +8 -0
  27. package/packages/core/src/cli/ticket.ts +22 -4
  28. package/packages/core/src/cli/watch.ts +2 -0
  29. package/packages/core/src/config/live.ts +4 -0
  30. package/packages/core/src/config/profiles.ts +96 -0
  31. package/packages/core/src/config/ready-assignee.ts +43 -11
  32. package/packages/core/src/config/roles.ts +33 -10
  33. package/packages/core/src/config/schema.ts +166 -24
  34. package/packages/core/src/events/compatibility.ts +3 -1
  35. package/packages/core/src/events/forge-degradation-policy.ts +16 -2
  36. package/packages/core/src/events/payloads.ts +8 -0
  37. package/packages/core/src/events/policy.ts +1 -0
  38. package/packages/core/src/events/repository.ts +17 -0
  39. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +73 -124
  40. package/packages/core/src/kernel/build-creation.ts +29 -0
  41. package/packages/core/src/kernel/forge-health.ts +47 -0
  42. package/packages/core/src/kernel/guarded-forge.ts +76 -18
  43. package/packages/core/src/kernel/node-parent.ts +2 -0
  44. package/packages/core/src/kernel/read-facts.ts +9 -1
  45. package/packages/core/src/kernel/reducer.ts +18 -1
  46. package/packages/core/src/kernel/ticket-preparation.ts +4 -1
  47. package/packages/core/src/operator/protocol.ts +10 -0
  48. package/packages/core/src/operator/query.ts +1 -1
  49. package/packages/core/src/operator/registry.ts +25 -5
  50. package/packages/core/src/operator/sandbox-host.ts +3 -0
  51. package/packages/core/src/operator/tickets.ts +15 -3
  52. package/packages/core/src/plugin-sdk/index.ts +4 -0
  53. package/packages/core/src/ports/forge/create.ts +6 -0
  54. package/packages/core/src/ports/forge/github-transport.ts +40 -3
  55. package/packages/core/src/ports/forge/github.ts +12 -1
  56. package/packages/core/src/ports/forge/workspace-ancestry.ts +60 -0
  57. package/packages/core/src/ports/forge-failure.ts +31 -2
  58. package/packages/core/src/ports/runner/routing.ts +66 -5
  59. package/packages/core/src/ports/tickets/assignees.ts +54 -0
  60. package/packages/core/src/ports/tickets/contract.ts +164 -4
  61. package/packages/core/src/ports/tickets/create.ts +17 -3
  62. package/packages/core/src/ports/tickets/github-fake.ts +18 -2
  63. package/packages/core/src/ports/tickets/github.ts +247 -29
  64. package/packages/core/src/ports/tickets/hosted-index.ts +1 -0
  65. package/packages/core/src/ports/tickets/operations.ts +6 -1
  66. package/packages/core/src/ports/tickets/tree.ts +12 -2
  67. package/packages/core/src/ports/tickets/update.ts +6 -2
  68. package/packages/core/src/ports/types.ts +33 -3
  69. package/packages/core/src/ports/workspace/vercel-sandbox.ts +9 -0
  70. package/packages/core/src/processes/build-child.ts +28 -7
  71. package/packages/core/src/processes/build-execution-state.ts +4 -1
  72. package/packages/core/src/processes/build-runner.ts +15 -1
  73. package/packages/core/src/processes/dispatcher.ts +98 -18
  74. package/packages/core/src/processes/harvest-child.ts +4 -0
  75. package/packages/core/src/processes/harvest-runner.ts +5 -0
  76. package/packages/core/src/processes/repo-view.ts +2 -0
  77. package/packages/core/src/scenarios/harness.ts +15 -1
  78. package/packages/core/src/store/reducer-value-shapes.json +3119 -2926
  79. package/packages/core/src/store/remote/client.ts +21 -8
  80. package/packages/core/src/store/remote/index.ts +4 -0
  81. package/packages/core/src/store/remote/protocol.ts +7 -0
  82. package/packages/core/src/store/remote/released-clients.json +11 -0
  83. package/packages/core/src/store/remote/released-reducer-values/1.7.0.json +27366 -0
  84. package/packages/core/src/store/remote/released-reducer-values/index.ts +2 -0
  85. package/packages/core/src/store/repo-state-events.ts +1 -0
  86. package/packages/core/src/store/types.ts +11 -0
  87. package/packages/core/src/testing/dispatch-read-budget.ts +84 -58
  88. package/packages/core/src/testing/index.ts +2 -0
  89. package/packages/core/src/testing/reduced-read-budget.ts +72 -9
  90. package/skills/guide/SKILL.md +116 -21
  91. package/skills/guide/references/operator-api.md +19 -8
  92. package/skills/guide/references/plugin-authoring.md +44 -6
  93. package/skills/guide/references/remote-store-protocol.md +19 -6
  94. package/skills/guide/references/restacking.md +12 -7
  95. package/skills/operate/SKILL.md +29 -3
  96. package/skills/tickets/SKILL.md +18 -2
  97. package/templates/hosted-service/package.json +2 -2
@@ -90,13 +90,15 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
90
90
  never preempts a running build.
91
91
  - **Failed preparation.** Durable preparation facts protect the claim-to-build
92
92
  interval. Caught failures return tickets to Ready (invalid specs to Triage),
93
- after exact build-ownership readback. Unresolved attempts stay withheld and
94
- retry before intake, even at full capacity or with intake disabled. Unsafe
95
- ownership or externally changed/missing tickets end automatic recovery with
96
- a diagnostic `abandoned` resolution, reported once in that tick's dispatcher
97
- diagnostics and once as default `ab watch` repository attention, leaving the
98
- ticket unchanged. The resolution records whether the claim was confirmed; an
99
- unconfirmed claim's provider outcome is unknown. See
93
+ after build-ownership readback at the selected slug and, for a keyed attempt,
94
+ the canonical slug its creation key derives. Unresolved attempts stay withheld
95
+ and retry before intake, even at full capacity or with intake disabled. Unsafe
96
+ ownership, an unprovable creation outcome, or externally changed/missing
97
+ tickets end automatic recovery with a diagnostic `abandoned` resolution,
98
+ reported once in that tick's dispatcher diagnostics and once as default
99
+ `ab watch` repository attention, leaving the ticket unchanged. The resolution
100
+ records whether the claim was confirmed; an unconfirmed claim's provider
101
+ outcome is unknown. See
100
102
  [Ticket preparation recovery](references/restacking.md#ticket-preparation-before-build-creation).
101
103
  - **Ticket assets** — files or folders attached to a ticket (see
102
104
  [Ticket assets](#ticket-assets)) are frozen into the build at claim and
@@ -441,7 +443,8 @@ evaluated as config logic.
441
443
 
442
444
  **Strictness:** unknown top-level keys/tables and unknown keys inside known
443
445
  tables are **errors**, not warnings — a typo must not silently disable a
444
- verifier. The open maps are `[accounts]`, `[commands]`, `[roles]`, `[workspace.config]`,
446
+ verifier. The open maps are `[accounts]`, `[commands]`, `[roles]`, `[profiles]`,
447
+ `[profiles.<name>.roles]`, `[workspace.config]`,
445
448
  `[workspace.config.runtimeProvisioning]`, `[verify.<step>]`, and
446
449
  `[finalize.<step>]`. Autobuild strictly validates the
447
450
  repository-defined command, role, and step entries. `[workspace.config]` is
@@ -839,6 +842,8 @@ The step's configured skill name remains a deprecated alias for existing
839
842
  configurations and will be removed in a future release. It applies only when
840
843
  `[roles.<step>]` is undeclared, so the step name always wins when both are
841
844
  present, and `ab dispatch` reports the alias with the step name to rename it to.
845
+ A [role profile](#profiles) the build selected can override the step's role
846
+ for that build.
842
847
  Written order never reorders execution: the event records the canonical config
843
848
  order. No front matter means all configured steps, preserving old plans and
844
849
  logs; an explicit empty list is valid only when all steps are optional. The
@@ -1088,6 +1093,8 @@ examples, remedies and regional routing are in [billing accounts](references/acc
1088
1093
  ### `[roles]`
1089
1094
 
1090
1095
  An **open map** of role name → `{ runtime?, model?, account?, args?, extensions?, sessionBudgetSeconds?, alternates? }`.
1096
+ These are the repository's roles for every build; a ticket label can select a
1097
+ [`[profiles]`](#profiles) entry that overrides some of them for that build.
1091
1098
  The four primary axes, session budget, and ordered alternate list inherit independently. The reserved `default` role must explicitly name a
1092
1099
  runtime, is the raw inheritance base for every other role, and is **never
1093
1100
  dispatched as a phase**. Its absence fails eager resolution before a session,
@@ -1209,6 +1216,50 @@ or `phase.failed`. A typed terminal racing either boundary remains authoritative
1209
1216
  Agent finalize post-step expiry is failure-tolerant; Harvest and direct check
1210
1217
  commands are outside this budget.
1211
1218
 
1219
+ ### `[profiles]`
1220
+
1221
+ An **open map** of profile name → `{ label, roles }`, for tickets that justify
1222
+ different role settings without changing the roles every other build reads.
1223
+
1224
+ ```toml
1225
+ [profiles.deep]
1226
+ label = "deep"
1227
+
1228
+ [profiles.deep.roles.plan-review]
1229
+ model = "claude-opus-5-5"
1230
+
1231
+ [profiles.deep.roles.implement]
1232
+ args = ["--effort", "high"]
1233
+ ```
1234
+
1235
+ - **Overlay.** A `[profiles.<name>.roles.<role>]` entry accepts the
1236
+ `[roles.<role>]` fields and may name any role, including agent verify and
1237
+ finalize step names and roles `[roles]` does not declare. Each declared
1238
+ field overrides; each omitted field comes from `[roles.<role>]`, then
1239
+ `[roles.default]`. A declared `alternates` list, including `[]`, replaces the
1240
+ inherited list. Key selection walks the step name, then its deprecated
1241
+ skill-name alias, against profile entries and `[roles]` together. An entry
1242
+ named `default` is refused.
1243
+ - **Selection is fixed at claim.** `label` matches ticket labels
1244
+ case-insensitively after trimming. The dispatcher records the selected
1245
+ profile on `build.created`; relabelling later has no effect. A node and each
1246
+ child select from their own ticket. A ready ticket carrying two profiles'
1247
+ labels is not claimed and appears as a `queue:` line in
1248
+ `ab repository status` until it carries at most one. A ticket can only
1249
+ select a profile; it never supplies a model, runtime or argument itself.
1250
+ - **Contents are live.** Every agent session of the build (plan, plan
1251
+ review, implement, code review, agent verify and finalize steps, reconcile)
1252
+ resolves through the profile read from the current configuration, so an
1253
+ edit reaches only the builds that selected it, at their next session.
1254
+ `session.started.profile` records `{ name, configured }`. If a reload removes
1255
+ the profile, those builds continue on the repository roles and
1256
+ `ab build status` says the profile is no longer configured.
1257
+ - **Validation.** Duplicate labels, a missing or blank label, and an entry
1258
+ whose effective runtime, model, args or account would be refused for a
1259
+ `[roles]` entry fail config load, `ab init --validate` and a live reload.
1260
+ - **Scope.** Sessions outside a build (`slug`, `upgrade`, `harvest`,
1261
+ `harvest-review`) never use a profile.
1262
+
1212
1263
  Mixing models across roles is **intentional**, not an inconsistency to clean
1213
1264
  up: a reviewer that differs from the implementer catches more. The removed
1214
1265
  legacy `[agent]` table is not an alias: config loading rejects it and directs
@@ -1316,7 +1367,8 @@ state eligible.
1316
1367
  | `readyLabels` | — (source-aware) | optional; array of nonempty strings | A ticket must carry **every** listed label to be dispatchable. `[]` = **no label gate**. Absent uses the source default below. |
1317
1368
  | `url` | selected build service | HTTPS URL (loopback HTTP allowed), no userinfo/query/fragment; hosted only | Ticket service independent of builds; required for local builds. |
1318
1369
  | `readyState` | hosted, github: `ready` | non-blank string; required for other sources | The one workflow state a ticket must sit in to be dispatchable. Linear matches exactly and case-sensitively; file matches it case-insensitively to a state directory (`ready` → `ready/`); github matches the `autobuild:<state>` label ignoring case. There is no any-state mode. |
1319
- | `readyAssignee` | — | optional; sources that declare the capability: `linear` (`"me"` or an email), `github` (`"me"` or a username, managed-user `name_shortcode` logins included), declaring plugins; refused for `file`/`hosted` | Also require the ticket to be assigned to that user; unassigned tickets are never ready. `me` is the credential owner: of `LINEAR_API_KEY` for `linear`, of the GitHub token for `github`. A `github` issue with several assignees matches any one of them. |
1370
+ | `readyAssignee` | — | optional; sources that declare the capability: `linear` (`"me"` or an email), `github` (`"me"` or a username, managed-user `name_shortcode` logins included), declaring plugins; refused for `file`/`hosted` | Also require the ticket to be assigned to that user; unassigned tickets are never ready. With `github`, each ready scan reports ready issues that have no assignee in the ticket diagnostics; assign one to make it claimable. `me` is the credential owner: of `LINEAR_API_KEY` for `linear`, of the GitHub token for `github`. A `github` issue with several assignees matches any one of them. |
1371
+ | `createAssignee` | — | optional; sources that declare the `assignees` capability: `github` (`"me"` or a username), declaring plugins; refused for `file`/`hosted`/`linear` | Assign every ticket Autobuild creates (`ab ticket create`, operator `tickets.create`, harvest proposals) to that user unless the create names its own assignees. `me` is the creating credential's owner, so a harvest proposal belongs to the filing dispatcher's owner. Pairs with `readyAssignee = "me"`. |
1320
1372
  | `teamKey` | — | required by `linear` and `hosted`, forbidden by `file` and `github`, allowed for plugins | The Linear team key (e.g. `"ENG"`), the captured prefix for new hosted ticket ids (`ENG-1`), or a plugin configuration field. Hosted numbers are project-local and continue across prefix changes; legacy ids remain aliases and readable inputs are case-insensitive. |
1321
1373
  | `claimedState` | hosted, github: `doing` | optional nonempty string; forbidden by `file`, allowed for plugins | Workflow state `claim()` moves a ticket to when a build starts. |
1322
1374
  | `doneState` | hosted, github: `"done"` | optional nonblank string | Project completion state and merged-ticket transition; hosted and github tickets only. A github ticket is done when its issue is closed as completed. |
@@ -1354,6 +1406,10 @@ Cross-field rules, each an **error**:
1354
1406
  `hosted`, or a plugin source without it). The error names the source; for a
1355
1407
  plugin it comes at startup and `ab init --validate`, after plugins load, and
1356
1408
  a live reload that adds it is rejected.
1409
+ - `createAssignee` on a source that can't store assignees (`file`, `hosted`,
1410
+ `linear`, or a plugin source without the `assignees` capability), the same
1411
+ way. `ab init --validate` also reports a `"me"` whose credential has no user
1412
+ and a user who can't be assigned issues in the repository.
1357
1413
  - `source = "file"` with `teamKey` or `claimedState` set. `dir` is **optional**
1358
1414
  here — absent means the default above, which is why the schema leaves it
1359
1415
  optional rather than giving it a `.default()`: that is what keeps the
@@ -1737,8 +1793,9 @@ every agent session as `AB_STORE`.
1737
1793
  One repository driven by several dispatchers — for example each engineer
1738
1794
  running `ab dispatch` locally — should share one store: connect every
1739
1795
  dispatcher to the same service with `ab connect`. Assignee gating
1740
- (`[tickets].readyAssignee`) divides tickets between dispatchers but not
1741
- store-owned state. Separate local stores each see only their own builds:
1796
+ (`[tickets].readyAssignee`, with `createAssignee = "me"` so each person's
1797
+ tickets and harvest proposals are assigned to them) divides tickets between
1798
+ dispatchers but not store-owned state. Separate local stores each see only their own builds:
1742
1799
 
1743
1800
  - **Nodes are owned by one store.** A child ticket can target only a node built
1744
1801
  in its own store; elsewhere it stays queued with `target node … is being
@@ -1836,12 +1893,12 @@ repository's `[tickets]` table selects. These forms therefore work unchanged
1836
1893
  with the file tracker, Linear, hosted tickets and GitHub issues, without
1837
1894
  provider-specific API/MCP calls:
1838
1895
 
1839
- - `ab ticket create <title> --body <file> [--state <state>] [--labels a,b] [--blocked-by id,id] [--issues N[:refs],...] [--priority urgent|normal] [--json]`
1896
+ - `ab ticket create <title> --body <file> [--state <state>] [--labels a,b] [--blocked-by id,id] [--issues N[:refs],...] [--priority urgent|normal] [--assignees a,b] [--json]`
1840
1897
  files a ticket. Without `--state`, the source uses `[tickets].createState` or
1841
1898
  its own default. A named state is passed through unchanged and the selected
1842
1899
  source validates it before creating anything. Blocker ids belong to the same
1843
1900
  source and are also checked before the single create call.
1844
- - `ab ticket update <id> [--title <title>] [--body <file>] [--labels a,b] [--issues N[:refs],...] [--priority urgent|normal] [--json]`
1901
+ - `ab ticket update <id> [--title <title>] [--body <file>] [--labels a,b] [--issues N[:refs],...] [--priority urgent|normal] [--assignees a,b] [--json]`
1845
1902
  partially replaces editable fields. At least one editable flag is required;
1846
1903
  `--json` alone is not an update.
1847
1904
  - `ab ticket block <id> <blocker-id[,blocker-id...]> [--json]` adds one or more
@@ -1914,6 +1971,15 @@ alone); plugin sources without the capability read every ticket as normal,
1914
1971
  refuse `urgent` naming themselves and writing nothing, and accept `normal`
1915
1972
  as a no-op. JSON
1916
1973
  ticket output always includes `priority`, and list output marks urgent tickets.
1974
+ `--assignees a,b` names usernames, or `me` for the owner of the source's
1975
+ credential, on a source that stores assignees (GitHub). On create it replaces
1976
+ the `[tickets].createAssignee` default and `--assignees ''` files the ticket
1977
+ unassigned; on update it replaces the whole set, `''` clears it, and omitting
1978
+ it leaves them alone. A user who can't be assigned, or a write the provider
1979
+ accepts without the assignees, fails naming the cause. `ab ticket show` prints
1980
+ assignees and JSON reads carry an `assignees` array; sources that can't store
1981
+ them (file, hosted, Linear) carry no field and refuse the option, naming
1982
+ themselves and writing nothing.
1917
1983
  Supplied title/body values must be
1918
1984
  nonblank. State is intentionally not an update field — `transition()` remains its sole owner —
1919
1985
  and every validation or unknown-ticket error occurs before
@@ -2143,8 +2209,9 @@ ready-ticket queue depth, and `active` is occupied capacity (every unfinished
2143
2209
  build, plus finished builds running work again) against root `capacity`. Observation pressure is not a header counter: the
2144
2210
  Harvest row shows a run's observations, and `ab harvest status` reports
2145
2211
  Harvest state.
2146
- The execution-mode frontend checkpoints dashboard facts, the latest run start and the sampled
2147
- lease holder's start; identity history stays partial and missing holders use a
2212
+ The execution-mode frontend checkpoints only the latest run start and the sampled
2213
+ lease holder's start; dashboard facts render from the canonical reduced
2214
+ repository value. Identity history stays partial and missing holders use a
2148
2215
  bounded per-run lookup. Without a usable checkpoint, startup and recovery seed
2149
2216
  from the canonical reduced repository value, never the journal. Unchanged written/refused checkpoints are not uploaded
2150
2217
  again. Dirty saves run at most once per 30 seconds; transient failures retry
@@ -2535,8 +2602,10 @@ repository-local precedence. The command uses the same reducer as the
2535
2602
  dispatcher and dashboard, writes no state, claims no ticket, attaches no runner,
2536
2603
  and starts no dispatcher work. Dispatcher identity includes the held run’s recorded
2537
2604
  runtime; historical starts without metadata display `runtime unrecorded`.
2538
- It also lists the latest ticket scan's dependency diagnostics (`queue:` lines,
2539
- `dependencyDiagnostics` in JSON), including tickets held because their target
2605
+ It also lists the latest ticket scan's ticket and dependency diagnostics
2606
+ (`queue:` lines, `ticketDiagnostics` and `dependencyDiagnostics` in JSON),
2607
+ including ready tickets whose labels select more than one role profile and
2608
+ tickets held because their target
2540
2609
  node is being built by another store, and dispatcher startup warnings
2541
2610
  (`warningLines`).
2542
2611
 
@@ -2565,7 +2634,9 @@ cycle, PR lifecycle, latest event, durable progress age, heartbeat, and lease.
2565
2634
  Every runner attach appears chronologically with its recorded runtime (version,
2566
2635
  commit, source kind/location), or `runtime unrecorded` for historical attaches;
2567
2636
  JSON exposes nullable runtime in `runnerAttaches`. Phases belong to the preceding
2568
- attach boundary.
2637
+ attach boundary. A build created with a [role profile](#profiles) shows a
2638
+ `profile:` line (`profile` in JSON), marked no longer configured when a reload
2639
+ removed it; a build without one shows neither.
2569
2640
  For an open PR, the current work-owner decision reads the build-owned
2570
2641
  configuration from the store's deposited `build-runner-effective-config`
2571
2642
  artifact — deposited at every runner launch and refreshed on effective-config
@@ -2671,7 +2742,11 @@ The default watch reports actionable conditions only:
2671
2742
  - Repository `harvest.escalated`, `harvest.recovery-exhausted`,
2672
2743
  `dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
2673
2744
  `restartRequired`, `dispatcher.upgrade-failed`, `dispatcher.runtime-rolled-back`,
2674
- `dispatcher.kernel-git-unavailable`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
2745
+ `dispatcher.kernel-git-unavailable`, `forge.credential-limited`, abnormal
2746
+ `dispatcher.run-stopped`, and `dispatcher.lost`. A `forge.credential-limited`
2747
+ line names the process whose GitHub request was rate-limited outside the
2748
+ dispatcher's credential (unauthenticated, with why, or on that process's own
2749
+ credential) and its reset; dispatcher forge work continues.
2675
2750
  - Repository `ticket-preparation.resolved` with outcome `abandoned`: automatic
2676
2751
  preparation recovery stopped and left the ticket unchanged. The line names the
2677
2752
  ticket, attempt and recorded reason; the payload's `claimed` says whether the
@@ -3111,7 +3186,7 @@ not consume `maxPhaseAttempts`. A seventh transient failure records
3111
3186
  error and six retries. Answering that escalation opens a fresh publication episode
3112
3187
  for the same retained intent without resetting agent phase failures. Pending
3113
3188
  publication keeps its workspace through backoff and unresolved exhaustion.
3114
- Classified rate limits retain repository cooldown and consume no publication
3189
+ Dispatcher-classified rate limits retain repository cooldown and consume no publication
3115
3190
  retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
3116
3191
  errors retain their existing behavior.
3117
3192
 
@@ -3140,7 +3215,8 @@ one durable `dispatcher.kernel-git-unavailable` repository condition, node work
3140
3215
  waits, and `dispatcher.kernel-git-recovered` closes the condition once a clone
3141
3216
  succeeds.
3142
3217
 
3143
- A classified forge rate limit records repository degradation with `resetAt`.
3218
+ A rate limit the dispatcher classifies on its own authenticated request
3219
+ records repository degradation with `resetAt`.
3144
3220
  Forge work waits during cooldown; passing the deadline permits a recovery
3145
3221
  request; a successful probe records automatic recovery. An authorized operator
3146
3222
  may explicitly override erroneous recorded state with
@@ -3151,6 +3227,25 @@ success. A subsequent actual limit records a fresh cooldown. Hosted admission
3151
3227
  requires a schema-valid finite ISO `resetAt` no later than server time plus
3152
3228
  24 hours, inclusive; past deadlines remain valid. Rejection never clamps or
3153
3229
  invents a provider reset, and historical events remain readable.
3230
+
3231
+ Only the dispatcher's own forge pauses the repository. A limit on a request
3232
+ that carried no credential, or one seen by a build runner or phase session,
3233
+ says nothing about the dispatcher's credential: that process waits out its own
3234
+ reset locally (a dispatcher defers that work instead), and records one advisory
3235
+ `forge.credential-limited` fact per episode naming the process, whether the
3236
+ request was `unauthenticated` (with why) or used the process's own credential,
3237
+ and the reset. It is `ab watch` attention and appears as
3238
+ `forgeCredentialLimits` in `ab repository status` until its reset;
3239
+ `forge-clear` does not apply. Remote guests receive no forge credential: their
3240
+ GitHub API requests fail with a typed error naming `GITHUB_TOKEN or GH_TOKEN`
3241
+ instead of going out anonymously, and they prove ancestry through their
3242
+ workspace's Git. An unauthenticated limit therefore points at a process missing
3243
+ `GITHUB_TOKEN`/`GH_TOKEN` or a `gh` login, or at guest-side forge use that must
3244
+ run kernel-side. Runners and sessions still wait out a dispatcher-recorded
3245
+ cooldown, but a limit they hit on a shared token no longer pauses the
3246
+ dispatcher in advance; the dispatcher records it on its own next limited
3247
+ request.
3248
+
3154
3249
  Native merge application failures keep candidate-specific retry eligibility,
3155
3250
  including automatic decisions without a human command. Retries recheck consent,
3156
3251
  holds, verification and the exact candidate. Uncertain enables remain pending
@@ -88,7 +88,7 @@ raw session-event append. External operator harnesses own agent execution.
88
88
  | `GET …/status` | Repository intake, pause, and default-auto-merge projection. Its `operator` is `{presence: "unavailable", reason}`: this route does not load presence registrations, so it is not evidence that no operator is present. |
89
89
  | `GET …/harvest/status` | Harvest gate, runs, steps, recovery, and attention projection. |
90
90
  | `GET …/builds/{slug}/artifacts/{kind}?rev=N` | Raw bytes (`application/octet-stream`) plus content-disposition and `X-Autobuild-Artifact-*` metadata headers. Omit `rev` for latest. |
91
- | `GET …/tickets?state=S&label=L&limit=N&offset=K&order=O` | `{states,tickets,diagnostics,criteria,triageState,readyState,doneState,total}`. The three lifecycle names come from effective repository configuration (including provider fallback). With no `state`, `criteria.state` is `triageState`; repeated `label` parameters narrow that state with AND filters. An explicit `state` selects that exact backend workflow state. `limit` (0–200) returns one page, after skipping `offset`, in `order` `oldest` (the default: dispatch order, urgent tickets first, then the source order) or `newest` (newest filed first); `total` counts every match before paging. |
91
+ | `GET …/tickets?state=S&label=L&limit=N&offset=K&order=O` | `{states,tickets,diagnostics,criteria,triageState,readyState,doneState,total}`. The three lifecycle names come from effective repository configuration (including provider fallback). With no `state`, `criteria.state` is `triageState`; repeated `label` parameters narrow that state with AND filters. An explicit `state` selects that exact backend workflow state. `limit` (0–200) returns one page, after skipping `offset`, in `order` `oldest` (the default: dispatch order, urgent tickets first, then the source order) or `newest` (newest filed first, regardless of urgency; see paging below); `total` counts every match before paging. |
92
92
  | `GET …/tickets/states` | Full state metadata `{name,tickets,about?}[]`, including empty states (`tickets.states` in MCP). |
93
93
  | `GET …/tickets/{id}` | `{ticket,blockers,build}`. Blockers include native `exists`/`resolved` status; `build` prefers an active matching repository build, otherwise the most recently updated one. |
94
94
 
@@ -132,8 +132,8 @@ JSON bodies are strict: unknown fields are rejected.
132
132
  | `POST …/bulk-control` | `{"action":"pause"\|"resume"}`. The hold fact, intake fact, then eligible build events are written in that order. |
133
133
  | `POST …/harvest/control` | `{"action":"toggle-gate"}` or `{"action":"run","run":"…"}`. A run action is bound to that concrete projected run. |
134
134
  | `POST …/tickets/states` | `{name,about?}` → `{state,created}`; requires attributed operator identity (`tickets.state.create` in MCP). Hosted duplicate names are refused case-insensitively. |
135
- | `POST …/tickets` | `{"title":"…","body":"…","labels"?:[],"state"?:"…","blockedBy"?:[],"issueLinks"?:[{"issue":N,"intent"?:"closes"|"refs"}],"priority"?:"urgent"|"normal","kind"?:"work"|"node","target"?:"id"|null}`; omitted state preserves the backend default, omitted intent is `closes`, and omitted priority is normal. A backend that cannot store issue links refuses with `code: "issue-links-unsupported"`; one that cannot store priority refuses `urgent` with `code: "priority-unsupported"` and accepts `normal` as a no-op. |
136
- | `PATCH …/tickets/{id}` | Any nonempty subset of `title`, `body`, complete-replacement `labels`, complete-replacement `issueLinks` (`[]` clears), `priority` (`urgent` or `normal`; refusals as for create), `kind` (`work` or `node`), and nullable `target` (null clears). Body bytes are not normalized. |
135
+ | `POST …/tickets` | `{"title":"…","body":"…","labels"?:[],"state"?:"…","blockedBy"?:[],"issueLinks"?:[{"issue":N,"intent"?:"closes"|"refs"}],"priority"?:"urgent"|"normal","assignees"?:["login"|"me"],"kind"?:"work"|"node","target"?:"id"|null}`; omitted state preserves the backend default, omitted intent is `closes`, omitted priority is normal, and omitted assignees apply `[tickets].createAssignee` (`[]` creates an unassigned ticket). `assignees` takes at most ten entries, counted before duplicates collapse, and more is a validation error. A backend that cannot store issue links refuses with `code: "issue-links-unsupported"`; one that cannot store priority refuses `urgent` with `code: "priority-unsupported"` and accepts `normal` as a no-op; one that cannot store assignees refuses any `assignees` with `code: "assignees-unsupported"`. |
136
+ | `PATCH …/tickets/{id}` | Any nonempty subset of `title`, `body`, complete-replacement `labels`, complete-replacement `issueLinks` (`[]` clears), `priority` (`urgent` or `normal`; refusals as for create), complete-replacement `assignees` (`[]` clears; refusals as for create), `kind` (`work` or `node`), and nullable `target` (null clears). Body bytes are not normalized. |
137
137
  | `POST …/tickets/{id}/move` | Exactly one of `{"state":"backend state name"}` or `{"role":"triage"\|"ready"\|"backlog"\|"rejected"}`; both or neither is `400 validation` (`tickets.move` in MCP takes the same target). A role resolves to the configured `triageState`, `readyState`, `backlogState`, or `rejectedState`. An unset `backlogState` or `rejectedState` refuses with a message naming the key to set, and never guesses a native state. A source that can create states creates a missing role state before moving. |
138
138
  | `POST …/tickets/{id}/block` | `{"blockerIds":["…"]}`. |
139
139
  | `POST …/tickets/{id}/unblock` | `{"blockerIds":["…"]}`. |
@@ -298,7 +298,11 @@ The default watch reports actionable conditions only:
298
298
  - Repository `harvest.escalated`, `harvest.recovery-exhausted`,
299
299
  `dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
300
300
  `restartRequired`, `dispatcher.upgrade-failed`, `dispatcher.runtime-rolled-back`,
301
- `dispatcher.kernel-git-unavailable`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
301
+ `dispatcher.kernel-git-unavailable`, `forge.credential-limited`, abnormal
302
+ `dispatcher.run-stopped`, and `dispatcher.lost`. A `forge.credential-limited`
303
+ line names the process whose GitHub request was rate-limited outside the
304
+ dispatcher's credential (unauthenticated, with why, or on that process's own
305
+ credential) and its reset; dispatcher forge work continues.
302
306
  - Repository `ticket-preparation.resolved` with outcome `abandoned`: automatic
303
307
  preparation recovery stopped and left the ticket unchanged. The line names the
304
308
  ticket, attempt and recorded reason; the payload's `claimed` says whether the
@@ -395,6 +399,10 @@ Active janitor attention and an open janitor escalation clear on a successful
395
399
  attempt. Repository status
396
400
  includes forge degradation/reset and available request counts; `dispatcher.forge-persistent` requires a completed retry opportunity past
397
401
  the original reset, which later rate limits cannot postpone indefinitely.
402
+ Only the dispatcher's own classified limits record that degradation. Status
403
+ also lists active `forgeCredentialLimits`: limits on unauthenticated requests or
404
+ seen by build runners and phase sessions, each naming the process, which never
405
+ pause repository forge work.
398
406
 
399
407
  ### Node restack request
400
408
 
@@ -580,20 +588,23 @@ permission or retention failures leave deletion pending. Vercel Blob cleanup use
580
588
  the same store identity, token and prefixed pathname as uploads. Missing objects
581
589
  are successful cleanup; provider errors never count as completed deletion.
582
590
 
583
- Paged ticket listings use the source's optional native `listPage(criteria, page)` capability when present, otherwise read the full listing, order it, and slice it: by default urgent tickets first, then normal ones, each in source order; for `newest`, the reversed source order. Native errors propagate. PostgreSQL counts matches without bodies and reads only the requested window. Zero limits and offsets past the end still report the full matching total. Unpaged listings remain exhaustive; the wire payload is the same for both paths.
591
+ Paged ticket listings use the source's optional native `listPage(criteria, page)` capability when present, otherwise read the full listing, order it, and slice it: by default urgent tickets first, then normal ones, each in source order; for `newest`, the reversed listing. `newest` means newest filed first, regardless of urgency, with a stable tie-break; it is not the reverse of dispatch order. A source that lists in filing order (file, GitHub, Linear) gets exactly that from the reversed listing. The remote `HostedTicketSource` is the exception: the hosted list-ready protocol returns urgent tickets first and carries no filing time, so its fallback `newest` pages are reversed dispatch order whenever urgent tickets exist. Native errors propagate. PostgreSQL counts matches without bodies and reads only the requested window. Zero limits and offsets past the end still report the full matching total. Unpaged listings remain exhaustive; the wire payload is the same for both paths.
584
592
 
585
593
 
586
594
  ### Forge cooldown admission and explicit recovery
587
595
 
588
596
  Hosted repository event appends and atomic artifact deposits validate
589
- `dispatcher.forge-degraded` before any durable mutation. The payload must match
590
- its event schema, with a finite ISO `resetAt` at most 24 hours after server time
597
+ `dispatcher.forge-degraded` and `forge.credential-limited` before any durable
598
+ mutation. The payload must match its event schema, with a finite ISO `resetAt` at most 24 hours after server time
591
599
  (inclusive). Already-expired deadlines are accepted. Invalid or out-of-horizon
592
600
  writes return `400 validation` (the remote adapter exposes `EventValidationError`);
593
601
  the server never clamps or invents a provider reset. Historical decoding has no clock-relative restriction.
594
602
 
595
603
  Build-runner and build-phase grants may POST only the kernel-authored
596
- `dispatcher.forge-degraded` repository fact through the events route. The
604
+ `forge.credential-limited` and `dispatcher.forge-degraded` repository facts
605
+ through the events route. Current runners and phase sessions record only
606
+ `forge.credential-limited` attention; the `dispatcher.forge-degraded` exception
607
+ remains for runners pinned to older releases. The
597
608
  preceding `requireProject` check binds this exception to the exact repository
598
609
  in the delegated claim. A hosted project identifies one repository. Delegates
599
610
  cannot write recovery, deposits or other repository facts, regardless of the
@@ -158,6 +158,9 @@ API 1.8 adds optional forge failure classification. Import `ForgeFailure` and `i
158
158
  ```ts
159
159
  // Rate limit, with a valid ISO reset timestamp:
160
160
  throw new ForgeFailure(message, { kind: 'rate-limited', resetAt })
161
+ // The limited request carried no credential: say why, so the limit stays local
162
+ // to the caller instead of pausing the repository:
163
+ throw new ForgeFailure(message, { kind: 'rate-limited', resetAt, unauthenticated: reason })
161
164
  // Retryable transport error:
162
165
  throw new ForgeFailure(message, { kind: 'transient', retry: 'retryable' })
163
166
  ```
@@ -537,10 +540,12 @@ refuse a configured `readyAssignee` with an error naming the source and plugin.
537
540
  Three optional methods support it:
538
541
 
539
542
  - `prepareReadyAssignee(): Promise<void>` is called once at dispatcher startup,
540
- before the loop and never in a tick, whether or not `readyAssignee` is set.
543
+ before the loop and never in a tick, whether or not `readyAssignee` or
544
+ `createAssignee` is set.
541
545
  Resolve whatever `"me"` needs and memoize it. A credential with no user is a
542
546
  recorded result, not a throw; throw only for infrastructure failures, which
543
- fail startup when `readyAssignee` is set and are otherwise a warning.
547
+ fail startup when `readyAssignee` or `createAssignee` is set and are
548
+ otherwise a warning.
544
549
  - `readyAssigneeRefusal(value): string | undefined` is synchronous and makes no
545
550
  request. Return why the value can't be honoured from what was prepared, or
546
551
  `undefined`. Startup and every reload call it, so a refused reload keeps the
@@ -549,6 +554,29 @@ Three optional methods support it:
549
554
  return a one-line summary of who the value names, such as `me → @octocat`,
550
555
  or throw an error that says how to fix a value that names nobody.
551
556
 
557
+ ## Optional assignees capability
558
+
559
+ An adapter opts in with `assignees: true` and must then accept
560
+ `assignees?: string[]` on create, update and revision-checked update, where
561
+ each entry is a username or `me` (the owner of the source's credential) and an
562
+ update replaces the whole set, `[]` clearing it. Return `assignees` on every
563
+ read, `[]` when unassigned, and leave it out of revisions. Check each user
564
+ before any write and refuse, writing nothing, when one can't be assigned. A
565
+ write the provider accepts without the requested assignees must fail rather
566
+ than report success, and a retried keyed create that adopts an existing ticket
567
+ must leave it with the requested assignees. Without the flag, the
568
+ compatibility facade refuses any write naming assignees, including `[]`, with
569
+ `TicketAssigneesUnsupported` before your methods run, strips them from reads,
570
+ and dispatcher startup, `ab init --validate` and live reloads refuse a
571
+ configured `[tickets].createAssignee`, naming the source and plugin.
572
+
573
+ Callers apply `createAssignee` themselves, so a draft's assignees are always
574
+ exact. To support it, implement `createAssigneeRefusal(value)`, synchronous
575
+ and request-free like `readyAssigneeRefusal`, and
576
+ `describeCreateAssignee(value)` for `ab init --validate`. `"me"` should reuse
577
+ what `prepareReadyAssignee` resolved, so a dispatcher never resolves it in a
578
+ tick.
579
+
552
580
  ## Optional ticket paging capability
553
581
 
554
582
  Native paging is an optional API 1.9 ticket-source capability:
@@ -556,8 +584,11 @@ Native paging is an optional API 1.9 ticket-source capability:
556
584
  The SDK exports these types; the result is `TicketListing & { total: number }`.
557
585
  Criteria retain state, labels (AND), and assignee semantics. The page has a
558
586
  nonnegative integer `limit`, optional nonnegative integer `offset` (default 0),
559
- and optional `order: 'oldest' | 'newest'` (default oldest). Newest reverses the
560
- entire source order before offset and limit. Total counts all matches, even
587
+ and optional `order: 'oldest' | 'newest'` (default oldest). Oldest is the
588
+ source's dispatch order: with `priority`, urgent tickets first, then normal
589
+ ones, each in listing order. Newest is newest filed first: creation time
590
+ descending, regardless of urgency, with a stable tie-break. It is not the
591
+ reverse of dispatch order. Offset and limit apply after ordering. Total counts all matches, even
561
592
  with limit zero or an offset past the end. Records, diagnostics and errors
562
593
  match the exhaustive listing. The shared `describeTicketSourceContract` suite
563
594
  automatically compares declared native paging with full-read windows.
@@ -565,7 +596,12 @@ automatically compares declared native paging with full-read windows.
565
596
  Only paged operator listings select this capability. Sources without it retain
566
597
  the full-read fallback, which orders the listing before offset and limit: by
567
598
  default a stable urgent-first partition (urgent, then normal, each in source
568
- order), or for newest the reversed source order. Native errors propagate. Unpaged operator
599
+ order), or for newest the reversed listing, which is newest filed first for
600
+ sources that list in filing order (file, GitHub, Linear). The remote
601
+ `HostedTicketSource` is the exception: the hosted list-ready protocol returns
602
+ urgent tickets first and carries no filing time, so the client cannot see
603
+ filing order, and its newest pages are reversed dispatch order whenever urgent
604
+ tickets exist. Native errors propagate. Unpaged operator
569
605
  listings, CLI ticket lists and dispatcher ready scans remain exhaustive through
570
606
  `listReady`/`listAll`. The hosted PostgreSQL source counts matches without
571
607
  bodies and reads only the SQL-bounded window. File, Linear, GitHub and the remote
@@ -574,4 +610,6 @@ bodies and reads only the SQL-bounded window. File, Linear, GitHub and the remot
574
610
  Hosted cooldown recording rejects observed reset deadlines beyond the 24-hour
575
611
  admission horizon explicitly; adapters must not shorten or invent a provider
576
612
  reset to evade this validation. Operator forge-clear is an audited override,
577
- not a successful provider observation.
613
+ not a successful provider observation. Only limits the dispatcher's own forge
614
+ classifies, without `unauthenticated`, record repository cooldown; others are
615
+ local to the process and reported as `forge.credential-limited` attention.
@@ -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 |
@@ -1190,8 +1196,12 @@ Remote clients continue mapping addressed GET 404 responses to null. Nested
1190
1196
  streams must also belong to the addressed parent.
1191
1197
 
1192
1198
  `GET /builds` is filtered by the server to the credential's project. Project
1193
- `POST /builds` always allocates a fresh random-suffixed slug from the requested
1194
- 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
1195
1205
  namespace: `ab-node/<slug>` when the `build.created` payload has `kind: "node"`,
1196
1206
  otherwise `ab/<slug>`. Without `created`, a supplied `branch` prefix decides the
1197
1207
  kind. A supplied `branch` must be exactly `ab/<requested slug>` or
@@ -1776,14 +1786,17 @@ The commands use the saved owner credential, even if an ambient build token exis
1776
1786
  ### Forge cooldown admission and explicit recovery
1777
1787
 
1778
1788
  Hosted repository event appends and atomic artifact deposits validate
1779
- `dispatcher.forge-degraded` before any durable mutation. The payload must match
1780
- 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
1781
1791
  (inclusive). Already-expired deadlines are accepted. Invalid or out-of-horizon
1782
1792
  writes return `400 validation` (the remote adapter exposes `EventValidationError`);
1783
1793
  the server never clamps or invents a provider reset. Historical decoding has no clock-relative restriction.
1784
1794
 
1785
1795
  Build-runner and build-phase grants may POST only the kernel-authored
1786
- `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
1787
1800
  preceding `requireProject` check binds this exception to the exact repository
1788
1801
  in the delegated claim. A hosted project identifies one repository. Delegates
1789
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
@@ -119,7 +119,8 @@ Credential/process changes remain subject to the Boundaries below.
119
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
121
  restart, abnormal dispatcher stops/loss, abandoned ticket preparations, ticket-source and forge degradation past reset (15 minutes
122
- for ticket sources without reset), and five minutes of continuous tick failures. Advertised resets
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
@@ -339,6 +340,11 @@ out of ready to make room. Urgency never preempts a running build, and a blocked
339
340
  urgent ticket still waits on its blockers. A source that cannot store priority
340
341
  refuses `urgent` and names itself; tell the human.
341
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
+
342
348
  Move tickets by lifecycle role rather than by native state name:
343
349
  `ab ticket move <id> --role triage|ready|backlog|rejected`. "Ice it",
344
350
  "icebox" and "backlog" mean `--role backlog` (deferred work); "reject" and
@@ -652,7 +658,7 @@ not consume `maxPhaseAttempts`. A seventh transient failure records
652
658
  error and six retries. Answering that escalation opens a fresh publication episode
653
659
  for the same retained intent without resetting agent phase failures. Pending
654
660
  publication keeps its workspace through backoff and unresolved exhaustion.
655
- Classified rate limits retain repository cooldown and consume no publication
661
+ Dispatcher-classified rate limits retain repository cooldown and consume no publication
656
662
  retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
657
663
  errors retain their existing behavior.
658
664
 
@@ -692,7 +698,8 @@ one durable `dispatcher.kernel-git-unavailable` repository condition, node work
692
698
  waits, and `dispatcher.kernel-git-recovered` closes the condition once a clone
693
699
  succeeds.
694
700
 
695
- 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`.
696
703
  Forge work waits during cooldown; passing the deadline permits a recovery
697
704
  request; a successful probe records automatic recovery. An authorized operator
698
705
  may explicitly override erroneous recorded state with
@@ -703,6 +710,25 @@ success. A subsequent actual limit records a fresh cooldown. Hosted admission
703
710
  requires a schema-valid finite ISO `resetAt` no later than server time plus
704
711
  24 hours, inclusive; past deadlines remain valid. Rejection never clamps or
705
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
+
706
732
  Native merge application failures keep candidate-specific retry eligibility,
707
733
  including automatic decisions without a human command. Retries recheck consent,
708
734
  holds, verification and the exact candidate. Uncertain enables remain pending