@defrex/autobuild 0.13.0 → 1.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/README.md +5 -3
  2. package/SPEC.md +673 -99
  3. package/bin/ab-dispatch-kernel.ts +4 -6
  4. package/docs/architecture.md +322 -75
  5. package/docs/assets/headline-wide.png +0 -0
  6. package/docs/configuration.md +112 -12
  7. package/docs/hosted-service.md +20 -2
  8. package/docs/integration-tree.md +117 -0
  9. package/docs/landing-policy.md +150 -0
  10. package/docs/mcp.md +24 -0
  11. package/docs/migration-1.0.md +68 -0
  12. package/docs/operator-api.md +20 -9
  13. package/docs/remote-store-protocol.md +114 -9
  14. package/docs/remote-ticket-protocol.md +26 -5
  15. package/docs/restacking.md +79 -0
  16. package/docs/setup.md +49 -6
  17. package/docs/ticket-dependencies.md +69 -0
  18. package/docs/ticket-migration.md +8 -0
  19. package/package.json +4 -3
  20. package/packages/core/src/cli/attention.ts +40 -163
  21. package/packages/core/src/cli/build-control.ts +75 -55
  22. package/packages/core/src/cli/bulk-control.ts +3 -2
  23. package/packages/core/src/cli/context.ts +68 -78
  24. package/packages/core/src/cli/dashboard/actions.ts +6 -3
  25. package/packages/core/src/cli/dashboard/landing-display.ts +6 -0
  26. package/packages/core/src/cli/dashboard/live.ts +5 -0
  27. package/packages/core/src/cli/dashboard/model.ts +178 -40
  28. package/packages/core/src/cli/dashboard/poll.ts +15 -9
  29. package/packages/core/src/cli/dashboard/refresh.ts +176 -0
  30. package/packages/core/src/cli/dashboard/render.ts +78 -28
  31. package/packages/core/src/cli/dashboard/repository-poll.ts +57 -0
  32. package/packages/core/src/cli/dashboard/selection.ts +7 -1
  33. package/packages/core/src/cli/dashboard/tree.ts +107 -0
  34. package/packages/core/src/cli/dispatch-frontend.ts +173 -169
  35. package/packages/core/src/cli/dispatch-process.ts +14 -7
  36. package/packages/core/src/cli/dispatch-repository-feed.ts +196 -0
  37. package/packages/core/src/cli/dispatch.ts +397 -214
  38. package/packages/core/src/cli/dispatcher-liveness.ts +41 -21
  39. package/packages/core/src/cli/harvest.ts +71 -39
  40. package/packages/core/src/cli/help.ts +49 -32
  41. package/packages/core/src/cli/historical-build-state.ts +27 -0
  42. package/packages/core/src/cli/init-validation.ts +43 -2
  43. package/packages/core/src/cli/keyboard.ts +6 -0
  44. package/packages/core/src/cli/landings.ts +18 -0
  45. package/packages/core/src/cli/main.ts +52 -18
  46. package/packages/core/src/cli/mcp.ts +9 -0
  47. package/packages/core/src/cli/pr-attachments.ts +10 -13
  48. package/packages/core/src/cli/pr-summary-publication.ts +27 -60
  49. package/packages/core/src/cli/pr-summary.ts +43 -13
  50. package/packages/core/src/cli/publication-settlement.ts +177 -21
  51. package/packages/core/src/cli/repository-status.ts +49 -2
  52. package/packages/core/src/cli/status.ts +133 -36
  53. package/packages/core/src/cli/terminal-restore.ts +54 -0
  54. package/packages/core/src/cli/terminal.ts +16 -2
  55. package/packages/core/src/cli/terminals.ts +121 -219
  56. package/packages/core/src/cli/ticket-editor.ts +10 -3
  57. package/packages/core/src/cli/ticket.ts +115 -20
  58. package/packages/core/src/cli/upgrade-commit.ts +4 -0
  59. package/packages/core/src/cli/upgrade-compatibility.ts +2 -2
  60. package/packages/core/src/cli/upgrade-landing.ts +69 -0
  61. package/packages/core/src/cli/upgrade.ts +16 -0
  62. package/packages/core/src/cli/wait.ts +194 -91
  63. package/packages/core/src/cli/watch.ts +111 -109
  64. package/packages/core/src/config/landing.ts +22 -0
  65. package/packages/core/src/config/live.ts +1 -0
  66. package/packages/core/src/config/pipeline-source.ts +4 -3
  67. package/packages/core/src/config/schema.ts +3 -0
  68. package/packages/core/src/events/catalog.ts +48 -3
  69. package/packages/core/src/events/payloads.ts +295 -6
  70. package/packages/core/src/events/repository.ts +38 -3
  71. package/packages/core/src/integration/harness.ts +11 -2
  72. package/packages/core/src/kernel/__snapshots__/reducer-registry.test.ts.snap +3330 -119
  73. package/packages/core/src/kernel/auto-merge-default.ts +1 -0
  74. package/packages/core/src/kernel/auto-merge.ts +29 -4
  75. package/packages/core/src/kernel/build-identity.ts +94 -0
  76. package/packages/core/src/kernel/change-presence.ts +179 -0
  77. package/packages/core/src/kernel/dispatch-status.ts +17 -1
  78. package/packages/core/src/kernel/dispatcher-liveness.ts +10 -4
  79. package/packages/core/src/kernel/engine.ts +89 -2
  80. package/packages/core/src/kernel/generators/build-log.ts +23 -0
  81. package/packages/core/src/kernel/generators/leaf-restack-log.ts +110 -0
  82. package/packages/core/src/kernel/generators/node-restack-log.ts +94 -0
  83. package/packages/core/src/kernel/generators/repository-journals.ts +25 -3
  84. package/packages/core/src/kernel/harvest.ts +25 -23
  85. package/packages/core/src/kernel/integration-completeness.ts +81 -0
  86. package/packages/core/src/kernel/integration-landing.ts +263 -0
  87. package/packages/core/src/kernel/integration-stack.ts +36 -0
  88. package/packages/core/src/kernel/integration-state.ts +135 -0
  89. package/packages/core/src/kernel/landing-policy.ts +47 -0
  90. package/packages/core/src/kernel/landing-publication.ts +41 -0
  91. package/packages/core/src/kernel/landing-readiness.ts +67 -0
  92. package/packages/core/src/kernel/landing-state.ts +96 -0
  93. package/packages/core/src/kernel/leaf-restack-completion.ts +24 -0
  94. package/packages/core/src/kernel/leaf-restack-state.ts +73 -0
  95. package/packages/core/src/kernel/log-index-value.ts +38 -0
  96. package/packages/core/src/kernel/log-index.ts +35 -5
  97. package/packages/core/src/kernel/node-landing.ts +439 -0
  98. package/packages/core/src/kernel/node-parent.ts +184 -0
  99. package/packages/core/src/kernel/node-restack-state.ts +191 -0
  100. package/packages/core/src/kernel/node-restack-transaction.ts +210 -0
  101. package/packages/core/src/kernel/node-restack.ts +274 -0
  102. package/packages/core/src/kernel/read-facts.ts +704 -0
  103. package/packages/core/src/kernel/reconcile-head.ts +51 -0
  104. package/packages/core/src/kernel/reconcile-restack.ts +560 -0
  105. package/packages/core/src/kernel/reducer-registry.ts +153 -3
  106. package/packages/core/src/kernel/reducer.ts +121 -6
  107. package/packages/core/src/kernel/repository-attention.ts +179 -0
  108. package/packages/core/src/kernel/service-facts.ts +135 -0
  109. package/packages/core/src/kernel/snapshot-parent.ts +33 -0
  110. package/packages/core/src/kernel/terminal-guard.ts +133 -0
  111. package/packages/core/src/ontology.ts +9 -1
  112. package/packages/core/src/operator/annotations.ts +12 -0
  113. package/packages/core/src/operator/control.ts +11 -6
  114. package/packages/core/src/operator/index.ts +6 -0
  115. package/packages/core/src/operator/landings.ts +35 -0
  116. package/packages/core/src/operator/presentation.ts +1 -0
  117. package/packages/core/src/operator/protocol.ts +12 -3
  118. package/packages/core/src/operator/query.ts +40 -21
  119. package/packages/core/src/operator/read-view.ts +4 -13
  120. package/packages/core/src/operator/registry.ts +48 -19
  121. package/packages/core/src/operator/requests.ts +3 -22
  122. package/packages/core/src/operator/sandbox.ts +10 -9
  123. package/packages/core/src/operator/tickets.ts +57 -11
  124. package/packages/core/src/plugin-sdk/index.ts +13 -0
  125. package/packages/core/src/ports/forge/contract.ts +91 -3
  126. package/packages/core/src/ports/forge/fake.ts +142 -4
  127. package/packages/core/src/ports/forge/git-rewrite.ts +232 -0
  128. package/packages/core/src/ports/forge/github-readiness.ts +421 -0
  129. package/packages/core/src/ports/forge/github.ts +631 -35
  130. package/packages/core/src/ports/forge/local-git.ts +119 -5
  131. package/packages/core/src/ports/forge/readiness.ts +99 -0
  132. package/packages/core/src/ports/tickets/contract.ts +41 -0
  133. package/packages/core/src/ports/tickets/create.ts +8 -1
  134. package/packages/core/src/ports/tickets/fake.ts +32 -1
  135. package/packages/core/src/ports/tickets/file-codec.ts +7 -0
  136. package/packages/core/src/ports/tickets/file.ts +18 -1
  137. package/packages/core/src/ports/tickets/hosted-index.ts +2 -0
  138. package/packages/core/src/ports/tickets/linear.ts +124 -4
  139. package/packages/core/src/ports/tickets/migration.ts +25 -1
  140. package/packages/core/src/ports/tickets/operations.ts +7 -2
  141. package/packages/core/src/ports/tickets/remote-protocol.ts +19 -0
  142. package/packages/core/src/ports/tickets/remote.ts +10 -1
  143. package/packages/core/src/ports/tickets/revision.ts +3 -1
  144. package/packages/core/src/ports/tickets/tree.ts +148 -0
  145. package/packages/core/src/ports/tickets/update.ts +15 -2
  146. package/packages/core/src/ports/types.ts +135 -5
  147. package/packages/core/src/ports/workspace/git-worktree.ts +2 -1
  148. package/packages/core/src/ports/workspace/provider-capabilities.ts +1 -1
  149. package/packages/core/src/ports/workspace/vercel-sandbox.ts +60 -3
  150. package/packages/core/src/processes/build-child.ts +6 -6
  151. package/packages/core/src/processes/build-runner.ts +586 -87
  152. package/packages/core/src/processes/dispatch-failure-budget.ts +5 -4
  153. package/packages/core/src/processes/dispatcher-selectors.ts +15 -9
  154. package/packages/core/src/processes/dispatcher.ts +2239 -357
  155. package/packages/core/src/processes/execution-no-progress.ts +46 -1
  156. package/packages/core/src/processes/harvest-execution-state.ts +15 -9
  157. package/packages/core/src/processes/harvest-runner.ts +34 -70
  158. package/packages/core/src/processes/harvest.ts +38 -15
  159. package/packages/core/src/processes/infrastructure-failure-budget.ts +13 -15
  160. package/packages/core/src/processes/orchestrator-tick.ts +2 -2
  161. package/packages/core/src/processes/publication-loss.ts +35 -21
  162. package/packages/core/src/processes/publication-state.ts +30 -5
  163. package/packages/core/src/processes/repo-view.ts +244 -1130
  164. package/packages/core/src/processes/tick-publication.ts +110 -0
  165. package/packages/core/src/store/adapter.ts +23 -0
  166. package/packages/core/src/store/build-scope.ts +35 -0
  167. package/packages/core/src/store/contract.ts +909 -0
  168. package/packages/core/src/store/digest.ts +52 -4
  169. package/packages/core/src/store/local/schema.ts +26 -13
  170. package/packages/core/src/store/local/store.ts +296 -55
  171. package/packages/core/src/store/memory.ts +181 -30
  172. package/packages/core/src/store/phase-session.ts +34 -0
  173. package/packages/core/src/store/reduced-reads.ts +240 -0
  174. package/packages/core/src/store/reducer-value-shapes.json +18323 -0
  175. package/packages/core/src/store/reducer-value-validation.ts +96 -0
  176. package/packages/core/src/store/reducer-values.ts +145 -0
  177. package/packages/core/src/store/remote/client.ts +85 -0
  178. package/packages/core/src/store/remote/compatibility.ts +21 -9
  179. package/packages/core/src/store/remote/index.ts +19 -0
  180. package/packages/core/src/store/remote/protocol.ts +27 -0
  181. package/packages/core/src/store/remote/version.ts +3 -1
  182. package/packages/core/src/store/repo-state-events.ts +3 -1
  183. package/packages/core/src/store/repo-tick.ts +72 -0
  184. package/packages/core/src/store/session-handle.ts +34 -0
  185. package/packages/core/src/store/snapshots.ts +10 -0
  186. package/packages/core/src/store/subscribe.ts +1 -1
  187. package/packages/core/src/store/ticket-assets.ts +4 -4
  188. package/packages/core/src/store/types.ts +71 -6
  189. package/packages/core/src/testing/dispatch-read-budget.ts +215 -0
  190. package/packages/core/src/testing/index.ts +10 -0
  191. package/packages/core/src/testing/reduced-read-budget.ts +502 -0
  192. package/packages/core/src/testing/refresh-scheduler.ts +32 -0
  193. package/skills/guide/SKILL.md +116 -62
  194. package/skills/guide/references/integration-tree.md +117 -0
  195. package/skills/guide/references/landing-policy.md +150 -0
  196. package/skills/guide/references/migration-1.0.md +68 -0
  197. package/skills/guide/references/operator-api.md +13 -6
  198. package/skills/guide/references/plugin-authoring.md +34 -0
  199. package/skills/guide/references/remote-store-protocol.md +114 -9
  200. package/skills/guide/references/remote-ticket-protocol.md +26 -5
  201. package/skills/guide/references/restacking.md +79 -0
  202. package/skills/guide/references/setup.md +49 -6
  203. package/skills/guide/references/ticket-dependencies.md +69 -0
  204. package/skills/guide/references/ticket-migration.md +8 -0
  205. package/skills/operate/SKILL.md +55 -5
  206. package/skills/reconcile/SKILL.md +55 -48
  207. package/skills/spec/SKILL.md +67 -1
  208. package/skills/tickets/SKILL.md +55 -2
  209. package/templates/autobuild.toml +3 -0
  210. package/templates/hosted-service/package.json +2 -2
