@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.
- package/README.md +5 -3
- package/SPEC.md +673 -99
- package/bin/ab-dispatch-kernel.ts +4 -6
- package/docs/architecture.md +322 -75
- package/docs/assets/headline-wide.png +0 -0
- package/docs/configuration.md +112 -12
- package/docs/hosted-service.md +20 -2
- package/docs/integration-tree.md +117 -0
- package/docs/landing-policy.md +150 -0
- package/docs/mcp.md +24 -0
- package/docs/migration-1.0.md +68 -0
- package/docs/operator-api.md +20 -9
- package/docs/remote-store-protocol.md +114 -9
- package/docs/remote-ticket-protocol.md +26 -5
- package/docs/restacking.md +79 -0
- package/docs/setup.md +49 -6
- package/docs/ticket-dependencies.md +69 -0
- package/docs/ticket-migration.md +8 -0
- package/package.json +4 -3
- package/packages/core/src/cli/attention.ts +40 -163
- package/packages/core/src/cli/build-control.ts +75 -55
- package/packages/core/src/cli/bulk-control.ts +3 -2
- package/packages/core/src/cli/context.ts +68 -78
- package/packages/core/src/cli/dashboard/actions.ts +6 -3
- package/packages/core/src/cli/dashboard/landing-display.ts +6 -0
- package/packages/core/src/cli/dashboard/live.ts +5 -0
- package/packages/core/src/cli/dashboard/model.ts +178 -40
- package/packages/core/src/cli/dashboard/poll.ts +15 -9
- package/packages/core/src/cli/dashboard/refresh.ts +176 -0
- package/packages/core/src/cli/dashboard/render.ts +78 -28
- package/packages/core/src/cli/dashboard/repository-poll.ts +57 -0
- package/packages/core/src/cli/dashboard/selection.ts +7 -1
- package/packages/core/src/cli/dashboard/tree.ts +107 -0
- package/packages/core/src/cli/dispatch-frontend.ts +173 -169
- package/packages/core/src/cli/dispatch-process.ts +14 -7
- package/packages/core/src/cli/dispatch-repository-feed.ts +196 -0
- package/packages/core/src/cli/dispatch.ts +397 -214
- package/packages/core/src/cli/dispatcher-liveness.ts +41 -21
- package/packages/core/src/cli/harvest.ts +71 -39
- package/packages/core/src/cli/help.ts +49 -32
- package/packages/core/src/cli/historical-build-state.ts +27 -0
- package/packages/core/src/cli/init-validation.ts +43 -2
- package/packages/core/src/cli/keyboard.ts +6 -0
- package/packages/core/src/cli/landings.ts +18 -0
- package/packages/core/src/cli/main.ts +52 -18
- package/packages/core/src/cli/mcp.ts +9 -0
- package/packages/core/src/cli/pr-attachments.ts +10 -13
- package/packages/core/src/cli/pr-summary-publication.ts +27 -60
- package/packages/core/src/cli/pr-summary.ts +43 -13
- package/packages/core/src/cli/publication-settlement.ts +177 -21
- package/packages/core/src/cli/repository-status.ts +49 -2
- package/packages/core/src/cli/status.ts +133 -36
- package/packages/core/src/cli/terminal-restore.ts +54 -0
- package/packages/core/src/cli/terminal.ts +16 -2
- package/packages/core/src/cli/terminals.ts +121 -219
- package/packages/core/src/cli/ticket-editor.ts +10 -3
- package/packages/core/src/cli/ticket.ts +115 -20
- package/packages/core/src/cli/upgrade-commit.ts +4 -0
- package/packages/core/src/cli/upgrade-compatibility.ts +2 -2
- package/packages/core/src/cli/upgrade-landing.ts +69 -0
- package/packages/core/src/cli/upgrade.ts +16 -0
- package/packages/core/src/cli/wait.ts +194 -91
- package/packages/core/src/cli/watch.ts +111 -109
- package/packages/core/src/config/landing.ts +22 -0
- package/packages/core/src/config/live.ts +1 -0
- package/packages/core/src/config/pipeline-source.ts +4 -3
- package/packages/core/src/config/schema.ts +3 -0
- package/packages/core/src/events/catalog.ts +48 -3
- package/packages/core/src/events/payloads.ts +295 -6
- package/packages/core/src/events/repository.ts +38 -3
- package/packages/core/src/integration/harness.ts +11 -2
- package/packages/core/src/kernel/__snapshots__/reducer-registry.test.ts.snap +3330 -119
- package/packages/core/src/kernel/auto-merge-default.ts +1 -0
- package/packages/core/src/kernel/auto-merge.ts +29 -4
- package/packages/core/src/kernel/build-identity.ts +94 -0
- package/packages/core/src/kernel/change-presence.ts +179 -0
- package/packages/core/src/kernel/dispatch-status.ts +17 -1
- package/packages/core/src/kernel/dispatcher-liveness.ts +10 -4
- package/packages/core/src/kernel/engine.ts +89 -2
- package/packages/core/src/kernel/generators/build-log.ts +23 -0
- package/packages/core/src/kernel/generators/leaf-restack-log.ts +110 -0
- package/packages/core/src/kernel/generators/node-restack-log.ts +94 -0
- package/packages/core/src/kernel/generators/repository-journals.ts +25 -3
- package/packages/core/src/kernel/harvest.ts +25 -23
- package/packages/core/src/kernel/integration-completeness.ts +81 -0
- package/packages/core/src/kernel/integration-landing.ts +263 -0
- package/packages/core/src/kernel/integration-stack.ts +36 -0
- package/packages/core/src/kernel/integration-state.ts +135 -0
- package/packages/core/src/kernel/landing-policy.ts +47 -0
- package/packages/core/src/kernel/landing-publication.ts +41 -0
- package/packages/core/src/kernel/landing-readiness.ts +67 -0
- package/packages/core/src/kernel/landing-state.ts +96 -0
- package/packages/core/src/kernel/leaf-restack-completion.ts +24 -0
- package/packages/core/src/kernel/leaf-restack-state.ts +73 -0
- package/packages/core/src/kernel/log-index-value.ts +38 -0
- package/packages/core/src/kernel/log-index.ts +35 -5
- package/packages/core/src/kernel/node-landing.ts +439 -0
- package/packages/core/src/kernel/node-parent.ts +184 -0
- package/packages/core/src/kernel/node-restack-state.ts +191 -0
- package/packages/core/src/kernel/node-restack-transaction.ts +210 -0
- package/packages/core/src/kernel/node-restack.ts +274 -0
- package/packages/core/src/kernel/read-facts.ts +704 -0
- package/packages/core/src/kernel/reconcile-head.ts +51 -0
- package/packages/core/src/kernel/reconcile-restack.ts +560 -0
- package/packages/core/src/kernel/reducer-registry.ts +153 -3
- package/packages/core/src/kernel/reducer.ts +121 -6
- package/packages/core/src/kernel/repository-attention.ts +179 -0
- package/packages/core/src/kernel/service-facts.ts +135 -0
- package/packages/core/src/kernel/snapshot-parent.ts +33 -0
- package/packages/core/src/kernel/terminal-guard.ts +133 -0
- package/packages/core/src/ontology.ts +9 -1
- package/packages/core/src/operator/annotations.ts +12 -0
- package/packages/core/src/operator/control.ts +11 -6
- package/packages/core/src/operator/index.ts +6 -0
- package/packages/core/src/operator/landings.ts +35 -0
- package/packages/core/src/operator/presentation.ts +1 -0
- package/packages/core/src/operator/protocol.ts +12 -3
- package/packages/core/src/operator/query.ts +40 -21
- package/packages/core/src/operator/read-view.ts +4 -13
- package/packages/core/src/operator/registry.ts +48 -19
- package/packages/core/src/operator/requests.ts +3 -22
- package/packages/core/src/operator/sandbox.ts +10 -9
- package/packages/core/src/operator/tickets.ts +57 -11
- package/packages/core/src/plugin-sdk/index.ts +13 -0
- package/packages/core/src/ports/forge/contract.ts +91 -3
- package/packages/core/src/ports/forge/fake.ts +142 -4
- package/packages/core/src/ports/forge/git-rewrite.ts +232 -0
- package/packages/core/src/ports/forge/github-readiness.ts +421 -0
- package/packages/core/src/ports/forge/github.ts +631 -35
- package/packages/core/src/ports/forge/local-git.ts +119 -5
- package/packages/core/src/ports/forge/readiness.ts +99 -0
- package/packages/core/src/ports/tickets/contract.ts +41 -0
- package/packages/core/src/ports/tickets/create.ts +8 -1
- package/packages/core/src/ports/tickets/fake.ts +32 -1
- package/packages/core/src/ports/tickets/file-codec.ts +7 -0
- package/packages/core/src/ports/tickets/file.ts +18 -1
- package/packages/core/src/ports/tickets/hosted-index.ts +2 -0
- package/packages/core/src/ports/tickets/linear.ts +124 -4
- package/packages/core/src/ports/tickets/migration.ts +25 -1
- package/packages/core/src/ports/tickets/operations.ts +7 -2
- package/packages/core/src/ports/tickets/remote-protocol.ts +19 -0
- package/packages/core/src/ports/tickets/remote.ts +10 -1
- package/packages/core/src/ports/tickets/revision.ts +3 -1
- package/packages/core/src/ports/tickets/tree.ts +148 -0
- package/packages/core/src/ports/tickets/update.ts +15 -2
- package/packages/core/src/ports/types.ts +135 -5
- package/packages/core/src/ports/workspace/git-worktree.ts +2 -1
- package/packages/core/src/ports/workspace/provider-capabilities.ts +1 -1
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +60 -3
- package/packages/core/src/processes/build-child.ts +6 -6
- package/packages/core/src/processes/build-runner.ts +586 -87
- package/packages/core/src/processes/dispatch-failure-budget.ts +5 -4
- package/packages/core/src/processes/dispatcher-selectors.ts +15 -9
- package/packages/core/src/processes/dispatcher.ts +2239 -357
- package/packages/core/src/processes/execution-no-progress.ts +46 -1
- package/packages/core/src/processes/harvest-execution-state.ts +15 -9
- package/packages/core/src/processes/harvest-runner.ts +34 -70
- package/packages/core/src/processes/harvest.ts +38 -15
- package/packages/core/src/processes/infrastructure-failure-budget.ts +13 -15
- package/packages/core/src/processes/orchestrator-tick.ts +2 -2
- package/packages/core/src/processes/publication-loss.ts +35 -21
- package/packages/core/src/processes/publication-state.ts +30 -5
- package/packages/core/src/processes/repo-view.ts +244 -1130
- package/packages/core/src/processes/tick-publication.ts +110 -0
- package/packages/core/src/store/adapter.ts +23 -0
- package/packages/core/src/store/build-scope.ts +35 -0
- package/packages/core/src/store/contract.ts +909 -0
- package/packages/core/src/store/digest.ts +52 -4
- package/packages/core/src/store/local/schema.ts +26 -13
- package/packages/core/src/store/local/store.ts +296 -55
- package/packages/core/src/store/memory.ts +181 -30
- package/packages/core/src/store/phase-session.ts +34 -0
- package/packages/core/src/store/reduced-reads.ts +240 -0
- package/packages/core/src/store/reducer-value-shapes.json +18323 -0
- package/packages/core/src/store/reducer-value-validation.ts +96 -0
- package/packages/core/src/store/reducer-values.ts +145 -0
- package/packages/core/src/store/remote/client.ts +85 -0
- package/packages/core/src/store/remote/compatibility.ts +21 -9
- package/packages/core/src/store/remote/index.ts +19 -0
- package/packages/core/src/store/remote/protocol.ts +27 -0
- package/packages/core/src/store/remote/version.ts +3 -1
- package/packages/core/src/store/repo-state-events.ts +3 -1
- package/packages/core/src/store/repo-tick.ts +72 -0
- package/packages/core/src/store/session-handle.ts +34 -0
- package/packages/core/src/store/snapshots.ts +10 -0
- package/packages/core/src/store/subscribe.ts +1 -1
- package/packages/core/src/store/ticket-assets.ts +4 -4
- package/packages/core/src/store/types.ts +71 -6
- package/packages/core/src/testing/dispatch-read-budget.ts +215 -0
- package/packages/core/src/testing/index.ts +10 -0
- package/packages/core/src/testing/reduced-read-budget.ts +502 -0
- package/packages/core/src/testing/refresh-scheduler.ts +32 -0
- package/skills/guide/SKILL.md +116 -62
- package/skills/guide/references/integration-tree.md +117 -0
- package/skills/guide/references/landing-policy.md +150 -0
- package/skills/guide/references/migration-1.0.md +68 -0
- package/skills/guide/references/operator-api.md +13 -6
- package/skills/guide/references/plugin-authoring.md +34 -0
- package/skills/guide/references/remote-store-protocol.md +114 -9
- package/skills/guide/references/remote-ticket-protocol.md +26 -5
- package/skills/guide/references/restacking.md +79 -0
- package/skills/guide/references/setup.md +49 -6
- package/skills/guide/references/ticket-dependencies.md +69 -0
- package/skills/guide/references/ticket-migration.md +8 -0
- package/skills/operate/SKILL.md +55 -5
- package/skills/reconcile/SKILL.md +55 -48
- package/skills/spec/SKILL.md +67 -1
- package/skills/tickets/SKILL.md +55 -2
- package/templates/autobuild.toml +3 -0
- package/templates/hosted-service/package.json +2 -2
package/skills/guide/SKILL.md
CHANGED
|
@@ -8,6 +8,18 @@ description: Authoritative reference for the autobuild system as installed in th
|
|
|
8
8
|
Reference material for an agent working on a repository that uses autobuild.
|
|
9
9
|
This skill describes the *system*. It drives no phase and changes no files.
|
|
10
10
|
|
|
11
|
+
## The integration tree
|
|
12
|
+
|
|
13
|
+
The configured `baseBranch` is the root. Work tickets are leaves; finite node
|
|
14
|
+
builds collect child contributions, verify their exact head and parent, and land
|
|
15
|
+
under ordered policy. Targets freeze at claim; blockers are a separate graph.
|
|
16
|
+
Idle nodes consume no runner capacity and empty nodes have no PR.
|
|
17
|
+
|
|
18
|
+
- [Nodes, targets and the operating model](references/integration-tree.md)
|
|
19
|
+
- [Landing policy, examples and forge requirements](references/landing-policy.md)
|
|
20
|
+
- [Restacking, identity and recovery](references/restacking.md)
|
|
21
|
+
- [Migration from 0.x](references/migration-1.0.md)
|
|
22
|
+
|
|
11
23
|
## How to use this skill
|
|
12
24
|
|
|
13
25
|
For first-time or existing-repository installation, including the local versus
|
|
@@ -50,7 +62,7 @@ choose, not this project's to correct.
|
|
|
50
62
|
|
|
51
63
|
## The lifecycle
|
|
52
64
|
|
|
53
|
-
A groomed ticket becomes a build
|
|
65
|
+
A groomed work ticket becomes a leaf build and walks a **fixed pipeline**:
|
|
54
66
|
|
|
55
67
|
```text
|
|
56
68
|
spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → finalize
|
|
@@ -90,10 +102,15 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
|
|
|
90
102
|
PR. `[finalize].steps` run afterward and are failure-tolerant. A
|
|
91
103
|
content-producing step commits selected files locally and finishes clean;
|
|
92
104
|
the runner regular-pushes a descendant head to extend the open PR branch.
|
|
93
|
-
- **
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
**closed**.
|
|
105
|
+
- **Restacking and epilogue.** The kernel replays one net leaf change at verify
|
|
106
|
+
entry and when its destination moves while awaiting landing. Clean replay
|
|
107
|
+
starts no agent; conflicts enter `reconcile`, then verification. The leaf
|
|
108
|
+
terminates **merged** or **closed**. See the [replay reference](references/restacking.md).
|
|
109
|
+
|
|
110
|
+
Integration builds use collect → verify → land → close, with descendant cascade,
|
|
111
|
+
repair children and source-aware reconcile as needed. Their exact-head/parent
|
|
112
|
+
verification differs from clean waiting leaf rewrites. See the
|
|
113
|
+
[node lifecycle](references/integration-tree.md#collect-verify-and-land).
|
|
97
114
|
|
|
98
115
|
**Review severity is proportion to the spec.** Both review loops rate a
|
|
99
116
|
finding by what the defect costs against the spec's acceptance criteria and
|
|
@@ -207,7 +224,7 @@ The distinctions that change an administrator's answer:
|
|
|
207
224
|
- **Forge operations and pushes are kernel-side plumbing.** Agents commit
|
|
208
225
|
locally and never push, never touch a remote, never open the PR. A push
|
|
209
226
|
happens at the implement terminal boundary or after the runner validates a
|
|
210
|
-
successful content-producing finalize post-step
|
|
227
|
+
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>`.
|
|
211
228
|
`github` publishes through GitHub. `local-git` performs no remote/network/`gh`
|
|
212
229
|
operation: durable PR records live under private Git refs, the review locator
|
|
213
230
|
is `refs/heads/ab/<slug>`, and consent lands a local guarded, unsigned squash
|
|
@@ -272,7 +289,7 @@ under the preceding table.
|
|
|
272
289
|
|
|
273
290
|
| Field | Default | Allowed / constraints | Effect |
|
|
274
291
|
|---|---|---|---|
|
|
275
|
-
| `baseBranch` | `"main"` | nonempty string | The branch builds branch from and target with their PR; what `reconcile`
|
|
292
|
+
| `baseBranch` | `"main"` | nonempty string | The branch builds branch from and target with their PR; what `reconcile` replays the build change onto. |
|
|
276
293
|
| `ticketScanIntervalSeconds` | `60` | positive integer seconds | Hot-reloaded ready scan cadence; tick spacing is the floor, and same-repository merge/completion/abort forces an early scan. |
|
|
277
294
|
| `capacity` | `1` | positive integer | Maximum concurrent builds for this repository. |
|
|
278
295
|
| `forge` | `"github"` | nonblank string | Selects shipped `github` or `local-git`, or a plugin-registered Forge adapter. `github` authenticates with `GITHUB_TOKEN`, then `GH_TOKEN`, then the gh CLI's stored login. |
|
|
@@ -314,6 +331,36 @@ credential. See [repository setup](references/setup.md#connect-a-project).
|
|
|
314
331
|
Changing the store requires restarting dispatch.
|
|
315
332
|
|
|
316
333
|
|
|
334
|
+
### `[landing]`
|
|
335
|
+
|
|
336
|
+
Declare an ordered array of rules with `[[landing]]` headers. Each rule ANDs
|
|
337
|
+
its predicates; the first match wins. Omitted predicates are wildcards.
|
|
338
|
+
An unmatched leaf defaults to `auto`; an unmatched node defaults to `consent`.
|
|
339
|
+
Rules are strict and blank predicates are rejected with their array index.
|
|
340
|
+
|
|
341
|
+
| Field | Required | Values / purpose |
|
|
342
|
+
|---|---|---|
|
|
343
|
+
| `into` | No | `root`, any `node`, or an exact frozen destination node ticket id. |
|
|
344
|
+
| `from` | No | `leaf` or `node`. |
|
|
345
|
+
| `label` | No | Exact, case-sensitive source ticket label sampled at readiness. |
|
|
346
|
+
| `mode` | Yes | `auto` or `consent`. |
|
|
347
|
+
|
|
348
|
+
Help the operator choose policy around their release process. A solo team can
|
|
349
|
+
use one catch-all `mode = "auto"` rule. A team requiring an operator's review
|
|
350
|
+
for every landing can use one catch-all `mode = "consent"` rule. For release
|
|
351
|
+
nodes that collect work automatically but require a final click, put an
|
|
352
|
+
`into = "root"`, `mode = "consent"` rule first, followed by a catch-all
|
|
353
|
+
`mode = "auto"` rule. A broad rule placed first shadows narrower rules below
|
|
354
|
+
it. Use `from = "node"` or a release label to narrow that root decision when
|
|
355
|
+
ordinary leaves should follow a different release process.
|
|
356
|
+
|
|
357
|
+
Specific-node matching uses the claimed build's immutable destination, never
|
|
358
|
+
the source ticket's current parent. Decisions retain the sampled labels,
|
|
359
|
+
matched rule index and snapshot (or explicit default). Policy is live
|
|
360
|
+
dispatcher configuration, excluded from pinned pipeline settings and
|
|
361
|
+
integration verification inputs; later config edits do not rewrite an earlier
|
|
362
|
+
decision's provenance.
|
|
363
|
+
|
|
317
364
|
### `[pr]`
|
|
318
365
|
|
|
319
366
|
Optional PR-projection settings. Omission leaves artifact attachments text-only.
|
|
@@ -770,7 +817,7 @@ three fresh executions. The guard is derived from durable facts, including on
|
|
|
770
817
|
supervisor restart, and uses the ordinary watch, dashboard and operator API
|
|
771
818
|
attention paths.
|
|
772
819
|
|
|
773
|
-
For each repeat conflict, Autobuild compares the base
|
|
820
|
+
For each repeat conflict, Autobuild compares the target base of the latest
|
|
774
821
|
completed reconcile with a fresh authoritative base snapshot. An advanced base
|
|
775
822
|
proves the attempt lost a race and permits another reconcile regardless of the
|
|
776
823
|
attempt high-water. An unchanged base consumes `maxReconcileAttempts` and
|
|
@@ -946,6 +993,9 @@ commit, and the PR; a refused or failed attempt is journaled too.
|
|
|
946
993
|
|
|
947
994
|
## Setup and upgrades
|
|
948
995
|
|
|
996
|
+
For 0.x upgrades, first read the [migration reference](references/migration-1.0.md):
|
|
997
|
+
landing-policy conversion and resumed-build behavior are part of adoption.
|
|
998
|
+
|
|
949
999
|
**`ab init <target> [--force]`** runs *outside* build sessions — it takes a
|
|
950
1000
|
repo path, needs no `AB_*` environment, and is safe to re-run. It:
|
|
951
1001
|
|
|
@@ -1335,8 +1385,7 @@ that display value directly from the BuildStore; a failed refresh retains the
|
|
|
1335
1385
|
last successful count, shows a diagnostic, and appends no transport event.
|
|
1336
1386
|
Non-interactive dispatch performs no frontend-only sampling, and the separate
|
|
1337
1387
|
drift trigger is not displayed. An indented controls line follows for
|
|
1338
|
-
`intake ON`/`intake OFF
|
|
1339
|
-
ON`/`harvest OFF`, plus a conditional yellow `repository PAUSED` segment while
|
|
1388
|
+
`intake ON`/`intake OFF` and `harvest ON`/`harvest OFF`, plus a conditional yellow `repository PAUSED` segment while
|
|
1340
1389
|
the durable repository-wide hold is set. The controls start in the title
|
|
1341
1390
|
column. From the top of the frame through the body, the two-column marker lane
|
|
1342
1391
|
stays empty except for the selected row's `> ` marker. These controls and the
|
|
@@ -1391,11 +1440,12 @@ Up/Down moves without wrapping through global first, optional `Harvest` second,
|
|
|
1391
1440
|
then slug-sorted builds. Stable discriminated identity preserves selection
|
|
1392
1441
|
through repaint, re-sort, and row appearance/disappearance. The legend is
|
|
1393
1442
|
contextual: every row offers navigation and quit; global offers `h harvest`,
|
|
1394
|
-
`
|
|
1395
|
-
failure or `p acknowledge` for exhaustion/escalation only when
|
|
1396
|
-
available
|
|
1397
|
-
`p pause`, `p cancel pause`, or `r resume`
|
|
1398
|
-
`d discard`.
|
|
1443
|
+
`i intake`, `p pause all`, and `r resume all`; `Harvest` offers `p resume`
|
|
1444
|
+
for ordinary failure or `p acknowledge` for exhaustion/escalation only when
|
|
1445
|
+
available. Selected builds offer `l land` and `o hold`, subject to command
|
|
1446
|
+
eligibility, plus the state-specific `p pause`, `p cancel pause`, or `r resume`
|
|
1447
|
+
action; queued builds offer `d discard`. Land requires readiness; hold may be
|
|
1448
|
+
recorded before readiness. There is no repository landing toggle.
|
|
1399
1449
|
|
|
1400
1450
|
A running build reads `PAUSING` after `p` appends its pause request and before
|
|
1401
1451
|
the kernel acknowledges it at a safe boundary. During that window `p` appends
|
|
@@ -1444,22 +1494,14 @@ itself, so an already-paused repository shows `repository PAUSED` and `(held)`
|
|
|
1444
1494
|
on its first paint; clearing the hold removes both on the next poll. The hold
|
|
1445
1495
|
survives a restart and is not defeated by re-running `ab dispatch`.
|
|
1446
1496
|
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
on each change the dispatcher reconciles every non-terminal build against the
|
|
1456
|
-
newest fact, requesting consent when it turns on and withdrawing it when it
|
|
1457
|
-
turns off, attributed to the toggling operator exactly as a row keypress would
|
|
1458
|
-
be. A per-build toggle overrides its build's state until the global row is
|
|
1459
|
-
toggled again, so a seeded or fanned build can still be cancelled while the
|
|
1460
|
-
global default stays on. Both repository settings are independently
|
|
1461
|
-
last-write-wins by event sequence. They are stored in the BuildStore, not in
|
|
1462
|
-
`autobuild.toml`; propagation uses polling, not a push channel.
|
|
1497
|
+
`[[landing]]` rules in `autobuild.toml` determine landing policy. The
|
|
1498
|
+
dispatcher records an immutable decision when each candidate becomes ready.
|
|
1499
|
+
No rules means leaf auto / node consent. There is no claim-time default
|
|
1500
|
+
seeding or fan-out over existing builds. `ab land <slug>` supplies consent to
|
|
1501
|
+
that landing and frozen destination; it survives replacement heads until hold
|
|
1502
|
+
or completion. `ab hold <slug>` suppresses policy and withdraws consent.
|
|
1503
|
+
The old `--auto-merge` / `--no-auto-merge` flags and `ab auto-merge` command
|
|
1504
|
+
are retired and return actionable errors; use landing rules and hold/land.
|
|
1463
1505
|
|
|
1464
1506
|
Global-row `h` re-reads the repository journal and appends the existing human
|
|
1465
1507
|
pause/resume request. The newest pending command determines the next target, so
|
|
@@ -1483,13 +1525,14 @@ settles every exhaustion barrier. Exhaustion and escalation remain terminal.
|
|
|
1483
1525
|
Escalation's row is dismissed only by a post-terminal human resume request
|
|
1484
1526
|
followed by its later kernel acknowledgement, never by the request alone.
|
|
1485
1527
|
|
|
1486
|
-
Every build row renders
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1528
|
+
Every build row renders a `landing <state>` token. Cyan requested means
|
|
1529
|
+
authorized but not yet applied natively; green enabled means the native request
|
|
1530
|
+
is armed; yellow cancelling means cancellation is in flight; dim off means no
|
|
1531
|
+
authorization. A recorded consent decision waiting for an operator reads
|
|
1532
|
+
`landing awaiting consent`; an explicit hold reads `landing held`.
|
|
1533
|
+
There is no red comparison with a repository default. Row and detail merge
|
|
1534
|
+
explanations distinguish a pending policy decision, consent, and hold, and name
|
|
1535
|
+
`ab land <slug>` / `ab hold <slug>` where appropriate.
|
|
1493
1536
|
Merge conflicts recover automatically: the gate defers, the pipeline re-enters
|
|
1494
1537
|
reconcile, and verify re-runs before consent is re-examined — the reconcile
|
|
1495
1538
|
step on the build row is the only indication, and uncomputed mergeability
|
|
@@ -1514,7 +1557,8 @@ to the build's event log and apply the same write-time checks.
|
|
|
1514
1557
|
| Resume | `ab resume <slug> [--store <ref>]` | Select a `PAUSED` build and press `r`. | `build.resume-requested` |
|
|
1515
1558
|
| 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 |
|
|
1516
1559
|
| 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 |
|
|
1517
|
-
|
|
|
1560
|
+
| Consent to landing | `ab land <slug> [--store <ref>]` | Select a ready build and press `l`. | `build.land-requested`, then `landing.command-acknowledged` |
|
|
1561
|
+
| 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 |
|
|
1518
1562
|
| 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. |
|
|
1519
1563
|
| 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. |
|
|
1520
1564
|
| Dismiss cited finding chains | `ab answer <slug> --dismiss [--store <ref>]` | CLI only; build detail names the command. | One `escalation.answered` with `resolution: dismiss-finding` per blocker that cites a real review finding. |
|
|
@@ -1625,15 +1669,16 @@ revision and keeps any open PR. A build's spec can therefore change under it:
|
|
|
1625
1669
|
phase runs after the revision read the new revision, while historical runs
|
|
1626
1670
|
remain readable at the revision they actually saw.
|
|
1627
1671
|
|
|
1628
|
-
Every command requires
|
|
1629
|
-
|
|
1672
|
+
Every command requires an applicable target in this repository. Pause and
|
|
1673
|
+
resume require an active build; abort and hold also accept queued builds.
|
|
1674
|
+
Land requires a ready candidate and cannot bypass verification or merge gates;
|
|
1630
1675
|
`ab answer` additionally requires an open escalation. A stale, missing, done,
|
|
1631
1676
|
aborted, or otherwise inapplicable target is an error and gets no new event. Attribution uses `USER`, then `USERNAME`, then the
|
|
1632
|
-
same stable fallback on both surfaces.
|
|
1677
|
+
same stable fallback on both surfaces. These commands run sessionless and
|
|
1633
1678
|
accept `--store <ref>` with the usual explicit flag > `AB_STORE` > `[store] url` > repository
|
|
1634
1679
|
local precedence. If nonblank `AB_SESSION` and matching `AB_BUILD` identify the
|
|
1635
1680
|
caller's own phase build, the command refuses it; a phase cannot pause, resume,
|
|
1636
|
-
|
|
1681
|
+
hold, land, answer, or abort itself. `ab pause --all` and `ab resume --all`
|
|
1637
1682
|
accept `--store` on the same precedence and are refused for the same reason
|
|
1638
1683
|
whenever `AB_SESSION` and `AB_BUILD` are both nonblank — the caller's own build
|
|
1639
1684
|
is inside the walk.
|
|
@@ -1646,8 +1691,9 @@ survives `ab dispatch` and `ab dispatch --once` startup until a human answers
|
|
|
1646
1691
|
it. Startup still recovers actionable builds and delivers pending operator
|
|
1647
1692
|
commands, but it never records an answer or re-arms a budget.
|
|
1648
1693
|
|
|
1649
|
-
Durable repository intake
|
|
1650
|
-
|
|
1694
|
+
Durable repository intake has launch-flag setters and a global-row toggle.
|
|
1695
|
+
Landing policy is configured through ordered rules, with per-landing hold/land
|
|
1696
|
+
commands; no writable repository auto-merge default remains.
|
|
1651
1697
|
Abort is available through both its CLI command and the confirmed build-row/detail
|
|
1652
1698
|
`a` key. Global-row `h` owns the durable harvest gate. Global-row `p`/`r` and
|
|
1653
1699
|
`ab pause --all` / `ab resume --all` are two surfaces over the one walk described
|
|
@@ -1656,7 +1702,7 @@ repository hold nor intake has a standalone sessionless setter of its own, but
|
|
|
1656
1702
|
the bulk commands write both as part of quiescing — the hold first. On the
|
|
1657
1703
|
optional repository-scoped
|
|
1658
1704
|
`Harvest` run row, `p` only resumes or acknowledges the represented run; `i`
|
|
1659
|
-
and `h` are no-ops
|
|
1705
|
+
and `h` are no-ops; `l` and `o` apply only to selected builds. On build
|
|
1660
1706
|
rows, `i` and `h` are also no-ops.
|
|
1661
1707
|
|
|
1662
1708
|
## Checking build status
|
|
@@ -1670,13 +1716,15 @@ malformed, shared-only, or mixed build/Harvest identity is rejected rather than
|
|
|
1670
1716
|
falling back to operator access. The commands append no events, take no leases,
|
|
1671
1717
|
and are safe to run at any time.
|
|
1672
1718
|
|
|
1673
|
-
**`ab repository status [--json] [--store <ref>]`** reports
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1719
|
+
**`ab repository status [--json] [--store <ref>]`** reports ticket intake
|
|
1720
|
+
(`intake`, default `true`) and repository-wide pause (`paused`, default
|
|
1721
|
+
`false`), alongside dispatcher and infrastructure status. Its historical
|
|
1722
|
+
`defaultAutoMerge` field remains an inert compatibility value; it is not
|
|
1723
|
+
claim-time policy or a writable setting. Landing decisions and command state
|
|
1724
|
+
are queried on the build. A repository with no journal row uses the defaults
|
|
1725
|
+
without creating a row. Human output is the default. `--json` emits one bare
|
|
1726
|
+
object including the canonical `repo`, and `--store` follows the usual explicit
|
|
1727
|
+
flag > `AB_STORE` > `[store] url` >
|
|
1680
1728
|
repository-local precedence. The command uses the same reducer as the
|
|
1681
1729
|
dispatcher and dashboard, writes no state, claims no ticket, attaches no runner,
|
|
1682
1730
|
and starts no dispatcher work.
|
|
@@ -1765,8 +1813,9 @@ With no slugs the repository journal is included; named watches add it with
|
|
|
1765
1813
|
The default watch reports actionable conditions only:
|
|
1766
1814
|
|
|
1767
1815
|
- Build `escalation.raised`, or `build.merge-decision`: a finalized open PR
|
|
1768
|
-
with
|
|
1769
|
-
|
|
1816
|
+
with a recorded consent decision awaiting consent, an explicit hold, or a
|
|
1817
|
+
current actionable merge-gate deferral. Policy decisions not yet recorded and
|
|
1818
|
+
authorized landings awaiting application are silent. One merge decision is reported per build/PR.
|
|
1770
1819
|
- Repository `harvest.escalated`, `harvest.recovery-exhausted`,
|
|
1771
1820
|
`dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
|
|
1772
1821
|
`restartRequired`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
|
|
@@ -1823,7 +1872,12 @@ cursor from a different repository or store is rejected.
|
|
|
1823
1872
|
Dispatcher liveness is also visible through `ab repository status --json`:
|
|
1824
1873
|
`dispatcher.holder` identifies the unexpired repository lease owner, independently
|
|
1825
1874
|
of `latestRun`. Heartbeat age measures attributable renewals; tick age measures
|
|
1826
|
-
|
|
1875
|
+
actual tick completion. Successful unchanged ticks leave no journal pair; bounded,
|
|
1876
|
+
lease-fenced repository telemetry still records each actual completion and its
|
|
1877
|
+
outcome. Last-tick age refreshes independently of the event cursor and never uses
|
|
1878
|
+
heartbeat as completion evidence. Open telemetry protects unsafe work during
|
|
1879
|
+
shutdown; historical journals retain their boundary fallback. Missing historical
|
|
1880
|
+
evidence is null. The liveness query uses
|
|
1827
1881
|
bounded repository facts first, with a full-history fallback when a later
|
|
1828
1882
|
invocation hides the holder start or the latest stop. Other state reads retain
|
|
1829
1883
|
their bounded semantics.
|
|
@@ -1896,7 +1950,7 @@ those builds, and an unknown slug is an error before waiting begins. Inside a
|
|
|
1896
1950
|
phase, only the ambient build may be waited on.
|
|
1897
1951
|
|
|
1898
1952
|
At least one `--for <condition>` or `--event <glob>` is required. The condition
|
|
1899
|
-
vocabulary is closed: `blocked`, `paused`, `running`, `done`, `aborted`,
|
|
1953
|
+
vocabulary is closed: `blocked`, `paused`, `running`, `collecting`, `done`, `aborted`,
|
|
1900
1954
|
`terminal` (done or aborted), `pr=open`, `pr=merged`, `pr=closed`,
|
|
1901
1955
|
`pr=conflicted`, `phase=<phase>` (a core phase — `plan`, `plan-review`,
|
|
1902
1956
|
`implement`, `code-review`, `finalize`, `reconcile` — or `verify:<step>`), and
|
|
@@ -1976,7 +2030,7 @@ no run. The dispatch header always shows its acknowledged `harvest ON/OFF` gate
|
|
|
1976
2030
|
and global `h` controls it. The optional, non-color-only `Harvest` row omits the
|
|
1977
2031
|
internal run id and represents one deterministically selected open run or
|
|
1978
2032
|
unresolved attention; its contextual `p` issues the repository-wide resume or
|
|
1979
|
-
acknowledgement
|
|
2033
|
+
acknowledgement; `l` / `o` landing controls apply only to builds.
|
|
1980
2034
|
|
|
1981
2035
|
### Status, durable progress, and lease health are separate
|
|
1982
2036
|
|
|
@@ -2065,9 +2119,9 @@ default, when you need to know what this repo's version says).
|
|
|
2065
2119
|
| `ab-plan-review` | `plan-review` phase | Fresh skeptic: review the plan against the spec, verdict `approve`/`revise`/`escalate`. |
|
|
2066
2120
|
| `ab-implement` | `implement` phase | Execute the approved plan as local commits plus deposited notes. Never pushes. |
|
|
2067
2121
|
| `ab-code-review` | `code-review` phase | Fresh skeptic: review the implementation diff against spec and plan, same verdict vocabulary. |
|
|
2068
|
-
| `ab-reconcile` | `reconcile` phase (epilogue) | Resolve a
|
|
2122
|
+
| `ab-reconcile` | `reconcile` phase (epilogue) | Resolve a kernel-prepared single-change replay onto a frozen refreshed base; the kernel archives evidence and publishes with an exact expected-head guard. |
|
|
2069
2123
|
| `ab-finalize` | `finalize` phase | Write the PR description for a green build; the kernel opens the PR. |
|
|
2070
|
-
| `ab-operate` | outside the pipeline; model-invocable | The orchestrator role's operating manual, for any agent: file and groom tickets, watch builds with a resumable `ab watch` / `ab wait` loop, answer escalations, pause, resume, abort, control
|
|
2124
|
+
| `ab-operate` | outside the pipeline; model-invocable | The orchestrator role's operating manual, for any agent: file and groom tickets, watch builds with a resumable `ab watch` / `ab wait` loop, answer escalations, pause, resume, abort, control landing consent and holds, and keep going until every shepherded build is merged, closed, or aborted. Also read by the hosted turn runner as its system prompt (registry tools, approval and budget suspension, wake turns). |
|
|
2071
2125
|
|
|
2072
2126
|
Autobuild installs 12 skills. Everything except `ab-spec`, `ab-tickets`,
|
|
2073
2127
|
`ab-guide`, and `ab-operate` carries `disable-model-invocation: true` — do not
|
|
@@ -2091,13 +2145,13 @@ revisions rather than ignoring them.
|
|
|
2091
2145
|
|
|
2092
2146
|
`ab ticket edit <id>` opens `$VISUAL`, falling back to `$EDITOR`, using TOML
|
|
2093
2147
|
frontmatter and a Markdown body. Only title, body and labels are editable;
|
|
2094
|
-
id, blockers, creation key and reference comments are read-only. It saves only
|
|
2148
|
+
kind, target, id, blockers, creation key and reference comments are read-only. It saves only
|
|
2095
2149
|
changed fields with the opening revision. Unchanged or formatting-only edits
|
|
2096
2150
|
write nothing. On conflict, invalid input or editor failure, the error names an
|
|
2097
2151
|
absolute file path containing the edited text. Read the current ticket and
|
|
2098
2152
|
reapply the intended changes before retrying; conflicts are never merged.
|
|
2099
2153
|
|
|
2100
|
-
File and Linear revisions fingerprint title, body, canonical label/blocker sets
|
|
2154
|
+
File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets
|
|
2101
2155
|
and state; reverting identical content restores its fingerprint. File checks
|
|
2102
2156
|
re-read immediately before writing, with the existing no-lock race window.
|
|
2103
2157
|
Direct file edits and state-directory moves change revisions. File revisions also
|
|
@@ -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).
|