@defrex/autobuild 1.0.0-beta.0 → 1.0.0-beta.2

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 (162) hide show
  1. package/README.md +9 -4
  2. package/SPEC.md +295 -62
  3. package/bin/ab-build-runner.ts +10 -8
  4. package/docs/architecture.md +179 -25
  5. package/docs/configuration.md +41 -6
  6. package/docs/hosted-service.md +35 -0
  7. package/docs/integration-tree.md +81 -4
  8. package/docs/landing-policy.md +11 -0
  9. package/docs/migration-1.0.md +9 -0
  10. package/docs/operator-api.md +18 -0
  11. package/docs/remote-store-protocol.md +11 -0
  12. package/docs/restacking.md +42 -7
  13. package/docs/setup.md +25 -0
  14. package/docs/ticket-dependencies.md +6 -45
  15. package/package.json +3 -3
  16. package/packages/core/src/cli/attention.ts +4 -1
  17. package/packages/core/src/cli/binary.ts +17 -1
  18. package/packages/core/src/cli/context.ts +53 -1
  19. package/packages/core/src/cli/dashboard/actions.ts +4 -0
  20. package/packages/core/src/cli/dashboard/detail.ts +45 -1
  21. package/packages/core/src/cli/dashboard/facts.ts +7 -2
  22. package/packages/core/src/cli/dashboard/integration-detail.ts +142 -0
  23. package/packages/core/src/cli/dashboard/integration-row.ts +248 -0
  24. package/packages/core/src/cli/dashboard/landing-display.ts +64 -0
  25. package/packages/core/src/cli/dashboard/model.ts +140 -16
  26. package/packages/core/src/cli/dashboard/poll.ts +40 -4
  27. package/packages/core/src/cli/dashboard/refresh.ts +20 -13
  28. package/packages/core/src/cli/dashboard/render.ts +106 -5
  29. package/packages/core/src/cli/dashboard/transcript.ts +2 -1
  30. package/packages/core/src/cli/dispatch-frontend.ts +22 -12
  31. package/packages/core/src/cli/dispatch.ts +59 -25
  32. package/packages/core/src/cli/help.ts +19 -2
  33. package/packages/core/src/cli/main.ts +37 -0
  34. package/packages/core/src/cli/publication-settlement.ts +49 -5
  35. package/packages/core/src/cli/repository-status.ts +97 -2
  36. package/packages/core/src/cli/status.ts +24 -1
  37. package/packages/core/src/cli/terminals.ts +94 -93
  38. package/packages/core/src/cli/wait.ts +11 -2
  39. package/packages/core/src/cli/watch.ts +12 -0
  40. package/packages/core/src/config/schema.ts +3 -0
  41. package/packages/core/src/events/catalog.ts +38 -0
  42. package/packages/core/src/events/compatibility.ts +183 -0
  43. package/packages/core/src/events/native-session.ts +13 -0
  44. package/packages/core/src/events/payloads.ts +148 -2
  45. package/packages/core/src/events/policy.ts +209 -0
  46. package/packages/core/src/events/repository.ts +48 -0
  47. package/packages/core/src/integration/harness.ts +4 -4
  48. package/packages/core/src/kernel/__snapshots__/{reducer-registry.test.ts.snap → reducer-accumulator-shapes.json} +771 -538
  49. package/packages/core/src/kernel/change-presence.ts +4 -2
  50. package/packages/core/src/kernel/dispatch-capacity.ts +119 -0
  51. package/packages/core/src/kernel/dispatcher-liveness.ts +5 -1
  52. package/packages/core/src/kernel/engine.ts +25 -5
  53. package/packages/core/src/kernel/forge-health.ts +19 -0
  54. package/packages/core/src/kernel/generators/build-log.ts +18 -0
  55. package/packages/core/src/kernel/generators/node-restack-log.ts +1 -1
  56. package/packages/core/src/kernel/generators/repository-journals.ts +10 -0
  57. package/packages/core/src/kernel/guarded-forge.ts +159 -0
  58. package/packages/core/src/kernel/incremental.ts +4 -2
  59. package/packages/core/src/kernel/integration-completeness.ts +61 -0
  60. package/packages/core/src/kernel/integration-landing.ts +5 -4
  61. package/packages/core/src/kernel/janitor-failure.ts +36 -0
  62. package/packages/core/src/kernel/landing-publication.ts +35 -15
  63. package/packages/core/src/kernel/landing-state.ts +7 -0
  64. package/packages/core/src/kernel/leaf-restack-state.ts +1 -1
  65. package/packages/core/src/kernel/log-index.ts +12 -1
  66. package/packages/core/src/kernel/mixed-version.ts +52 -0
  67. package/packages/core/src/kernel/node-landing.ts +14 -11
  68. package/packages/core/src/kernel/node-restack-demand.ts +29 -0
  69. package/packages/core/src/kernel/node-restack-state.ts +46 -16
  70. package/packages/core/src/kernel/node-restack-transaction.ts +151 -8
  71. package/packages/core/src/kernel/node-restack.ts +34 -10
  72. package/packages/core/src/kernel/publication.ts +22 -0
  73. package/packages/core/src/kernel/read-deferrals.ts +111 -0
  74. package/packages/core/src/kernel/read-facts.ts +27 -6
  75. package/packages/core/src/kernel/reconcile-restack.ts +23 -2
  76. package/packages/core/src/kernel/reducer-registry.ts +15 -2
  77. package/packages/core/src/kernel/reducer.ts +196 -10
  78. package/packages/core/src/kernel/repository-attention.ts +38 -1
  79. package/packages/core/src/kernel/terminal-guard.ts +11 -4
  80. package/packages/core/src/operator/annotations.ts +6 -0
  81. package/packages/core/src/operator/index.ts +2 -0
  82. package/packages/core/src/operator/presentation.ts +5 -0
  83. package/packages/core/src/operator/query.ts +45 -11
  84. package/packages/core/src/operator/registry.ts +17 -1
  85. package/packages/core/src/operator/restack.ts +51 -0
  86. package/packages/core/src/plugin-sdk/index.ts +10 -0
  87. package/packages/core/src/plugins/load.ts +3 -4
  88. package/packages/core/src/plugins/manifest.ts +1 -1
  89. package/packages/core/src/ports/forge/contract.ts +23 -0
  90. package/packages/core/src/ports/forge/fake.ts +6 -2
  91. package/packages/core/src/ports/forge/git-rewrite.ts +92 -64
  92. package/packages/core/src/ports/forge/github-transport.ts +45 -2
  93. package/packages/core/src/ports/forge/github.ts +56 -17
  94. package/packages/core/src/ports/forge/local-git.ts +7 -2
  95. package/packages/core/src/ports/forge-failure.ts +40 -0
  96. package/packages/core/src/ports/forge-request-context.ts +35 -0
  97. package/packages/core/src/ports/forge-telemetry.ts +16 -0
  98. package/packages/core/src/ports/runner/claude.ts +136 -9
  99. package/packages/core/src/ports/runner/codex.ts +112 -7
  100. package/packages/core/src/ports/runner/contract.ts +78 -0
  101. package/packages/core/src/ports/runner/fake.ts +59 -1
  102. package/packages/core/src/ports/runner/native-cli-fixture.ts +86 -0
  103. package/packages/core/src/ports/runner/native-process-fixture.ts +38 -0
  104. package/packages/core/src/ports/runner/native-session.ts +110 -0
  105. package/packages/core/src/ports/runner/pi-rpc.ts +7 -1
  106. package/packages/core/src/ports/runner/pi.ts +162 -2
  107. package/packages/core/src/ports/types.ts +53 -5
  108. package/packages/core/src/ports/workspace/git-worktree.ts +45 -51
  109. package/packages/core/src/ports/workspace/vercel-sandbox.ts +28 -12
  110. package/packages/core/src/processes/build-child-exit.ts +50 -2
  111. package/packages/core/src/processes/build-child.ts +15 -7
  112. package/packages/core/src/processes/build-runner.ts +909 -213
  113. package/packages/core/src/processes/dispatcher.ts +652 -334
  114. package/packages/core/src/processes/execution-no-progress.ts +15 -0
  115. package/packages/core/src/processes/pause-execution-fixture.ts +37 -0
  116. package/packages/core/src/processes/phase-failure-budget.ts +2 -1
  117. package/packages/core/src/processes/publication-loss.ts +7 -3
  118. package/packages/core/src/processes/repo-view.ts +53 -6
  119. package/packages/core/src/processes/tick-publication.ts +6 -2
  120. package/packages/core/src/runtime-identity.ts +37 -0
  121. package/packages/core/src/store/adapter.ts +4 -2
  122. package/packages/core/src/store/build-scope.ts +9 -0
  123. package/packages/core/src/store/contract.ts +203 -16
  124. package/packages/core/src/store/digest.ts +20 -2
  125. package/packages/core/src/store/local/schema.ts +6 -0
  126. package/packages/core/src/store/local/store.ts +57 -4
  127. package/packages/core/src/store/memory.ts +83 -2
  128. package/packages/core/src/store/new-build.ts +2 -2
  129. package/packages/core/src/store/phase-session.ts +13 -0
  130. package/packages/core/src/store/reduced-reads.ts +43 -4
  131. package/packages/core/src/store/reducer-value-shapes.json +8238 -5764
  132. package/packages/core/src/store/reducer-value-validation.ts +103 -3
  133. package/packages/core/src/store/reducer-values.ts +21 -6
  134. package/packages/core/src/store/remote/client.ts +146 -20
  135. package/packages/core/src/store/remote/compatibility.ts +6 -0
  136. package/packages/core/src/store/remote/index.ts +2 -0
  137. package/packages/core/src/store/remote/protocol.ts +19 -0
  138. package/packages/core/src/store/remote/version.ts +2 -0
  139. package/packages/core/src/store/repo-state-events.ts +3 -1
  140. package/packages/core/src/store/repo-tick.ts +6 -1
  141. package/packages/core/src/store/session-handle.ts +8 -0
  142. package/packages/core/src/store/snapshots.ts +21 -5
  143. package/packages/core/src/store/types.ts +19 -1
  144. package/packages/core/src/testing/dispatch-read-budget.ts +17 -2
  145. package/packages/core/src/testing/index.ts +7 -0
  146. package/packages/core/src/testing/newer-writer.ts +37 -0
  147. package/packages/core/src/testing/reduced-read-budget.ts +3 -0
  148. package/skills/guide/SKILL.md +144 -27
  149. package/skills/guide/references/integration-tree.md +81 -4
  150. package/skills/guide/references/landing-policy.md +11 -0
  151. package/skills/guide/references/migration-1.0.md +9 -0
  152. package/skills/guide/references/operator-api.md +18 -0
  153. package/skills/guide/references/plugin-authoring.md +55 -7
  154. package/skills/guide/references/remote-store-protocol.md +11 -0
  155. package/skills/guide/references/restacking.md +42 -7
  156. package/skills/guide/references/setup.md +25 -0
  157. package/skills/guide/references/ticket-dependencies.md +6 -45
  158. package/skills/implement/SKILL.md +4 -2
  159. package/skills/operate/SKILL.md +63 -6
  160. package/skills/reconcile/SKILL.md +3 -1
  161. package/skills/spec/SKILL.md +49 -39
  162. 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,10 @@ 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