@@ -214,6 +214,7 @@ These fields hot-reload:
214
214
  | `ticketScanIntervalSeconds` | Next tick; evaluates elapsed time against the new interval. |
215
215
  | `capacity` | Next dispatcher tick. |
216
216
  | `[pr]` | Next build creation. |
217
+ | `[landing]` (ordered `[[landing]]` rules) | Dispatcher-owned policy; next new readiness decision. Existing decisions retain their sampled rule. |
217
218
  | `[commands]` | Next setup, verify check, or finalize check selected for a build whose OWN branch carries it. Dispatcher readiness, resume, and recovery use the same pin. A base-branch reload does not retarget an in-flight build. |
218
219
  | `[verify]` and `[finalize]` | Next engine step selection for a build whose OWN branch carries it. Dispatcher readiness, resume, and recovery use the same pin. An approved plan's stored verify selection remains authoritative, and a base-branch reload does not retarget an in-flight build. |
219
220
  | `[workspace]` provider and config (including `provisioning`) | Next launch of a build whose OWN branch carries it. A base-branch reload never re-provisions an in-flight build. |
@@ -445,6 +446,32 @@ runtime's optional one-shot capability serves slug naming and lazy upgrade
445
446
  conflict resolution; when absent, each caller retains its existing safe
446
447
  fallback.
