@defrex/autobuild 1.6.0 → 1.8.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 (165) hide show
  1. package/README.md +1 -1
  2. package/SPEC.md +423 -57
  3. package/docs/agent-runtimes.md +1 -1
  4. package/docs/answering-blocked-builds.md +44 -3
  5. package/docs/architecture.md +124 -29
  6. package/docs/cli.md +1 -0
  7. package/docs/configuration-overview.md +11 -1
  8. package/docs/configuration.md +334 -14
  9. package/docs/dispatcher.md +1 -1
  10. package/docs/forges.md +1 -0
  11. package/docs/integration-overview.md +2 -2
  12. package/docs/integration-tree.md +7 -4
  13. package/docs/merge-policy.md +78 -6
  14. package/docs/migration-1.0.md +4 -2
  15. package/docs/operating.md +3 -2
  16. package/docs/operator-api.md +45 -13
  17. package/docs/operator-surfaces.md +16 -3
  18. package/docs/plugin-authoring.md +45 -7
  19. package/docs/remote-store-protocol.md +28 -7
  20. package/docs/restacking.md +35 -11
  21. package/docs/ticket-dependencies.md +9 -4
  22. package/docs/ticket-sources.md +34 -6
  23. package/docs/tickets.md +7 -1
  24. package/docs/troubleshooting.md +1 -1
  25. package/docs/workspaces.md +1 -1
  26. package/package.json +3 -3
  27. package/packages/core/src/cli/attention.ts +2 -0
  28. package/packages/core/src/cli/binary-direct.ts +1 -0
  29. package/packages/core/src/cli/build-control.ts +65 -7
  30. package/packages/core/src/cli/context.ts +55 -14
  31. package/packages/core/src/cli/dashboard/actions.ts +13 -4
  32. package/packages/core/src/cli/dashboard/landing-display.ts +32 -8
  33. package/packages/core/src/cli/dashboard/model.ts +61 -8
  34. package/packages/core/src/cli/dashboard/render.ts +28 -3
  35. package/packages/core/src/cli/dashboard/tree.ts +9 -1
  36. package/packages/core/src/cli/dispatch-frontend.ts +10 -14
  37. package/packages/core/src/cli/dispatch-preflight.ts +1 -0
  38. package/packages/core/src/cli/dispatch-repository-feed.ts +145 -109
  39. package/packages/core/src/cli/dispatch.ts +9 -3
  40. package/packages/core/src/cli/help.ts +80 -11
  41. package/packages/core/src/cli/init-validation.ts +14 -1
  42. package/packages/core/src/cli/landings.ts +1 -1
  43. package/packages/core/src/cli/main.ts +60 -9
  44. package/packages/core/src/cli/publication-settlement.ts +10 -0
  45. package/packages/core/src/cli/repository-status.ts +37 -2
  46. package/packages/core/src/cli/status.ts +186 -12
  47. package/packages/core/src/cli/terminals.ts +197 -4
  48. package/packages/core/src/cli/ticket.ts +22 -4
  49. package/packages/core/src/cli/wait.ts +1 -0
  50. package/packages/core/src/cli/watch.ts +73 -0
  51. package/packages/core/src/config/landing.ts +12 -0
  52. package/packages/core/src/config/live.ts +4 -0
  53. package/packages/core/src/config/path-selectors.ts +68 -0
  54. package/packages/core/src/config/profiles.ts +96 -0
  55. package/packages/core/src/config/ready-assignee.ts +43 -11
  56. package/packages/core/src/config/roles.ts +33 -10
  57. package/packages/core/src/config/schema.ts +205 -81
  58. package/packages/core/src/events/catalog.ts +17 -3
  59. package/packages/core/src/events/compatibility.ts +4 -1
  60. package/packages/core/src/events/forge-degradation-policy.ts +16 -2
  61. package/packages/core/src/events/head-paths-limits.ts +25 -0
  62. package/packages/core/src/events/payloads.ts +323 -20
  63. package/packages/core/src/events/policy.ts +22 -0
  64. package/packages/core/src/events/repository.ts +47 -1
  65. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +320 -130
  66. package/packages/core/src/kernel/build-creation.ts +29 -0
  67. package/packages/core/src/kernel/consent-revocation.ts +72 -0
  68. package/packages/core/src/kernel/dispatch-capacity.ts +19 -8
  69. package/packages/core/src/kernel/engine.ts +48 -8
  70. package/packages/core/src/kernel/forge-health.ts +47 -0
  71. package/packages/core/src/kernel/guarded-forge.ts +76 -18
  72. package/packages/core/src/kernel/head-paths-state.ts +63 -0
  73. package/packages/core/src/kernel/head-paths.ts +401 -0
  74. package/packages/core/src/kernel/landing-policy-identity.ts +20 -0
  75. package/packages/core/src/kernel/landing-policy.ts +55 -2
  76. package/packages/core/src/kernel/landing-readiness.ts +104 -9
  77. package/packages/core/src/kernel/landing-state.ts +44 -4
  78. package/packages/core/src/kernel/leaf-restack-state.ts +50 -2
  79. package/packages/core/src/kernel/log-index.ts +27 -1
  80. package/packages/core/src/kernel/node-parent.ts +2 -0
  81. package/packages/core/src/kernel/node-polling.ts +13 -3
  82. package/packages/core/src/kernel/node-restack-state.ts +8 -1
  83. package/packages/core/src/kernel/node-restack-transaction.ts +45 -0
  84. package/packages/core/src/kernel/read-deferrals.ts +3 -1
  85. package/packages/core/src/kernel/read-facts.ts +37 -2
  86. package/packages/core/src/kernel/reducer-registry.ts +22 -1
  87. package/packages/core/src/kernel/reducer.ts +332 -16
  88. package/packages/core/src/kernel/target-observation.ts +2 -5
  89. package/packages/core/src/kernel/terminal-guard.ts +52 -3
  90. package/packages/core/src/kernel/ticket-handbacks.ts +40 -0
  91. package/packages/core/src/kernel/ticket-preparation.ts +15 -1
  92. package/packages/core/src/kernel/ticket-wait.ts +345 -0
  93. package/packages/core/src/kernel/verify-applicability.ts +9 -19
  94. package/packages/core/src/ontology.ts +1 -0
  95. package/packages/core/src/operator/annotations.ts +6 -0
  96. package/packages/core/src/operator/index.ts +3 -0
  97. package/packages/core/src/operator/protocol.ts +25 -2
  98. package/packages/core/src/operator/query.ts +1 -1
  99. package/packages/core/src/operator/registry.ts +122 -10
  100. package/packages/core/src/operator/repository-events.ts +67 -0
  101. package/packages/core/src/operator/sandbox-host.ts +3 -0
  102. package/packages/core/src/operator/tickets.ts +15 -3
  103. package/packages/core/src/plugin-sdk/index.ts +4 -0
  104. package/packages/core/src/ports/forge/create.ts +6 -0
  105. package/packages/core/src/ports/forge/github-transport.ts +40 -3
  106. package/packages/core/src/ports/forge/github.ts +12 -1
  107. package/packages/core/src/ports/forge/workspace-ancestry.ts +60 -0
  108. package/packages/core/src/ports/forge-failure.ts +31 -2
  109. package/packages/core/src/ports/runner/routing.ts +66 -5
  110. package/packages/core/src/ports/tickets/assignees.ts +54 -0
  111. package/packages/core/src/ports/tickets/contract.ts +164 -4
  112. package/packages/core/src/ports/tickets/create.ts +17 -3
  113. package/packages/core/src/ports/tickets/fake.ts +5 -0
  114. package/packages/core/src/ports/tickets/github-fake.ts +18 -2
  115. package/packages/core/src/ports/tickets/github.ts +247 -29
  116. package/packages/core/src/ports/tickets/hosted-index.ts +1 -0
  117. package/packages/core/src/ports/tickets/operations.ts +6 -1
  118. package/packages/core/src/ports/tickets/tree.ts +12 -2
  119. package/packages/core/src/ports/tickets/update.ts +6 -2
  120. package/packages/core/src/ports/types.ts +36 -5
  121. package/packages/core/src/ports/workspace/vercel-sandbox.ts +9 -0
  122. package/packages/core/src/processes/build-child.ts +28 -7
  123. package/packages/core/src/processes/build-execution-state.ts +34 -2
  124. package/packages/core/src/processes/build-runner.ts +165 -19
  125. package/packages/core/src/processes/dispatcher.ts +837 -115
  126. package/packages/core/src/processes/execution-no-progress.ts +22 -2
  127. package/packages/core/src/processes/harvest-child.ts +4 -0
  128. package/packages/core/src/processes/harvest-runner.ts +5 -0
  129. package/packages/core/src/processes/phase-failure-budget.ts +1 -0
  130. package/packages/core/src/processes/publication-state.ts +6 -1
  131. package/packages/core/src/processes/repo-view.ts +2 -0
  132. package/packages/core/src/scenarios/harness.ts +15 -1
  133. package/packages/core/src/store/digest.ts +41 -2
  134. package/packages/core/src/store/reduced-reads.ts +4 -1
  135. package/packages/core/src/store/reducer-value-shapes.json +10310 -8441
  136. package/packages/core/src/store/remote/client.ts +49 -10
  137. package/packages/core/src/store/remote/index.ts +4 -0
  138. package/packages/core/src/store/remote/protocol.ts +18 -1
  139. package/packages/core/src/store/remote/released-clients.json +22 -0
  140. package/packages/core/src/store/remote/released-reducer-values/1.7.0.json +27366 -0
  141. package/packages/core/src/store/remote/released-reducer-values/1.8.0.json +29043 -0
  142. package/packages/core/src/store/remote/released-reducer-values/index.ts +4 -0
  143. package/packages/core/src/store/repo-state-events.ts +3 -0
  144. package/packages/core/src/store/types.ts +27 -0
  145. package/packages/core/src/testing/dispatch-read-budget.ts +84 -58
  146. package/packages/core/src/testing/index.ts +2 -0
  147. package/packages/core/src/testing/reduced-read-budget.ts +419 -9
  148. package/skills/code-review/SKILL.md +8 -0
  149. package/skills/finalize/SKILL.md +4 -0
  150. package/skills/guide/SKILL.md +241 -47
  151. package/skills/guide/references/integration-tree.md +7 -4
  152. package/skills/guide/references/merge-policy.md +78 -6
  153. package/skills/guide/references/migration-1.0.md +4 -2
  154. package/skills/guide/references/operator-api.md +45 -13
  155. package/skills/guide/references/plugin-authoring.md +45 -7
  156. package/skills/guide/references/remote-store-protocol.md +28 -7
  157. package/skills/guide/references/restacking.md +35 -11
  158. package/skills/guide/references/ticket-dependencies.md +9 -4
  159. package/skills/implement/SKILL.md +15 -1
  160. package/skills/operate/SKILL.md +133 -16
  161. package/skills/plan/SKILL.md +17 -2
  162. package/skills/plan-review/SKILL.md +8 -0
  163. package/skills/reconcile/SKILL.md +21 -5
  164. package/skills/tickets/SKILL.md +23 -6
  165. package/templates/hosted-service/package.json +2 -2