277
+ /** Reads cross a network boundary; presentation polling may use a relaxed cadence. */
278
+ readonly networkReads?: boolean
270
279
  /** Return an interface-enforced handle with authority over exactly `slug`.
271
280
  * The handle retains this shape so foreign/admin calls fail loudly. */
272
281
  scopeBuild(slug: string): BuildScopedStore
@@ -332,6 +341,15 @@ export interface BuildStore {
332
341
  makeEvent: (deposited: ArtifactMeta[]) => EventWrite<T>,
333
342
  ): Promise<{ event: EventEnvelope<T>; artifacts: ArtifactMeta[] }>
334
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
+
335
353
  /** Events with seq strictly greater than `sinceSeq` (default 0), in order.
336
354
  * When nothing newer exists and `opts.waitSeconds` is given (whole
337
355
  * seconds; clamped at the adapter's ceiling, never rejected), the adapter
@@ -1,3 +1,4 @@
1
+ import { loadReducerSnapshot } from '../store/snapshots'
1
2
  import { expect } from 'bun:test'
2
3
  import { DispatchFrontend } from '../cli/dispatch-frontend'
3
4
  import type { DispatchChildResult } from '../cli/dispatch-process'
@@ -146,7 +147,14 @@ export async function dispatchReadBudget(store: BuildStore, backing: BuildStore)
146
147
  const refresh = () => (frontend as unknown as { renderOnce(): Promise<void> }).renderOnce()
147
148
  await refresh()
148
149
  const initialSize = JSON.stringify(
149
- (await getSnapshot({ kind: 'repo', repo }, 'dispatchFrontend', 2))?.state,
150
+ (
151
+ await loadReducerSnapshot(
152
+ { getReducerSnapshot: getSnapshot },
153
+ { kind: 'repo', repo },
154
+ 'dispatchFrontend',
155
+ { version: 2 },
156
+ )
157
+ )?.state,
150
158
  ).length
151
159
  let recordReads: number | undefined
152
160
  try {
@@ -179,7 +187,14 @@ export async function dispatchReadBudget(store: BuildStore, backing: BuildStore)
179
187
  recordReads ??= metrics.records - before.records
180
188
  expect(metrics.records - before.records).toBe(recordReads)
181
189
  const size = JSON.stringify(
182
- (await getSnapshot({ kind: 'repo', repo }, 'dispatchFrontend', 2))?.state,
190
+ (
191
+ await loadReducerSnapshot(
192
+ { getReducerSnapshot: getSnapshot },
193
+ { kind: 'repo', repo },
194
+ 'dispatchFrontend',
195
+ { version: 2 },
196
+ )
197
+ )?.state,
183
198
  ).length
184
199
  // First advancement adds the child's identity; ticks add nothing.
185
200
  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(
@@ -5,6 +5,10 @@ description: Authoritative reference for the autobuild system as installed in th
5
5
 
6
6
  # Autobuild system guide
7
7
 
8
+ Install Autobuild in the target repository with `bun add -d --exact @defrex/autobuild`.
9
+ Here, `ab <command>` means the repository-installed CLI; run it as
10
+ `bun ab <command>`, for example `bun ab init`.
11
+
8
12
  Reference material for an agent working on a repository that uses autobuild.
9
13
  This skill describes the *system*. It drives no phase and changes no files.
10
14
 
@@ -101,13 +105,13 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
101
105
  - **`finalize`** — the agent writes the PR description; the kernel opens the
102
106
  PR. `[finalize].steps` run afterward and are failure-tolerant. A
103
107
  content-producing step commits selected files locally and finishes clean;
104
- the runner regular-pushes a descendant head to extend the open PR branch.
108
+ the runner pushes the exact descendant SHA and confirms forge readback before recording success.
105
109
  - **Restacking and epilogue.** The kernel replays one net leaf change at verify
106
110
  entry and when its destination moves while awaiting landing. Clean replay
107
111
  starts no agent; conflicts enter `reconcile`, then verification. The leaf
108
112
  terminates **merged** or **closed**. See the [replay reference](references/restacking.md).
109
113
 
110
- Integration builds use collect → verify → land → close, with descendant cascade,
114
+ Integration builds use collect → verify → land → close, with demand-driven node restacking,
111
115
  repair children and source-aware reconcile as needed. Their exact-head/parent
112
116
  verification differs from clean waiting leaf rewrites. See the
113
117
  [node lifecycle](references/integration-tree.md#collect-verify-and-land).
@@ -222,7 +226,10 @@ The distinctions that change an administrator's answer:
222
226
  - **Ticket providers** (`linear`, `file`) sit behind one port; the dispatcher
223
227
  does not know which is configured.
224
228
  - **Forge operations and pushes are kernel-side plumbing.** Agents commit
225
- locally and never push, never touch a remote, never open the PR. A push
229
+ locally and never push, never touch a remote, never open the PR. The forge
230
+ acknowledges the exact intended SHA; local refs are caches refreshed after
231
+ confirmation. Local implementation publication failures write no completion or
232
+ pending request and leave the same session retryable. A push
226
233
  happens at the implement terminal boundary or after the runner validates a
227
234
  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>`.
228
235
  `github` publishes through GitHub. `local-git` performs no remote/network/`gh`
@@ -298,9 +305,9 @@ under the preceding table.
298
305
  Repository-path specifiers resolve from the config-bearing root, which is the
299
306
  immutable build worktree in scoped phases. npm package specifiers resolve from
300
307
  the consuming main checkout's installed dependencies first, then from the
301
- Autobuild installation the CLI runs from, so an extension installed next to
302
- the CLI (`bun add -g @defrex/autobuild-<extension>`) loads without being added
303
- to the repository; a repository copy wins over an installed one, and missing
308
+ Autobuild installation the CLI runs from as a fallback. Install extensions in
309
+ the consuming repository with `bun add -d --exact @defrex/autobuild-<extension>`;
310
+ a repository copy wins over an installed one, and missing
304
311
  packages fail and are never installed automatically. Specifier strings must be
305
312
  unique: an exact repeat fails config
306
313
  validation before resolution or evaluation, identifies the repeated value and
@@ -601,9 +608,31 @@ skip reason is required and
601
608
  must be non-blank; no failure report is required. Either kind of skip satisfies
602
609
  that step for the current cycle and advances, but it is not a pass and never
603
610
  masks another step's failure. Only failures return the build to `implement` and
604
- consume `[policy].maxVerifyAttempts`; skips retain the cycle's attempt number
611
+ consume `[policy].maxVerifyAttempts` once per distinct failed cycle since the
612
+ latest spec revision. Passing target-movement cycles cost zero; cycle identifiers
613
+ remain monotonic across restacks and reconciles. Skips retain the cycle's attempt number
605
614
  without consuming that budget.
606
615
 
616
+
617
+ Classified session deferrals consume no phase failures. Unsupported decisive
618
+ facts retain the mixed-version wait gate and durable compatibility diagnostic.
619
+ When the scoped `ab context` initial own-build read fails, the CLI best-effort
620
+ writes `session.build-read-failed` with exact session, phase, round, operation
621
+ `context`, reason `own-build-read`, and diagnostic. A valid terminal from that
622
+ session wins if the agent recovers. Otherwise settlement records `phase.deferred`
623
+ and `phase.deferral-escalated`, immediately projecting ordinary blocked attention.
624
+ The raise cites `own-build-read:<evidenceSeq>`; replay repairs either settlement
625
+ crash gap before launching another agent. An `escalation.answered` retry or
626
+ guidance authorizes one fresh session without resetting genuine phase failures;
627
+ a new classified failure parks again. There are zero automatic paid retries
628
+ after this deferral. If evidence cannot be written, ordinary recovery applies;
629
+ agent output and `no-terminal` alone never classify a read failure.
630
+
631
+ Ordinary silence, provider failures and session timeouts retain the runner's
632
+ phase failure limit (`BuildRunnerOpts.maxPhaseAttempts`, default 2). This is
633
+ an internal runner option, not an accepted `[policy]` TOML key. Reconcile
634
+ execution and unchanged-base progress budgets retain their existing accounting.
635
+
607
636
  ### `[finalize]`
608
637
 
609
638
  `steps` orders the post-PR actions; every name requires a matching
@@ -672,7 +701,8 @@ field outside the selected strict variant. Diagnostics name the logical step.
672
701
 
673
702
  A post-step that produces repository content must select and commit its files
674
703
  locally and leave a clean worktree. The runner proves the last published head
675
- is an ancestor and performs the regular, non-force push through the Forge port;
704
+ is an ancestor and performs the regular, non-force push through the Forge port
705
+ of the frozen SHA, confirming exact authoritative readback;
676
706
  the agent never pushes. An unchanged `HEAD` creates and pushes no commit. Dirty
677
707
  output, rewritten history, Git errors, and publication failures record the
678
708
  step as failed and file an observation while the green build continues.
@@ -722,7 +752,7 @@ consumed by the core `plan` phase, and nothing is reported.
722
752
  | `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. |
723
753
  | `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. |
724
754
  | `extensions` | no effect | deprecated optional array of nonempty strings | Compatibility-only field. Dispatch warns for each declaring role and directs migration to `args`. |
725
- | `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. |
755
+ | `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. |
726
756
  | `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. |
727
757
 
728
758
  Inheritance is mechanical and **independent per field**: merge each configured
@@ -786,15 +816,17 @@ nonnegative integer so zero can disable that trigger.
786
816
 
787
817
  | Field | Default | Allowed / constraints | Effect |
788
818
  |---|---|---|---|
789
- | `sessionBudgetSeconds` | `3600` | positive integer | Wall-clock bound for each build agent session unless its logical role overrides it. |
819
+ | `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. |
790
820
  | `stallRounds` | `3` | positive integer | The same finding surviving this many review rounds auto-escalates to a human — the anti-loop guard. |
791
- | `maxVerifyAttempts` | `3` | positive integer | Caps the `verify → implement → verify` cycle before escalation. |
821
+ | `maxVerifyAttempts` | `3` | positive integer | Caps distinct failed verify cycles since the latest spec revision; passed and skipped cycles cost zero. |
792
822
  | `maxDispatchAttempts` | `3` | positive integer | Caps consecutive dispatch failures before a setup-targeted `dispatch-failure-limit` escalation. |
793
823
  | `maxSetupAttempts` | `3` | positive integer | Caps consecutive `[commands].setup` failures before a setup-targeted human escalation. |
794
824
  | `maxInfrastructureAttempts` | `3` | positive integer | Caps consecutive remote provider lifecycle failures before a setup-targeted human escalation; a `retry` answer re-arms the budget. |
795
825
  | `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. |
796
826
  | `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. |
797
827
  | `harvestThreshold` | `5` | positive integer | Newly unclaimed `observation.recorded` occurrences required to start one repository harvest run. |
828
+ | `janitorFailureAttentionSeconds` | `600` | positive integer | Consecutive janitor failure duration before build attention. |
829
+ | `janitorBackoffMaxSeconds` | `300` | positive integer | Cap on exponential janitor retry delay, starting at 30 seconds. |
798
830
  | `harvestMaxDrift` | `3` | nonnegative integer | Other builds merged after the oldest unclaimed observation required to start a run; `0` disables drift. |
799
831
 
800
832
  Dispatch failures share one budget across stages until runner attachment. At
@@ -821,8 +853,9 @@ For each repeat conflict, Autobuild compares the target base of the latest
821
853
  completed reconcile with a fresh authoritative base snapshot. An advanced base
822
854
  proves the attempt lost a race and permits another reconcile regardless of the
823
855
  attempt high-water. An unchanged base consumes `maxReconcileAttempts` and
824
- escalates when the budget is exhausted. Every current policy escalation carries
825
- a closed `policyCause`; reconcile no-progress uses `reconcile-no-progress`,
856
+ escalates when the budget is exhausted. Ordinary current policy escalations carry
857
+ a closed `policyCause`; `phase.deferral-escalated` instead identifies an
858
+ own-build-read deferral and its answer resets no phase failures; reconcile no-progress uses `reconcile-no-progress`,
826
859
  while `round` remains occurrence scope. Answering a runner-failure cause re-arms
827
860
  only its matching phase and round. The phase-level `verify-failure-limit` cause
828
861
  explicitly re-arms all rounds for its verify target, while
@@ -835,7 +868,7 @@ matching cause separately before another reconcile. Cause-less historical
835
868
  raises retain their former round-shaped reset behavior, and roundless
836
869
  policy/reconcile raises retain their former no-progress meaning, on replay
837
870
  without migration. Post-reconcile verification follows the captured policy and remains
838
- independently bounded by `maxVerifyAttempts`.
871
+ independently bounded by the distinct failed-cycle count in `maxVerifyAttempts`.
839
872
 
840
873
  `stallRounds` counts *persistence chains*, which reviewers mark and the kernel
841
874
  only follows. A finding's `persists` ids name prior-round findings whose defect
@@ -1370,6 +1403,23 @@ in-session `put|get` still require ambient phase auth.
1370
1403
 
1371
1404
  ## Dispatch dashboard
1372
1405
 
1406
+ Integration list rows show parent commit distance (current or unknown when appropriate),
1407
+ name the destination and show children landed out of the
1408
+ known total, with the remainder split into building and queued. Cancelled
1409
+ children are excluded. Missing or diagnostic-bearing observations show
1410
+ `children unknown`; a successful empty enumeration shows `no children yet`.
1411
+ The five list steps are `spec`, `open`, `collect`, `verify`, and `land`, with
1412
+ verification progress or failure and the landing mode in parentheses. Before
1413
+ a policy decision, label-dependent modes may read `policy pending`. A current
1414
+ verified node adds `verified`. Only restack conflicts, current verification
1415
+ failures (file a repair child targeting the node), and readiness awaiting
1416
+ consent add a list alert. Consent names `l` and `ab land <slug>`. Branch,
1417
+ restack state and conflicting files remain in detail, along with every child's
1418
+ ticket id, title and live phase (or queued/landed), open-first counts, verification
1419
+ steps and current outcomes, repair instructions, and the landing rule. Cancelled
1420
+ children are omitted; historical missing titles or filenames are explicit.
1421
+ The operator web app uses the same facts as text, without a graphical bar.
1422
+
1373
1423
  On a TTY, `ab dispatch` renders one fixed interactive frame anchored at the
1374
1424
  terminal's first row. Its header remains on that top row as frame height changes
1375
1425
  and after a resize; unused rows remain below. On exit, the final frame is copied
@@ -1448,7 +1498,11 @@ action; queued builds offer `d discard`. Land requires readiness; hold may be
1448
1498
  recorded before readiness. There is no repository landing toggle.
1449
1499
 
1450
1500
  A running build reads `PAUSING` after `p` appends its pause request and before
1451
- the kernel acknowledges it at a safe boundary. During that window `p` appends
1501
+ the live session stops and the kernel records its suspension. Pause interrupts
1502
+ live agent work immediately; resume continues where it stopped when supported,
1503
+ while remote or unsupported sessions rerun fresh with a recorded fallback reason.
1504
+ Without a live agent, acknowledgement still waits for a safe boundary. During
1505
+ that window `p` appends
1452
1506
  the opposing resume request, cancels the stale pause, and projects the build
1453
1507
  back to `RUNNING`. An acknowledged paused build offers only `r resume` and reads
1454
1508
  `RESUMING` until the kernel acknowledges that request; there is no gesture to
@@ -1558,6 +1612,7 @@ to the build's event log and apply the same write-time checks.
1558
1612
  | 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 |
1559
1613
  | 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 |
1560
1614
  | Consent to landing | `ab land <slug> [--store <ref>]` | Select a ready build and press `l`. | `build.land-requested`, then `landing.command-acknowledged` |
1615
+ | Restack node | `ab restack <node> [--store <ref>]` | CLI/tool request; normal safety gates apply. | `node.restack-requested`, then `node.restack-satisfied` |
1561
1616
  | 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 |
1562
1617
  | 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. |
1563
1618
  | 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. |
@@ -1774,14 +1829,29 @@ JSON exposes `outcome: "skipped"` and `reason`, never a synthetic pass.
1774
1829
 
1775
1830
  Use `ab builds` to find the build; use `ab build status` to understand it.
1776
1831
 
1777
- The open-session list is literal durable state. Historical logs with a
1778
- `session.started` but no ending remain readable and show that session as open;
1779
- Autobuild does not reinterpret or repair them. When a runner actually takes a
1780
- build over, it first records each session open at the resume boundary as
1781
- `reclaimed`, without inventing a transcript, and then records its attachment.
1782
- The rerun opens one fresh session, so after attachment only work that could
1783
- still be alive appears in `ab build status`. Dashboard session history keeps the
1784
- reclaimed entry visibly distinct and reports that its transcript is unavailable.
1832
+ The open-session list is literal durable state. A graceful dispatcher stop
1833
+ suspends local git-worktree agent turns, retaining their partial transcripts
1834
+ and native handles. On restart, a matching host/path/runtime resumes the same
1835
+ phase and round with fresh session credentials. The first message names the
1836
+ interruption and asks the agent to re-check the worktree and re-run anything
1837
+ in flight. Native state is an optimization; the Store remains authoritative.
1838
+
1839
+ `session.started.continuation` records resume intent before launch. Native
1840
+ acceptance is a separate `session.resumed` fact; terminals may land before it.
1841
+ Recovery retries an unaccepted attempt using its inherited handle. Suspended
1842
+ sessions reject old credentials permanently. `session.resume-fallback` records
1843
+ why native continuation could not be used (including remote workspaces), then
1844
+ ordinary fresh-session recovery applies. Unrelated open sessions are reclaimed
1845
+ without inventing transcripts. Dashboard history shows suspended and resumed
1846
+ segments separately, with their individual transcript refs and usage.
1847
+
1848
+ The phase budget counts active time across interruptions using the original
1849
+ ceiling. Suspended intervals do not consume it; abrupt loss is conservatively
1850
+ charged through recovery. Pause immediately suspends a live turn with cause
1851
+ `pause`, including remote sessions and sessions without a native handle. Resume
1852
+ continues the local native session where eligible; otherwise the recorded
1853
+ fallback explains the fresh rerun. Pause acknowledgement follows turn stop and
1854
+ suspension or terminal settlement.
1785
1855
 
1786
1856
  Each session row also shows its live-view stream: the stream id and
1787
1857
  whether that stream is `open` or `closed` — for example `stream st_1f2e (open)`.
@@ -1812,7 +1882,12 @@ With no slugs the repository journal is included; named watches add it with
1812
1882
 
1813
1883
  The default watch reports actionable conditions only:
1814
1884
 
1815
- - Build `escalation.raised`, or `build.merge-decision`: a finalized open PR
1885
+ - `build.janitor-failing`: a build has failed janitor attempts for the configured attention threshold. A successful attempt clears it.
1886
+ - `dispatcher.forge-persistent`: forge degradation remains after a post-reset retry tick; recovery clears the episode.
1887
+
1888
+ - Build `escalation.raised` or `phase.deferral-escalated`: an operator answer
1889
+ is required. A read deferral asks for CLI/store repair before retry or guidance.
1890
+ - Build `build.merge-decision`: a finalized open PR
1816
1891
  with a recorded consent decision awaiting consent, an explicit hold, or a
1817
1892
  current actionable merge-gate deferral. Policy decisions not yet recorded and
1818
1893
  authorized landings awaiting application are silent. One merge decision is reported per build/PR.
@@ -1828,7 +1903,10 @@ The default watch reports actionable conditions only:
1828
1903
  for five minutes in one run. A successful tick, new run, or matching stop
1829
1904
  ends the episode. Source grace and cooldown-driven failures do not start
1830
1905
  this clock; after grace, the first qualifying failure starts a new five-minute
1831
- interval. Each persistence episode is reported once.
1906
+ interval. Each persistence episode is reported once. Repository read failures
1907
+ fail the watch tick and retry on the next tick; repeated failures use this
1908
+ existing attention. Validation errors include reducer, scope, cursor, field
1909
+ path, and running version/commit in the stored tick error.
1832
1910
 
1833
1911
  Repository conditions are included with no slugs or with `--repository`.
1834
1912
  Routine outcomes and self-healing failures are silent. Repeatable
@@ -1954,7 +2032,7 @@ vocabulary is closed: `blocked`, `paused`, `running`, `collecting`, `done`, `abo
1954
2032
  `terminal` (done or aborted), `pr=open`, `pr=merged`, `pr=closed`,
1955
2033
  `pr=conflicted`, `phase=<phase>` (a core phase — `plan`, `plan-review`,
1956
2034
  `implement`, `code-review`, `finalize`, `reconcile` — or `verify:<step>`), and
1957
- `attention` (an open escalation or a build waiting for a merge decision). Repeatable `--event`
2035
+ `attention` (an open escalation, janitor failure attention, or a build waiting for a merge decision). Repeatable `--event`
1958
2036
  globs follow the `ab watch` rules. Multiple values are alternatives: the first
1959
2037
  one satisfied ends the wait — all `--for` values in supply order, then all
1960
2038
  globs in supply order — and the record names what matched.
@@ -1965,12 +2043,17 @@ means an open escalation exactly as everywhere else. In the manner of `kubectl
1965
2043
  wait`, a condition that already holds when the command starts returns
1966
2044
  immediately with that build's latest event (`--since` does not suppress this);
1967
2045
  otherwise the first later event whose reduction produces it ends the wait.
1968
- `attention` is also a current-state condition: an already open escalation or
2046
+ `attention` is also a current-state condition: existing janitor failure attention, an already open escalation or
1969
2047
  merge decision returns immediately, including with `--since`. Merge matches
1970
2048
  use the same observation as watch. During replay, only new escalation events
1971
2049
  or undelivered eligible merge decisions satisfy attention. `--event` conditions
1972
2050
  fire only on new events or a cursor-resumed backlog.
1973
2051
 
2052
+ Default `ab watch` and `ab wait --for attention` also deliver
2053
+ `phase.deferral-escalated`, preserving its original event type, id and sequence.
2054
+ Its question asks for CLI/store repair and an explicit retry or guidance answer.
2055
+ Explicit event globs continue to replace the default filter.
2056
+
1974
2057
  The record is the `ab watch` record plus a `condition` field naming the
1975
2058
  satisfied `--for` value or `--event` glob. Unlike `ab watch`, there is no
1976
2059
  trailing cursor object: the record's own `cursor` is the final position.
@@ -2172,3 +2255,37 @@ ab ticket edit AUT-8
2172
2255
 
2173
2256
  Use `expectedRevision` on MCP `tickets.update`, `tickets.move`, `tickets.block`
2174
2257
  and `tickets.unblock` with the revision from `tickets.get` or `tickets.list`.
2258
+
2259
+ ## Forge failure recovery
2260
+
2261
+ Janitor failures are durable per-build episodes. Eligible failures retry after
2262
+ 30, 60, 120, 240 seconds, then at the configured cap (300 seconds by default).
2263
+ Skipped polls preserve the episode across restart. After
2264
+ `policy.janitorFailureAttentionSeconds` (600 by default), `build.janitor-failing`
2265
+ notifies default watchers and appears on the build row. A successful attempt
2266
+ clears it. `policy.janitorBackoffMaxSeconds` sets the positive integer cap.
2267
+
2268
+ A classified forge rate limit records repository degradation with `resetAt`.
2269
+ Forge work waits during cooldown; passing the deadline permits a recovery
2270
+ request, and only success clears degradation. A further limit extends cooldown.
2271
+ Native landing application failures keep candidate-specific retry eligibility,
2272
+ including automatic decisions without a human command. Retries recheck consent,
2273
+ holds, verification and the exact candidate. Uncertain enables remain pending
2274
+ until cancellation can be confirmed after cooldown. Publication retries reuse
2275
+ cancellation receipts only when the forge confirms the same disabled state for
2276
+ the same candidate and publication operation.
2277
+
2278
+ Tick telemetry counts provider wire requests, including failures. Counts are
2279
+ unavailable for uninstrumented adapters. Attribution retains at most ten builds
2280
+ ordered by descending count then build name; repository requests are unattributed.
2281
+ Repository status names a hotspot only when one build makes at least two requests
2282
+ and more than half of attributed requests. Telemetry never controls workflow.
2283
+
2284
+ ### Requesting node freshness
2285
+
2286
+ `ab restack <node>` and `builds.restack {repo, slug}` record durable demand.
2287
+ Paused or blocked nodes wait for normal safety gates; leaves, terminal nodes
2288
+ and unopened nodes are refused. Collecting nodes may intentionally trail their
2289
+ parent; both dashboards show its commit distance, current, or unknown.
2290
+ See [restacking timing and recovery](references/restacking.md) for the five
2291
+ automatic and explicit demand points, minimal presence paths and upgrade behavior.
@@ -15,7 +15,44 @@ 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
+ Whenever grooming produces more than one ticket for a feature, explicitly choose
23
+ root or a node before filing. Use a node when the set should reach the base branch
24
+ as one integrated change, or intermediate states should not ship independently.
25
+ Use root when every ticket is independently valuable and safe to land alone.
26
+ Nested nodes can collect a subfeature before contributing it to a larger feature.
27
+ A node provides one integrated delivery to its parent under the configured forge
28
+ method; it does not promise one physical Git commit.
29
+
30
+ Blockers and targets are independent: blockers order work; targets decide where
31
+ it lands. A blocker inside the same node resolves when its change lands into that
32
+ node, so a dependency chain can advance without waiting for root consent, subject
33
+ to the normal claim gates and presence rules. Dependencies across destinations
34
+ still need the presence evidence described above and in
35
+ [blocker resolution](ticket-dependencies.md#when-a-blocker-resolves).
36
+
37
+ Read the consuming repository's `autobuild.toml` and evaluate its effective
38
+ [landing policy](landing-policy.md) for the actual ticket kinds, destinations and
39
+ labels. Ordered `[[landing]]` rules use the first match; `from`, `into` and `label`
40
+ predicates are ANDed, with omitted predicates acting as wildcards. Without a
41
+ match, leaves default to auto and nodes to consent. Explain the resulting landing
42
+ and consent flow to the human in plain terms. Ask when grooming does not make the
43
+ destination choice clear. This decision is separate from workflow-state placement
44
+ and never authorizes promoting tickets to ready.
45
+
46
+ For example, **if** the matched rules require consent into root and allow automatic
47
+ landing into nodes (the staged-release example in the policy reference), a
48
+ root-targeted chain waits for consent separately for each ticket and ships each
49
+ intermediate change to the base branch. Under those same rules, children collect
50
+ automatically in a node and the verified, complete node waits for consent once
51
+ into root. Other matching rules can produce different flows; auto authorization
52
+ still obeys every readiness and merge gate. If the live dispatcher rejected a
53
+ configuration reload, the edited file is not evidence of its effective policy.
54
+ Resolve or report that uncertainty using existing operator repository status
55
+ and configuration-reload evidence before claiming which policy is active.
19
56
 
20
57
  ## Tickets and admission
21
58
 
@@ -25,8 +62,13 @@ cycles are refused. A node with targeting tickets cannot be demoted, even when
25
62
  those children are completed. Clear or reparent its children first.
26
63
 
27
64
  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
65
+ changes transactionally within the project. Existing tickets default to work with
66
+ no target; metadata changes increment the revision once, while equivalent aliases
67
+ and unchanged values do not. Legacy plugins without `integrationTree` support
68
+ read as work with no target and refuse explicit metadata writes, including clears
69
+ and mixed patches, with guidance to use a capable source.
70
+
71
+ Linear uses the exact `node` label for kind and the parent relation for target only when that parent has the node
30
72
  label. Ordinary grouping parents remain grouping and survive unrelated edits;
31
73
  explicit target clear clears the parent relation. Label replacement can demote a
32
74
  node and receives the same guards; explicit kind and labels must agree. Linear
@@ -40,6 +82,17 @@ no placeholder commit or PR. Idle nodes need no provisioned workspace, runner,
40
82
  execution lease or dispatch capacity. A PR opens or is adopted when the node
41
83
  has commits its current parent lacks; parent-only advancement remains empty.
42
84
 
85
+
86
+ A node requesting reconcile or verification is admitted before new ticket
87
+ claims. Its candidate occupancy excludes itself and capacity-bearing blocked or
88
+ paused descendants, following accepted source-qualified build target ancestry.
89
+ Running descendants and unrelated builds still count; ordinary blocked and
90
+ paused work retains its slot for every other admission. Provisioning reserves
91
+ node occupancy before the runner starts. This exception never raises the budget
92
+ for new claims. Status and both dashboards report actual occupancy, configured
93
+ capacity, effective display capacity and the nodes using descendant-held slots.
94
+ Idle collecting nodes remain free.
95
+
43
96
  Claims freeze the destination build generation and branch. Missing, unopened,
44
97
  landed, closed or aborted targets leave work queued with diagnostics. The newest
45
98
  generation wins; a closed generation never falls back to an older open one.
@@ -96,7 +149,7 @@ children retain their frozen destination.
96
149
  `--no-target` moves it to the root. Omitted fields preserve existing values;
97
150
  `--kind work` resets kind when valid. Only owned contributions replay onto the
98
151
  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.
152
+ new commit or PR. Descendants restack only on their own demand.
100
153
 
101
154
  The request is durable before the provider write. Source readback accepts the
102
155
  new effective ancestry; branch publication, PR retargeting and completion have
@@ -115,3 +168,27 @@ written: abort and re-dispatch instead.
115
168
 
116
169
  See [forge requirements](landing-policy.md#forge-requirements),
117
170
  [restacking](restacking.md), and [migration from 0.x](migration-1.0.md).
171
+
172
+ ## Integration detail
173
+
174
+ Both dashboards show destination (with the configured-base annotation for root
175
+ targets), row progress and steps, branch/restack state, and all open and landed
176
+ children with titles and states. Open children come first; live children show
177
+ their current phase, unbuilt children read `queued`, contributions read `landed`.
178
+ Cancelled tickets without contributions are excluded. Verification names the
179
+ expected steps and only outcomes bound to the current node head and destination;
180
+ failures name the repair-child instruction. Landing explains the rule and mode;
181
+ ready consent names `l` and `ab land <slug>`. Conflicts name recorded files.
182
+ These are Store-only projections: additive `integration.observed.children`
183
+ metadata carries source/id, optional title and contribution build identity;
184
+ `node.item-conflicted.files` and conflicted `restack.replayed.files` retain paths.
185
+ Older events remain readable, with explicit unavailable titles/files. Display
186
+ metadata never changes completeness or landing eligibility.
187
+
188
+ ## Demand-driven parent freshness
189
+
190
+ Collecting nodes may intentionally trail their parent. They refresh before
191
+ verification and landing, for queued dependency presence, on operator request,
192
+ and after accepted re-parenting. Descendants need independent demand; presence
193
+ requests follow only the minimal proven ancestor path. See
194
+ [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.