@defrex/autobuild 0.14.0 → 1.0.0-beta.1
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 +13 -6
- package/SPEC.md +657 -100
- package/docs/architecture.md +230 -5
- package/docs/assets/headline-wide.png +0 -0
- package/docs/configuration.md +118 -14
- package/docs/hosted-service.md +18 -0
- 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 +19 -8
- package/docs/remote-store-protocol.md +30 -7
- package/docs/remote-ticket-protocol.md +26 -5
- package/docs/restacking.md +79 -0
- package/docs/setup.md +53 -6
- package/docs/ticket-dependencies.md +69 -0
- package/docs/ticket-migration.md +8 -0
- package/package.json +3 -3
- package/packages/core/src/cli/attention.ts +25 -2
- package/packages/core/src/cli/build-control.ts +65 -41
- package/packages/core/src/cli/context.ts +54 -2
- 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 +142 -18
- package/packages/core/src/cli/dashboard/poll.ts +15 -9
- package/packages/core/src/cli/dashboard/refresh.ts +183 -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 +156 -105
- package/packages/core/src/cli/dispatch.ts +257 -139
- package/packages/core/src/cli/dispatcher-liveness.ts +15 -2
- package/packages/core/src/cli/help.ts +52 -33
- 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 +49 -15
- package/packages/core/src/cli/mcp.ts +9 -0
- package/packages/core/src/cli/publication-settlement.ts +168 -2
- package/packages/core/src/cli/repository-status.ts +11 -0
- package/packages/core/src/cli/status.ts +72 -5
- 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 +98 -79
- package/packages/core/src/cli/ticket-editor.ts +10 -3
- package/packages/core/src/cli/ticket.ts +113 -18
- 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 +115 -19
- package/packages/core/src/cli/watch.ts +51 -12
- package/packages/core/src/config/landing.ts +22 -0
- package/packages/core/src/config/live.ts +1 -0
- 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 +31 -0
- package/packages/core/src/integration/harness.ts +10 -0
- package/packages/core/src/kernel/__snapshots__/reducer-registry.test.ts.snap +1030 -239
- package/packages/core/src/kernel/auto-merge-default.ts +1 -0
- package/packages/core/src/kernel/auto-merge.ts +12 -3
- 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/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 +11 -0
- 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.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 +70 -3
- 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 +16 -0
- package/packages/core/src/kernel/reducer.ts +121 -6
- package/packages/core/src/kernel/snapshot-parent.ts +33 -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 +6 -0
- package/packages/core/src/operator/index.ts +4 -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 +3 -1
- package/packages/core/src/operator/registry.ts +48 -19
- package/packages/core/src/operator/requests.ts +1 -8
- package/packages/core/src/operator/tickets.ts +55 -9
- package/packages/core/src/plugins/load.ts +3 -4
- 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-runner.ts +530 -23
- package/packages/core/src/processes/dispatcher-selectors.ts +15 -9
- package/packages/core/src/processes/dispatcher.ts +2145 -203
- package/packages/core/src/processes/execution-no-progress.ts +46 -1
- package/packages/core/src/processes/publication-state.ts +30 -5
- package/packages/core/src/processes/repo-view.ts +21 -2
- package/packages/core/src/store/build-scope.ts +18 -0
- package/packages/core/src/store/contract.ts +658 -0
- package/packages/core/src/store/digest.ts +52 -4
- package/packages/core/src/store/local/schema.ts +25 -13
- package/packages/core/src/store/local/store.ts +117 -1
- package/packages/core/src/store/memory.ts +62 -1
- package/packages/core/src/store/phase-session.ts +17 -0
- package/packages/core/src/store/reduced-reads.ts +2 -1
- package/packages/core/src/store/reducer-value-shapes.json +10707 -6440
- package/packages/core/src/store/remote/client.ts +45 -0
- package/packages/core/src/store/remote/compatibility.ts +25 -9
- package/packages/core/src/store/remote/protocol.ts +11 -0
- package/packages/core/src/store/repo-state-events.ts +2 -0
- package/packages/core/src/store/session-handle.ts +15 -0
- package/packages/core/src/store/subscribe.ts +1 -1
- package/packages/core/src/store/types.ts +34 -4
- package/packages/core/src/testing/index.ts +2 -0
- package/packages/core/src/testing/reduced-read-budget.ts +48 -8
- package/packages/core/src/testing/refresh-scheduler.ts +32 -0
- package/skills/guide/SKILL.md +117 -64
- 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 +12 -5
- package/skills/guide/references/plugin-authoring.md +42 -3
- package/skills/guide/references/remote-store-protocol.md +30 -7
- package/skills/guide/references/remote-ticket-protocol.md +26 -5
- package/skills/guide/references/restacking.md +79 -0
- package/skills/guide/references/setup.md +53 -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
|
@@ -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.
|
package/docs/operator-api.md
CHANGED
|
@@ -112,17 +112,15 @@ JSON bodies are strict: unknown fields are rejected.
|
|
|
112
112
|
|
|
113
113
|
| Method and path | Body |
|
|
114
114
|
|---|---|
|
|
115
|
-
| `POST …/builds/{slug}/control` | `{"action":"pause"\|"cancel-pause"\|"resume"\|"abort"\|"discard"\|"
|
|
115
|
+
| `POST …/builds/{slug}/control` | `{"action":"pause"\|"cancel-pause"\|"resume"\|"abort"\|"discard"\|"land"\|"hold"}` |
|
|
116
116
|
| `POST …/builds/{slug}/answer` | One answer variant described below. |
|
|
117
117
|
| `PUT …/settings/intake` | `{"enabled":boolean}` |
|
|
118
118
|
| `POST …/settings/intake/toggle` | Empty body. |
|
|
119
|
-
| `PUT …/settings/auto-merge-default` | `{"enabled":boolean}` |
|
|
120
|
-
| `POST …/settings/auto-merge-default/toggle` | Empty body. |
|
|
121
119
|
| `POST …/bulk-control` | `{"action":"pause"\|"resume"}`. The hold fact, intake fact, then eligible build events are written in that order. |
|
|
122
120
|
| `POST …/harvest/control` | `{"action":"toggle-gate"}` or `{"action":"run","run":"…"}`. A run action is bound to that concrete projected run. |
|
|
123
121
|
| `POST …/tickets/states` | `{name,about?}` → `{state,created}`; requires attributed operator identity (`tickets.state.create` in MCP). Hosted duplicate names are refused case-insensitively. |
|
|
124
|
-
| `POST …/tickets` | `{"title":"…","body":"…","labels"?:[],"state"?:"…","blockedBy"?:[]}`; omitted state preserves the backend default. |
|
|
125
|
-
| `PATCH …/tickets/{id}` | Any nonempty subset of `title`, `body`,
|
|
122
|
+
| `POST …/tickets` | `{"title":"…","body":"…","labels"?:[],"state"?:"…","blockedBy"?:[],"kind"?:"work"|"node","target"?:"id"|null}`; omitted state preserves the backend default. |
|
|
123
|
+
| `PATCH …/tickets/{id}` | Any nonempty subset of `title`, `body`, complete-replacement `labels`, `kind` (`work` or `node`), and nullable `target` (null clears). Body bytes are not normalized. |
|
|
126
124
|
| `POST …/tickets/{id}/move` | `{"state":"backend state name"}`. |
|
|
127
125
|
| `POST …/tickets/{id}/block` | `{"blockerIds":["…"]}`. |
|
|
128
126
|
| `POST …/tickets/{id}/unblock` | `{"blockerIds":["…"]}`. |
|
|
@@ -239,9 +237,13 @@ record the first signal in the stop fact, and release its lease before exit.
|
|
|
239
237
|
|
|
240
238
|
The default watch reports actionable conditions only:
|
|
241
239
|
|
|
242
|
-
- Build `escalation.raised`,
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
- Build `escalation.raised`, `integration.landed`, `node.item-conflicted`, or
|
|
241
|
+
conflicted `restack.replayed` events. `build.consent-ready` is the single
|
|
242
|
+
signal for a ready consent or held landing, including first repository-wide
|
|
243
|
+
discovery. Its target has the queue entry shape `{kind, branch, ticket?, build?}`.
|
|
244
|
+
Unready and stale candidates stay silent. `build.merge-decision` remains for
|
|
245
|
+
current actionable merge-gate deferrals and unsafe forge outcomes, once per
|
|
246
|
+
build/PR; it does not duplicate consent or hold attention.
|
|
245
247
|
- Repository `harvest.escalated`, `harvest.recovery-exhausted`,
|
|
246
248
|
`dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
|
|
247
249
|
`restartRequired`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
|
|
@@ -291,3 +293,12 @@ Hosted ticket tools resolve independent project ticket policy before legacy uplo
|
|
|
291
293
|
configuration. Queue, detail, state discovery and mutations work before any build
|
|
292
294
|
or dispatcher run; detail reports a null matching build. Ticket policy publication
|
|
293
295
|
never creates synthetic build or repository history.
|
|
296
|
+
|
|
297
|
+
Ticket results include kind (default work) and optional same-source node target.
|
|
298
|
+
Metadata-only patches are accepted. Target validation and demotion guards apply
|
|
299
|
+
to CLI, HTTP and MCP alike; unsupported sources refuse even explicit defaults
|
|
300
|
+
or clears before changing other fields. Dispatch routing is unchanged.
|
|
301
|
+
|
|
302
|
+
Landing controls use `land` and `hold` with acknowledged durable state. Land
|
|
303
|
+
requires readiness and survives restacks; hold persists until land. Repository
|
|
304
|
+
auto-merge settings are retired; configure ordered `[[landing]]` rules.
|
|
@@ -12,21 +12,24 @@ persistence requirements, and conformance bar for the protocol shipped in this
|
|
|
12
12
|
distribution are all defined here. Protocol implementations must retain contracts for every supported client line;
|
|
13
13
|
protocol changes update this document and executable contracts together.
|
|
14
14
|
|
|
15
|
-
A service accepts stable clients from its own `major.minor`
|
|
16
|
-
the two preceding minor lines in the same major. A major starts a new family:
|
|
15
|
+
A service accepts stable and prerelease clients from its own `major.minor`
|
|
16
|
+
release line and the two preceding minor lines in the same major. A major starts a new family:
|
|
17
17
|
X.0 accepts only X.0, X.1 accepts X.0/X.1, and X.2 onward accepts three lines.
|
|
18
18
|
Patch versions are interchangeable in both directions and must never change
|
|
19
19
|
the protocol. Upgrade the service first, then projects independently within
|
|
20
20
|
its window. Supported release lines retain their wire handlers and known
|
|
21
21
|
protocol identities; an unknown protocol is refused independently of version.
|
|
22
|
-
|
|
22
|
+
Stable and prerelease service and client identities share their numeric major/minor
|
|
23
|
+
line. Malformed or missing identities, build metadata (`+…`), prefixes and
|
|
24
|
+
whitespace are refused with HTTP 409.
|
|
23
25
|
A newer client is told to upgrade the service; a client below the window is
|
|
24
26
|
told to upgrade the project's Autobuild. Diagnostics name the service version
|
|
25
27
|
and supported range.
|
|
26
28
|
|
|
27
29
|
Unauthenticated `GET /health` publishes `ok`, `autobuildVersion`,
|
|
28
30
|
`protocolVersion`, and `supportedClientRange: { minVersion, maxVersionExclusive }`.
|
|
29
|
-
The range is inclusive at the minimum
|
|
31
|
+
Range endpoints remain stable versions. The range is inclusive at the minimum
|
|
32
|
+
and exclusive at the maximum; a 0.11.x
|
|
30
33
|
service publishes `>=0.9.0 <0.12.0`. Health needs no credentials, version
|
|
31
34
|
headers, or available backend.
|
|
32
35
|
|
|
@@ -510,22 +513,37 @@ creation operation and must not reset timestamps, events, artifacts, or lease
|
|
|
510
513
|
state when the repository already exists. Event sequence numbering starts at 1
|
|
511
514
|
for each repository independently of every build and other repository.
|
|
512
515
|
|
|
513
|
-
A `BuildDigest`
|
|
514
|
-
|
|
516
|
+
A `BuildDigest` projects terminal, observation, and compact landing evidence
|
|
517
|
+
from one build's log:
|
|
515
518
|
|
|
516
519
|
```jsonc
|
|
517
520
|
// BuildDigest
|
|
518
521
|
{
|
|
522
|
+
"integrationAuditPending": true, // optional: kernel landing audit requested, not yet settled
|
|
519
523
|
"slug": "ab-fix-login-3",
|
|
520
524
|
"terminal": "done", // optional: "done" | "aborted", omitted while the log has neither
|
|
521
525
|
"observations": [ // ascending-seq pairs for the log's observation.recorded events
|
|
522
526
|
{ "seq": 1, "ts": "2026-07-15T12:00:01.000Z" },
|
|
523
527
|
{ "seq": 4, "ts": "2026-07-15T12:00:04.000Z" }
|
|
524
528
|
],
|
|
525
|
-
"merged": "2026-07-15T12:00:06.000Z" // optional: ts of the log's latest pr.merged, omitted when none
|
|
529
|
+
"merged": "2026-07-15T12:00:06.000Z", // optional: ts of the log's latest pr.merged, omitted when none
|
|
530
|
+
"mergedSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", // optional: that merge's actual landing SHA
|
|
531
|
+
"nodeContribution": { // optional: latest node.contribution-recorded payload
|
|
532
|
+
"landing": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
533
|
+
"head": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
534
|
+
"base": "cccccccccccccccccccccccccccccccccccccccc",
|
|
535
|
+
"identities": ["build:child"]
|
|
536
|
+
}
|
|
526
537
|
}
|
|
527
538
|
```
|
|
528
539
|
|
|
540
|
+
The optional `mergedSha` and `nodeContribution` fields let admission index
|
|
541
|
+
confirmed landing evidence without fetching every historical build's full facts.
|
|
542
|
+
A node contribution is usable only when its `landing` matches `mergedSha`;
|
|
543
|
+
recording or recovering a contribution advances `readinessChangeSeq`. These
|
|
544
|
+
members are additive: older peers can omit them, leaving presence unproven rather
|
|
545
|
+
than substituting source completion. They do not change the protocol version.
|
|
546
|
+
|
|
529
547
|
The digest is derived from the event log on every call — the server persists
|
|
530
548
|
nothing and there is no refresh step. Protocol version `3` reshaped the
|
|
531
549
|
digest's `observations` from bare sequence numbers to `{seq, ts}` pairs and
|
|
@@ -1295,3 +1313,8 @@ These operations never renew the lease. Repository records optionally expose
|
|
|
1295
1313
|
`tick: {run, open?: {startedAt}, finished?: {run, startedAt, completedAt, ...completion}}`.
|
|
1296
1314
|
They retain the previous completion while a new tick is open and after lease
|
|
1297
1315
|
release. Build and session credentials cannot mutate repository ticks.
|
|
1316
|
+
|
|
1317
|
+
The optional `integrationAuditPending` digest fact is introduced on the 0.14
|
|
1318
|
+
release line without changing protocol identity 4. It survives build completion
|
|
1319
|
+
and is cleared by audit settlement. Services omit it for historical 0.12/0.13
|
|
1320
|
+
clients, retaining their decoders and the supported three-line window.
|
|
@@ -6,21 +6,24 @@ version headers with the remote BuildStore. The version must be in the
|
|
|
6
6
|
published service window and the protocol must
|
|
7
7
|
match its known release-line identity (`3` for 0.9, 0.10, and 0.11).
|
|
8
8
|
|
|
9
|
-
A service accepts stable clients from its own `major.minor`
|
|
10
|
-
the two preceding minor lines in the same major. A major starts a new family:
|
|
9
|
+
A service accepts stable and prerelease clients from its own `major.minor`
|
|
10
|
+
release line and the two preceding minor lines in the same major. A major starts a new family:
|
|
11
11
|
X.0 accepts only X.0, X.1 accepts X.0/X.1, and X.2 onward accepts three lines.
|
|
12
12
|
Patch versions are interchangeable in both directions and must never change
|
|
13
13
|
the protocol. Upgrade the service first, then projects independently within
|
|
14
14
|
its window. Supported release lines retain their wire handlers and known
|
|
15
15
|
protocol identities; an unknown protocol is refused independently of version.
|
|
16
|
-
|
|
16
|
+
Stable and prerelease service and client identities share their numeric major/minor
|
|
17
|
+
line. Malformed or missing identities, build metadata (`+…`), prefixes and
|
|
18
|
+
whitespace are refused with HTTP 409.
|
|
17
19
|
A newer client is told to upgrade the service; a client below the window is
|
|
18
20
|
told to upgrade the project's Autobuild. Diagnostics name the service version
|
|
19
21
|
and supported range.
|
|
20
22
|
|
|
21
23
|
Unauthenticated `GET /health` publishes `ok`, `autobuildVersion`,
|
|
22
24
|
`protocolVersion`, and `supportedClientRange: { minVersion, maxVersionExclusive }`.
|
|
23
|
-
The range is inclusive at the minimum
|
|
25
|
+
Range endpoints remain stable versions. The range is inclusive at the minimum
|
|
26
|
+
and exclusive at the maximum; a 0.11.x
|
|
24
27
|
service publishes `>=0.9.0 <0.12.0`. Health needs no credentials, version
|
|
25
28
|
headers, or available backend.
|
|
26
29
|
|
|
@@ -273,7 +276,7 @@ snapshot of fields, blockers and revision.
|
|
|
273
276
|
|
|
274
277
|
`POST /tickets/mutate-if-revision` accepts the usual authenticated context and
|
|
275
278
|
`input: { id, expectedRevision, mutation }`. Mutation is one of
|
|
276
|
-
`{ kind: "update", patch: { title?, body?, labels? } }`,
|
|
279
|
+
`{ kind: "update", patch: { title?, body?, labels?, kind?, target? } }`,
|
|
277
280
|
`{ kind: "transition", state }`, or
|
|
278
281
|
`{ kind: "blockers", operation: "block" | "unblock", ids: string[] }`.
|
|
279
282
|
Unknown keys and empty patches are refused. Success returns `{ ok: true }`.
|
|
@@ -312,3 +315,21 @@ before source construction. Their ordinary create grants remain unchanged.
|
|
|
312
315
|
|
|
313
316
|
See the [migration procedure](ticket-migration.md) for preflight, state mapping,
|
|
314
317
|
resumption and portable file records.
|
|
318
|
+
|
|
319
|
+
## Integration tree metadata
|
|
320
|
+
|
|
321
|
+
Hosted tickets store `kind` (`work` or `node`, default `work`) and optional
|
|
322
|
+
`target`, the canonical readable id of a node in the same project. Create accepts
|
|
323
|
+
both fields; update and guarded update preserve omitted fields and accept
|
|
324
|
+
`target: null` to clear an edge. Targets must exist and be nodes. Self-targets,
|
|
325
|
+
ancestor cycles, and demoting a node with targeting tickets (including completed
|
|
326
|
+
work) are rejected before any part of a mixed patch is written. Graph mutations
|
|
327
|
+
serialize per project in the same transaction as validation and revision checks.
|
|
328
|
+
Effective metadata changes increment the revision; equivalent aliases are no-ops.
|
|
329
|
+
|
|
330
|
+
Ticket responses include these fields only with `x-autobuild-ticket-tree: 1`.
|
|
331
|
+
This capability is independent of revision and comment capabilities and of the
|
|
332
|
+
client version. Without it, both fields are projected away, preserving historical
|
|
333
|
+
strict decoders. Current hosted clients send all three capability headers and
|
|
334
|
+
default absent kind to `work`. Unfiltered listing includes all ticket states and
|
|
335
|
+
empty nodes for `ab ticket tree`; dispatch and landing behavior are unchanged.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Restacking and change identity
|
|
2
|
+
|
|
3
|
+
A leaf contributes one net change, independent of its WIP commit count. Before
|
|
4
|
+
verification the kernel collapses its contribution relative to the effective
|
|
5
|
+
diff base and replays it onto the sampled destination. Implementation and review
|
|
6
|
+
do not rewrite history. Verification failures return to implementation; later
|
|
7
|
+
commits append until the next approved cycle. Later reviews use the effective
|
|
8
|
+
base from the preceding successful restack; the original cut remains provenance.
|
|
9
|
+
|
|
10
|
+
The terminal `Autobuild-Build: <slug>` trailer identifies a change across SHA
|
|
11
|
+
rewrites. Reachable identities determine presence, including blockers; old SHAs
|
|
12
|
+
alone do not. Each canonical leaf replay has one parent and one identity,
|
|
13
|
+
including an empty resolved change. Root leaf squash retains that identity;
|
|
14
|
+
node fast-forwards preserve ordered contributing identities.
|
|
15
|
+
|
|
16
|
+
## Timing and evidence
|
|
17
|
+
|
|
18
|
+
Destination observations are durable `target.moved` facts, including while an
|
|
19
|
+
agent runs. Verify-entry restack freezes a current base before verification;
|
|
20
|
+
path selection excludes upstream-only paths. After finalize and post-steps,
|
|
21
|
+
waiting leaves restack when the target moves. Node-target finalize contributions
|
|
22
|
+
are canonicalized before guarded landing even when the target SHA is unchanged.
|
|
23
|
+
Clean replay starts no agent. A clean waiting leaf rewrite preserves prior
|
|
24
|
+
verification; reports retain their actual cycle base/head. Conflicted replay
|
|
25
|
+
runs reconcile and verification, and initial verification cannot be skipped
|
|
26
|
+
through post-reconcile policy.
|
|
27
|
+
|
|
28
|
+
Every open node observes its parent and cascades movement to descendants,
|
|
29
|
+
including empty nodes without PRs. Movement coalesces onto the newest sample
|
|
30
|
+
after an active frozen transaction finishes; no separate throttle is configured.
|
|
31
|
+
Unlike clean waiting leaves, nodes must reverify any changed head or parent.
|
|
32
|
+
|
|
33
|
+
Before replacement the kernel publishes retained tips, displaced heads and the
|
|
34
|
+
temporary change under immutable exact archive refs. `restack.*` facts record
|
|
35
|
+
preparation, replay, intent, archived replacement, contention and completion.
|
|
36
|
+
Unpublished request/loss records alone cannot preserve objects from a released
|
|
37
|
+
sandbox. Publication uses exact expected-head CAS; contention retains evidence
|
|
38
|
+
and retries without overwriting another writer. Remote guests park for trusted
|
|
39
|
+
publication after teardown. Historical merge reconciliations keep their original
|
|
40
|
+
interpretation and supply a promoted contribution base for later replay.
|
|
41
|
+
|
|
42
|
+
## Node contributions and recovery
|
|
43
|
+
|
|
44
|
+
Node replay enumerates oldest-first first-parent contributions above the last
|
|
45
|
+
completed boundary (initially the opening SHA). Inherited foreign history is
|
|
46
|
+
excluded from node ownership; the boundary advances only on confirmed completion.
|
|
47
|
+
Ordered source identities survive, and identities already reachable upstream
|
|
48
|
+
are dropped. Untagged commits, including empty ones, are foreign.
|
|
49
|
+
|
|
50
|
+
A separate node writer lease and durable reservation serialize restacks and
|
|
51
|
+
child landings. Reservations freeze expected head, parent, contribution boundary,
|
|
52
|
+
archives, changes and merge proofs. Lease expiry recovers the same operation,
|
|
53
|
+
not a competing one. Prepared/conflicted/replayed item receipts, publication
|
|
54
|
+
intent, proven replacement and settlement distinguish each recovery boundary.
|
|
55
|
+
Inventory exposes source identities, node-owned foreign commits, active operation,
|
|
56
|
+
conflict item and unsafe merge evidence.
|
|
57
|
+
|
|
58
|
+
Only a conflicted item attaches a reconcile runner. It receives the original
|
|
59
|
+
source build's pinned spec, approved plan and implement-notes, with the integration
|
|
60
|
+
owner identified separately. Missing artifacts or invalid identity escalate.
|
|
61
|
+
Foreign conflicts receive commit metadata and a diff; unclear intent escalates.
|
|
62
|
+
Completion validates exactly one commit on the item's replay base, preserving
|
|
63
|
+
identity or foreign status. The agent never publishes the stack; dispatcher
|
|
64
|
+
publication waits for session and execution settlement.
|
|
65
|
+
|
|
66
|
+
## Foreign merges
|
|
67
|
+
|
|
68
|
+
Before any replay or publication, inspect every merge's non-first-parent history,
|
|
69
|
+
including nested side history, against identities reachable in the frozen parent.
|
|
70
|
+
Flattening is safe only when the merge has no own identity and every side-history
|
|
71
|
+
identity is already present upstream. It becomes one foreign first-parent delta,
|
|
72
|
+
including resolution content or an empty result; side identities stay inherited.
|
|
73
|
+
An identity-bearing merge, absent upstream side identity, malformed or ambiguous
|
|
74
|
+
identity refuses the whole restack. The branch and contribution boundary remain
|
|
75
|
+
untouched and the integration build escalates with offending evidence. The kernel
|
|
76
|
+
never preserves merge topology or decomposes an unsafe merge automatically.
|
|
77
|
+
|
|
78
|
+
See [integration trees](integration-tree.md), [landing](landing-policy.md), and
|
|
79
|
+
[migration](migration-1.0.md).
|