@defrex/autobuild 1.0.0-beta.1 → 1.0.0-beta.3

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 (172) hide show
  1. package/SPEC.md +310 -56
  2. package/bin/ab-build-runner.ts +10 -8
  3. package/docs/architecture.md +177 -23
  4. package/docs/configuration.md +35 -4
  5. package/docs/hosted-service.md +35 -0
  6. package/docs/integration-tree.md +83 -4
  7. package/docs/landing-policy.md +11 -0
  8. package/docs/migration-1.0.md +9 -0
  9. package/docs/operator-api.md +18 -0
  10. package/docs/remote-store-protocol.md +16 -0
  11. package/docs/remote-ticket-protocol.md +5 -0
  12. package/docs/restacking.md +42 -7
  13. package/docs/setup.md +25 -0
  14. package/docs/spec-standard.md +71 -0
  15. package/docs/ticket-dependencies.md +6 -45
  16. package/docs/ticket-migration.md +50 -4
  17. package/package.json +3 -3
  18. package/packages/core/src/cli/attention.ts +4 -1
  19. package/packages/core/src/cli/binary.ts +17 -1
  20. package/packages/core/src/cli/build-control.ts +3 -3
  21. package/packages/core/src/cli/context.ts +53 -1
  22. package/packages/core/src/cli/dashboard/actions.ts +4 -0
  23. package/packages/core/src/cli/dashboard/detail.ts +45 -1
  24. package/packages/core/src/cli/dashboard/facts.ts +7 -2
  25. package/packages/core/src/cli/dashboard/integration-detail.ts +144 -0
  26. package/packages/core/src/cli/dashboard/integration-row.ts +255 -0
  27. package/packages/core/src/cli/dashboard/landing-display.ts +64 -0
  28. package/packages/core/src/cli/dashboard/model.ts +147 -16
  29. package/packages/core/src/cli/dashboard/poll.ts +40 -4
  30. package/packages/core/src/cli/dashboard/render.ts +106 -5
  31. package/packages/core/src/cli/dashboard/transcript.ts +2 -1
  32. package/packages/core/src/cli/dispatch-frontend.ts +11 -0
  33. package/packages/core/src/cli/dispatch-repository-feed.ts +2 -1
  34. package/packages/core/src/cli/dispatch.ts +49 -14
  35. package/packages/core/src/cli/help.ts +17 -1
  36. package/packages/core/src/cli/main.ts +48 -8
  37. package/packages/core/src/cli/publication-settlement.ts +49 -5
  38. package/packages/core/src/cli/repository-status.ts +103 -2
  39. package/packages/core/src/cli/status.ts +24 -1
  40. package/packages/core/src/cli/terminals.ts +94 -93
  41. package/packages/core/src/cli/ticket.ts +35 -11
  42. package/packages/core/src/cli/wait.ts +11 -2
  43. package/packages/core/src/cli/watch.ts +12 -0
  44. package/packages/core/src/config/schema.ts +3 -0
  45. package/packages/core/src/events/catalog.ts +38 -0
  46. package/packages/core/src/events/compatibility.ts +183 -0
  47. package/packages/core/src/events/native-session.ts +13 -0
  48. package/packages/core/src/events/payloads.ts +150 -2
  49. package/packages/core/src/events/policy.ts +210 -0
  50. package/packages/core/src/events/repository.ts +69 -0
  51. package/packages/core/src/integration/harness.ts +4 -4
  52. package/packages/core/src/kernel/__snapshots__/{reducer-registry.test.ts.snap → reducer-accumulator-shapes.json} +4286 -4006
  53. package/packages/core/src/kernel/change-presence.ts +11 -3
  54. package/packages/core/src/kernel/dispatch-capacity.ts +127 -0
  55. package/packages/core/src/kernel/dispatcher-liveness.ts +5 -1
  56. package/packages/core/src/kernel/engine.ts +25 -5
  57. package/packages/core/src/kernel/forge-health.ts +19 -0
  58. package/packages/core/src/kernel/generators/build-log.ts +18 -0
  59. package/packages/core/src/kernel/generators/node-restack-log.ts +1 -1
  60. package/packages/core/src/kernel/generators/repository-journals.ts +10 -0
  61. package/packages/core/src/kernel/guarded-forge.ts +159 -0
  62. package/packages/core/src/kernel/incremental.ts +4 -2
  63. package/packages/core/src/kernel/integration-completeness.ts +108 -9
  64. package/packages/core/src/kernel/integration-landing.ts +5 -4
  65. package/packages/core/src/kernel/janitor-failure.ts +36 -0
  66. package/packages/core/src/kernel/landing-publication.ts +35 -15
  67. package/packages/core/src/kernel/landing-state.ts +7 -0
  68. package/packages/core/src/kernel/leaf-restack-state.ts +1 -1
  69. package/packages/core/src/kernel/log-index.ts +12 -1
  70. package/packages/core/src/kernel/mixed-version.ts +52 -0
  71. package/packages/core/src/kernel/node-landing.ts +14 -11
  72. package/packages/core/src/kernel/node-parent.ts +35 -10
  73. package/packages/core/src/kernel/node-restack-demand.ts +29 -0
  74. package/packages/core/src/kernel/node-restack-state.ts +46 -16
  75. package/packages/core/src/kernel/node-restack-transaction.ts +151 -8
  76. package/packages/core/src/kernel/node-restack.ts +34 -10
  77. package/packages/core/src/kernel/publication.ts +22 -0
  78. package/packages/core/src/kernel/read-deferrals.ts +111 -0
  79. package/packages/core/src/kernel/read-facts.ts +34 -6
  80. package/packages/core/src/kernel/reconcile-restack.ts +23 -2
  81. package/packages/core/src/kernel/reducer-registry.ts +18 -2
  82. package/packages/core/src/kernel/reducer.ts +196 -10
  83. package/packages/core/src/kernel/repository-attention.ts +38 -1
  84. package/packages/core/src/kernel/terminal-guard.ts +11 -4
  85. package/packages/core/src/kernel/ticket-migrations.ts +139 -0
  86. package/packages/core/src/operator/annotations.ts +6 -0
  87. package/packages/core/src/operator/index.ts +2 -0
  88. package/packages/core/src/operator/presentation.ts +5 -0
  89. package/packages/core/src/operator/query.ts +51 -11
  90. package/packages/core/src/operator/registry.ts +17 -1
  91. package/packages/core/src/operator/restack.ts +51 -0
  92. package/packages/core/src/operator/tickets.ts +30 -26
  93. package/packages/core/src/plugin-sdk/index.ts +10 -0
  94. package/packages/core/src/plugins/manifest.ts +1 -1
  95. package/packages/core/src/ports/forge/contract.ts +23 -0
  96. package/packages/core/src/ports/forge/fake.ts +6 -2
  97. package/packages/core/src/ports/forge/git-rewrite.ts +92 -64
  98. package/packages/core/src/ports/forge/github-transport.ts +45 -2
  99. package/packages/core/src/ports/forge/github.ts +56 -17
  100. package/packages/core/src/ports/forge/local-git.ts +7 -2
  101. package/packages/core/src/ports/forge-failure.ts +40 -0
  102. package/packages/core/src/ports/forge-request-context.ts +35 -0
  103. package/packages/core/src/ports/forge-telemetry.ts +16 -0
  104. package/packages/core/src/ports/runner/claude.ts +136 -9
  105. package/packages/core/src/ports/runner/codex.ts +112 -7
  106. package/packages/core/src/ports/runner/contract.ts +78 -0
  107. package/packages/core/src/ports/runner/fake.ts +59 -1
  108. package/packages/core/src/ports/runner/native-cli-fixture.ts +86 -0
  109. package/packages/core/src/ports/runner/native-process-fixture.ts +38 -0
  110. package/packages/core/src/ports/runner/native-session.ts +110 -0
  111. package/packages/core/src/ports/runner/pi-rpc.ts +7 -1
  112. package/packages/core/src/ports/runner/pi.ts +162 -2
  113. package/packages/core/src/ports/tickets/linear.ts +180 -12
  114. package/packages/core/src/ports/tickets/migration.ts +92 -9
  115. package/packages/core/src/ports/types.ts +60 -5
  116. package/packages/core/src/ports/workspace/git-worktree.ts +45 -51
  117. package/packages/core/src/ports/workspace/vercel-sandbox.ts +28 -12
  118. package/packages/core/src/processes/build-child-exit.ts +50 -2
  119. package/packages/core/src/processes/build-child.ts +15 -7
  120. package/packages/core/src/processes/build-runner.ts +909 -213
  121. package/packages/core/src/processes/dispatcher.ts +815 -369
  122. package/packages/core/src/processes/execution-no-progress.ts +15 -0
  123. package/packages/core/src/processes/pause-execution-fixture.ts +37 -0
  124. package/packages/core/src/processes/phase-failure-budget.ts +2 -1
  125. package/packages/core/src/processes/publication-loss.ts +7 -3
  126. package/packages/core/src/processes/repo-view.ts +53 -6
  127. package/packages/core/src/processes/tick-publication.ts +6 -2
  128. package/packages/core/src/runtime-identity.ts +37 -0
  129. package/packages/core/src/store/adapter.ts +4 -2
  130. package/packages/core/src/store/build-scope.ts +9 -0
  131. package/packages/core/src/store/contract.ts +233 -16
  132. package/packages/core/src/store/digest.ts +20 -2
  133. package/packages/core/src/store/local/schema.ts +6 -0
  134. package/packages/core/src/store/local/store.ts +57 -4
  135. package/packages/core/src/store/memory.ts +83 -2
  136. package/packages/core/src/store/new-build.ts +2 -2
  137. package/packages/core/src/store/phase-session.ts +13 -0
  138. package/packages/core/src/store/reduced-reads.ts +43 -4
  139. package/packages/core/src/store/reducer-value-shapes.json +8911 -6344
  140. package/packages/core/src/store/reducer-value-validation.ts +103 -3
  141. package/packages/core/src/store/reducer-values.ts +21 -6
  142. package/packages/core/src/store/remote/client.ts +145 -20
  143. package/packages/core/src/store/remote/index.ts +2 -0
  144. package/packages/core/src/store/remote/protocol.ts +19 -0
  145. package/packages/core/src/store/remote/version.ts +2 -0
  146. package/packages/core/src/store/repo-state-events.ts +5 -2
  147. package/packages/core/src/store/repo-tick.ts +6 -1
  148. package/packages/core/src/store/session-handle.ts +8 -0
  149. package/packages/core/src/store/snapshots.ts +21 -5
  150. package/packages/core/src/store/types.ts +17 -1
  151. package/packages/core/src/testing/dispatch-read-budget.ts +18 -2
  152. package/packages/core/src/testing/index.ts +7 -0
  153. package/packages/core/src/testing/newer-writer.ts +37 -0
  154. package/packages/core/src/testing/reduced-read-budget.ts +3 -0
  155. package/skills/guide/SKILL.md +140 -25
  156. package/skills/guide/references/integration-tree.md +83 -4
  157. package/skills/guide/references/landing-policy.md +11 -0
  158. package/skills/guide/references/migration-1.0.md +9 -0
  159. package/skills/guide/references/operator-api.md +18 -0
  160. package/skills/guide/references/plugin-authoring.md +47 -4
  161. package/skills/guide/references/remote-store-protocol.md +16 -0
  162. package/skills/guide/references/remote-ticket-protocol.md +5 -0
  163. package/skills/guide/references/restacking.md +42 -7
  164. package/skills/guide/references/setup.md +25 -0
  165. package/skills/guide/references/spec-standard.md +71 -0
  166. package/skills/guide/references/ticket-dependencies.md +6 -45
  167. package/skills/guide/references/ticket-migration.md +50 -4
  168. package/skills/implement/SKILL.md +4 -2
  169. package/skills/operate/SKILL.md +63 -6
  170. package/skills/reconcile/SKILL.md +3 -1
  171. package/skills/spec/SKILL.md +62 -40
  172. package/skills/tickets/SKILL.md +15 -43