@@ -259,7 +259,7 @@ Changing the store requires restarting dispatch.
259
259
  Parsing is strict. Unknown top-level keys or tables, unknown fields in a known
260
260
  table, fields from the wrong step variant, malformed values, and dangling
261
261
  command references are errors. The open maps are `[accounts]`, `[commands]`, `[roles]`,
262
- `[workspace.config]`, `[workspace.config.runtimeProvisioning]`,
262
+ `[profiles]`, `[profiles.<name>.roles]`, `[workspace.config]`, `[workspace.config.runtimeProvisioning]`,
263
263
  `[verify.<step>]`, and `[finalize.<step>]`. Autobuild
264
264
  validates repository-defined command, role, and step entries.
265
265
  `[workspace.config]` is plugin-owned and passed through unchanged for plugin
@@ -319,9 +319,9 @@ the worktree file has uncommitted edits, because the clean/dirty comparison
319
319
  could not be performed (non-git workspace or a transient git error), or because
320
320
  the branch head never carried the file — the deposit records the source
321
321
  `worktree-dirty` with no commit. The build still runs the worktree bytes, but
322
- provenance declines to attribute them to any commit. **Deployment-owned** sections — `[accounts]` and `[roles]`
323
- (runtime, model, account, args, alternates, per-role `sessionBudgetSeconds`) and
324
- `[policy]` — keep flowing live. **Dispatcher-owned** sections (`baseBranch`,
322
+ provenance declines to attribute them to any commit. **Deployment-owned** sections — `[accounts]`, `[roles]`
323
+ (runtime, model, account, args, alternates, per-role `sessionBudgetSeconds`),
324
+ `[profiles]` and `[policy]` — keep flowing live. **Dispatcher-owned** sections (`baseBranch`,
325
325
  `capacity`, `ticketScanIntervalSeconds`, `forge`, `plugins`, `pr`, `tickets`, `orchestrator`) configure the
326
326
  dispatcher itself and are never interpreted by the build runner.
327
327
 
@@ -383,10 +383,12 @@ These fields hot-reload:
383
383
  | `[workspace]` provider and config (including `provisioning`) | Next launch of a build whose OWN branch carries it. A base-branch reload never re-provisions an in-flight build. |
384
384
  | `[accounts]` | Descriptors are adopted atomically with roles at the next session boundary, except existing ChatGPT descriptors require stopped dispatch before replacement or removal (see [accounts](#accounts)); credentials refresh on observation ticks. |
385
385
  | `[roles]` | Next agent invocation for that role. Runtime, model, args, alternates, and the session budget are captured together and delivered live. |
386
+ | `[profiles]` | Next agent session of a build that selected the profile; builds without it are unaffected. A build's selected profile name never changes after claim. |
386
387
  | `[upgrade]` | Cancels preparation when disabled; automatic target checks every 60 seconds. |
387
388
  | `[policy]` | Next policy, convergence, or agent-session boundary, delivered live. A running session keeps its captured budget. |
388
389
  | `tickets.readyLabels`, `tickets.readyState`, `tickets.readyAssignee` | Next ready-ticket scan. |
389
390
  | `tickets.triageState`, `tickets.proposalState` | Next dispatcher handback or harvest filing boundary. |
391
+ | `tickets.createAssignee` | Next ticket create, including the next harvest filing. |
390
392
  | `tickets.backlogState`, `tickets.rejectedState` | Next role move, ready-ticket scan, or node completeness observation. |
391
393
 
392
394
  Adapter selectors and factory inputs are constructed once and require a
@@ -441,7 +443,7 @@ any table header.
441
443
  - **Required:** Optional
442
444
  - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
443
445
 
444
- **Description:** Builds running work at once for this repository. A build that finished its pipeline holds no slot while it waits for a merge decision; it is admitted ahead of new claims when it must run again. Unfinished paused and blocked work retains slots. Node reconcile and verification exclude their own blocked/paused descendants at admission; new claims use total occupancy. See [integration capacity](integration-tree.md).
446
+ **Description:** Builds running work at once for this repository. A build that finished its pipeline holds no slot while it waits for a merge decision, nor does a build waiting on other tickets; either is admitted ahead of new claims when it must run again. Other unfinished paused and blocked work retains slots. Node reconcile and verification exclude their own blocked/paused descendants at admission; new claims use total occupancy. See [integration capacity](integration-tree.md).
445
447
 
446
448
  **Constraints:** safe integer; > 0
447
449
 
@@ -702,7 +704,12 @@ fallback.
702
704
 
703
705
  An ordered list of strict merge rules. Predicates within one rule are ANDed;
704
706
  the first matching rule wins. Omitted predicates match everything. With no
705
- matching rule, leaves default to `auto` and nodes to `consent`.
707
+ matching rule, leaves default to `auto` and nodes to `consent`. Besides
708
+ `from`, `into` and `label`, a rule can match the paths a candidate head
709
+ changes: `paths` when any changed path matches, `within` when every one does.
710
+ Path selectors use the `[verify.<step>].paths` grammar. A head without
711
+ recorded changed paths defers a decision that reaches a path rule. See
712
+ [changed paths](merge-policy.md#changed-paths).
706
713
 
707
714
  The deprecated `[[landing]]` spelling accepts identical rules and emits a migration warning.
708
715
  Do not declare both spellings, even as empty arrays. `ab upgrade` migrates the
@@ -762,6 +769,32 @@ old key without changing policy values or order. See [deprecated spellings](merg
762
769
 
763
770
  **Constraints:** label must be nonblank (labels match exactly, including case)
764
771
 
772
+ #### `merge[].paths`
773
+
774
+ **TOML key:** `merge[].paths`
775
+
776
+ - **Type:** `array of string`
777
+ - **Default:** `omitted`
778
+ - **Required:** Optional
779
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
780
+
781
+ **Description:** Match when at least one changed path matches a selector. Same glob grammar and case sensitivity as `[verify.<step>].paths`.
782
+
783
+ **Constraints:** minimum length 1; Each item: Positive repository-relative globs with literal characters, *, ?, and whole-segment ** only. No NUL, absolute paths, backslashes, negation, empty or traversal segments, character classes, brace expansion or extglobs.
784
+
785
+ #### `merge[].within`
786
+
787
+ **TOML key:** `merge[].within`
788
+
789
+ - **Type:** `array of string`
790
+ - **Default:** `omitted`
791
+ - **Required:** Optional
792
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
793
+
794
+ **Description:** Match when every changed path matches a selector and at least one path changed.
795
+
796
+ **Constraints:** minimum length 1; Each item: Positive repository-relative globs with literal characters, *, ?, and whole-segment ** only. No NUL, absolute paths, backslashes, negation, empty or traversal segments, character classes, brace expansion or extglobs.
797
+
765
798
  #### `merge[].mode`
766
799
 
767
800
  **TOML key:** `merge[].mode`
@@ -2389,6 +2422,270 @@ failure-tolerant step as `ok = false` and files its follow-up observation.
2389
2422
  Harvest sessions and direct verify/finalize check commands are not covered by
2390
2423
  this setting.
2391
2424
 
2425
+ ## `[profiles]`
2426
+
2427
+ `[roles]` applies to every build. A profile lets one ticket's build use
2428
+ different role settings without touching the roles every other build reads.
2429
+ Each `[profiles.<name>]` names one ticket `label` and overrides only the role
2430
+ fields it declares:
2431
+
2432
+ <!-- config-fragment:profiles -->
2433
+ ```toml
2434
+ [profiles.deep]
2435
+ label = "deep"
2436
+
2437
+ [profiles.deep.roles.plan-review]
2438
+ model = "claude-opus-5-5"
2439
+
2440
+ [profiles.deep.roles.implement]
2441
+ args = ["--effort", "high"]
2442
+ ```
2443
+
2444
+ A ticket labelled `deep` builds with those two overrides; every other field and
2445
+ role comes from `[roles.<role>]`, then `[roles.default]`, exactly as without the
2446
+ profile. An entry may name any role, including agent verify and finalize step
2447
+ names and roles `[roles]` does not declare, and accepts the `[roles.<role>]`
2448
+ fields. A declared `alternates` list, including `[]`, replaces the inherited
2449
+ list. An entry named `default` is refused.
2450
+
2451
+ Labels match case-insensitively after trimming. The dispatcher fixes a build's
2452
+ profile when it claims the ticket and records it on the build; relabelling
2453
+ later has no effect. A ready ticket carrying two profiles' labels is not
2454
+ claimed and appears in the scan's ticket diagnostics (`ab repository status`)
2455
+ until it carries at most one. The profile's contents are read at every session
2456
+ boundary, so an edit reaches the builds that selected it at their next
2457
+ session. If a reload removes the profile, those builds continue on the
2458
+ repository roles and `ab build status` reports the profile as no longer
2459
+ configured. Duplicate labels, a blank label, and an entry whose effective
2460
+ runtime, model, args or account is invalid are refused at load, by
2461
+ `ab init --validate`, and on live reload. Sessions outside a build (`slug`,
2462
+ `upgrade`, `harvest`, `harvest-review`) never use a profile.
2463
+
2464
+ <!-- configuration-reference:profiles -->
2465
+
2466
+ #### `profiles`
2467
+
2468
+ **TOML key:** `profiles`
2469
+
2470
+ - **Type:** `table`
2471
+ - **Default:** `{} (input supplied on omission)`
2472
+ - **Required:** Optional
2473
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2474
+
2475
+ **Description:** Named role profiles selected by ticket label. A profile overrides only the role fields it declares, for the builds that selected it.
2476
+
2477
+ **Constraints:** Entry names: nonempty
2478
+
2479
+ #### `profiles.<name>`
2480
+
2481
+ **TOML key:** `profiles.<name>`
2482
+
2483
+ - **Type:** `strict table`
2484
+ - **Default:** `omitted`
2485
+ - **Required:** Required
2486
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2487
+
2488
+ **Description:** Named role profile. The build's profile is fixed when its ticket is claimed; the profile's contents are read at each session boundary.
2489
+
2490
+ **Constraints:** None beyond the input type.
2491
+
2492
+ #### `profiles.<name>.label`
2493
+
2494
+ **TOML key:** `profiles.<name>.label`
2495
+
2496
+ - **Type:** `string`
2497
+ - **Default:** `omitted`
2498
+ - **Required:** Required
2499
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2500
+
2501
+ **Description:** Ticket label that selects this profile, matched case-insensitively after trimming. A ticket carrying two profiles' labels is not claimed.
2502
+
2503
+ **Constraints:** Nonblank; unique across profiles after trimming and case folding.
2504
+
2505
+ #### `profiles.<name>.roles`
2506
+
2507
+ **TOML key:** `profiles.<name>.roles`
2508
+
2509
+ - **Type:** `table`
2510
+ - **Default:** `{} (input supplied on omission)`
2511
+ - **Required:** Optional
2512
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2513
+
2514
+ **Description:** Role entries this profile overrides. Any role name is accepted except the reserved default.
2515
+
2516
+ **Constraints:** An entry named default is refused; Entry names: nonempty
2517
+
2518
+ #### `profiles.<name>.roles.<name>`
2519
+
2520
+ **TOML key:** `profiles.<name>.roles.<name>`
2521
+
2522
+ - **Type:** `strict table`
2523
+ - **Default:** `omitted`
2524
+ - **Required:** Required
2525
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2526
+
2527
+ **Description:** Role override for builds whose ticket carries the profile's label. Omitted fields inherit `[roles.<role>]`, then `[roles.default]`; a declared alternates list, including [], replaces the inherited list.
2528
+
2529
+ **Constraints:** None beyond the input type.
2530
+
2531
+ #### `profiles.<name>.roles.<name>.account`
2532
+
2533
+ **TOML key:** `profiles.<name>.roles.<name>.account`
2534
+
2535
+ - **Type:** `string`
2536
+ - **Default:** `omitted`
2537
+ - **Required:** Optional
2538
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2539
+
2540
+ **Description:** Named billing account; inherits independently. Claude selects the sole subscription account when omitted.
2541
+
2542
+ **Constraints:** minimum length 1; matches /\S/
2543
+
2544
+ #### `profiles.<name>.roles.<name>.runtime`
2545
+
2546
+ **TOML key:** `profiles.<name>.roles.<name>.runtime`
2547
+
2548
+ - **Type:** `string`
2549
+ - **Default:** `omitted`
2550
+ - **Required:** Optional
2551
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2552
+
2553
+ **Description:** Select an agent adapter.
2554
+
2555
+ **Constraints:** minimum length 1; Required on roles.default by runtime resolution; other roles inherit it. Must name a registered runtime.
2556
+
2557
+ #### `profiles.<name>.roles.<name>.model`
2558
+
2559
+ **TOML key:** `profiles.<name>.roles.<name>.model`
2560
+
2561
+ - **Type:** `string`
2562
+ - **Default:** `omitted`
2563
+ - **Required:** Optional
2564
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2565
+
2566
+ **Description:** Select the exact model. Codex uses unqualified `gpt-*`; Pi ids are provider-qualified.
2567
+
2568
+ **Constraints:** minimum length 1; Omission inherits the base model, otherwise uses the selected runtime default. Must be compatible with that runtime.
2569
+
2570
+ #### `profiles.<name>.roles.<name>.args`
2571
+
2572
+ **TOML key:** `profiles.<name>.roles.<name>.args`
2573
+
2574
+ - **Type:** `array of string`
2575
+ - **Default:** `omitted`
2576
+ - **Required:** Optional
2577
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2578
+
2579
+ **Description:** Ordered extra CLI argv tokens applied to every phase and tool-free one-shot invocation. A supplied list replaces, rather than unions with, the inherited list.
2580
+
2581
+ **Constraints:** Omission inherits the base list, otherwise resolves to an empty list; an explicit list replaces it.; Each item: minimum length 1
2582
+
2583
+ #### `profiles.<name>.roles.<name>.extensions`
2584
+
2585
+ **TOML key:** `profiles.<name>.roles.<name>.extensions`
2586
+
2587
+ - **Type:** `array of string`
2588
+ - **Default:** `omitted`
2589
+ - **Required:** Optional
2590
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2591
+
2592
+ **Description:** Compatibility-only field. Dispatch warns for each declaring role; migrate explicit runtime options to `args`.
2593
+
2594
+ **Constraints:** Each item: minimum length 1
2595
+
2596
+ #### `profiles.<name>.roles.<name>.sessionBudgetSeconds`
2597
+
2598
+ **TOML key:** `profiles.<name>.roles.<name>.sessionBudgetSeconds`
2599
+
2600
+ - **Type:** `number`
2601
+ - **Default:** `omitted`
2602
+ - **Required:** Optional
2603
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2604
+
2605
+ **Description:** Active-time budget for each build phase session routed through this role in a profiled build. Suspended intervals are excluded; native continuation retains the original ceiling and accumulated active time. One budget covers the primary and every alternate target.
2606
+
2607
+ **Constraints:** safe integer; > 0; Omission inherits roles.<role>.sessionBudgetSeconds, then roles.default.sessionBudgetSeconds, otherwise policy.sessionBudgetSeconds.
2608
+
2609
+ #### `profiles.<name>.roles.<name>.alternates`
2610
+
2611
+ **TOML key:** `profiles.<name>.roles.<name>.alternates`
2612
+
2613
+ - **Type:** `array of strict table`
2614
+ - **Default:** `omitted`
2615
+ - **Required:** Optional
2616
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2617
+
2618
+ **Description:** Failure-triggered execution targets (provider failures and a runtime whose CLI is not installed). A role's list replaces the inherited list wholesale; each entry overlays that role's effective primary axes. `extensions` is accepted there only as the same deprecated no-op.
2619
+
2620
+ **Constraints:** Omission inherits the base alternate list, otherwise resolves to an empty list; each alternate overlays the resolved primary axes.
2621
+
2622
+ #### `profiles.<name>.roles.<name>.alternates[].account`
2623
+
2624
+ **TOML key:** `profiles.<name>.roles.<name>.alternates[].account`
2625
+
2626
+ - **Type:** `string`
2627
+ - **Default:** `omitted`
2628
+ - **Required:** Optional
2629
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2630
+
2631
+ **Description:** Named billing account; inherits independently. Claude selects the sole subscription account when omitted.
2632
+
2633
+ **Constraints:** minimum length 1; matches /\S/
2634
+
2635
+ #### `profiles.<name>.roles.<name>.alternates[].runtime`
2636
+
2637
+ **TOML key:** `profiles.<name>.roles.<name>.alternates[].runtime`
2638
+
2639
+ - **Type:** `string`
2640
+ - **Default:** `omitted`
2641
+ - **Required:** Optional
2642
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2643
+
2644
+ **Description:** Select an agent adapter.
2645
+
2646
+ **Constraints:** minimum length 1; Required on roles.default by runtime resolution; other roles inherit it. Must name a registered runtime.
2647
+
2648
+ #### `profiles.<name>.roles.<name>.alternates[].model`
2649
+
2650
+ **TOML key:** `profiles.<name>.roles.<name>.alternates[].model`
2651
+
2652
+ - **Type:** `string`
2653
+ - **Default:** `omitted`
2654
+ - **Required:** Optional
2655
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2656
+
2657
+ **Description:** Select the exact model. Codex uses unqualified `gpt-*`; Pi ids are provider-qualified.
2658
+
2659
+ **Constraints:** minimum length 1; Omission inherits the base model, otherwise uses the selected runtime default. Must be compatible with that runtime.
2660
+
2661
+ #### `profiles.<name>.roles.<name>.alternates[].args`
2662
+
2663
+ **TOML key:** `profiles.<name>.roles.<name>.alternates[].args`
2664
+
2665
+ - **Type:** `array of string`
2666
+ - **Default:** `omitted`
2667
+ - **Required:** Optional
2668
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2669
+
2670
+ **Description:** Ordered extra CLI argv tokens applied to every phase and tool-free one-shot invocation. A supplied list replaces, rather than unions with, the inherited list.
2671
+
2672
+ **Constraints:** Each item: minimum length 1
2673
+
2674
+ #### `profiles.<name>.roles.<name>.alternates[].extensions`
2675
+
2676
+ **TOML key:** `profiles.<name>.roles.<name>.alternates[].extensions`
2677
+
2678
+ - **Type:** `array of string`
2679
+ - **Default:** `omitted`
2680
+ - **Required:** Optional
2681
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2682
+
2683
+ **Description:** Compatibility-only field. Dispatch warns for each declaring role; migrate explicit runtime options to `args`.
2684
+
2685
+ **Constraints:** Each item: minimum length 1
2686
+
2687
+ <!-- configuration-reference:/profiles -->
2688
+
2392
2689
  ## `[policy]`
2393
2690
 
2394
2691
  Optional. Every field receives its own default. All are positive integers except
@@ -2821,6 +3118,19 @@ state. Within a present table, `source` is required; `hosted` and `github` defau
2821
3118
 
2822
3119
  **Constraints:** [tickets].readyAssignee must be a nonblank value with no surrounding whitespace; Allowed for sources that can filter by assignee: linear ("me" or an email), github ("me" or a GitHub username, including managed-user logins such as mona_acme), and plugin sources that declare readyAssignee. Refused for file and hosted.
2823
3120
 
3121
+ #### `tickets.createAssignee`
3122
+
3123
+ **TOML key:** `tickets.createAssignee`
3124
+
3125
+ - **Type:** `string`
3126
+ - **Default:** `omitted`
3127
+ - **Required:** Optional
3128
+ - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
3129
+
3130
+ **Description:** Assign every ticket Autobuild creates (`ab ticket create`, operator `tickets.create`, harvest proposals) to one user unless the create names its own assignees.
3131
+
3132
+ **Constraints:** [tickets].createAssignee must be a nonblank value with no surrounding whitespace; Allowed for github ("me" or a GitHub username) and plugin sources that declare assignees. Refused for file, hosted and linear.
3133
+
2824
3134
  #### `tickets.teamKey`
2825
3135
 
2826
3136
  **TOML key:** `tickets.teamKey`
@@ -2882,7 +3192,7 @@ state. Within a present table, `source` is required; `hosted` and `github` defau
2882
3192
  - **Required:** Optional
2883
3193
  - **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
2884
3194
 
2885
- **Description:** State used for spec-gate bounces, aborts, and closed-unmerged PRs.
3195
+ **Description:** State used for spec-gate bounces, aborts (unless `ab abort --to ready` with a ticket that meets the spec standard), and closed-unmerged PRs.
2886
3196
 
2887
3197
  **Constraints:** minimum length 1; state must be nonblank; Omission resolves to Backlog for Linear, triage for hosted and github, Triage for file/plugin sources.
2888
3198
 
@@ -2953,7 +3263,8 @@ and plugin sources that declare it accept it, each with its own value forms.
2953
3263
  assignees is ready when the user is any one of them.
2954
3264
 
2955
3265
  The gate is conjunctive with `readyState` and `readyLabels`, and a ticket with
2956
- no assignee is never ready while it is set. It applies to every ready surface
3266
+ no assignee is never ready while it is set; the GitHub source reports such ready
3267
+ issues in the ticket diagnostics. It applies to every ready surface
2957
3268
  (dispatch, the queued count, and `ab ticket list` without filters); blockers
2958
3269
  still prevent claim. A blank value, or one outside the source's forms, fails
2959
3270
  validation. `file`, `hosted` and plugin sources that don't declare the
@@ -3611,10 +3922,11 @@ action. Check the gates in this order:
3611
3922
  same source. This includes harvest proposals filed directly into the ready
3612
3923
  state. Plain dispatch output reports unresolved ids and cycles.
3613
3924
  6. **Capacity:** every unfinished build for this repository—including paused
3614
- and blocked builds—uses a slot. A build that has finished its pipeline and
3615
- waits for a merge decision holds none, but one that must re-verify or
3616
- reconcile is admitted ahead of new claims and reserves a slot while it
3617
- waits. Inspect `ab repository status`, `ab builds --queued` and
3925
+ builds and builds blocked on a question—uses a slot. A build that has
3926
+ finished its pipeline and waits for a merge decision holds none, and neither
3927
+ does a build waiting on other tickets. One that must re-verify or reconcile,
3928
+ or whose ticket wait ended, is admitted ahead of new claims and reserves a
3929
+ slot while it waits. Inspect `ab repository status`, `ab builds --queued` and
3618
3930
  `ab build status <slug>` rather than looking only for a live process.
3619
3931
  7. **Duplicate work:** a ready ticket already represented by an active build is
3620
3932
  deliberately excluded from the queue.
@@ -3691,9 +4003,17 @@ merge methods and forge capability requirements.
3691
4003
  `ab hold <slug>` durably suppresses merge and revokes previous consent, even
3692
4004
  before readiness. `ab merge <slug>` requires readiness, clears hold, and consents
3693
4005
  to this build/node merge into its effective destination. Consent survives head
3694
- replacement, restacking, verification and re-finalization until another hold or
3695
- completion. Accepted node reparenting revokes consent; holds survive.
4006
+ replacement, clean restacking, verification and re-finalization until another
4007
+ hold or completion. Consent given under a rule with `paths` or `within`
4008
+ predicates is revoked when a reconcile's own edits (its recorded resolution)
4009
+ touch a file those predicates match; `landing.consent-revoked` raises default
4010
+ attention naming the files and both heads, and the build returns to the consent
4011
+ queue for its new head. Accepted node reparenting revokes consent; holds survive.
3696
4012
  It is consent to the merge, not approval of an immutable diff.
4013
+ The optional `ab merge <slug> --head <sha>` (operator `head`) refuses with
4014
+ `head-mismatch`, recording nothing, unless `<sha>` (full or at least seven
4015
+ characters) is the current candidate head. The consented head is the head of
4016
+ the recorded decision the consent named; `--head` does not change survival.
3697
4017
  Commands and acknowledgements are sequence-correlated; hold acknowledgement
3698
4018
  requires confirmed native cancellation, while merge acknowledgement accepts
3699
4019
  consent without claiming that merge gates passed. The same actions are available
@@ -50,7 +50,7 @@ A ticket is claimed when it passes every gate:
50
50
 
51
51
  Others stay queued. Urgent tickets are claimed before normal ones, each in the source's order; priority never preempts a running build. See [Tickets and specs](tickets.md) for grooming and [Intake and harvest](intake.md) for proposed work.
52
52
 
53
- Each build gets its own workspace (local git worktree or remote sandbox) and a build-runner that owns its pipeline. Capacity caps the builds running work: a work build holds a slot until it finishes its pipeline (verification and finalize), even while paused or blocked. Once it waits for a merge decision it holds none; if its target moves or its PR conflicts, it waits for a slot ahead of new claims to restack, re-verify or reconcile. It keeps its workspace until it merges or closes, so retained workspaces can exceed `capacity` while running work cannot. An integration node holds a slot only while it verifies, not while collecting children. See [the integration tree](integration-overview.md).
53
+ Each build gets its own workspace (local git worktree or remote sandbox) and a build-runner that owns its pipeline. Capacity caps the builds running work: a work build holds a slot until it finishes its pipeline (verification and finalize), even while paused or blocked on a question. Once it waits for a merge decision it holds none; if its target moves or its PR conflicts, it waits for a slot ahead of new claims to restack, re-verify or reconcile. A work build waiting on other tickets (`ab wait-on`) also holds none, and when the wait ends it waits for a slot ahead of new claims to resume. Finished and waiting builds keep their workspaces, so retained workspaces can exceed `capacity` while running work cannot. An integration node holds a slot only while it verifies, not while collecting children. See [the integration tree](integration-overview.md).
54
54
 
55
55
 
56
56
  ## The log is the source of truth
package/docs/forges.md CHANGED
@@ -113,6 +113,7 @@ Classify failures with `ForgeFailure` (API 1.8):
113
113
 
114
114
  ```ts
115
115
  { kind: 'rate-limited', resetAt } // resetAt: a valid ISO timestamp
116
+ { kind: 'rate-limited', resetAt, unauthenticated } // the request had no credential; why
116
117
  { kind: 'transient', retry: 'retryable' } // retryable transport failures
117
118
  ```
118
119
 
@@ -58,7 +58,7 @@ bun ab ticket block <id> <blocker-id>
58
58
 
59
59
  ## Policy authorizes merge
60
60
 
61
- Ordered `[[merge]]` rules in `autobuild.toml` select `auto` or `consent`; the first match wins. Rules match source kind (`from`), destination (`into`), and ticket `label`. Without a match, leaves default to `auto` and nodes to `consent`.
61
+ Ordered `[[merge]]` rules in `autobuild.toml` select `auto` or `consent`; the first match wins. Rules match source kind (`from`), destination (`into`), ticket `label`, and changed paths (`paths`, `within`). Without a match, leaves default to `auto` and nodes to `consent`.
62
62
 
63
63
  ```toml
64
64
  # Leaves merge on the root automatically; everything else needs consent.
@@ -73,7 +73,7 @@ mode = "consent"
73
73
 
74
74
  Your operator agent manages consent:
75
75
 
76
- - `ab merge <slug>` records consent to a ready merge and clears a hold.
76
+ - `ab merge <slug>` records consent to a ready merge and clears a hold. `--head <sha>` refuses unless `<sha>` is the current candidate head.
77
77
  - `ab hold <slug>` suppresses merge, even before readiness, and withdraws consent.
78
78
 
79
79
  Neither control, nor automatic authorization, bypasses readiness, verification, forge checks, protection, or merge gates.
@@ -38,8 +38,9 @@ still need the presence evidence described above and in
38
38
 
39
39
  Read the consuming repository's `autobuild.toml` and evaluate its effective
40
40
  [merge policy](merge-policy.md) for the actual ticket kinds, destinations and
41
- labels. Ordered `[[merge]]` rules use the first match; `from`, `into` and `label`
42
- predicates are ANDed, with omitted predicates acting as wildcards. Without a
41
+ labels. Ordered `[[merge]]` rules use the first match; `from`, `into`, `label`,
42
+ `paths` and `within` predicates are ANDed, with omitted predicates acting as
43
+ wildcards. `paths` and `within` match the paths the candidate head changes. Without a
43
44
  match, leaves default to auto and nodes to consent. Explain the resulting merge
44
45
  and consent flow to the human in plain terms. Ask when grooming does not make the
45
46
  destination choice clear. This decision is separate from workflow-state placement
@@ -105,7 +106,8 @@ idle node polling, so a slot freed in any tick goes to the node, not to a new
105
106
  claim. Its candidate occupancy excludes itself and capacity-bearing blocked or
106
107
  paused descendants, following accepted source-qualified build target ancestry.
107
108
  Running descendants and unrelated builds still count; ordinary blocked and
108
- paused work retains its slot for every other admission. Provisioning reserves
109
+ paused work retains its slot for every other admission, except a work build
110
+ parked by a ticket wait, which holds none. Provisioning reserves
109
111
  node occupancy before the runner starts. This exception never raises the budget
110
112
  for new claims. Status and both dashboards report actual occupancy, configured
111
113
  capacity, effective display capacity and the nodes using descendant-held slots.
@@ -178,7 +180,8 @@ own issue; landed child commits keep their own messages.
178
180
  Human forge merges are an explicit escape hatch, including while incomplete,
179
181
  paused or unverified. The janitor records human provenance and whether the actual
180
182
  merged head was verified, then completes the ticket. Closing without merge or
181
- aborting closes admission and returns the ticket to triage; already claimed
183
+ aborting closes admission and returns the ticket to triage (or ready with
184
+ `ab abort --to ready`); already claimed
182
185
  children retain their frozen destination.
183
186
 
184
187
  ### Node verification context
@@ -9,24 +9,64 @@ predicates are ANDed, omissions are wildcards, and the first match wins.
9
9
  | `from` | `leaf` or `node` |
10
10
  | `into` | `root`, any `node`, or an exact destination node ticket id |
11
11
  | `label` | An exact, case-sensitive source ticket label |
12
+ | `paths` | At least one changed path matches a selector |
13
+ | `within` | Every changed path matches a selector, and at least one path changed |
12
14
 
13
15
  Blank destinations and labels are invalid. With no match, leaves use auto and
14
16
  nodes consent. Destination means the frozen effective destination, not mutable
15
17
  source metadata. Successful source reads supply labels at readiness; unavailable
16
18
  data defers the decision rather than pretending labels are empty.
17
19
 
20
+ ### Changed paths
21
+
22
+ `paths` and `within` take the same selectors as `[verify.<step>].paths`:
23
+ positive, repository-relative, case-sensitive globs with `*`, `?` and
24
+ whole-segment `**`. An invalid selector is rejected when the configuration
25
+ loads, naming its rule, such as `merge[1].paths[0]`. The changed paths are the
26
+ ones the candidate head changes against its merge base with the destination,
27
+ as the build recorded when it produced that head. A rename counts both paths
28
+ and a deletion counts its path. Each candidate head is decided on its own
29
+ paths, and `landing.decided` records the paths the matched rule's selectors
30
+ matched: the first 20, sorted, with a total.
31
+
32
+ Evaluation never guesses a change. When it reaches a rule with a path
33
+ predicate and the candidate head's paths are not recorded, the decision is
34
+ deferred, recorded once and shown in `ab build status`; it is never evaluated
35
+ as an empty change. Only heads a build publishes are recorded, so a head
36
+ pushed to the branch outside a build stays deferred until the build publishes
37
+ a recorded head. A recorded empty change matches neither predicate. Rules
38
+ without path predicates decide without the fact.
39
+
40
+ First match still wins, so **protective rules belong first**: put a `paths`
41
+ rule that holds sensitive files ahead of any `within` rule that releases the
42
+ rest. See [Protected paths](#protected-paths).
43
+
18
44
  A leaf is ready after verification and finalize on a current base; a node must
19
45
  be complete and verified at its exact head and parent. `landing.decided` retains
20
46
  that candidate, labels, mode and the full matched rule/index or explicit default.
21
47
  Editing configuration does not revise that decision. A replacement candidate
22
- gets a fresh decision. Policy is live dispatcher configuration, separate from
23
- the pinned execution pipeline.
48
+ gets a fresh decision, evaluated on its own changed paths, and that decision
49
+ governs. A reconcile or restack head can therefore match a different rule: a
50
+ documentation change that merged automatically waits for consent once its new
51
+ head touches a protected file. Native auto-merge armed under the old decision
52
+ is cancelled before the new head is published. Policy is live dispatcher
53
+ configuration, separate from the pinned execution pipeline.
24
54
 
25
55
  `ab hold <slug>` suppresses merge and revokes consent, even before readiness.
26
56
  `ab merge <slug>` requires readiness, clears hold and consents to this merge
27
- into its destination. Consent survives head replacement, restacking, verification
28
- and re-finalization until hold or completion; it approves the merge rather than
29
- an immutable diff. Accepted node reparenting revokes it. Commands and receipts
57
+ into its destination. Consent survives head replacement, clean restacking,
58
+ verification and re-finalization until hold or completion; it approves the merge
59
+ rather than an immutable diff. Consent given under a rule with `paths` or
60
+ `within` predicates is revoked when a reconcile's own edits (its recorded
61
+ resolution) touch a file those predicates match: `landing.consent-revoked`
62
+ raises default attention naming the files and both heads, and the build returns
63
+ to the consent queue for its new head. Accepted node reparenting also revokes
64
+ consent.
65
+ `ab merge <slug> --head <sha>` binds consent to the head the reviewer saw: it
66
+ refuses with `head-mismatch`, recording nothing, unless `<sha>` (full or at
67
+ least seven characters) is the current candidate head. Build status and the
68
+ consent queue show the current candidate head beside the head consent was
69
+ given at; `--head` does not change survival. Commands and receipts
30
70
  are sequence-correlated: hold acknowledgement confirms native cancellation;
31
71
  merge acknowledgement does not claim gates passed. MCP/operator tools offer the
32
72
  same actions; the terminal uses `l`/`o`. These controls record durable actions; merge consent does not mean the merge gates have passed.
@@ -99,6 +139,38 @@ other leaves match rule 3. `Review` does not match `review`. Moving the catch-al
99
139
  to the front would shadow both safeguards and automatically authorize nodes too.
100
140
  Authorization never bypasses verification, checks, protection or merge gates.
101
141
 
142
+ ### Protected paths
143
+
144
+ ```toml
145
+ baseBranch = "main"
146
+
147
+ [[merge]]
148
+ paths = ["autobuild.toml", ".agents/**", "SPEC.md", "docs/policy/**"]
149
+ mode = "consent"
150
+
151
+ [[merge]]
152
+ within = ["docs/**", "README.md"]
153
+ mode = "auto"
154
+
155
+ [[merge]]
156
+ mode = "consent"
157
+
158
+ [tickets]
159
+ source = "file"
160
+ readyState = "ready"
161
+ ```
162
+
163
+ Rule 1 holds any change that touches a protected file, whatever else it
164
+ changes. Rule 2 merges changes confined to documentation automatically. Every
165
+ other change matches rule 3 and waits for consent. Protective rules belong
166
+ first: placed after rule 2, a documentation change under `docs/policy/**` would
167
+ match rule 2 and merge automatically.
168
+
169
+ Consent given under rule 1 lasts only while the reviewed protected change does.
170
+ A clean restack keeps it, and so does a reconcile that resolves conflicts
171
+ without editing a protected file. A reconcile whose resolution edits a protected
172
+ file revokes it, and the new head needs fresh consent.
173
+
102
174
  ## Merge methods
103
175
 
104
176
  Root-target leaves squash into one identity-bearing commit per build.
@@ -192,5 +264,5 @@ unsupported spellings require the reported manual edit before retrying.
192
264
 
193
265
  MCP discovery offers `merges.list` and its deprecated alias `landings.list`.
194
266
  `builds.control` accepts canonical `merge` and deprecated `land` actions through
195
- both MCP bindings. HTTP control bodies and durable event fields retain their
267
+ both MCP bindings, with an optional `head` that binds consent like `--head`. HTTP control bodies and durable event fields retain their
196
268
  existing wire names, including `land`, `landing.decided`, and `integration.landed`.
@@ -52,8 +52,10 @@ Execution pipeline configuration stays owned by the build and is re-pinned
52
52
  from its checkout at each verify cycle; live dispatcher
53
53
  merge policy is separate. A recorded readiness decision retains its rule
54
54
  snapshot despite configuration edits; a new candidate receives a new decision.
55
- Explicit consent persists through replay and re-verification until hold or
56
- completion, except accepted node reparenting revokes it.
55
+ Explicit consent persists through clean replay and re-verification until hold
56
+ or completion, except accepted node reparenting revokes it, and a reconcile
57
+ whose own edits touch files protected by the consent rule's `paths` or `within`
58
+ predicates revokes it.
57
59
 
58
60
  ## The reversed rebase ban
59
61
 
package/docs/operating.md CHANGED
@@ -74,7 +74,7 @@ sequence positions behind its head. If a cursor is too old, re-arm without
74
74
  recover the unavailable historical gap; status reconciliation does not restore
75
75
  one-off events from that gap.
76
76
 
77
- - **Default filter:** actionable attention only, such as escalations and ready merges awaiting consent. Add `--event` globs for routine lifecycle events.
77
+ - **Default filter:** actionable attention only, such as escalations and ready merges awaiting consent. Add `--event` globs for routine lifecycle events. Ticket waits beginning and ending are routine: follow them with `--event 'wait.*' --event escalation.answered`. A `wait-unresolvable` escalation, raised when a waited ticket is rejected or deleted, is ordinary attention.
78
78
  - **Starts now:** a fresh watch ignores history, so check current status too.
79
79
  - **Resumable:** pass the opaque cursor from the JSON output back with `--since` to receive events recorded while away within the hosted window described above. The final JSON line always carries one.
80
80
  - **Duration:** 30 minutes by default; `--timeout 0` keeps it open.
@@ -124,7 +124,8 @@ bun ab hold my-build
124
124
 
125
125
  - **`merge`** requires a ready build, clears its hold and grants consent to merge into its destination.
126
126
  - **`hold`** suppresses merge and revokes consent, even before the build is ready.
127
- - **Persistence:** consent survives head changes, restacks, verification and re-finalization until a hold or completion. Accepted node reparenting revokes it.
127
+ - **Reviewed head:** `merge --head <sha>` records consent only while `<sha>` is the current candidate head; otherwise it refuses with `head-mismatch` and records nothing.
128
+ - **Persistence:** consent survives head changes, clean restacks, verification and re-finalization until a hold or completion. Consent given under a `paths` or `within` rule is revoked, with `landing.consent-revoked` attention, when a reconcile's own edits touch a file the rule protects. Accepted node reparenting also revokes it.
128
129
 
129
130
  ## Choose an operator surface
130
131