447
448
 
449
+ ## `[[landing]]`
450
+
451
+ An ordered list of strict landing rules. Predicates within one rule are ANDed;
452
+ the first matching rule wins. Omitted predicates match everything. With no
453
+ matching rule, leaves default to `auto` and nodes to `consent`.
454
+
455
+ | Field | Meaning |
456
+ |---|---|
457
+ | `into` | Optional destination: `root`, any `node`, or an exact frozen destination node ticket id. |
458
+ | `from` | Optional source kind: `leaf` or `node`. |
459
+ | `label` | Optional exact, case-sensitive label on the source ticket. Blank labels are invalid. |
460
+ | `mode` | Required `auto` or `consent`. |
461
+
462
+ For example, put a rule with `into = "root"` and `mode = "consent"`
463
+ before a catch-all rule with `mode = "auto"` to request consent only at the
464
+ root. A catch-all placed first shadows every later rule. Specific-node rules
465
+ match the build's frozen destination, rather than the ticket's current parent.
466
+
467
+ A readiness decision retains the complete matched rule and index (or an explicit
468
+ default), source kind, destination and sampled labels. Later policy edits do not
469
+ rewrite this provenance. Landing policy belongs to the live dispatcher config;
470
+ it is excluded from pinned pipeline settings and integration verification inputs.
471
+ See [worked landing configurations and forge requirements](landing-policy.md),
472
+ [operating controls](#landing-policy), and
473
+ [migration from 0.x](migration-1.0.md).
474
+
448
475
  ## `[pr]`
449
476
 
450
477
  Optional. Omitting the table leaves attachment hosting off; attached artifacts
@@ -1243,6 +1270,25 @@ invariants, not additional configuration fields.
1243
1270
 
1244
1271
  ## `[tickets]`
1245
1272
 
1273
+ ### Ticket kind and target metadata
1274
+
1275
+ `kind` and `target` are fields on individual tickets, not `[tickets]` TOML keys.
1276
+ `kind` defaults to `work`; `node` creates a finite integration point. Omitted
1277
+ `target` means the configured `baseBranch` root. A target must be a same-source
1278
+ node ticket id. `ab ticket update <id> --target <node-id>` changes it;
1279
+ `--no-target` clears it and `--kind work` resets kind. Omitted update fields
1280
+ preserve values. Claimed work targets cannot change: abort and re-dispatch.
1281
+ Open nodes can reparent under the guarded protocol, revoking land consent.
1282
+
1283
+ File tickets persist the fields in frontmatter; hosted tickets store them with
1284
+ project-scoped transactional validation. Linear maps kind to the exact `node`
1285
+ label and target to a parent carrying that label. Ordinary grouping parents do
1286
+ not impose targets; explicit clear removes the parent relation. Node demotion
1287
+ with targeting children and cycles are refused regardless of child state.
1288
+ See [integration trees](integration-tree.md) for admission, lifecycle and commands.
1289
+
1290
+ ### Source configuration
1291
+
1246
1292
  To move an existing project between sources, follow the
1247
1293
  [ticket migration procedure](ticket-migration.md).
1248
1294
 
@@ -1647,8 +1693,10 @@ configuration. The setup prompt instead asks the agent to review and improve
1647
1693
  the existing config.
1648
1694
 
1649
1695
  Re-running init still maintains the `.autobuild/` ignore rule and skill
1650
- installation. `ab upgrade` does not migrate or rewrite `autobuild.toml`; by
1651
- default it first updates a recognized Bun installation — from the npm registry
1696
+ installation. `ab upgrade` migrates an absent landing policy from the target
1697
+ repository journal; explicit landing arrays are preserved. See
1698
+ [migration from 0.x](migration-1.0.md). By default it first updates a recognized
1699
+ Bun installation — from the npm registry
1652
1700
  for a registry install, or from GitHub Releases for a `github:` install — and
1653
1701
  then merges vendored skills from that distribution. For a local install, Bun may update the
1654
1702
  *owning* project's Autobuild dependency in `package.json` and `bun.lock`; this
@@ -1705,7 +1753,7 @@ either retirement.
1705
1753
 
1706
1754
  ## Durable settings outside TOML
1707
1755
 
1708
- Four repository-wide operator choices intentionally live as facts in the
1756
+ Three repository-wide operator choices intentionally live as facts in the
1709
1757
  BuildStore repository journal, not in `autobuild.toml`. They are latest-write
1710
1758
  wins, survive process restarts, and are sampled by every dispatcher on its
1711
1759
  poll. Editing TOML cannot change them.
@@ -1714,13 +1762,13 @@ poll. Editing TOML cannot change them.
1714
1762
  |---|---:|---|---|
1715
1763
  | Ticket intake | on | `ab dispatch --intake` / `--no-intake`; `i` on the dashboard's global row, and `p` (pause all) / `r` (resume all) on that row or their sessionless equivalents `ab pause --all` / `ab resume --all`, which turn intake off and on as part of quiescing the repository | When off, skip only new ticket list/claim/dispatch work. Janitor work, lease recovery, in-flight builds, and harvesting continue. Turning intake off does not hold builds the repository has already accepted — that is the repository pause below. |
1716
1764
  | Repository pause | off | `p` (pause all) / `r` (resume all) on the dashboard's global row, or `ab pause --all` / `ab resume --all` | While on, the dashboard controls line shows `repository PAUSED`, and each held queued row shows `(held)` while retaining its literal `QUEUED` status. No dispatcher tick attaches a runner to such a build — recovery, startup resume, and the lease sweep all skip them. Running builds are parked by the per-build pauses the same command writes; the janitor still settles aborts and discards. |
1717
- | Repository auto-merge default | off | `ab dispatch --auto-merge` / `--no-auto-merge`; `m` on the global row | Seeds durable auto-merge intent on builds claimed while the setting is enabled, and — on each change — also applies as a bulk action to every current non-terminal build: turning it on requests consent for each build (turning it off withdraws it), attributed to the operator who toggled it exactly as if they had pressed `m` on every row. A per-build toggle overrides its build's state until the global row is toggled again. |
1718
1765
  | Harvest gate | on | `h` on the dashboard's global row | Pauses or resumes repository observation harvesting. The header shows the kernel-acknowledged gate, not merely a pending keypress. |
1719
1766
 
1720
1767
  The opposite flag forms for each dispatch setting are mutually exclusive.
1721
1768
  Omitting both writes nothing and reuses the durable value. Per-build
1722
- pause/resume and auto-merge controls are separate facts and do not alter these
1723
- repository defaults. Pause all and resume all write two facts each — the
1769
+ pause/resume and landing controls are separate facts and do not alter these
1770
+ repository settings; landing authorization follows `[[landing]]`. Pause all and
1771
+ resume all write two facts each — the
1724
1772
  repository pause first, then intake — so a partial failure still leaves the
1725
1773
  repository at least as quiesced as asked; `ab pause --all` reports on stderr
1726
1774
  which of them landed when a walk stops partway. The current release has no TOML
@@ -1758,8 +1806,10 @@ set or copy them into `.env`; the runner stamps them for each session.
1758
1806
 
1759
1807
  Forge and agent credentials remain adapter-owned. The `local-git` forge uses no
1760
1808
  credentials or network access: it keeps durable PR records under private Git
1761
- refs, leaves each build at `refs/heads/ab/<slug>`, and squash-merges locally only
1762
- after auto-merge consent. The squash author and committer come from the
1809
+ refs, leaves each work build at `refs/heads/ab/<slug>`, and lands root leaves by
1810
+ squash under the recorded landing authorization. Node landings use guarded
1811
+ fast-forwards; see [landing methods](landing-policy.md#landing-methods).
1812
+ The squash author and committer come from the
1763
1813
  repository's ordinary Git identity, as resolved for a plain `git commit`; the
1764
1814
  landing is always unsigned even when `commit.gpgsign` is enabled. If Git cannot
1765
1815
  resolve that identity, the PR remains open and `ab build status <slug>` names
@@ -1891,21 +1941,24 @@ configuration still rejects unknown override keys.
1891
1941
 
1892
1942
  ## Hosted service client compatibility
1893
1943
 
1894
- A service accepts stable clients from its own `major.minor` release line and
1895
- the two preceding minor lines in the same major. A major starts a new family:
1944
+ A service accepts stable and prerelease clients from its own `major.minor`
1945
+ release line and the two preceding minor lines in the same major. A major starts a new family:
1896
1946
  X.0 accepts only X.0, X.1 accepts X.0/X.1, and X.2 onward accepts three lines.
1897
1947
  Patch versions are interchangeable in both directions and must never change
1898
1948
  the protocol. Upgrade the service first, then projects independently within
1899
1949
  its window. Supported release lines retain their wire handlers and known
1900
1950
  protocol identities; an unknown protocol is refused independently of version.
1901
- Malformed, missing, and prerelease identities are refused with HTTP 409.
1951
+ Stable and prerelease service and client identities share their numeric major/minor
1952
+ line. Malformed or missing identities, build metadata (`+…`), prefixes and
1953
+ whitespace are refused with HTTP 409.
1902
1954
  A newer client is told to upgrade the service; a client below the window is
1903
1955
  told to upgrade the project's Autobuild. Diagnostics name the service version
1904
1956
  and supported range.
1905
1957
 
1906
1958
  Unauthenticated `GET /health` publishes `ok`, `autobuildVersion`,
1907
1959
  `protocolVersion`, and `supportedClientRange: { minVersion, maxVersionExclusive }`.
1908
- The range is inclusive at the minimum and exclusive at the maximum; a 0.11.x
1960
+ Range endpoints remain stable versions. The range is inclusive at the minimum
1961
+ and exclusive at the maximum; a 0.11.x
1909
1962
  service publishes `>=0.9.0 <0.12.0`. Health needs no credentials, version
1910
1963
  headers, or available backend.
1911
1964
 
@@ -1916,3 +1969,50 @@ and is never supplied; factory environments also exclude `AB_TOKEN`. Launch
1916
1969
  credentials travel through the separate transient execution-auth argument, never
1917
1970
  through serialized execution identity. Existing plugins that forwarded
1918
1971
  `storeToken` must migrate to this callback and fail closed if it is unavailable.
1972
+
1973
+ ## Landing policy
1974
+
1975
+ The [`[[landing]]` table](#landing) defines ordered authorization rules and
1976
+ readiness provenance. See [landing policy](landing-policy.md) for examples,
1977
+ merge methods and forge capability requirements.
1978
+
1979
+ `ab hold <slug>` durably suppresses landing and revokes previous consent, even
1980
+ before readiness. `ab land <slug>` requires readiness, clears hold, and consents
1981
+ to this build/node landing into its effective destination. Consent survives head
1982
+ replacement, restacking, verification and re-finalization until another hold or
1983
+ completion. Accepted node reparenting revokes consent; holds survive.
1984
+ It is consent to the landing, not approval of an immutable diff.
1985
+ Commands and acknowledgements are sequence-correlated; hold acknowledgement
1986
+ requires confirmed native cancellation, while land acknowledgement accepts
1987
+ consent without claiming that merge gates passed. The same actions are available
1988
+ through the MCP/operator build-control tools. The terminal uses `l` for land and
1989
+ `o` for hold on the selected landing. The web has no consent controls.
1990
+
1991
+ The repository auto-merge default and its fan-out are retired. Historical events
1992
+ still replay; explicit old per-build commands map to consent/hold until a new
1993
+ landing command supersedes them, while old default seeds confer no consent.
1994
+ `ab upgrade` samples the target repository's configured journal and writes leaf
1995
+ auto for old ON, leaf consent for old OFF (including no fact), and node consent
1996
+ in either case. Explicit landing arrays remain byte-for-byte unchanged. Missing
1997
+ configuration or unavailable journals fail with recovery guidance. Fresh init
1998
+ uses the no-rules fallback.
1999
+
2000
+ Native auto-merge is reconciled on every janitor poll against durable desired
2001
+ landing state. It is disabled while held, unauthorized, unready, or replacement
2002
+ publication is pending or just completed; enabling binds to the current head
2003
+ through the forge's expected-head guard. Every replacement publication confirms
2004
+ cancellation first, and its first following poll re-reads and reconciles native
2005
+ state before other build actions. Native receipts bind to exact candidates;
2006
+ consent does not. A stale enable completing after cancellation is repaired by
2007
+ poll reconciliation. This is an explicitly bounded failure model: native merge
2008
+ is used only behind a merge-blocking gate, and checks on a replacement head must
2009
+ take far longer than one poll interval, allowing cancellation before they pass.
2010
+ There is no durable native-effect reservation protocol. An undesired forge
2011
+ landing is classified from the kernel's last durable native application state, without changing provider contracts. A confirmed disabled
2012
+ state with no enable in flight or indeterminate means a deliberate human forge
2013
+ landing, which supplies consent. Record whether it overrode a hold: an unheld
2014
+ human landing needs no operator attention; overriding a hold is informational.
2015
+ If native auto-merge was armed, or an enable was in flight or indeterminate,
2016
+ record a possible stale-enable landing as contrary to policy and raise operator
2017
+ attention. Autobuild never rewrites the target to undo either outcome. Merge
2018
+ gates and the serialized node-writer publication rules remain authoritative.
@@ -17,8 +17,8 @@ package's `deployment/` directory and in `templates/hosted-service/`).
17
17
  "build": "ab-hosted-service-build"
18
18
  },
19
19
  "dependencies": {
20
- "@defrex/autobuild-hosted-store-service": "0.13.0",
21
- "@defrex/autobuild": "0.13.0",
20
+ "@defrex/autobuild-hosted-store-service": "0.14.0",
21
+ "@defrex/autobuild": "0.14.0",
22
22
  "next": "16.1.6",
23
23
  "react": "19.2.4",
24
24
  "react-dom": "19.2.4"
@@ -238,3 +238,21 @@ To retain earlier names configure `triageState = "Backlog"`,
238
238
  `claimedState = "Doing"`, `doneState = "Done"`, and the desired `readyState`.
239
239
  Existing ticket rows are never renamed. Older combined-service clients continue
240
240
  using the uploaded dispatcher configuration until independent policy is published.
241
+
242
+ ## Integration tree metadata
243
+
244
+ Hosted tickets store `kind` (`work` or `node`, default `work`) and optional
245
+ `target`, the canonical readable id of a node in the same project. Create accepts
246
+ both fields; update and guarded update preserve omitted fields and accept
247
+ `target: null` to clear an edge. Targets must exist and be nodes. Self-targets,
248
+ ancestor cycles, and demoting a node with targeting tickets (including completed
249
+ work) are rejected before any part of a mixed patch is written. Graph mutations
250
+ serialize per project in the same transaction as validation and revision checks.
251
+ Effective metadata changes increment the revision; equivalent aliases are no-ops.
252
+
253
+ Ticket responses include these fields only with `x-autobuild-ticket-tree: 1`.
254
+ This capability is independent of revision and comment capabilities and of the
255
+ client version. Without it, both fields are projected away, preserving historical
256
+ strict decoders. Current hosted clients send all three capability headers and
257
+ default absent kind to `work`. Unfiltered listing includes all ticket states and
258
+ empty nodes for `ab ticket tree`; dispatch and landing behavior are unchanged.
@@ -0,0 +1,117 @@
1
+ # Integration trees
2
+
3
+ Autobuild organizes work as a tree rooted at the configured `baseBranch`.
4
+ Work tickets are leaves; node tickets are finite integration points that collect
5
+ children before landing into their parent. Nodes can nest. An omitted target
6
+ means the root, so repositories can continue sending every leaf directly there.
7
+ Blockers form a separate graph. In repositories with nodes, a blocker with a
8
+ build resolves only when its change identity is present in the dependent's
9
+ sampled destination, regardless of source completion. Without nodes, or for a
10
+ blocker without a build, native done-state resolution remains in effect.
11
+ See [restacking](restacking.md) for change identity and replay.
12
+
13
+ Presence is checked only at claim, never to interrupt existing work. The newest
14
+ build generation supplies evidence; ambiguous or unavailable evidence leaves the
15
+ dependent queued. Confirmed landing SHA reachability can prove presence without
16
+ a trailer, and a landed node transports its whole owned contribution. Empty
17
+ completed nodes contribute nothing. Sibling work waits for landing into the common
18
+ ancestor and cascade; same-node landings satisfy presence directly.
19
+
20
+ ## Tickets and admission
21
+
22
+ Tickets default to `kind = "work"` with no `target`. A target is a node ticket
23
+ id in the same source. Targets must exist and be nodes; self-targets and ancestor
24
+ cycles are refused. A node with targeting tickets cannot be demoted, even when
25
+ those children are completed. Clear or reparent its children first.
26
+
27
+ 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
30
+ label. Ordinary grouping parents remain grouping and survive unrelated edits;
31
+ explicit target clear clears the parent relation. Label replacement can demote a
32
+ node and receives the same guards; explicit kind and labels must agree. Linear
33
+ label and parent connections are fully paginated and guarded writes are refused.
34
+ Kind and target participate in content revisions; file writes retain their
35
+ best-effort unlocked semantics. `ab ticket edit` displays these fields read-only.
36
+
37
+ A ready node opens `ab-node/<slug>` at its parent's sampled head. Opening intent
38
+ and acknowledgement are durable. Its branch admits children immediately, with
39
+ no placeholder commit or PR. Idle nodes need no provisioned workspace, runner,
40
+ execution lease or dispatch capacity. A PR opens or is adopted when the node
41
+ has commits its current parent lacks; parent-only advancement remains empty.
42
+
43
+ Claims freeze the destination build generation and branch. Missing, unopened,
44
+ landed, closed or aborted targets leave work queued with diagnostics. The newest
45
+ generation wins; a closed generation never falls back to an older open one.
46
+ Source metadata and effective ancestry are different: `ab ticket tree` shows
47
+ source targets, while build status shows the effective destination.
48
+
49
+ ## Collect, verify and land
50
+
51
+ Create a node and direct work into it (replace ids with those returned by your
52
+ source):
53
+
54
+ ```sh
55
+ ab ticket create "Release candidate" --body candidate.md --kind node
56
+ ab ticket update WORK-2 --target NODE-1
57
+ ab ticket tree
58
+ ab ticket tree --json
59
+ ```
60
+
61
+ Use the ordinary native ticket lifecycle and ready gate to dispatch the node
62
+ and children. The tree includes completed work and empty nodes, sorted by id
63
+ among siblings; invalid external graphs and listing diagnostics remain explicit.
64
+ Each leaf runs the normal spec, plan/review, implement/review, verify and finalize
65
+ pipeline against its frozen destination.
66
+
67
+ A node collects until every ticket targeting it is natively done or cancelled,
68
+ all frozen child claims have settled, and at least one contribution has landed.
69
+ Triage, backlog and ready children keep it incomplete. Exhaustive enumeration
70
+ failures fail closed. Completeness is sampled again before verification and
71
+ publication; tracker edits cannot be transactional with a forge write.
72
+
73
+ The kernel runs all configured verify steps with normal path applicability on
74
+ the exact node head and parent. Either moving invalidates eligibility, even a
75
+ clean restack. Failed verification blocks the node: file a repair child targeting
76
+ it; the repaired landed head permits a new cycle. Historical reports keep their
77
+ actual head/base citations. Integration grammar is collect → verify → land →
78
+ close, with restacking and repair cycles along the way.
79
+
80
+ [Landing policy](landing-policy.md) defaults nodes to consent. Once complete and
81
+ verified, `ab land <slug>` authorizes landing; it refuses incomplete nodes and
82
+ names open children. `ab hold <slug>` works before readiness and withdraws
83
+ consent. Automatic authorization still requires every readiness and merge gate.
84
+ A landed node completes its ticket and closes admission; it is not a perpetual
85
+ staging branch. Releases remain separate maintainer operations.
86
+
87
+ Human forge merges are an explicit escape hatch, including while incomplete,
88
+ paused or unverified. The janitor records human provenance and whether the actual
89
+ merged head was verified, then completes the ticket. Closing without merge or
90
+ aborting closes admission and returns the ticket to triage; already claimed
91
+ children retain their frozen destination.
92
+
93
+ ## Changing a parent
94
+
95
+ `ab ticket update NODE-1 --target NODE-2` reparents an open node;
96
+ `--no-target` moves it to the root. Omitted fields preserve existing values;
97
+ `--kind work` resets kind when valid. Only owned contributions replay onto the
98
+ 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.
100
+
101
+ The request is durable before the provider write. Source readback accepts the
102
+ new effective ancestry; branch publication, PR retargeting and completion have
103
+ separate receipts. Pending moves fence verification and landing and keep both
104
+ parents incomplete. Reparenting revokes land consent; holds survive. Policy is
105
+ sampled again for the new parent, including when both parents have the same SHA.
106
+
107
+ Cycles, unopened/terminal parents, landing or closing nodes, unsupported PR
108
+ retargeting and busy writer operations refuse or defer the move with a reason.
109
+ Invalid direct provider edits leave effective ancestry unchanged and produce
110
+ durable diagnostics; restoring it clears the current refusal. Missing source
111
+ reads withhold acceptance, while an accepted operation can finish its reserved
112
+ Git/PR effects without the tracker. Ambiguous writes are reread on recovery.
113
+ Changing a claimed work ticket's target is refused before any combined patch is
114
+ written: abort and re-dispatch instead.
115
+
116
+ See [forge requirements](landing-policy.md#forge-requirements),
117
+ [restacking](restacking.md), and [migration from 0.x](migration-1.0.md).
@@ -0,0 +1,150 @@
1
+ # Landing policy
2
+
3
+ Landing authorization is an ordered, strict `[[landing]]` array in
4
+ `autobuild.toml`. Rules require `mode = "auto"` or `"consent"`; optional
5
+ predicates are ANDed, omissions are wildcards, and the first match wins.
6
+
7
+ | Predicate | Matches |
8
+ |---|---|
9
+ | `from` | `leaf` or `node` |
10
+ | `into` | `root`, any `node`, or an exact destination node ticket id |
11
+ | `label` | An exact, case-sensitive source ticket label |
12
+
13
+ Blank destinations and labels are invalid. With no match, leaves use auto and
14
+ nodes consent. Destination means the frozen effective destination, not mutable
15
+ source metadata. Successful source reads supply labels at readiness; unavailable
16
+ data defers the decision rather than pretending labels are empty.
17
+
18
+ A leaf is ready after verification and finalize on a current base; a node must
19
+ be complete and verified at its exact head and parent. `landing.decided` retains
20
+ that candidate, labels, mode and the full matched rule/index or explicit default.
21
+ Editing configuration does not revise that decision. A replacement candidate
22
+ gets a fresh decision. Policy is live dispatcher configuration, separate from
23
+ the pinned execution pipeline.
24
+
25
+ `ab hold <slug>` suppresses landing and revokes consent, even before readiness.
26
+ `ab land <slug>` requires readiness, clears hold and consents to this landing
27
+ into its destination. Consent survives head replacement, restacking, verification
28
+ and re-finalization until hold or completion; it approves the landing rather than
29
+ an immutable diff. Accepted node reparenting revokes it. Commands and receipts
30
+ are sequence-correlated: hold acknowledgement confirms native cancellation;
31
+ land acknowledgement does not claim gates passed. MCP/operator tools offer the
32
+ same actions; the terminal uses `l`/`o`, and the web has no consent controls.
33
+
34
+ ## Worked configurations
35
+
36
+ These independent minimal configurations each parse on their own. Add your
37
+ repository's commands, roles and verification before operating it.
38
+
39
+ ### Continuous deployment
40
+
41
+ ```toml
42
+ baseBranch = "main"
43
+ landing = []
44
+
45
+ [tickets]
46
+ source = "file"
47
+ readyState = "ready"
48
+ ```
49
+
50
+ Root leaves and leaves entering nodes default to auto; every node defaults to
51
+ consent. No special rule is needed for a repository without integration nodes.
52
+
53
+ ### Staged release
54
+
55
+ ```toml
56
+ baseBranch = "main"
57
+
58
+ [[landing]]
59
+ into = "root"
60
+ mode = "consent"
61
+
62
+ [[landing]]
63
+ into = "node"
64
+ mode = "auto"
65
+
66
+ [tickets]
67
+ source = "file"
68
+ readyState = "ready"
69
+ ```
70
+
71
+ Leaves and nodes entering the root match rule 1 and require consent. Leaves and
72
+ nested nodes entering any node match rule 2 and land automatically when ready.
73
+ A specific destination can replace `"node"` with its ticket id, such as
74
+ `"REL-1"`; it matches that frozen destination only.
75
+
76
+ ### Team review
77
+
78
+ ```toml
79
+ baseBranch = "main"
80
+
81
+ [[landing]]
82
+ label = "review"
83
+ mode = "consent"
84
+
85
+ [[landing]]
86
+ from = "node"
87
+ mode = "consent"
88
+
89
+ [[landing]]
90
+ mode = "auto"
91
+
92
+ [tickets]
93
+ source = "file"
94
+ readyState = "ready"
95
+ ```
96
+
97
+ Any source carrying exactly `review` matches rule 1. Other nodes match rule 2;
98
+ other leaves match rule 3. `Review` does not match `review`. Moving the catch-all
99
+ to the front would shadow both safeguards and automatically authorize nodes too.
100
+ Authorization never bypasses verification, checks, protection or merge gates.
101
+
102
+ ## Landing methods
103
+
104
+ Root-target leaves squash into one identity-bearing commit per build.
105
+ Node-target children use serialized, exact-parent guarded fast-forwards;
106
+ node-to-local-git-root landing also fast-forwards, preserving the contributions.
107
+ Node-to-GitHub-root landing uses PR rebase merge guarded on verified head after
108
+ a final parent freshness read. Enforced up-to-date protection provides a fenced
109
+ landing; uncertainty is recorded as unfenced and requires immutable landed-tree
110
+ audit. A mismatch raises operator attention without rewriting the shared parent.
111
+ Pending audits survive completion and retry until settled.
112
+
113
+ Root leaf native auto-merge is used behind a real merge-blocking gate. An
114
+ authoritatively ungated root permits an inspected-head guarded direct squash;
115
+ unknown gate state defers. Node targets instead require authoritative proof of
116
+ an ungated destination, cancel native auto-merge and serialize the guarded push.
117
+ Gated or unproven node destinations stay open with actionable diagnostics.
118
+ Successful push proves landing; forge acknowledgement is best-effort, including
119
+ a landed-SHA comment and closing an unacknowledged open review.
120
+
121
+ Native application receipts bind to exact candidates; consent does not. Every
122
+ replacement confirms cancellation first; the next poll reconciles native state
123
+ before other actions. Stale enables are repaired by polling. This bounded model
124
+ requires replacement-head checks to take far longer than a poll interval. It
125
+ has no durable native-effect reservation. Human forge merges record whether a
126
+ hold was overridden; possible stale-enable landings raise operator attention.
127
+ No result is undone by rewriting the target.
128
+
129
+ ## Forge requirements
130
+
131
+ The kernel must publish and fetch immutable exact archive refs under
132
+ `refs/autobuild/archive/<slug>/<sha>` and replace branches with an exact
133
+ expected-old-head guard. Namespace or permission failures stop publication;
134
+ there is no branch/tag fallback. Archive retention remains indefinite pending a
135
+ retention policy. See [restacking](restacking.md).
136
+
137
+ Tree admission requires node branch creation, authoritative branch-head reads
138
+ and comparison. Reparenting additionally requires PR retargeting. Controlled
139
+ landing requires exact-parent guarded publication and authoritative gate proof;
140
+ GitHub root nodes also need rebase merge support. Root leaves require squash
141
+ support. Readiness inspection reports method/publication hard failures and
142
+ linear-history/freshness recommendations without changing provider settings or
143
+ pushing probes. Unknown permission never proves permission.
144
+
145
+ Legacy plugins can remain readable without supporting tree operations: old
146
+ ticket sources read as work/root and refuse tree metadata writes. This read
147
+ compatibility does not grant forge tree capabilities. Upgrade adapters before
148
+ admitting nodes or requesting unsupported retargeting or landing operations.
149
+ For the lifecycle see [integration trees](integration-tree.md); for old controls
150
+ and upgrade conversion see [migration](migration-1.0.md).
package/docs/mcp.md CHANGED
@@ -123,3 +123,27 @@ The endpoint requires no additional variables beyond the hosted service's
123
123
  existing web/auth set. Note that consent renders when the client sends
124
124
  `prompt=consent`; a client that omits it gets a code directly (the plugin's
125
125
  designed behavior).
126
+
127
+ ### Tree and consent reads
128
+
129
+ `landings.list` takes `{repo}` and returns slug-sorted ready consent or held
130
+ landings, with effective target, source branch, candidate, verification receipts
131
+ and node completeness/children. It reads reduced durable state; `builds.control`
132
+ with `land` rechecks readiness and live completeness. `hold` remains available
133
+ before readiness. `tickets.tree` takes `{repo}` and returns `{root, children,
134
+ diagnostics}` from exhaustive configured-source enumeration. Source ancestry is
135
+ separate from frozen build ancestry. Both tools are read-only and repository scoped.
136
+
137
+ The CLI equivalents are `ab landings [--json] [--store <ref>]` and
138
+ `ab ticket tree [--json]`. Default `ab watch` attention includes node landings,
139
+ restack conflicts and derived `build.consent-ready` observations with durable
140
+ cursor positions. `ab wait` supports `consent`, `node-landed` and
141
+ `restack-conflicted`; current-state conditions return immediately. Explicit
142
+ watch event globs emit durable events only. A readiness episode changes on a
143
+ new candidate or exit/re-entry, and cursor resume suppresses its duplicate.
144
+
145
+ Consent and hold readiness produce only `build.consent-ready`; merge attention is
146
+ reserved for current gate deferrals and unsafe forge outcomes. Named and
147
+ repository-wide watches report an already-ready landing on first discovery.
148
+ Readiness observations use the same `{kind, branch, ticket?, build?}` effective
149
+ target shape as queue entries.
@@ -0,0 +1,68 @@
1
+ # Migrating from 0.x to 1.0
2
+
3
+ The integration tree changes replay and landing authorization. It does not cut a
4
+ release or rename `baseBranch`: that setting now names the tree root. Existing
5
+ tickets default to work with no target and continue targeting the root. Adopt
6
+ nodes only when useful; see [integration trees](integration-tree.md).
7
+
8
+ ## Configuration and installed skills
9
+
10
+ Run `ab upgrade` against the intended repository. It updates the recognized
11
+ installation and three-way merges vendored skills with their pristine defaults;
12
+ review local conflicts. `--no-self-update` skips installation update while still
13
+ performing repository migration and skill merging. Preserve local customizations
14
+ and use the installed [setup reference](setup.md) to review verification and roles.
15
+
16
+ When `landing` is absent, upgrade reads the target repository's configured
17
+ BuildStore journal, ignoring ambient `AB_STORE` for that choice, and appends:
18
+
19
+ | Legacy repository default | Leaf rule | Node rule |
20
+ |---|---|---|
21
+ | ON | auto | consent |
22
+ | OFF or no fact | consent | consent |
23
+
24
+ A genuinely absent local journal counts as no fact. An unreadable or unavailable
25
+ journal fails migration with guidance: restore store access and retry, or write
26
+ explicit rules after deciding the desired policy. Existing valid landing arrays
27
+ are preserved byte-for-byte, including root-level `landing = []`, which selects
28
+ the new leaf-auto/node-consent defaults. Fresh init uses those new defaults.
29
+ See [landing policy](landing-policy.md) for complete worked configurations.
30
+
31
+ The repository auto-merge default, its fan-out and old CLI/default controls are
32
+ retired. Use `ab land` and `ab hold`, not an old repository switch. Historical
33
+ explicit per-build `build.auto-merge-requested`/`cancelled` facts map to land/hold
34
+ until a new landing command supersedes them; historical default-seeded requests
35
+ confer no consent. New claims do not materialize old defaults.
36
+
37
+ ## Builds already in flight
38
+
39
+ Historical events and merge reconciliations keep their replay/display meaning;
40
+ old merge commits remain valid history. Later replay uses the promoted historical
41
+ contribution base. The current engine can restack resumed builds at newly reached
42
+ verification or waiting-for-landing boundaries, and current landing rules govern
43
+ new readiness decisions. There is no claim-version switch promising every old
44
+ build finishes with the old merge standard. Drain old work before switching
45
+ versions if retaining old execution behavior is required. Simultaneous old and
46
+ new writers are not a supported migration strategy.
47
+
48
+ Execution pipeline configuration stays pinned to the build; live dispatcher
49
+ landing policy is separate. A recorded readiness decision retains its rule
50
+ snapshot despite configuration edits; a new candidate receives a new decision.
51
+ Explicit consent persists through replay and re-verification until hold or
52
+ completion, except accepted node reparenting revokes it.
53
+
54
+ ## The reversed rebase ban
55
+
56
+ The old ban protected event-recorded SHAs and avoided resolving the same conflict
57
+ for every WIP commit. The new standard replays one net leaf change or ordered
58
+ node contributions, retains displaced history through immutable archive refs and
59
+ durable rewrite facts, and resolves each conflicted item once. Ordinary agent
60
+ rebase of WIP history is still inappropriate. Agents resolve kernel-prepared
61
+ replay; the kernel owns branch replacement with expected-head guards.
62
+
63
+ Root leaves squash; node destinations and local-git root nodes fast-forward;
64
+ GitHub root nodes use guarded rebase merge with recorded fencing/audit limits.
65
+ Check [forge requirements](landing-policy.md#forge-requirements) and
66
+ [restacking](restacking.md) before enabling nodes on a plugin forge. Ensure
67
+ archive publication/read permissions, tree capabilities and required merge
68
+ methods are available; legacy read compatibility is insufficient.