@@ -106,6 +106,7 @@ export interface ArtifactMeta {
106
106
  * the event log on each call, so the log stays the sole authority and the
107
107
  * digest can always be discarded and rebuilt. */
108
108
  export interface BuildDigest {
109
+ compatibility?: import('../events/compatibility').CompatibilityState
109
110
  /** A kernel landing requested an audit and no audit settlement has followed. */
110
111
  integrationAuditPending?: true
111
112
  /** Compact confirmed landing evidence for admission; avoids full build reads. */
@@ -141,7 +142,11 @@ export type RepoTickCompletion =
141
142
  outcome: 'completed'
142
143
  counters: RepositoryEventEnvelope<'dispatcher.tick-completed'>['payload']['counters']
143
144
  }
144
- | { outcome: 'failed'; error: string }
145
+ | {
146
+ outcome: 'failed'
147
+ error: string
148
+ forgeRequests?: import('../ports/forge-telemetry').ForgeRequestCounts
149
+ }
145
150
 
146
151
  /** Bounded operational telemetry; never workflow or queue authority. */
147
152
  export interface RepoTickObservation {
@@ -267,6 +272,8 @@ export interface SubscribeOptions {
267
272
  }
268
273
 
269
274
  export interface BuildStore {
275
+ /** Catalog used for event-derived batch answers, when known by this adapter. */
276
+ readonly catalogIdentity?: string
270
277
  /** Reads cross a network boundary; presentation polling may use a relaxed cadence. */
271
278
  readonly networkReads?: boolean
272
279
  /** Return an interface-enforced handle with authority over exactly `slug`.
@@ -334,6 +341,15 @@ export interface BuildStore {
334
341
  makeEvent: (deposited: ArtifactMeta[]) => EventWrite<T>,
335
342
  ): Promise<{ event: EventEnvelope<T>; artifacts: ArtifactMeta[] }>
336
343
 
344
+ /** Atomic conditional deposit. A stale head returns null without revisions,
345
+ * timestamps, retention changes or artifact deposits. */
346
+ appendWithArtifactsIfCurrent<T extends EventType>(
347
+ slug: string,
348
+ expectedSeq: number,
349
+ artifacts: ArtifactInput[],
350
+ makeEvent: (deposited: ArtifactMeta[]) => EventWrite<T>,
351
+ ): Promise<{ event: EventEnvelope<T>; artifacts: ArtifactMeta[] } | null>
352
+
337
353
  /** Events with seq strictly greater than `sinceSeq` (default 0), in order.
338
354
  * When nothing newer exists and `opts.waitSeconds` is given (whole
339
355
  * seconds; clamped at the adapter's ceiling, never rejected), the adapter
@@ -1,3 +1,5 @@
1
+ import { dispatchFrontendReducer } from '../cli/dispatch-repository-feed'
2
+ import { loadReducerSnapshot } from '../store/snapshots'
1
3
  import { expect } from 'bun:test'
2
4
  import { DispatchFrontend } from '../cli/dispatch-frontend'
3
5
  import type { DispatchChildResult } from '../cli/dispatch-process'
@@ -146,7 +148,14 @@ export async function dispatchReadBudget(store: BuildStore, backing: BuildStore)
146
148
  const refresh = () => (frontend as unknown as { renderOnce(): Promise<void> }).renderOnce()
147
149
  await refresh()
148
150
  const initialSize = JSON.stringify(
149
- (await getSnapshot({ kind: 'repo', repo }, 'dispatchFrontend', 2))?.state,
151
+ (
152
+ await loadReducerSnapshot(
153
+ { getReducerSnapshot: getSnapshot },
154
+ { kind: 'repo', repo },
155
+ 'dispatchFrontend',
156
+ { version: dispatchFrontendReducer.version },
157
+ )
158
+ )?.state,
150
159
  ).length
151
160
  let recordReads: number | undefined
152
161
  try {
@@ -179,7 +188,14 @@ export async function dispatchReadBudget(store: BuildStore, backing: BuildStore)
179
188
  recordReads ??= metrics.records - before.records
180
189
  expect(metrics.records - before.records).toBe(recordReads)
181
190
  const size = JSON.stringify(
182
- (await getSnapshot({ kind: 'repo', repo }, 'dispatchFrontend', 2))?.state,
191
+ (
192
+ await loadReducerSnapshot(
193
+ { getReducerSnapshot: getSnapshot },
194
+ { kind: 'repo', repo },
195
+ 'dispatchFrontend',
196
+ { version: dispatchFrontendReducer.version },
197
+ )
198
+ )?.state,
183
199
  ).length
184
200
  // First advancement adds the child's identity; ticks add nothing.
185
201
  expect(size).toBeLessThan(initialSize + 1000)
@@ -74,3 +74,10 @@ export {
74
74
  } from './reduced-read-budget'
75
75
 
76
76
  export { gitRewrite } from '../ports/forge/git-rewrite'
77
+
78
+ export { newerFact, seedNewerMemoryFact, NEWER_EVENT_TYPE } from './newer-writer'
79
+ export { READ_CATALOG_IDENTITY, catalogIdentity } from '../events/compatibility'
80
+ export { readBuildFacts, readBuildStreamSeed, readRepositoryFacts } from '../store/reduced-reads'
81
+ export { deferMixedVersion } from '../kernel/mixed-version'
82
+
83
+ export { guardForge } from '../kernel/guarded-forge'
@@ -0,0 +1,37 @@
1
+ /** Frozen newer-writer fixture. Persist directly through an adapter fixture;
2
+ * never submit this fact through the older production writer's catalog. */
3
+ import type { StoredEvent } from '../events/compatibility'
4
+ import { AUTOBUILD_VERSION } from '../store/remote/version'
5
+ export const NEWER_EVENT_TYPE = 'future.fixture.control'
6
+ export function newerFact(
7
+ seq: number,
8
+ classification: 'advisory' | 'decisive' = 'decisive',
9
+ build = 'mixed',
10
+ ): StoredEvent {
11
+ return {
12
+ build,
13
+ seq,
14
+ ts: '2026-10-20T12:00:00.000Z',
15
+ actor: { kind: 'kernel' },
16
+ type: NEWER_EVENT_TYPE,
17
+ payload: { nested: { future: true } },
18
+ compatibility: { writerVersion: AUTOBUILD_VERSION, classification },
19
+ }
20
+ }
21
+
22
+ /** Models bytes committed by a separate newer writer, bypassing the older
23
+ * writer only inside test fixtures. Does not alter production validation. */
24
+ export function seedNewerMemoryFact(
25
+ store: import('../store/memory').MemoryBuildStore,
26
+ event: StoredEvent,
27
+ ): void {
28
+ const collection = event.repo === undefined ? 'builds' : 'repos'
29
+ const resource = event.repo ?? event.build!
30
+ const records = (store as unknown as Record<string, Map<string, { events: StoredEvent[] }>>)[
31
+ collection
32
+ ]!
33
+ const record = records.get(resource)
34
+ if (!record || event.seq !== record.events.length + 1)
35
+ throw new Error('invalid newer-writer fixture sequence')
36
+ record.events.push(structuredClone(event))
37
+ }
@@ -25,6 +25,7 @@ import {
25
25
  readBuildFacts,
26
26
  readBuildStreamSeed,
27
27
  readRepositoryFacts,
28
+ readForgeHealth,
28
29
  readRepositoryAttention,
29
30
  readBuildDigests,
30
31
  readDispatcherRunFacts,
@@ -168,6 +169,7 @@ export async function reducedReadBudget(opts: {
168
169
  await readBuildStreamSeed(store, slug)
169
170
  await readBuildFacts(store, slug)
170
171
  await readRepositoryFacts(store, repo)
172
+ await readForgeHealth(store, repo)
171
173
  await readBuildDigests(store, repo)
172
174
  await readRepositoryAttention(store, repo)
173
175
  const handle = await opts.fresh()
@@ -399,6 +401,7 @@ async function coldDispatchOnceBudget(
399
401
  payload: { enabled: false },
400
402
  })
401
403
  const boundary = (await readRepositoryFacts(store, onceRepo)).cursor
404
+ await readForgeHealth(store, onceRepo)
402
405
  const directory = await mkdtemp(join(tmpdir(), 'ab-cold-once-'))
403
406
  try {
404
407
  await writeFile(
@@ -23,6 +23,7 @@ Idle nodes consume no runner capacity and empty nodes have no PR.
23
23
  - [Landing policy, examples and forge requirements](references/landing-policy.md)
24
24
  - [Restacking, identity and recovery](references/restacking.md)
25
25
  - [Migration from 0.x](references/migration-1.0.md)
26
+ - [Moving ticket sources](references/ticket-migration.md): recorded migrations preserve in-flight build continuity.
26
27
 
27
28
  ## How to use this skill
28
29
 
@@ -105,13 +106,13 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
105
106
  - **`finalize`** — the agent writes the PR description; the kernel opens the
106
107
  PR. `[finalize].steps` run afterward and are failure-tolerant. A
107
108
  content-producing step commits selected files locally and finishes clean;
108
- the runner regular-pushes a descendant head to extend the open PR branch.
109
+ the runner pushes the exact descendant SHA and confirms forge readback before recording success.
109
110
  - **Restacking and epilogue.** The kernel replays one net leaf change at verify
110
111
  entry and when its destination moves while awaiting landing. Clean replay
111
112
  starts no agent; conflicts enter `reconcile`, then verification. The leaf
112
113
  terminates **merged** or **closed**. See the [replay reference](references/restacking.md).
113
114
 
114
- Integration builds use collect → verify → land → close, with descendant cascade,
115
+ Integration builds use collect → verify → land → close, with demand-driven node restacking,
115
116
  repair children and source-aware reconcile as needed. Their exact-head/parent
116
117
  verification differs from clean waiting leaf rewrites. See the
117
118
  [node lifecycle](references/integration-tree.md#collect-verify-and-land).
@@ -226,7 +227,10 @@ The distinctions that change an administrator's answer:
226
227
  - **Ticket providers** (`linear`, `file`) sit behind one port; the dispatcher
227
228
  does not know which is configured.
228
229
  - **Forge operations and pushes are kernel-side plumbing.** Agents commit
229
- locally and never push, never touch a remote, never open the PR. A push
230
+ locally and never push, never touch a remote, never open the PR. The forge
231
+ acknowledges the exact intended SHA; local refs are caches refreshed after
232
+ confirmation. Local implementation publication failures write no completion or
233
+ pending request and leave the same session retryable. A push
230
234
  happens at the implement terminal boundary or after the runner validates a
231
235
  successful content-producing finalize post-step. Reconcile alone uses an exact expected-head guarded rewrite after archiving every recorded Git tip under `refs/autobuild/archive/<slug>/<sha>`.
232
236
  `github` publishes through GitHub. `local-git` performs no remote/network/`gh`
@@ -605,9 +609,31 @@ skip reason is required and
605
609
  must be non-blank; no failure report is required. Either kind of skip satisfies
606
610
  that step for the current cycle and advances, but it is not a pass and never
607
611
  masks another step's failure. Only failures return the build to `implement` and
608
- consume `[policy].maxVerifyAttempts`; skips retain the cycle's attempt number
612
+ consume `[policy].maxVerifyAttempts` once per distinct failed cycle since the
613
+ latest spec revision. Passing target-movement cycles cost zero; cycle identifiers
614
+ remain monotonic across restacks and reconciles. Skips retain the cycle's attempt number
609
615
  without consuming that budget.
610
616
 
617
+
618
+ Classified session deferrals consume no phase failures. Unsupported decisive
619
+ facts retain the mixed-version wait gate and durable compatibility diagnostic.
620
+ When the scoped `ab context` initial own-build read fails, the CLI best-effort
621
+ writes `session.build-read-failed` with exact session, phase, round, operation
622
+ `context`, reason `own-build-read`, and diagnostic. A valid terminal from that
623
+ session wins if the agent recovers. Otherwise settlement records `phase.deferred`
624
+ and `phase.deferral-escalated`, immediately projecting ordinary blocked attention.
625
+ The raise cites `own-build-read:<evidenceSeq>`; replay repairs either settlement
626
+ crash gap before launching another agent. An `escalation.answered` retry or
627
+ guidance authorizes one fresh session without resetting genuine phase failures;
628
+ a new classified failure parks again. There are zero automatic paid retries
629
+ after this deferral. If evidence cannot be written, ordinary recovery applies;
630
+ agent output and `no-terminal` alone never classify a read failure.
631
+
632
+ Ordinary silence, provider failures and session timeouts retain the runner's
633
+ phase failure limit (`BuildRunnerOpts.maxPhaseAttempts`, default 2). This is
634
+ an internal runner option, not an accepted `[policy]` TOML key. Reconcile
635
+ execution and unchanged-base progress budgets retain their existing accounting.
636
+
611
637
  ### `[finalize]`
612
638
 
613
639
  `steps` orders the post-PR actions; every name requires a matching
@@ -676,7 +702,8 @@ field outside the selected strict variant. Diagnostics name the logical step.
676
702
 
677
703
  A post-step that produces repository content must select and commit its files
678
704
  locally and leave a clean worktree. The runner proves the last published head
679
- is an ancestor and performs the regular, non-force push through the Forge port;
705
+ is an ancestor and performs the regular, non-force push through the Forge port
706
+ of the frozen SHA, confirming exact authoritative readback;
680
707
  the agent never pushes. An unchanged `HEAD` creates and pushes no commit. Dirty
681
708
  output, rewritten history, Git errors, and publication failures record the
682
709
  step as failed and file an observation while the green build continues.
@@ -726,7 +753,7 @@ consumed by the core `plan` phase, and nothing is reported.
726
753
  | `model` | — | optional, nonempty string | Model for this role. A role that omits it inherits `[roles.default].model`; only when neither names a model does the merged runtime supply its own default. |
727
754
  | `args` | `[]` | optional, array of nonempty strings | Ordered extra CLI argv tokens for every phase and tool-free one-shot invocation. Omitted ⇒ inherit `[roles.default].args`; a set list, including `[]`, replaces it wholesale. Each string is one token, without shell parsing. Only model and parsed protocol/output-mode spellings are rejected eagerly. |
728
755
  | `extensions` | no effect | deprecated optional array of nonempty strings | Compatibility-only field. Dispatch warns for each declaring role and directs migration to `args`. |
729
- | `sessionBudgetSeconds` | policy fallback | optional positive integer | Wall-clock budget for each build phase session on this logical role. Omitted ⇒ inherit `[roles.default].sessionBudgetSeconds`; absent there too ⇒ `[policy].sessionBudgetSeconds`. One value covers the primary and every alternate. |
756
+ | `sessionBudgetSeconds` | policy fallback | optional positive integer | Active-time budget for each build phase session on this logical role; suspended intervals are excluded and native continuation retains the original ceiling. Omitted ⇒ inherit `[roles.default].sessionBudgetSeconds`; absent there too ⇒ `[policy].sessionBudgetSeconds`. One value covers the primary and every alternate. |
730
757
  | `alternates` | `[]` | optional ordered array of strict `{ runtime?, model?, args?, extensions? }` entries | Failure-triggered targets. Omitted ⇒ inherit `[roles.default].alternates`; a role list, including `[]`, replaces it wholesale. Each entry overlays that role's effective primary axes and is eagerly validated. `extensions` remains only the deprecated no-op. |
731
758
 
732
759
  Inheritance is mechanical and **independent per field**: merge each configured
@@ -790,15 +817,17 @@ nonnegative integer so zero can disable that trigger.
790
817
 
791
818
  | Field | Default | Allowed / constraints | Effect |
792
819
  |---|---|---|---|
793
- | `sessionBudgetSeconds` | `3600` | positive integer | Wall-clock bound for each build agent session unless its logical role overrides it. |
820
+ | `sessionBudgetSeconds` | `3600` | positive integer | Active-time bound for each build agent session unless its logical role overrides it; native continuation retains accumulated time and excludes suspension. |
794
821
  | `stallRounds` | `3` | positive integer | The same finding surviving this many review rounds auto-escalates to a human — the anti-loop guard. |
795
- | `maxVerifyAttempts` | `3` | positive integer | Caps the `verify → implement → verify` cycle before escalation. |
822
+ | `maxVerifyAttempts` | `3` | positive integer | Caps distinct failed verify cycles since the latest spec revision; passed and skipped cycles cost zero. |
796
823
  | `maxDispatchAttempts` | `3` | positive integer | Caps consecutive dispatch failures before a setup-targeted `dispatch-failure-limit` escalation. |
797
824
  | `maxSetupAttempts` | `3` | positive integer | Caps consecutive `[commands].setup` failures before a setup-targeted human escalation. |
798
825
  | `maxInfrastructureAttempts` | `3` | positive integer | Caps consecutive remote provider lifecycle failures before a setup-targeted human escalation; a `retry` answer re-arms the budget. |
799
826
  | `maxReconcileAttempts` | `3` | positive integer | Caps completed reconciles that leave the PR conflicted against an unchanged authoritative base. Moving-base races do not consume the budget. |
800
827
  | `maxReviewRounds` | `6` | positive integer | Default `maxRounds` for the `plan ⇄ plan-review` and `implement ⇄ code-review` convergence loops. When that cap parks a build, `ab answer <slug> --review-round-ceiling <n>` may replace it for only the escalation's loop and current spec revision. |
801
828
  | `harvestThreshold` | `5` | positive integer | Newly unclaimed `observation.recorded` occurrences required to start one repository harvest run. |
829
+ | `janitorFailureAttentionSeconds` | `600` | positive integer | Consecutive janitor failure duration before build attention. |
830
+ | `janitorBackoffMaxSeconds` | `300` | positive integer | Cap on exponential janitor retry delay, starting at 30 seconds. |
802
831
  | `harvestMaxDrift` | `3` | nonnegative integer | Other builds merged after the oldest unclaimed observation required to start a run; `0` disables drift. |
803
832
 
804
833
  Dispatch failures share one budget across stages until runner attachment. At
@@ -825,8 +854,9 @@ For each repeat conflict, Autobuild compares the target base of the latest
825
854
  completed reconcile with a fresh authoritative base snapshot. An advanced base
826
855
  proves the attempt lost a race and permits another reconcile regardless of the
827
856
  attempt high-water. An unchanged base consumes `maxReconcileAttempts` and
828
- escalates when the budget is exhausted. Every current policy escalation carries
829
- a closed `policyCause`; reconcile no-progress uses `reconcile-no-progress`,
857
+ escalates when the budget is exhausted. Ordinary current policy escalations carry
858
+ a closed `policyCause`; `phase.deferral-escalated` instead identifies an
859
+ own-build-read deferral and its answer resets no phase failures; reconcile no-progress uses `reconcile-no-progress`,
830
860
  while `round` remains occurrence scope. Answering a runner-failure cause re-arms
831
861
  only its matching phase and round. The phase-level `verify-failure-limit` cause
832
862
  explicitly re-arms all rounds for its verify target, while
@@ -839,7 +869,7 @@ matching cause separately before another reconcile. Cause-less historical
839
869
  raises retain their former round-shaped reset behavior, and roundless
840
870
  policy/reconcile raises retain their former no-progress meaning, on replay
841
871
  without migration. Post-reconcile verification follows the captured policy and remains
842
- independently bounded by `maxVerifyAttempts`.
872
+ independently bounded by the distinct failed-cycle count in `maxVerifyAttempts`.
843
873
 
844
874
  `stallRounds` counts *persistence chains*, which reviewers mark and the kernel
845
875
  only follows. A finding's `persists` ids name prior-round findings whose defect
@@ -1374,6 +1404,23 @@ in-session `put|get` still require ambient phase auth.
1374
1404
 
1375
1405
  ## Dispatch dashboard
1376
1406
 
1407
+ Integration list rows show parent commit distance (current or unknown when appropriate),
1408
+ name the destination and show children landed out of the
1409
+ known total, with the remainder split into building and queued. Cancelled
1410
+ children are excluded. Missing or diagnostic-bearing observations show
1411
+ `children unknown`; a successful empty enumeration shows `no children yet`.
1412
+ The five list steps are `spec`, `open`, `collect`, `verify`, and `land`, with
1413
+ verification progress or failure and the landing mode in parentheses. Before
1414
+ a policy decision, label-dependent modes may read `policy pending`. A current
1415
+ verified node adds `verified`. Only restack conflicts, current verification
1416
+ failures (file a repair child targeting the node), and readiness awaiting
1417
+ consent add a list alert. Consent names `l` and `ab land <slug>`. Branch,
1418
+ restack state and conflicting files remain in detail, along with every child's
1419
+ ticket id, title and live phase (or queued/landed), open-first counts, verification
1420
+ steps and current outcomes, repair instructions, and the landing rule. Cancelled
1421
+ children are omitted; historical missing titles or filenames are explicit.
1422
+ The operator web app uses the same facts as text, without a graphical bar.
1423
+
1377
1424
  On a TTY, `ab dispatch` renders one fixed interactive frame anchored at the
1378
1425
  terminal's first row. Its header remains on that top row as frame height changes
1379
1426
  and after a resize; unused rows remain below. On exit, the final frame is copied
@@ -1452,7 +1499,11 @@ action; queued builds offer `d discard`. Land requires readiness; hold may be
1452
1499
  recorded before readiness. There is no repository landing toggle.
1453
1500
 
1454
1501
  A running build reads `PAUSING` after `p` appends its pause request and before
1455
- the kernel acknowledges it at a safe boundary. During that window `p` appends
1502
+ the live session stops and the kernel records its suspension. Pause interrupts
1503
+ live agent work immediately; resume continues where it stopped when supported,
1504
+ while remote or unsupported sessions rerun fresh with a recorded fallback reason.
1505
+ Without a live agent, acknowledgement still waits for a safe boundary. During
1506
+ that window `p` appends
1456
1507
  the opposing resume request, cancels the stale pause, and projects the build
1457
1508
  back to `RUNNING`. An acknowledged paused build offers only `r resume` and reads
1458
1509
  `RESUMING` until the kernel acknowledges that request; there is no gesture to
@@ -1562,6 +1613,7 @@ to the build's event log and apply the same write-time checks.
1562
1613
  | Pause all | `ab pause --all [--store <ref>] [--json]` | Select the global row and press `p`. | `dispatcher.pause-set` (first), `dispatcher.intake-set`, then one `build.pause-requested` per `RUNNING` build |
1563
1614
  | Resume all | `ab resume --all [--store <ref>] [--json]` | Select the global row and press `r`. | `dispatcher.pause-set` (first), `dispatcher.intake-set`, then one `build.resume-requested` per `PAUSED` build |
1564
1615
  | Consent to landing | `ab land <slug> [--store <ref>]` | Select a ready build and press `l`. | `build.land-requested`, then `landing.command-acknowledged` |
1616
+ | Restack node | `ab restack <node> [--store <ref>]` | CLI/tool request; normal safety gates apply. | `node.restack-requested`, then `node.restack-satisfied` |
1565
1617
  | Hold landing | `ab hold <slug> [--store <ref>]` | Select a build and press `o`, including before readiness. | `build.hold-requested`, then `landing.command-acknowledged` after native cancellation |
1566
1618
  | Answer blockers with guidance | `ab answer <slug> <text> [--store <ref>]` | Select a blocked build, press `r`, enter text, then Enter. | One `escalation.answered` with `resolution: guidance` per applicable blocker. |
1567
1619
  | Retry blockers without guidance | `ab answer <slug> [--store <ref>]` | Open the same `r` field and press Enter empty or whitespace-only. | One `escalation.answered` with `resolution: retry` per applicable blocker. |
@@ -1598,7 +1650,8 @@ it after the bounded stop delay when necessary, and only then releases the lease
1598
1650
  The dispatcher defers cleanup while that lease is live, then performs the
1599
1651
  checkpointed, retry-safe cleanup: close an open unmerged PR, release the workspace,
1600
1652
  delete the exact remote and local build branches, preserve existing ticket labels
1601
- while adding `autobuild:aborted`, and return the ticket to configured Triage before
1653
+ while adding `autobuild:aborted`, return the ticket to configured Triage, and post
1654
+ an abort notice before
1602
1655
  completing as `abandoned`. Missing
1603
1656
  Forge cleanup capabilities or provider outages leave cleanup pending with an
1604
1657
  actionable diagnostic for the next tick.
@@ -1778,14 +1831,29 @@ JSON exposes `outcome: "skipped"` and `reason`, never a synthetic pass.
1778
1831
 
1779
1832
  Use `ab builds` to find the build; use `ab build status` to understand it.
1780
1833
 
1781
- The open-session list is literal durable state. Historical logs with a
1782
- `session.started` but no ending remain readable and show that session as open;
1783
- Autobuild does not reinterpret or repair them. When a runner actually takes a
1784
- build over, it first records each session open at the resume boundary as
1785
- `reclaimed`, without inventing a transcript, and then records its attachment.
1786
- The rerun opens one fresh session, so after attachment only work that could
1787
- still be alive appears in `ab build status`. Dashboard session history keeps the
1788
- reclaimed entry visibly distinct and reports that its transcript is unavailable.
1834
+ The open-session list is literal durable state. A graceful dispatcher stop
1835
+ suspends local git-worktree agent turns, retaining their partial transcripts
1836
+ and native handles. On restart, a matching host/path/runtime resumes the same
1837
+ phase and round with fresh session credentials. The first message names the
1838
+ interruption and asks the agent to re-check the worktree and re-run anything
1839
+ in flight. Native state is an optimization; the Store remains authoritative.
1840
+
1841
+ `session.started.continuation` records resume intent before launch. Native
1842
+ acceptance is a separate `session.resumed` fact; terminals may land before it.
1843
+ Recovery retries an unaccepted attempt using its inherited handle. Suspended
1844
+ sessions reject old credentials permanently. `session.resume-fallback` records
1845
+ why native continuation could not be used (including remote workspaces), then
1846
+ ordinary fresh-session recovery applies. Unrelated open sessions are reclaimed
1847
+ without inventing transcripts. Dashboard history shows suspended and resumed
1848
+ segments separately, with their individual transcript refs and usage.
1849
+
1850
+ The phase budget counts active time across interruptions using the original
1851
+ ceiling. Suspended intervals do not consume it; abrupt loss is conservatively
1852
+ charged through recovery. Pause immediately suspends a live turn with cause
1853
+ `pause`, including remote sessions and sessions without a native handle. Resume
1854
+ continues the local native session where eligible; otherwise the recorded
1855
+ fallback explains the fresh rerun. Pause acknowledgement follows turn stop and
1856
+ suspension or terminal settlement.
1789
1857
 
1790
1858
  Each session row also shows its live-view stream: the stream id and
1791
1859
  whether that stream is `open` or `closed` — for example `stream st_1f2e (open)`.
@@ -1816,7 +1884,12 @@ With no slugs the repository journal is included; named watches add it with
1816
1884
 
1817
1885
  The default watch reports actionable conditions only:
1818
1886
 
1819
- - Build `escalation.raised`, or `build.merge-decision`: a finalized open PR
1887
+ - `build.janitor-failing`: a build has failed janitor attempts for the configured attention threshold. A successful attempt clears it.
1888
+ - `dispatcher.forge-persistent`: forge degradation remains after a post-reset retry tick; recovery clears the episode.
1889
+
1890
+ - Build `escalation.raised` or `phase.deferral-escalated`: an operator answer
1891
+ is required. A read deferral asks for CLI/store repair before retry or guidance.
1892
+ - Build `build.merge-decision`: a finalized open PR
1820
1893
  with a recorded consent decision awaiting consent, an explicit hold, or a
1821
1894
  current actionable merge-gate deferral. Policy decisions not yet recorded and
1822
1895
  authorized landings awaiting application are silent. One merge decision is reported per build/PR.
@@ -1832,7 +1905,10 @@ The default watch reports actionable conditions only:
1832
1905
  for five minutes in one run. A successful tick, new run, or matching stop
1833
1906
  ends the episode. Source grace and cooldown-driven failures do not start
1834
1907
  this clock; after grace, the first qualifying failure starts a new five-minute
1835
- interval. Each persistence episode is reported once.
1908
+ interval. Each persistence episode is reported once. Repository read failures
1909
+ fail the watch tick and retry on the next tick; repeated failures use this
1910
+ existing attention. Validation errors include reducer, scope, cursor, field
1911
+ path, and running version/commit in the stored tick error.
1836
1912
 
1837
1913
  Repository conditions are included with no slugs or with `--repository`.
1838
1914
  Routine outcomes and self-healing failures are silent. Repeatable
@@ -1958,7 +2034,7 @@ vocabulary is closed: `blocked`, `paused`, `running`, `collecting`, `done`, `abo
1958
2034
  `terminal` (done or aborted), `pr=open`, `pr=merged`, `pr=closed`,
1959
2035
  `pr=conflicted`, `phase=<phase>` (a core phase — `plan`, `plan-review`,
1960
2036
  `implement`, `code-review`, `finalize`, `reconcile` — or `verify:<step>`), and
1961
- `attention` (an open escalation or a build waiting for a merge decision). Repeatable `--event`
2037
+ `attention` (an open escalation, janitor failure attention, or a build waiting for a merge decision). Repeatable `--event`
1962
2038
  globs follow the `ab watch` rules. Multiple values are alternatives: the first
1963
2039
  one satisfied ends the wait — all `--for` values in supply order, then all
1964
2040
  globs in supply order — and the record names what matched.
@@ -1969,12 +2045,17 @@ means an open escalation exactly as everywhere else. In the manner of `kubectl
1969
2045
  wait`, a condition that already holds when the command starts returns
1970
2046
  immediately with that build's latest event (`--since` does not suppress this);
1971
2047
  otherwise the first later event whose reduction produces it ends the wait.
1972
- `attention` is also a current-state condition: an already open escalation or
2048
+ `attention` is also a current-state condition: existing janitor failure attention, an already open escalation or
1973
2049
  merge decision returns immediately, including with `--since`. Merge matches
1974
2050
  use the same observation as watch. During replay, only new escalation events
1975
2051
  or undelivered eligible merge decisions satisfy attention. `--event` conditions
1976
2052
  fire only on new events or a cursor-resumed backlog.
1977
2053
 
2054
+ Default `ab watch` and `ab wait --for attention` also deliver
2055
+ `phase.deferral-escalated`, preserving its original event type, id and sequence.
2056
+ Its question asks for CLI/store repair and an explicit retry or guidance answer.
2057
+ Explicit event globs continue to replace the default filter.
2058
+
1978
2059
  The record is the `ab watch` record plus a `condition` field naming the
1979
2060
  satisfied `--for` value or `--event` glob. Unlike `ab watch`, there is no
1980
2061
  trailing cursor object: the record's own `cursor` is the final position.
@@ -2176,3 +2257,37 @@ ab ticket edit AUT-8
2176
2257
 
2177
2258
  Use `expectedRevision` on MCP `tickets.update`, `tickets.move`, `tickets.block`
2178
2259
  and `tickets.unblock` with the revision from `tickets.get` or `tickets.list`.
2260
+
2261
+ ## Forge failure recovery
2262
+
2263
+ Janitor failures are durable per-build episodes. Eligible failures retry after
2264
+ 30, 60, 120, 240 seconds, then at the configured cap (300 seconds by default).
2265
+ Skipped polls preserve the episode across restart. After
2266
+ `policy.janitorFailureAttentionSeconds` (600 by default), `build.janitor-failing`
2267
+ notifies default watchers and appears on the build row. A successful attempt
2268
+ clears it. `policy.janitorBackoffMaxSeconds` sets the positive integer cap.
2269
+
2270
+ A classified forge rate limit records repository degradation with `resetAt`.
2271
+ Forge work waits during cooldown; passing the deadline permits a recovery
2272
+ request, and only success clears degradation. A further limit extends cooldown.
2273
+ Native landing application failures keep candidate-specific retry eligibility,
2274
+ including automatic decisions without a human command. Retries recheck consent,
2275
+ holds, verification and the exact candidate. Uncertain enables remain pending
2276
+ until cancellation can be confirmed after cooldown. Publication retries reuse
2277
+ cancellation receipts only when the forge confirms the same disabled state for
2278
+ the same candidate and publication operation.
2279
+
2280
+ Tick telemetry counts provider wire requests, including failures. Counts are
2281
+ unavailable for uninstrumented adapters. Attribution retains at most ten builds
2282
+ ordered by descending count then build name; repository requests are unattributed.
2283
+ Repository status names a hotspot only when one build makes at least two requests
2284
+ and more than half of attributed requests. Telemetry never controls workflow.
2285
+
2286
+ ### Requesting node freshness
2287
+
2288
+ `ab restack <node>` and `builds.restack {repo, slug}` record durable demand.
2289
+ Paused or blocked nodes wait for normal safety gates; leaves, terminal nodes
2290
+ and unopened nodes are refused. Collecting nodes may intentionally trail their
2291
+ parent; both dashboards show its commit distance, current, or unknown.
2292
+ See [restacking timing and recovery](references/restacking.md) for the five
2293
+ automatic and explicit demand points, minimal presence paths and upgrade behavior.
@@ -15,7 +15,46 @@ build generation supplies evidence; ambiguous or unavailable evidence leaves the
15
15
  dependent queued. Confirmed landing SHA reachability can prove presence without
16
16
  a trailer, and a landed node transports its whole owned contribution. Empty
17
17
  completed nodes contribute nothing. Sibling work waits for landing into the common
18
- ancestor and cascade; same-node landings satisfy presence directly.
18
+ ancestor and demand the minimal restack path; same-node landings satisfy presence directly.
19
+
20
+ ## Choosing a destination
21
+
22
+ First decide whether the feature should be more than one ticket at all; the
23
+ [spec standard](spec-standard.md#sizing-and-splitting) prefers fewer, larger
24
+ tickets cut at seams. Whenever grooming produces more than one ticket for a
25
+ feature, explicitly choose root or a node before filing. Use a node when the set should reach the base branch
26
+ as one integrated change, or intermediate states should not ship independently.
27
+ Use root when every ticket is independently valuable and safe to land alone.
28
+ Nested nodes can collect a subfeature before contributing it to a larger feature.
29
+ A node provides one integrated delivery to its parent under the configured forge
30
+ method; it does not promise one physical Git commit.
31
+
32
+ Blockers and targets are independent: blockers order work; targets decide where
33
+ it lands. A blocker inside the same node resolves when its change lands into that
34
+ node, so a dependency chain can advance without waiting for root consent, subject
35
+ to the normal claim gates and presence rules. Dependencies across destinations
36
+ still need the presence evidence described above and in
37
+ [blocker resolution](ticket-dependencies.md#when-a-blocker-resolves).
38
+
39
+ Read the consuming repository's `autobuild.toml` and evaluate its effective
40
+ [landing policy](landing-policy.md) for the actual ticket kinds, destinations and
41
+ labels. Ordered `[[landing]]` rules use the first match; `from`, `into` and `label`
42
+ predicates are ANDed, with omitted predicates acting as wildcards. Without a
43
+ match, leaves default to auto and nodes to consent. Explain the resulting landing
44
+ and consent flow to the human in plain terms. Ask when grooming does not make the
45
+ destination choice clear. This decision is separate from workflow-state placement
46
+ and never authorizes promoting tickets to ready.
47
+
48
+ For example, **if** the matched rules require consent into root and allow automatic
49
+ landing into nodes (the staged-release example in the policy reference), a
50
+ root-targeted chain waits for consent separately for each ticket and ships each
51
+ intermediate change to the base branch. Under those same rules, children collect
52
+ automatically in a node and the verified, complete node waits for consent once
53
+ into root. Other matching rules can produce different flows; auto authorization
54
+ still obeys every readiness and merge gate. If the live dispatcher rejected a
55
+ configuration reload, the edited file is not evidence of its effective policy.
56
+ Resolve or report that uncertainty using existing operator repository status
57
+ and configuration-reload evidence before claiming which policy is active.
19
58
 
20
59
  ## Tickets and admission
21
60
 
@@ -25,8 +64,13 @@ cycles are refused. A node with targeting tickets cannot be demoted, even when
25
64
  those children are completed. Clear or reparent its children first.
26
65
 
27
66
  File tickets persist kind and target in frontmatter. Hosted tickets validate
28
- changes transactionally within the project. Linear uses the exact `node` label
29
- for kind and the parent relation for target only when that parent has the node
67
+ changes transactionally within the project. Existing tickets default to work with
68
+ no target; metadata changes increment the revision once, while equivalent aliases
69
+ and unchanged values do not. Legacy plugins without `integrationTree` support
70
+ read as work with no target and refuse explicit metadata writes, including clears
71
+ and mixed patches, with guidance to use a capable source.
72
+
73
+ Linear uses the exact `node` label for kind and the parent relation for target only when that parent has the node
30
74
  label. Ordinary grouping parents remain grouping and survive unrelated edits;
31
75
  explicit target clear clears the parent relation. Label replacement can demote a
32
76
  node and receives the same guards; explicit kind and labels must agree. Linear
@@ -40,6 +84,17 @@ no placeholder commit or PR. Idle nodes need no provisioned workspace, runner,
40
84
  execution lease or dispatch capacity. A PR opens or is adopted when the node
41
85
  has commits its current parent lacks; parent-only advancement remains empty.
42
86
 
87
+
88
+ A node requesting reconcile or verification is admitted before new ticket
89
+ claims. Its candidate occupancy excludes itself and capacity-bearing blocked or
90
+ paused descendants, following accepted source-qualified build target ancestry.
91
+ Running descendants and unrelated builds still count; ordinary blocked and
92
+ paused work retains its slot for every other admission. Provisioning reserves
93
+ node occupancy before the runner starts. This exception never raises the budget
94
+ for new claims. Status and both dashboards report actual occupancy, configured
95
+ capacity, effective display capacity and the nodes using descendant-held slots.
96
+ Idle collecting nodes remain free.
97
+
43
98
  Claims freeze the destination build generation and branch. Missing, unopened,
44
99
  landed, closed or aborted targets leave work queued with diagnostics. The newest
45
100
  generation wins; a closed generation never falls back to an older open one.
@@ -96,7 +151,7 @@ children retain their frozen destination.
96
151
  `--no-target` moves it to the root. Omitted fields preserve existing values;
97
152
  `--kind work` resets kind when valid. Only owned contributions replay onto the
98
153
  new parent, then the same PR is retargeted. Empty and same-head moves need no
99
- new commit or PR. Descendants follow through the normal cascade.
154
+ new commit or PR. Descendants restack only on their own demand.
100
155
 
101
156
  The request is durable before the provider write. Source readback accepts the
102
157
  new effective ancestry; branch publication, PR retargeting and completion have
@@ -115,3 +170,27 @@ written: abort and re-dispatch instead.
115
170
 
116
171
  See [forge requirements](landing-policy.md#forge-requirements),
117
172
  [restacking](restacking.md), and [migration from 0.x](migration-1.0.md).
173
+
174
+ ## Integration detail
175
+
176
+ Both dashboards show destination (with the configured-base annotation for root
177
+ targets), row progress and steps, branch/restack state, and all open and landed
178
+ children with titles and states. Open children come first; live children show
179
+ their current phase, unbuilt children read `queued`, contributions read `landed`.
180
+ Cancelled tickets without contributions are excluded. Verification names the
181
+ expected steps and only outcomes bound to the current node head and destination;
182
+ failures name the repair-child instruction. Landing explains the rule and mode;
183
+ ready consent names `l` and `ab land <slug>`. Conflicts name recorded files.
184
+ These are Store-only projections: additive `integration.observed.children`
185
+ metadata carries source/id, optional title and contribution build identity;
186
+ `node.item-conflicted.files` and conflicted `restack.replayed.files` retain paths.
187
+ Older events remain readable, with explicit unavailable titles/files. Display
188
+ metadata never changes completeness or landing eligibility.
189
+
190
+ ## Demand-driven parent freshness
191
+
192
+ Collecting nodes may intentionally trail their parent. They refresh before
193
+ verification and landing, for queued dependency presence, on operator request,
194
+ and after accepted re-parenting. Descendants need independent demand; presence
195
+ requests follow only the minimal proven ancestor path. See
196
+ [restacking](restacking.md#timing-and-evidence) for timing, requests and distance.
@@ -148,3 +148,14 @@ compatibility does not grant forge tree capabilities. Upgrade adapters before
148
148
  admitting nodes or requesting unsupported retargeting or landing operations.
149
149
  For the lifecycle see [integration trees](integration-tree.md); for old controls
150
150
  and upgrade conversion see [migration](migration-1.0.md).
151
+
152
+ Publication acknowledgement requires exact authoritative head readback, including
153
+ recovery. An unconfirmed candidate's descendants do not prove success. Durable
154
+ confirmed receipts preserve historical writes. Local refs cache confirmed heads;
155
+ remote expected-head leases and durable writer reservations still guard writes.
156
+ Local-git's shared database retains authoritative CAS.
157
+
158
+ Native cancellation receipts are candidate- and operation-specific. Publication
159
+ retries confirm forge state before reusing a receipt; external re-enables require
160
+ another confirmed cancellation. Classified transient landing failures retain
161
+ retry eligibility and recheck authorization after repository forge cooldown.
@@ -66,3 +66,12 @@ Check [forge requirements](landing-policy.md#forge-requirements) and
66
66
  [restacking](restacking.md) before enabling nodes on a plugin forge. Ensure
67
67
  archive publication/read permissions, tree capabilities and required merge
68
68
  methods are available; legacy read compatibility is insufficient.
69
+
70
+ ## Demand-driven node restacks
71
+
72
+ Parent movement is now observed without starting a node replay. Existing frozen
73
+ transactions finish after upgrade; subsequent replay needs completeness before
74
+ verification, freshness before landing, dependency presence, operator demand
75
+ (`ab restack <node>`), or accepted re-parenting. Nested nodes need independent
76
+ demand. Leaves keep their existing timing. There is no eager compatibility mode.
77
+ See [restacking](restacking.md) for durable requests and parent commit distance.