@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
package/SPEC.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
# Autobuild
|
|
1
|
+
# Autobuild — Specification
|
|
2
2
|
|
|
3
3
|
An agent-driven software development lifecycle system: it takes work from
|
|
4
4
|
*"something should be done"* to a merged PR, with a human in the loop only
|
|
5
|
-
where judgment matters. This is a ground-up rebuild of
|
|
6
|
-
history at `6d4dce3`), keeping
|
|
7
|
-
hard-coded with real interfaces.
|
|
5
|
+
where judgment matters. This is a ground-up rebuild of the pilot (preserved in
|
|
6
|
+
git history at `6d4dce3`), keeping the pilot's validated ideas and replacing
|
|
7
|
+
what it hard-coded with real interfaces. Versions are the npm release versions
|
|
8
|
+
of `@defrex/autobuild`; the pilot was never versioned.
|
|
8
9
|
|
|
9
10
|
**What this document is.** SPEC.md holds the durable design: principles,
|
|
10
11
|
boundaries between components, invariants, and decisions with their rationale
|
|
@@ -28,7 +29,8 @@ Status legend: sections describe **decided** design unless marked **[OPEN]**.
|
|
|
28
29
|
|
|
29
30
|
## 1. Why a rebuild
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
The pilot proved the core loop works. Its structural limits, which motivate
|
|
33
|
+
this design:
|
|
32
34
|
|
|
33
35
|
- **Repo as database.** Build state and artifacts lived in `build/<feature>/`
|
|
34
36
|
dirs committed to the repo — accumulating noise, bloating the repo, with no
|
|
@@ -45,7 +47,7 @@ v1 proved the core loop works. Its structural limits, which motivate v2:
|
|
|
45
47
|
|
|
46
48
|
## 2. Constitution
|
|
47
49
|
|
|
48
|
-
Principles — the first four carried from
|
|
50
|
+
Principles — the first four carried from the pilot — that are non-negotiable and that
|
|
49
51
|
every design decision below answers to:
|
|
50
52
|
|
|
51
53
|
1. **Judgment in skills, determinism in code.** Agents never decide phase
|
|
@@ -124,8 +126,8 @@ resolve first from the consuming repository's main checkout, so they use that
|
|
|
124
126
|
repository's installed dependencies and remain available when a local store
|
|
125
127
|
places linked worktrees outside the checkout's package ancestry; a package the
|
|
126
128
|
repository lacks then resolves from the Autobuild installation the CLI runs
|
|
127
|
-
from
|
|
128
|
-
@defrex/autobuild-<extension
|
|
129
|
+
from as a fallback. Install extensions as repository development dependencies
|
|
130
|
+
with `bun add -d --exact @defrex/autobuild-<extension>`. A
|
|
129
131
|
repository copy always wins over an installed one. Dispatch and sessionless
|
|
130
132
|
commands naturally use the main checkout for both repository roots. Autobuild
|
|
131
133
|
does not install a missing package.
|
|
@@ -177,6 +179,18 @@ and janitor completion; the same registration backs every source-agnostic
|
|
|
177
179
|
lifecycle fields unchanged and own any further validation; credentials remain
|
|
178
180
|
environment-only.
|
|
179
181
|
|
|
182
|
+
Forge readiness is an optional read-only port capability, inspected on the host
|
|
183
|
+
by init validation and once at dispatch startup after repository lease acquisition.
|
|
184
|
+
It reports squash/rebase merge methods and kernel build/node/archive publication
|
|
185
|
+
permissions as hard requirements, and protected-target linear history and root
|
|
186
|
+
freshness as recommendations. Results are pass, fail, or unknown; incomplete
|
|
187
|
+
inspection never proves permission. Local Git passes trivially; legacy plugins
|
|
188
|
+
report unknown. Known hard failures fail init validation and produce one durable
|
|
189
|
+
`dispatcher.forge-readiness-failed` repository fact per run/check. They do not
|
|
190
|
+
add a dispatch admission gate. Repository attention watches (`ab watch`), dashboard
|
|
191
|
+
warnings, and operator queries expose all failures and remediation for the run;
|
|
192
|
+
`ab wait` remains build-only. No setting is changed and no probe ref is pushed.
|
|
193
|
+
|
|
180
194
|
Forge selection is open through the root `forge` scalar (`github` by default).
|
|
181
195
|
Two adapters ship: `github` publishes through GitHub/`gh`; `local-git` uses only
|
|
182
196
|
the repository's shared local Git database and requires no remote, network, or
|
|
@@ -221,9 +235,8 @@ Small, independently runnable, crash-safe:
|
|
|
221
235
|
`build.created` from the immutable record (only records an older dispatcher
|
|
222
236
|
left with an empty stream: new claims write it atomically with the record), executes only missing workspace,
|
|
223
237
|
spec, and ticket-notification boundaries, and records each failed attempt as
|
|
224
|
-
`dispatch.failed`.
|
|
225
|
-
|
|
226
|
-
command fact is materialized, while
|
|
238
|
+
`dispatch.failed`. New claims do not seed landing consent or materialize
|
|
239
|
+
historical auto-merge defaults; policy is sampled at readiness. Meanwhile,
|
|
227
240
|
`dispatch.comment-posted` prevents retries from duplicating the ticket notice.
|
|
228
241
|
It also owns observation back-pressure: settling
|
|
229
242
|
outstanding recoverable harvest runs takes priority over starting new scans
|
|
@@ -281,8 +294,10 @@ One name, used everywhere. Every noun lives in exactly one layer.
|
|
|
281
294
|
|---|---|
|
|
282
295
|
| **Signal** | Raw input from the world — a Sentry issue, an observation |
|
|
283
296
|
| **Proposal** | A synthesized candidate ticket sitting in Triage, awaiting grooming |
|
|
284
|
-
| **Ticket** | A
|
|
285
|
-
| **
|
|
297
|
+
| **Ticket** | A source record of kind `work` (default) or `node`, optionally targeting a same-source node; ordinary groomed work is dispatchable |
|
|
298
|
+
| **Node ticket** | A named integration point represented by a ticket of kind `node`; its integration build owns a branch collecting child work |
|
|
299
|
+
| **Build** | One ticket execution with a slug; either a work pipeline or an integration branch lifecycle; the unit the operator sees |
|
|
300
|
+
| **Integration build** | A node build that opens its branch without a runner or capacity charge, collects child work, verifies its complete head and lands under ordered policy (node consent by default) |
|
|
286
301
|
| **Harvest run** | One repository-scoped claimed observation snapshot and staged proposal workflow; never a build |
|
|
287
302
|
| **Phase** | A named stage of the build pipeline grammar (§5) |
|
|
288
303
|
| **Round** | One iteration inside a review loop |
|
|
@@ -309,7 +324,7 @@ mechanically:
|
|
|
309
324
|
| `code-review` | `/code-review <build>` | `code-review.verdict` | `code-review` (rev N) |
|
|
310
325
|
| `verify:e2e` | `/verify-app-e2e <build>` (repository-authored) | `verify.completed {step, outcome}` | `verify-report:e2e` on pass/fail when present |
|
|
311
326
|
| `finalize` | `/finalize <build>` | `finalize.completed` | PR ref, summary |
|
|
312
|
-
| `reconcile` | `/reconcile <build>` | `reconcile.started`, `reconcile.completed` | `reconcile-notes` +
|
|
327
|
+
| `reconcile` | `/reconcile <build>` | `reconcile.started`, `reconcile.prepared`, `reconcile.replayed`, `reconcile.publish-intended`, `reconcile.rewritten`, `reconcile.contended`, `reconcile.completed` | `reconcile-notes` + one replayed change |
|
|
313
328
|
|
|
314
329
|
Every phase skill takes **only the build slug**; everything else it needs
|
|
315
330
|
comes from the store via the `ab` CLI (§8).
|
|
@@ -321,6 +336,14 @@ the bare phase names throughout.
|
|
|
321
336
|
|
|
322
337
|
## 5. Pipeline grammar
|
|
323
338
|
|
|
339
|
+
Work builds retain the fixed grammar below. Integration builds instead follow
|
|
340
|
+
`spec → branch opening → collecting → complete → verify:* → authorization → land → close`.
|
|
341
|
+
Authorization follows ordered landing policy: nodes default to explicit consent,
|
|
342
|
+
while an auto rule authorizes a complete, verified candidate without a command.
|
|
343
|
+
They never enter plan, implement, code-review or finalize. A node conflict uses
|
|
344
|
+
source-aware reconcile. Idle collecting nodes own no execution resources;
|
|
345
|
+
verification temporarily uses ordinary execution capacity. Empty nodes have no PR.
|
|
346
|
+
|
|
324
347
|
```
|
|
325
348
|
spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → finalize (+ finalize:*)
|
|
326
349
|
```
|
|
@@ -357,9 +380,24 @@ is kernel-hard-coded. That is what keeps the system inspectable.
|
|
|
357
380
|
`spec` is *not* a phase; it is satisfied at or before dispatch (§6). After
|
|
358
381
|
`finalize`, the build enters a post-PR epilogue owned by the dispatcher's
|
|
359
382
|
janitor duty (§15.7): a conflicted PR triggers the `reconcile` phase —
|
|
360
|
-
|
|
383
|
+
kernel-prepared single-change replay onto a frozen refreshed base, with agent
|
|
384
|
+
conflict resolution and the captured post-reconcile `verify:*` policy — repeating
|
|
361
385
|
until merge or close.
|
|
362
386
|
|
|
387
|
+
Leaf branches are collapsed into one build change and restacked onto the frozen
|
|
388
|
+
target branch's current head at verify entry, before any verifier or exclusion.
|
|
389
|
+
This is kernel work within the fixed grammar, not another phase. A verify failure
|
|
390
|
+
returns to implementation; its new commits append to the canonical change, and
|
|
391
|
+
the next approved cycle collapses and restacks again. While waiting to land after
|
|
392
|
+
finalize and its post-steps, an observed target move also schedules a restack.
|
|
393
|
+
For a node-targeted leaf, published finalize-step commits also schedule one
|
|
394
|
+
waiting restack, even when the target SHA is unchanged, so guarded landing
|
|
395
|
+
preserves one canonical build identity.
|
|
396
|
+
Clean waiting restacks retain existing verification; conflicts use reconcile and
|
|
397
|
+
its captured post-reconcile policy. A conflict before initial verification cannot
|
|
398
|
+
skip initial checks through that policy.
|
|
399
|
+
|
|
400
|
+
|
|
363
401
|
## 6. The spec
|
|
364
402
|
|
|
365
403
|
Two things wear the name:
|
|
@@ -441,8 +479,9 @@ continue reading their existing ticket rows.
|
|
|
441
479
|
|
|
442
480
|
## 7. The build store
|
|
443
481
|
|
|
444
|
-
The
|
|
445
|
-
repo did double duty as workspace and database.
|
|
482
|
+
The pilot's repo-bloat and no-observability problems share one root cause:
|
|
483
|
+
the repo did double duty as workspace and database. This design splits the
|
|
484
|
+
roles:
|
|
446
485
|
|
|
447
486
|
- **Workspace** — the sandbox/worktree. Scratch by construction: the working
|
|
448
487
|
tree plus the gitignored `.ab/` dir agents use as working memory during a
|
|
@@ -454,7 +493,8 @@ repo did double duty as workspace and database. v2 splits the roles:
|
|
|
454
493
|
|
|
455
494
|
```
|
|
456
495
|
builds id/slug, ticket ref, repo, branch, status (derived), created/updated,
|
|
457
|
-
lease + heartbeat
|
|
496
|
+
runner lease + heartbeat; independent node writer lease
|
|
497
|
+
(mutable liveness columns — §15.2.6, never events)
|
|
458
498
|
events build_id, seq, timestamp, actor, type, payload (JSON) — append-only
|
|
459
499
|
artifacts build_id, kind, revision, blobRef, metadata
|
|
460
500
|
repo_streams repo, created/updated, lease + heartbeat, bounded tick observation
|
|
@@ -675,6 +715,14 @@ concurrent processors; the event stream remains authoritative, with no
|
|
|
675
715
|
snapshot or side ledger. Sequence 0 names an empty stream, candidates receive
|
|
676
716
|
ordinary event validation, unknown builds reject, and a comparison miss leaves
|
|
677
717
|
the log and build timestamps untouched.
|
|
718
|
+
Node branch writers use separate `claimNodeWriter`, `renewNodeWriter`, and
|
|
719
|
+
`releaseNodeWriter` operations. Claim permits an absent, expired, or same-holder
|
|
720
|
+
lease; renewal requires the same unexpired holder, and release is holder-checked.
|
|
721
|
+
The memory, SQLite, Postgres, and HTTP stores enforce the same contract. These
|
|
722
|
+
leases neither grant nor renew runner authority. Delegated execution credentials
|
|
723
|
+
cannot acquire node writer authority. The active operation remains a durable
|
|
724
|
+
build-stream reservation across expiry, not mutable lease data.
|
|
725
|
+
|
|
678
726
|
The same contract has repository-scoped `ensureRepo`, event/artifact deposit
|
|
679
727
|
and read methods, plus a repository lease. Ticket assets (§7.1) add
|
|
680
728
|
`putTicketAsset`, `getTicketAsset` (latest live revision, or an explicit
|
|
@@ -725,25 +773,28 @@ conformance suite):
|
|
|
725
773
|
client, is the conformance bar. Autobuild does not load in-process BuildStore
|
|
726
774
|
plugins. Git worktrees and default file tickets necessarily remain local.
|
|
727
775
|
|
|
728
|
-
A service accepts stable clients from its own `major.minor`
|
|
729
|
-
the two preceding minor lines in the same major. A major starts a new family:
|
|
776
|
+
A service accepts stable and prerelease clients from its own `major.minor`
|
|
777
|
+
release line and the two preceding minor lines in the same major. A major starts a new family:
|
|
730
778
|
X.0 accepts only X.0, X.1 accepts X.0/X.1, and X.2 onward accepts three lines.
|
|
731
779
|
Patch versions are interchangeable in both directions and must never change
|
|
732
780
|
the protocol. Upgrade the service first, then projects independently within
|
|
733
781
|
its window. Supported release lines retain their wire handlers and known
|
|
734
782
|
protocol identities; an unknown protocol is refused independently of version.
|
|
735
|
-
|
|
783
|
+
Stable and prerelease service and client identities share their numeric major/minor
|
|
784
|
+
line. Malformed or missing identities, build metadata (`+…`), prefixes and
|
|
785
|
+
whitespace are refused with HTTP 409.
|
|
736
786
|
A newer client is told to upgrade the service; a client below the window is
|
|
737
787
|
told to upgrade the project's Autobuild. Diagnostics name the service version
|
|
738
788
|
and supported range.
|
|
739
789
|
|
|
740
790
|
Unauthenticated `GET /health` publishes `ok`, `autobuildVersion`,
|
|
741
791
|
`protocolVersion`, and `supportedClientRange: { minVersion, maxVersionExclusive }`.
|
|
742
|
-
The range is inclusive at the minimum
|
|
792
|
+
Range endpoints remain stable versions. The range is inclusive at the minimum
|
|
793
|
+
and exclusive at the maximum; a 0.11.x
|
|
743
794
|
service publishes `>=0.9.0 <0.12.0`. Health needs no credentials, version
|
|
744
795
|
headers, or available backend.
|
|
745
796
|
|
|
746
|
-
`subscribe` is specced in the interface; the
|
|
797
|
+
`subscribe` is specced in the interface; the current implementation is polling
|
|
747
798
|
`getEvents(since)`. True push comes later.
|
|
748
799
|
|
|
749
800
|
Operator UIs additionally have a repository-scoped batch read,
|
|
@@ -818,36 +869,43 @@ mid-turn leaves its transcript behind instead of nothing.
|
|
|
818
869
|
|
|
819
870
|
Because state is the event log and artifacts live in the store, a *new*
|
|
820
871
|
sandbox can resume a build a dead sandbox started: pull events, rehydrate
|
|
821
|
-
scratch from latest artifact revisions, continue.
|
|
872
|
+
scratch from latest artifact revisions, continue. The pilot structurally could not
|
|
822
873
|
do this.
|
|
823
874
|
|
|
824
|
-
|
|
875
|
+
The base-selection invariants make this safe with Git:
|
|
825
876
|
|
|
826
877
|
- **The base is chosen once, at first branch creation**, from the freshly
|
|
827
878
|
fetched origin tip of the configured base branch (fetched into a
|
|
828
879
|
build-scoped internal ref so concurrent dispatches cannot clobber each
|
|
829
880
|
other or the operator's refs). If the remote is unavailable, creation falls
|
|
830
881
|
back to the local base and records the diagnostic.
|
|
831
|
-
- **Re-provisioning
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
the
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
- **
|
|
849
|
-
|
|
850
|
-
|
|
882
|
+
- **Re-provisioning resumes; eligible restacks rewrite.** Provisioning alone
|
|
883
|
+
resumes the published branch. The kernel collapses and restacks at verify
|
|
884
|
+
entry and after target moves while awaiting landing. The first
|
|
885
|
+
`workspace.provisioned` base stays immutable branch-cut provenance; later
|
|
886
|
+
`existing` facts are resume evidence, not new cuts.
|
|
887
|
+
- **Review loops keep their starting effective base.** The initial loop uses
|
|
888
|
+
the original cut; after a successful verify-entry restack, later failure
|
|
889
|
+
loops use that restacked contribution base. Plan, implementation and
|
|
890
|
+
code-review never rewrite the branch. Previously recorded review ranges
|
|
891
|
+
remain immutable, including between rounds.
|
|
892
|
+
- **Each implementation completion records effective target divergence.**
|
|
893
|
+
`ab done` snapshots the authoritative frozen target branch in a build-private
|
|
894
|
+
ref and requires exactly one merge-base with implementation HEAD. The focused
|
|
895
|
+
`implement.completed {commits}` range excludes target history already absorbed
|
|
896
|
+
by the branch. This interrogation never moves the build branch. The original
|
|
897
|
+
cut remains provenance, and successful restacks establish the contribution
|
|
898
|
+
baseline for later loops and collapses. Recorded review ranges stay immutable.
|
|
899
|
+
- **Verification names its actual base.** Successful restack or reconcile
|
|
900
|
+
publication promotes the contribution/path base. Every new verify start and
|
|
901
|
+
result, including skips, cites the cycle's base and head. Those citations stay
|
|
902
|
+
frozen throughout the cycle and survive clean waiting restacks; historical
|
|
903
|
+
facts without citations remain readable. Upstream-only paths are excluded.
|
|
904
|
+
- **Observation never mutates a running workspace.** `target.moved` records an
|
|
905
|
+
exact observed head, even during a session. Transactions freeze their target;
|
|
906
|
+
later observations coalesce into one follow-on transaction for the newest
|
|
907
|
+
snapshot at the next eligible point. Session and execution settlement fence
|
|
908
|
+
rewrites, and trusted publication waits for remote guest teardown.
|
|
851
909
|
|
|
852
910
|
### 7.5 What the PR gets
|
|
853
911
|
|
|
@@ -996,7 +1054,7 @@ It buys three properties at once:
|
|
|
996
1054
|
1. **Storage-agnostic skills** — local or remote store, same commands.
|
|
997
1055
|
2. **An enforced ontology** — the CLI validates schemas at deposit; verdicts
|
|
998
1056
|
travel a typed channel, never parsed from stdout (the root-cause fix for
|
|
999
|
-
|
|
1057
|
+
the pilot's sentinel parsing).
|
|
1000
1058
|
3. **Structured observations at the point of capture**, not prose mined from
|
|
1001
1059
|
`observations.md` after the fact.
|
|
1002
1060
|
|
|
@@ -1045,7 +1103,14 @@ access rather than falling back to operator authority. `AB_STORE` and
|
|
|
1045
1103
|
Dispatcher machine authority is an opaque, revocable credential for exactly one
|
|
1046
1104
|
registered project. The service keeps only a digest of its random secret and
|
|
1047
1105
|
credential metadata (creator, creation, last use, expiry and revocation), and
|
|
1048
|
-
checks both credential status and project registration
|
|
1106
|
+
checks both credential status and project registration in one fresh database
|
|
1107
|
+
read on each request. Last-use metadata is written at most once per 60 seconds,
|
|
1108
|
+
with a database cutoff fencing concurrent writers; it trails actual use by at
|
|
1109
|
+
most 60 seconds. Requests starting after revocation, expiry, or deregistration
|
|
1110
|
+
are refused; an authentication already in flight may complete. Authentication
|
|
1111
|
+
is shared only within a handled request. Repository record/existence reads may
|
|
1112
|
+
also be reused within that request, including compound operator reads, but
|
|
1113
|
+
events, reducer tails, and mutation locks remain fresh. It
|
|
1049
1114
|
checks actual build/session/stream ownership and filters collections server-side.
|
|
1050
1115
|
Explicit project mismatch is 403; missing and foreign indirect IDs share 404.
|
|
1051
1116
|
Remote project build creation allocates a fresh slug and branch; the returned
|
|
@@ -1166,7 +1231,7 @@ terminals:
|
|
|
1166
1231
|
| `code-review` | spec, plan, commit range `{base, head}`, prior findings, implement-notes | `verdict` |
|
|
1167
1232
|
| `verify:<step>` (agent) | spec (acceptance criteria), step config, commit range | `verdict pass` \| `verdict fail --report` \| `verdict skip --reason` |
|
|
1168
1233
|
| `finalize` | spec, plan, verify reports, PR template config | `done` (requires `pr-description` artifact) |
|
|
1169
|
-
| `reconcile` | spec, plan, implement-notes, conflict `{baseSha}`
|
|
1234
|
+
| `reconcile` | spec, plan, implement-notes, conflict `{baseSha}` and kernel-prepared replay transaction | `done` (requires one replayed commit on the frozen base) |
|
|
1170
1235
|
|
|
1171
1236
|
Scoping is deliberate: the planner never sees code-review rounds; the
|
|
1172
1237
|
reviewer sees prior findings but not the producer's session. What a phase
|
|
@@ -1235,7 +1300,8 @@ requires a clean worktree and a descendant local `HEAD`, then regular-pushes
|
|
|
1235
1300
|
the configured build branch and records that head before completing the step.
|
|
1236
1301
|
A no-op step has no push. Agents only ever commit locally. Consequences: forge
|
|
1237
1302
|
credentials **never enter the sandbox** (load-bearing once builds run on
|
|
1238
|
-
remote sandboxes), history is extended
|
|
1303
|
+
remote sandboxes), ordinary implementation history is extended and reconcile
|
|
1304
|
+
uses exact expected-head guarded rewrites with archived evidence, and the
|
|
1239
1305
|
push-at-boundary rule from [D3] is enforced by construction rather than
|
|
1240
1306
|
convention. The same rule bounds the orchestrator's small fixes: an operator
|
|
1241
1307
|
sandbox publishes work only through the `sandbox.publish` tool, whose push and
|
|
@@ -1336,10 +1402,10 @@ sessionless read-only status projection.
|
|
|
1336
1402
|
|
|
1337
1403
|
`ab repository status [--json] [--store <ref>]` is the sessionless read-only
|
|
1338
1404
|
projection of the repository journal's dispatcher controls: ticket intake, the
|
|
1339
|
-
repository-wide pause, and the
|
|
1405
|
+
repository-wide pause, and the harvest gate. It uses the same
|
|
1340
1406
|
dispatch-settings reducer as dispatcher decisions and the dashboard. An absent
|
|
1341
1407
|
repository stream reduces as an empty journal and reports intake on, repository
|
|
1342
|
-
pause off
|
|
1408
|
+
pause off; the query does not create that stream,
|
|
1343
1409
|
append an event, claim a ticket, attach a runner, or start dispatcher work.
|
|
1344
1410
|
|
|
1345
1411
|
Agents never receive TicketSource credentials. Only the deterministic file
|
|
@@ -1845,6 +1911,26 @@ dependency-blocked ticket stays
|
|
|
1845
1911
|
queued source work rather than becoming a blocked build: the runtime `blocked`
|
|
1846
1912
|
status is for builds awaiting a human.
|
|
1847
1913
|
|
|
1914
|
+
In repositories with integration nodes, a blocker that has a build resolves only
|
|
1915
|
+
when its change identity is present in the dependent's sampled target head
|
|
1916
|
+
(the configured root branch when no target is set). Source completion or an
|
|
1917
|
+
aggregate source blocker flag cannot substitute for presence. Confirmed landing
|
|
1918
|
+
SHAs prove identity through Git reachability even without a build trailer;
|
|
1919
|
+
confirmed node landings transport their frozen whole contribution, including
|
|
1920
|
+
node-owned foreign changes and nested contributions. Inherited parent history
|
|
1921
|
+
is excluded. An empty completed node contributes nothing; missing or ambiguous
|
|
1922
|
+
completion evidence does not mean empty. The newest build generation is used,
|
|
1923
|
+
with ties diagnosed rather than falling back to older successful work.
|
|
1924
|
+
|
|
1925
|
+
The existing cascade supplies ancestor changes to descendants. Sibling changes
|
|
1926
|
+
wait for their node to land in the common ancestor and cascade into the target;
|
|
1927
|
+
descendant changes wait for their node to land into the target ancestor. Same-node
|
|
1928
|
+
landings satisfy presence directly. Unknown evidence leaves source work queued,
|
|
1929
|
+
with diagnostics naming the blocker and destination. Blockers with no build,
|
|
1930
|
+
and repositories without nodes, retain source done-state resolution. Presence
|
|
1931
|
+
is checked only at claim, with the sampled destination revalidated before claim;
|
|
1932
|
+
later movement never interrupts an existing build.
|
|
1933
|
+
|
|
1848
1934
|
**Crash-safe filing.** Creation supports a state override (harvest targets
|
|
1849
1935
|
Triage explicitly) and an idempotency key that must adopt the same ticket on
|
|
1850
1936
|
retry across process restarts. Ticket projections may carry this stable
|
|
@@ -1855,6 +1941,197 @@ ordering, not provider behavior, is what makes filing crash-safe. Dispatch
|
|
|
1855
1941
|
uses the key only to withhold unfinished Autobuild creates; its absence fails
|
|
1856
1942
|
open for legacy/plugin tickets and introduces no new readiness gate.
|
|
1857
1943
|
|
|
1944
|
+
### 13.1 Node tickets and targets
|
|
1945
|
+
|
|
1946
|
+
Tickets have `kind = "work"` by default, or `kind = "node"` for a named
|
|
1947
|
+
integration point. The optional `target` is a node ticket id in the same source;
|
|
1948
|
+
omission means the configured `baseBranch` root. Nodes may target other nodes.
|
|
1949
|
+
A ready node ticket opens an integration build on `ab-node/<slug>`, cut
|
|
1950
|
+
from its parent's sampled head. Opening intent and acknowledgement are durable;
|
|
1951
|
+
the branch is open to targeting tickets immediately, without a PR. Idle integration
|
|
1952
|
+
builds use no provisioned workspace, runner, execution lease, or dispatch capacity.
|
|
1953
|
+
An empty node has no PR and reports `integration`, `target`, and `empty`.
|
|
1954
|
+
Once it holds commits its current parent lacks, the dispatcher opens or adopts
|
|
1955
|
+
its PR. No placeholder commit is created; parent-only advancement is still empty.
|
|
1956
|
+
|
|
1957
|
+
Claims targeting an open node freeze its build identity and branch as their base.
|
|
1958
|
+
Their PR, landing and reconcile all use that frozen base, even after source
|
|
1959
|
+
metadata changes. Missing, unopened, landed, closed or aborted targets remain
|
|
1960
|
+
queued with a diagnostic. The newest generation wins; a closed generation never
|
|
1961
|
+
falls back to an older open one. Blockers remain a separate graph.
|
|
1962
|
+
|
|
1963
|
+
A node is complete when exhaustive native ticket enumeration finds no unresolved
|
|
1964
|
+
ticket targeting it, no unsettled frozen child claim remains, and a landed
|
|
1965
|
+
contribution is durably known. Triage, backlog and ready children keep it open;
|
|
1966
|
+
done and cancelled children do not. Listing diagnostics fail closed. Completeness
|
|
1967
|
+
is sampled again before verification and publication. Source edits cannot be
|
|
1968
|
+
transactional with a forge write.
|
|
1969
|
+
|
|
1970
|
+
The kernel verifies the exact node head and sampled parent with all configured
|
|
1971
|
+
verify steps and normal path applicability. A moved head or parent invalidates
|
|
1972
|
+
eligibility, including a clean restack. Failure blocks the node; file a repair
|
|
1973
|
+
child targeting it. Repair children remain admissible, and their landed head
|
|
1974
|
+
supersedes the failed cycle. Reports retain their actual head/base citations.
|
|
1975
|
+
|
|
1976
|
+
Landing follows ordered `[[landing]]` rules (§15.7), defaulting to node consent.
|
|
1977
|
+
Auto mode authorizes complete, verified nodes; consent mode waits for `ab land`.
|
|
1978
|
+
Land refuses incomplete nodes and names open children; `ab hold` remains available.
|
|
1979
|
+
Node parents and local-git roots receive guarded fast-forwards, preserving one
|
|
1980
|
+
commit and identity trailer per contributing build. GitHub shared roots use the
|
|
1981
|
+
PR rebase endpoint guarded on verified head, after a final parent freshness read.
|
|
1982
|
+
Authoritative enforced up-to-date protection records fenced landing; uncertainty
|
|
1983
|
+
records unfenced landing and triggers immutable landed-tree comparison. A mismatch
|
|
1984
|
+
raises operator attention and never rewrites the shared parent.
|
|
1985
|
+
The repository build digest carries an additive optional pending-audit signal from
|
|
1986
|
+
`integration.landed` with an operation until `integration.audited` settles it.
|
|
1987
|
+
Settled nodes without that signal require no full build reads; completion does
|
|
1988
|
+
not suppress retries for an outstanding audit. Pending audits
|
|
1989
|
+
survive completion. Merge gates are never bypassed; unsupported transports defer.
|
|
1990
|
+
|
|
1991
|
+
Human forge merges are an explicit escape hatch, even while incomplete, paused
|
|
1992
|
+
or unverified. The janitor records human provenance and whether the actual merged
|
|
1993
|
+
head had a successful cycle, then completes the node ticket.
|
|
1994
|
+
Closing without merge or aborting closes admission and returns the ticket to
|
|
1995
|
+
triage; children already claimed retain their frozen base. Nested nodes work.
|
|
1996
|
+
A forge plugin needs node branch creation, comparison and
|
|
1997
|
+
head-read capabilities to admit node tickets.
|
|
1998
|
+
|
|
1999
|
+
**Changing a node's parent.** Updating an open node ticket's target moves it to
|
|
2000
|
+
another open node generation, or to the configured root when cleared. The node
|
|
2001
|
+
branch replays only its contribution above the last completed boundary onto the
|
|
2002
|
+
new parent. Former-parent-only history is excluded; owned foreign changes and
|
|
2003
|
+
source build identities survive. Existing review identity is retained and its PR
|
|
2004
|
+
base changes after branch publication. Empty and same-head moves need no new
|
|
2005
|
+
commit or PR. Descendants keep targeting the moved node and follow its head
|
|
2006
|
+
through the ordinary cascade, including source-aware conflict reconciliation.
|
|
2007
|
+
|
|
2008
|
+
A supported ticket mutation records `node.parent-requested` before the provider
|
|
2009
|
+
write under node writer authority. The dispatcher reads back the source and
|
|
2010
|
+
records `node.parent-accepted` with old/new target, branch, destination build
|
|
2011
|
+
generation and observed ticket revision. Only acceptance changes the effective
|
|
2012
|
+
node ancestry; `build.created` and `node.opening` remain historical provenance.
|
|
2013
|
+
Replay completion, `node.parent-pr-retargeted`, and `node.parent-completed`
|
|
2014
|
+
acknowledge independent effects. Pending requests and accepted moves fence
|
|
2015
|
+
verification and landing, and keep both old and new parents incomplete. Leases
|
|
2016
|
+
alone do not represent outstanding work. Recovery rereads ambiguous writes,
|
|
2017
|
+
cancels unconfirmed requests, resumes frozen replay, and retries PR retargeting
|
|
2018
|
+
without replaying unrelated ticket edits. Later edits wait for the reserved
|
|
2019
|
+
operation to settle. Native auto-merge is cancelled before changing the base.
|
|
2020
|
+
Accepted node re-parenting revokes prior land consent through the recorded
|
|
2021
|
+
`node.parent-accepted` fact. Holds survive. Readiness evaluates landing policy
|
|
2022
|
+
against the new effective parent before another landing can proceed.
|
|
2023
|
+
|
|
2024
|
+
Parent identity changes invalidate eligibility even at identical SHAs; historical
|
|
2025
|
+
verification evidence remains immutable.
|
|
2026
|
+
|
|
2027
|
+
Self/ancestor cycles (including pending effective ancestry), unopened or terminal
|
|
2028
|
+
destination generations, landing/closing sources and unsupported forge retargeting
|
|
2029
|
+
are refused with a reason. Busy writer reservations defer external changes and
|
|
2030
|
+
refuse synchronous mutations. Direct provider edits receive durable, revision-
|
|
2031
|
+
deduplicated `node.parent-rejected` diagnostics when invalid, preserving effective
|
|
2032
|
+
ancestry. Restoring the effective target records `node.parent-rejection-cleared`,
|
|
2033
|
+
removing the current refusal while retaining its historical fact. Rejection deduplication
|
|
2034
|
+
compares revision, target and reason independently of persistence key order.
|
|
2035
|
+
Missing source reads withhold parent acceptance; ordinary cascade and PR handling
|
|
2036
|
+
continue against durable effective ancestry. Accepted moves finish their reserved
|
|
2037
|
+
Git and PR effects independently of tracker availability. A PR merged or closed
|
|
2038
|
+
by a human follows ordinary terminal handling. Changing a claimed work ticket's target is
|
|
2039
|
+
refused before any combined patch is written: abort and re-dispatch is the
|
|
2040
|
+
supported path. Unclaimed tickets retain ordinary target editing.
|
|
2041
|
+
|
|
2042
|
+
**Descendant cascade and node writers.** Every open node observes its effective
|
|
2043
|
+
parent branch and its own authoritative head. Parent movement schedules a
|
|
2044
|
+
multi-change restack, including for an empty node with no PR. Publications flow
|
|
2045
|
+
down the tree on subsequent dispatcher polls, to arbitrary depth; clean replay
|
|
2046
|
+
starts no agent and consumes no runner capacity. Observations coalesce after the
|
|
2047
|
+
active frozen transaction completes. Leaf children retain their verify-entry and
|
|
2048
|
+
awaiting-landing restack rules. Existing integration PR numbers and bases survive
|
|
2049
|
+
rewrites; an empty node never creates a placeholder PR.
|
|
2050
|
+
|
|
2051
|
+
Node branches have one writer at a time. A distinct mutable node writer lease
|
|
2052
|
+
(serialized independently of runner execution leases) guards both restacks and
|
|
2053
|
+
controlled child landings. A revision-checked `node.writer-reserved` fact freezes
|
|
2054
|
+
the operation, original expected head, parent snapshot, previous contribution
|
|
2055
|
+
boundary, immutable archives, ordered changes, and merge proofs. Expiry permits
|
|
2056
|
+
recovery of that reservation, never an incompatible operation. Each change has
|
|
2057
|
+
prepared, conflicted, or replayed receipts. Resolved objects are retained in the
|
|
2058
|
+
BuildStore before their receipts. `node.publish-intended`, `node.rewritten`, and
|
|
2059
|
+
`node.writer-settled` distinguish intent, proven effect, and completion. Exact
|
|
2060
|
+
expected-head replacement and immutable archive refs preserve displaced history;
|
|
2061
|
+
contention retains the previous contribution boundary and retries the complete
|
|
2062
|
+
observed contribution. An untagged commit, including an empty commit, is foreign.
|
|
2063
|
+
`node.inventory` reports reachable build identities separately from node-owned
|
|
2064
|
+
foreign commits above the durable boundary; inherited foreign history is excluded
|
|
2065
|
+
from the owned count.
|
|
2066
|
+
|
|
2067
|
+
Only a conflicted replay item attaches the integration build's reconcile runner.
|
|
2068
|
+
Its context names the integration owner separately from the original source
|
|
2069
|
+
build and supplies that source's pinned spec, approved plan and implement-notes.
|
|
2070
|
+
Missing source artifacts or invalid identities escalate. Foreign conflicts supply
|
|
2071
|
+
commit metadata and a diff, with escalation when intent is unclear. Completion
|
|
2072
|
+
validates exactly one commit on that item's replay base, retaining its original
|
|
2073
|
+
identity or foreign status. The agent never publishes the stack; the dispatcher
|
|
2074
|
+
resumes only after session and execution settlement. Automatic landing policy
|
|
2075
|
+
remains outside this grammar.
|
|
2076
|
+
|
|
2077
|
+
**Foreign merge safety for node replay.** A node contribution is enumerated
|
|
2078
|
+
oldest first along first-parent history above its durable previous contribution
|
|
2079
|
+
base (initially the opening SHA). Parent movement never makes inherited foreign
|
|
2080
|
+
commits into node-owned contributions. The boundary advances only on confirmed
|
|
2081
|
+
restack completion.
|
|
2082
|
+
|
|
2083
|
+
Before replaying any contribution or publishing a replacement, preflight every
|
|
2084
|
+
merge against the frozen new parent's full reachable build identity set. For
|
|
2085
|
+
each merge, inspect the union reachable from every non-first parent but not the
|
|
2086
|
+
first parent, including nested side history. Flattening is allowed only when
|
|
2087
|
+
the merge itself has no terminal `Autobuild-Build` trailer and every side-history
|
|
2088
|
+
identity is already reachable through the sampled parent, regardless of commit
|
|
2089
|
+
SHA. The safe merge becomes one linear foreign change carrying its first-parent
|
|
2090
|
+
delta, including merge-resolution content and an empty result when necessary;
|
|
2091
|
+
its side identities remain inherited from the parent.
|
|
2092
|
+
|
|
2093
|
+
A merge carrying its own identity is anomalous: the kernel never creates merges,
|
|
2094
|
+
and legacy reconcile merges were squashed at landing. It is refused regardless
|
|
2095
|
+
of side-history safety. Never strip, move or reinterpret its identity trailer.
|
|
2096
|
+
An absent upstream side identity, ambiguous or malformed identity, or an
|
|
2097
|
+
identity-bearing merge refuses the entire restack before replay or publication.
|
|
2098
|
+
Leave the public node branch untouched and escalate on the integration build,
|
|
2099
|
+
naming each offending merge and its missing or own build identities. The kernel
|
|
2100
|
+
never preserves merge topology or automatically decomposes a foreign merge.
|
|
2101
|
+
Refusal never promotes the contribution boundary; an authorized later retry
|
|
2102
|
+
samples the parent anew and repeats the proof.
|
|
2103
|
+
|
|
2104
|
+
Use `ab ticket create "Integration" --body spec.md --kind node`, then
|
|
2105
|
+
`ab ticket update <id> --target <node-id>`. Clear a target with `--no-target`;
|
|
2106
|
+
reset kind with `--kind work`. Omitted fields preserve existing values.
|
|
2107
|
+
`ab ticket show <id> [--json]` exposes both fields; `ab ticket tree [--json]`
|
|
2108
|
+
shows the configured root and every ticket, including completed work and empty
|
|
2109
|
+
nodes, nested by target with state. Siblings are sorted by id. Invalid external
|
|
2110
|
+
graphs and listing diagnostics are reported explicitly.
|
|
2111
|
+
|
|
2112
|
+
Targets must exist and be nodes in the configured source. Self-targeting,
|
|
2113
|
+
ancestor cycles and demoting a node with targeting tickets are refused before
|
|
2114
|
+
any part of the requested update is written, regardless of ticket state.
|
|
2115
|
+
Clear or reparent its children before demotion. File frontmatter persists the
|
|
2116
|
+
fields; `ab ticket edit` displays them read-only. Change them through update.
|
|
2117
|
+
Kind and target participate in content revisions and revision-checked writes.
|
|
2118
|
+
File writes retain their existing best-effort, unlocked concurrency semantics.
|
|
2119
|
+
|
|
2120
|
+
Linear uses the exact `node` issue label for kind and the parent relation for
|
|
2121
|
+
target, only when the parent carries that label. Ordinary grouping parents do
|
|
2122
|
+
not impose targets and survive unrelated updates. Explicit target clear clears
|
|
2123
|
+
the parent relation. Label replacements can demote nodes and receive the same
|
|
2124
|
+
guards; explicit kind and label instructions must agree about `node`. Label
|
|
2125
|
+
and parent connections are fully paginated. Linear still refuses guarded writes.
|
|
2126
|
+
|
|
2127
|
+
Hosted sources support kind and target with project-scoped transactional validation.
|
|
2128
|
+
Existing tickets default to work with no target. Metadata changes increment the
|
|
2129
|
+
revision once; equivalent aliases and unchanged values do not. Node demotion
|
|
2130
|
+
checks all targeting tickets, including completed work. Legacy plugins without
|
|
2131
|
+
integrationTree support read as work with no target and refuse metadata writes.
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
|
|
1858
2135
|
## 14. Operator UI
|
|
1859
2136
|
|
|
1860
2137
|
The UI layer is defined by the seam, not any implementation: **subscribe to
|
|
@@ -1899,15 +2176,48 @@ signal, and error evidence. `--plain`, non-TTY,
|
|
|
1899
2176
|
and `--once` kernel semantics remain the line-oriented/direct compatibility
|
|
1900
2177
|
path; `--once` still performs one tick and drains its in-flight work.
|
|
1901
2178
|
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
2179
|
+
Interactive watch presentation enables xterm focus reporting (mode 1004) only
|
|
2180
|
+
while it owns terminal input. Local-store reads keep the same cadence regardless
|
|
2181
|
+
of focus. Network stores (remote HTTP and Postgres) use 5-second polling while
|
|
2182
|
+
unfocused, including session feeds and automatic session recovery. Focus-in
|
|
2183
|
+
refreshes immediately. Terminals that send no reports remain focused. Every operator key requests an immediate refresh
|
|
2184
|
+
unless one is already running and holds the 500 ms cadence for at least 30
|
|
2185
|
+
seconds while focused (or on a local store). Otherwise retained nonterminal
|
|
2186
|
+
builds (including abort cleanup) use 500 ms polling and an empty dashboard uses 5 seconds. Cached elapsed counters
|
|
2187
|
+
may repaint without reads. Focus never pauses the dispatcher kernel. Job-control
|
|
2188
|
+
suspension restores owned terminal modes and raw input before stopping; resume
|
|
2189
|
+
reenables them, assumes focus, and refreshes immediately. Teardown disables focus
|
|
2190
|
+
reporting even when no frame painted, with synchronous process restoration for
|
|
2191
|
+
catchable faults. Plain, non-TTY, and once runs never enable focus reporting.
|
|
2192
|
+
|
|
2193
|
+
Interactive frames first read `BuildStore.getRepoChangePosition(repo)`, a canonical
|
|
2194
|
+
unsigned decimal string used only for invalidation. Unknown repositories return
|
|
2195
|
+
`"0"` without creating state. Each repository's durable position advances in the
|
|
2196
|
+
same transaction as build creation, build/repository event insertion (including
|
|
2197
|
+
artifact-backed and tick writes), or a stored dispatcher lease holder transition.
|
|
2198
|
+
Other repositories, failed writes, denied claims, same-holder renewals, heartbeats,
|
|
2199
|
+
and passive expiry do not advance it. It is separate from journal sequence cursors.
|
|
2200
|
+
Unchanged positions reuse the complete presentation snapshot; an ordinary refresh, focused or unfocused,
|
|
2201
|
+
then makes exactly one store request. Discovery uses required exact-repo
|
|
2202
|
+
`listBuildsForRepo(repo)`, never a global listing. Initial hydration, position or
|
|
2203
|
+
configuration changes, and at most ten seconds between full reads refresh the
|
|
2204
|
+
snapshot, including mutable lease/stream/artifact/ticket enrichment. Failed or
|
|
2205
|
+
cancelled reads do not acknowledge the sampled position. Open session feeds poll
|
|
2206
|
+
independently; kernel ticks and watch/wait retain their existing reads.
|
|
2207
|
+
|
|
2208
|
+
SQLite installs an additive counter table and transactional triggers on open.
|
|
2209
|
+
PostgreSQL installs the corresponding additive table/functions/triggers through
|
|
2210
|
+
explicit migration before deploying the new service; the core schema version
|
|
2211
|
+
and checksum stay unchanged. Existing data starts at zero, with no replay or
|
|
2212
|
+
backfill, and migration reruns preserve counters. Hosted reads use one GET
|
|
2213
|
+
`/repos/:repo/change-position` returning only `{ position: string }`, and
|
|
2214
|
+
`/repos/:repo/builds` returns scoped build records. Both routes authorize the
|
|
2215
|
+
repository before reading and support repositories with builds but no journal.
|
|
2216
|
+
|
|
2217
|
+
Durable operator settings (intake, repository pause, harvest gate) survive
|
|
2218
|
+
restarts through the repository journal. Per-landing hold and land commands
|
|
2219
|
+
live in the build log. Landing policy is declarative dispatcher configuration
|
|
2220
|
+
(§15.7); there is no writable repository auto-merge default.
|
|
1911
2221
|
|
|
1912
2222
|
The **operator sandbox** is the third execution kind beside build and harvest
|
|
1913
2223
|
executions: a persistent, credential-free, per-operator-per-repository
|
|
@@ -2030,7 +2340,15 @@ rejection is `EventValidationError`.
|
|
|
2030
2340
|
4. **[D3] Code travels through the Forge, never the store.**
|
|
2031
2341
|
`implement.completed` pushes the branch; events carry commit SHAs only.
|
|
2032
2342
|
This is what makes cross-sandbox resume work (§15.6-C) and keeps the
|
|
2033
|
-
store lean.
|
|
2343
|
+
store lean. SHAs are momentary evidence, not change identity: a forge
|
|
2344
|
+
or future history rewrite can mint a new object id for the same change.
|
|
2345
|
+
The immutable build slug in the landed commit's terminal Git trailer
|
|
2346
|
+
`Autobuild-Build: <slug>` identifies the build's change across such rewrites
|
|
2347
|
+
(RFC 0001 §5). Branch presence is determined by exact parsed trailer values
|
|
2348
|
+
in reachable history, not recorded SHA ancestry. Kernel-owned single-change
|
|
2349
|
+
replay, durable rewrite facts and immutable forge archive refs preserve
|
|
2350
|
+
historical SHAs (§15.7); the original no-rebase rationale does not prohibit
|
|
2351
|
+
this archived replay standard.
|
|
2034
2352
|
5. **Append-only; corrections are new events.**
|
|
2035
2353
|
6. **Liveness is not history.** Heartbeats and runner leases are mutable
|
|
2036
2354
|
columns on the `builds` table, never events — they would drown the log.
|
|
@@ -2057,14 +2375,16 @@ with illustrative members:
|
|
|
2057
2375
|
| Family | Examples |
|
|
2058
2376
|
|---|---|
|
|
2059
2377
|
| Build lifecycle | `build.created` (carrying `assets`, the claim-time pin, §6.3), `workspace.provisioned`, `workspace.released`, `execution.started`, `execution.ended`, `infrastructure.failed`, `infrastructure.cleanup-attempted`, `dispatch.comment-posted`, `dispatch.failed`, `runner.attached`, `runner.setup-failed`, `abort.remote-branch-deleted`, `abort.local-branch-deleted`, `abort.ticket-returned`, `build.completed` |
|
|
2060
|
-
| Operator commands [D2] | `build.pause-requested` → `build.paused`; `build.discard-requested`; `build.
|
|
2378
|
+
| Operator commands [D2] | `build.pause-requested` → `build.paused`; `build.discard-requested`; `build.hold-requested`; `build.land-requested` → `landing.command-acknowledged`; `escalation.answered` (optionally carrying a validated `reviewRoundCeiling`, or the `assets` sampled with a revise-from-ticket authorization) |
|
|
2379
|
+
| Landing policy | `landing.decided` (candidate, matched rule/default, labels, target, mode); `landing.native-enable-started`; `landing.native-applied` |
|
|
2061
2380
|
| Spec | `spec.imported`, `spec.authored`, `spec.revised` (optionally carrying `assets`, a re-pin of the ticket's assets, §6.3) |
|
|
2062
2381
|
| Sessions | `session.started`; `session.ended` with transcript ref and usage (ordinary completion — the analysis corpus), or `session.ended {outcome: reclaimed, reclaimedBy: {instance, resumedFromSeq}}` (explicit transcriptless takeover) |
|
|
2063
2382
|
| Plan/code loops | `plan.started` … `plan-review.verdict`; `implement.started` … `code-review.verdict` |
|
|
2064
|
-
| Verify/finalize | `verify.started {step, attempt, feedback?}`, `verify.completed {step, outcome, skipCause?}`, `verify.reconcile-policy-captured {reconcileSeq, steps}`, `finalize.completed {pr}`, `finalize.step-started {step}`, `finalize.step-completed {step, ok, headSha?}` |
|
|
2383
|
+
| Verify/finalize | `verify.started {step, attempt, feedback?, baseSha?, headSha?, restackId?}`, `verify.completed {step, outcome, skipCause?, baseSha?, headSha?, restackId?}`, `verify.reconcile-policy-captured {reconcileSeq, steps}`, `finalize.completed {pr}`, `finalize.step-started {step}`, `finalize.step-completed {step, ok, headSha?}` |
|
|
2065
2384
|
| PR summary | Kernel-authored `pr-summary.requested {occurrence, boundary}`, `pr-summary.attempted {occurrence, boundary, pr}`, `pr-summary.result {attempt, outcome, eligibleAfter?}`, `pr-summary.settled {request, disposition}`; sequence identities correlate durable starts, completed boundaries, attempts, and handoffs (§7.5) |
|
|
2066
2385
|
| PR attachments | `pr-attachment.designated`, `pr-attachment.hosted`, `pr-attachment.reclaimed`, `pr-attachment.reclaim-failed` |
|
|
2067
|
-
|
|
|
2386
|
+
| Leaf restacking | `target.moved {branch, sha}`, `restack.prepared`, `restack.replayed`, `restack.publish-intended`, `restack.rewritten`, `restack.contended`, `restack.completed` |
|
|
2387
|
+
| Post-PR [D1] | `pr.merged`, `pr.conflicted`, `reconcile.progress-checked`, `reconcile.started`, `reconcile.prepared`, `reconcile.replayed`, `reconcile.publish-intended`, `reconcile.rewritten`, `reconcile.contended`, `reconcile.completed` |
|
|
2068
2388
|
| Cross-cutting | `observation.recorded`, `escalation.raised`, `phase.failed` |
|
|
2069
2389
|
| Repository journal | dispatcher setting facts; run lifecycle, effective config, tick/queue diagnostics, reload and runner outcomes; the `harvest.*` workflow, recovery, and ledger facts |
|
|
2070
2390
|
|
|
@@ -2081,7 +2401,7 @@ missing Forge capabilities or outages leave the remainder due on the next tick.
|
|
|
2081
2401
|
One deliberate subtlety worth recording: `pr.conflicted.baseSha` is
|
|
2082
2402
|
detection-time evidence, while `reconcile.progress-checked.baseSha` is the
|
|
2083
2403
|
kernel's authoritative observation for deciding whether a completed attempt
|
|
2084
|
-
made progress and `reconcile.started.baseSha` is the separately refreshed
|
|
2404
|
+
made progress and `reconcile.started.baseSha` is the separately refreshed replay
|
|
2085
2405
|
target for the next attempt. Agent context uses only the started fact, so a
|
|
2086
2406
|
reconcile never runs against a persisted or known-stale observation.
|
|
2087
2407
|
|
|
@@ -2108,7 +2428,30 @@ chain survives `policy.stallRounds` rounds.
|
|
|
2108
2428
|
|
|
2109
2429
|
### 15.5 Derived state (the reducer)
|
|
2110
2430
|
|
|
2111
|
-
|
|
2431
|
+
A nonterminal integration with `node.opened` derives `collecting` (below paused
|
|
2432
|
+
and blocked in precedence); it requires no attached runner. Empty/holding changes
|
|
2433
|
+
comes from `node.compared`, independently of admission openness. Integration
|
|
2434
|
+
identity and target are immutable claim-time facts in `build.created`;
|
|
2435
|
+
historical absence means work/root. The resolved `baseBranch` stays frozen.
|
|
2436
|
+
|
|
2437
|
+
`node.opening {branch, parent, sha}` is the dispatcher's durable mutation intent.
|
|
2438
|
+
`node.opened {sha}` acknowledges creation or adoption without resetting advanced
|
|
2439
|
+
history. `node.compared {parentSha, headSha, ahead}` retains a changed observation;
|
|
2440
|
+
only positive ahead counts permit creating a PR. `pr.opened {pr}` records its
|
|
2441
|
+
identity without a fabricated finalize completion. All four facts are
|
|
2442
|
+
dispatcher-authored. Existing merged/closed PR, abort and completion facts close admission.
|
|
2443
|
+
|
|
2444
|
+
Node transaction state reduces `node.writer-reserved`, `node.item-prepared`,
|
|
2445
|
+
`node.item-conflicted`, `node.item-replayed`, `node.publish-intended`,
|
|
2446
|
+
`node.rewritten`, `node.writer-settled`, and `node.inventory` (§13.1 integration
|
|
2447
|
+
cascade). It retains the previous contribution boundary, latest parent
|
|
2448
|
+
observation, complete replay prefix, active source item and merge proofs.
|
|
2449
|
+
A rewrite receipt alone never promotes the boundary; only completed settlement
|
|
2450
|
+
does. CLI status exposes pending/active work, reachable build identities and
|
|
2451
|
+
node-owned foreign changes. A node stays `collecting` while its narrow reconcile
|
|
2452
|
+
runner is attached; it does not acquire a leaf pipeline.
|
|
2453
|
+
|
|
2454
|
+
`status ∈ queued | running | collecting | paused | blocked | done | aborted`, plus
|
|
2112
2455
|
`{phase, round, openEscalations[], reviewRoundCeilings?, pr?, autoMerge,
|
|
2113
2456
|
lastEvent}`. `blocked` ≡ an `escalation.raised` without a matching
|
|
2114
2457
|
`escalation.answered`, matched by id. `reviewRoundCeilings` projects valid
|
|
@@ -2163,9 +2506,9 @@ finalize.started → pr-attachment.hosted{designationSeq,asset} → finalize.com
|
|
|
2163
2506
|
|
|
2164
2507
|
**Interrupted dispatch:** if the log stops after `build.created`, a later
|
|
2165
2508
|
ordinary dispatcher tick provisions the workspace, atomically imports the spec,
|
|
2166
|
-
posts the ticket notice once, and launches the runner.
|
|
2167
|
-
|
|
2168
|
-
|
|
2509
|
+
posts the ticket notice once, and launches the runner. New claims do not
|
|
2510
|
+
materialize auto-merge-default attribution as a human request. Landing policy
|
|
2511
|
+
is recorded at readiness; consent is an explicit land command. A failed boundary appends `dispatch.failed
|
|
2169
2512
|
{stage,attempt,error}` and stays queued for another tick until its budget is
|
|
2170
2513
|
exhausted. Dispatch failures share a `[policy].maxDispatchAttempts` budget
|
|
2171
2514
|
(default 3) across
|
|
@@ -2311,7 +2654,7 @@ wins harmlessly.
|
|
|
2311
2654
|
|
|
2312
2655
|
Walking the happy path exposed a gap in the grammar: `finalize` creates the
|
|
2313
2656
|
PR, but *something* must watch it to merge/close, release the workspace, and
|
|
2314
|
-
emit `build.completed`.
|
|
2657
|
+
emit `build.completed`. Autobuild makes it a deterministic **janitor duty of the
|
|
2315
2658
|
dispatcher** (which already polls on cron): it checks open PRs for its
|
|
2316
2659
|
builds, emits `pr.merged`/`pr.closed`/`pr.conflicted`, releases workspaces,
|
|
2317
2660
|
and completes builds. Destructive discard, abort, and terminal-PR cleanup defer
|
|
@@ -2322,24 +2665,181 @@ correlated facts; a failed delete remains pending and retries on later ticks,
|
|
|
2322
2665
|
including after the build is already done. A merged-PR fixup request is a *new
|
|
2323
2666
|
ticket*, never a reopened build.
|
|
2324
2667
|
|
|
2325
|
-
**Merge standard: one
|
|
2326
|
-
|
|
2327
|
-
- **PR →
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2668
|
+
**Merge standard: one change per build, replay at reconcile.**
|
|
2669
|
+
|
|
2670
|
+
- **Root-target leaf PR → configured root: squash merge.** One commit per
|
|
2671
|
+
leaf build keeps the root linear. Node-target children and nodes landing into
|
|
2672
|
+
local-git roots use guarded fast-forwards; GitHub root nodes use guarded PR
|
|
2673
|
+
rebase merge with fencing/audit provenance (§13.1), preserving contributions.
|
|
2674
|
+
- **Conflicted build → refreshed base: restack.** The kernel collapses the
|
|
2675
|
+
contribution relative to its effective diff base into one commit with the
|
|
2676
|
+
original head's exact tree, then replays that change onto the freshly captured
|
|
2677
|
+
`reconcile.started.baseSha`. The result has exactly one parent equal to that
|
|
2678
|
+
frozen SHA and one `Autobuild-Build: <slug>` identity trailer, including when
|
|
2679
|
+
the resolved change is empty. No reconcile creates a merge commit.
|
|
2680
|
+
|
|
2681
|
+
This reverses the original rebase ban [D1, D3]. Replaying many WIP commits caused
|
|
2682
|
+
repeated conflict loops; replaying one net change resolves the conflict once.
|
|
2683
|
+
Rewrites used to sever event-recorded SHAs; immutable archives and durable
|
|
2684
|
+
rewrite facts retain them. Ordinary per-WIP-commit rebase remains inappropriate.
|
|
2685
|
+
Existing historical merge reconciliations retain their original replay/display
|
|
2686
|
+
semantics and supply the promoted contribution base for a later restack. Resumed
|
|
2687
|
+
builds use current engine routing at newly reached replay and landing boundaries;
|
|
2688
|
+
there is no claim-version guarantee that in-flight builds finish under the old
|
|
2689
|
+
merge standard. Execution configuration remains pinned, while landing policy
|
|
2690
|
+
is live dispatcher configuration. Operators requiring old execution behavior
|
|
2691
|
+
should drain work before upgrading rather than run mixed-version writers.
|
|
2692
|
+
|
|
2693
|
+
Before branch replacement the kernel publishes Git tips named by retained
|
|
2694
|
+
history and rewrite facts, plus both heads and the temporary change, under immutable non-branch refs
|
|
2695
|
+
`refs/autobuild/archive/<slug>/<sha>`. Archives must be fetchable by exact ref;
|
|
2696
|
+
namespace or permission failures stop publication without a branch/tag fallback.
|
|
2697
|
+
Publication requests and loss records alone are not retained Git history: their
|
|
2698
|
+
unpublished objects may have died with a released sandbox. A separately published
|
|
2699
|
+
or reviewed tip remains an archive requirement even when an earlier request named
|
|
2700
|
+
that same SHA.
|
|
2701
|
+
The branch replacement uses an explicit expected-old-head guard. A lost lease
|
|
2702
|
+
fetches the observed contribution and prepares another correlated transaction on
|
|
2703
|
+
the same occurrence's frozen base, preserving external work; deleted, divergent,
|
|
2704
|
+
or ambiguous history requires operator resolution. It never changes the target
|
|
2705
|
+
because upstream advances during contention. Only a later conflict occurrence
|
|
2706
|
+
captures a new base. Replay occurs detached, leaving the named branch untouched
|
|
2707
|
+
until publication. Confirmed publication reattaches the matching workspace HEAD
|
|
2708
|
+
to the build branch so a later verify → implement cycle can publish normally.
|
|
2709
|
+
Missing third-party forge capabilities refuse actionably.
|
|
2710
|
+
|
|
2711
|
+
Automatic leaf transactions use `restack.*`, independently of reconcile attempt
|
|
2712
|
+
numbers. Preparation freezes the trigger, verify-cycle boundary, absorbed target
|
|
2713
|
+
observation, old base/head, target base, single-change commit, workspace/local
|
|
2714
|
+
branch tips and canonical message. Publication intent precedes guarded replacement;
|
|
2715
|
+
`restack.rewritten` retains archives and proven writes even if readback observes a
|
|
2716
|
+
later writer. Completion requires confirmed publication. Clean transactions start
|
|
2717
|
+
no agent and do not fabricate `reconcile.completed`. A conflicted replay is adopted
|
|
2718
|
+
by `reconcile.started {restackId}` without another collapse or target selection.
|
|
2719
|
+
Resolver completion links back to the automatic transaction. Retained commit bytes
|
|
2720
|
+
and replay object packs recover disposable-workspace objects before publication.
|
|
2721
|
+
|
|
2722
|
+
`reconcile.prepared` records transaction identity, attempt, branch, old head,
|
|
2723
|
+
effective old base, target base and temporary single-change SHA before checkout.
|
|
2724
|
+
Before that fact is appended, the exact temporary commit bytes are deposited as a
|
|
2725
|
+
SHA-keyed BuildStore artifact. A replacement sandbox restores and verifies the
|
|
2726
|
+
same object from those bytes, retaining the original transaction and frozen base
|
|
2727
|
+
without requiring prepare-time remote write credentials. Retained trees and
|
|
2728
|
+
parents supply the rest of its object graph; trusted publication still archives
|
|
2729
|
+
the temporary commit before replacing the branch.
|
|
2730
|
+
`reconcile.replayed` records whether replay conflicted. Notes and the resolved
|
|
2731
|
+
head are deposited with `reconcile.publish-intended` before publication.
|
|
2732
|
+
`ab done` records a publication request; local kernels wait for the resolver
|
|
2733
|
+
session to end and remote kernels wait for guest teardown before replacement;
|
|
2734
|
+
`reconcile.rewritten` records old/new heads, old/new change SHAs, frozen base,
|
|
2735
|
+
conflict outcome and archive refs after confirmed publication. A successful CAS
|
|
2736
|
+
that is overtaken before readback still records its receipt, with `observedHead`
|
|
2737
|
+
naming the later head (or null for deletion). That observed head informs recovery;
|
|
2738
|
+
it does not complete reconcile or promote the verification base. Intent recovery
|
|
2739
|
+
can recognize an overtaken candidate newly introduced into the observed branch
|
|
2740
|
+
history, while a candidate already present in the expected old history is not
|
|
2741
|
+
evidence of a new write. New completion is
|
|
2742
|
+
`{headSha, rewriteId, artifact}`; historical `{mergeCommit, artifact}` remains
|
|
2743
|
+
valid. Remote requests carry identical transaction inputs and use the provider's
|
|
2744
|
+
trusted rewrite/archive capability only after execution teardown. Contention is
|
|
2745
|
+
recorded durably and uses the existing runner-failure bound, without spending
|
|
2746
|
+
unchanged-base no-progress budget before completion.
|
|
2747
|
+
|
|
2748
|
+
**Stable landed identity.** A root-target leaf kernel landing remains one squash commit and
|
|
2749
|
+
preserves the forge's existing message except for normalizing terminal build
|
|
2750
|
+
identity trailers to exactly one final `Autobuild-Build: <immutable slug>`.
|
|
2751
|
+
Implementation commits and deposited PR descriptions are unchanged. The janitor
|
|
2752
|
+
records `pr.merged { sha, buildTrailerPresent? }` from the actual landed message,
|
|
2753
|
+
including human landings. True and false are successful observations; historical
|
|
2754
|
+
logs, unsupported inspection, and transient read failures leave evidence absent.
|
|
2755
|
+
A failed inspection records an actionable observation and never blocks merge
|
|
2756
|
+
completion. This evidence does not change reduction or display semantics.
|
|
2757
|
+
|
|
2758
|
+
A node-target child landing instead fast-forwards its already canonical
|
|
2759
|
+
single-change commit, preserving exactly one terminal source-build identity.
|
|
2760
|
+
The guarded destination write is authoritative: its pushed SHA and identity
|
|
2761
|
+
produce the durable landing receipt independently of forge PR state. PR
|
|
2762
|
+
acknowledgement is best-effort: observe a provider-reported merge, or comment
|
|
2763
|
+
with the landed SHA and close a still-open review. Acknowledgement failure never
|
|
2764
|
+
retries or fails the landing.
|
|
2765
|
+
|
|
2766
|
+
GitHub uses its authoritative viewer squash headline and body with an expected
|
|
2767
|
+
head guard. Native auto-merge messages are checked against fresh server defaults
|
|
2768
|
+
on eligible polls even after consent acknowledgement, and repaired through
|
|
2769
|
+
consent-guarded disable/enable. Repeated polling covers later head or metadata
|
|
2770
|
+
changes; it cannot make a future push atomic with an already armed native merge.
|
|
2771
|
+
Merge queues ignore message overrides, so identity-aware kernel landing defers
|
|
2772
|
+
with `unproven-gate-state` rather than bypassing the queue. Human merges remain
|
|
2773
|
+
observable regardless of trailer evidence.
|
|
2774
|
+
|
|
2775
|
+
Ordered `[[landing]]` rules in `autobuild.toml` decide authorization. Each rule
|
|
2776
|
+
requires `mode = "auto" | "consent"` and may match `into = "root" | "node" |
|
|
2777
|
+
<node-ticket-id>`, `from = "leaf" | "node"`, and an exact, case-sensitive
|
|
2778
|
+
`label`. Predicates are ANDed; the first matching rule wins. Omitted predicates
|
|
2779
|
+
match anything. With no match, leaves use auto and nodes require consent.
|
|
2780
|
+
The target is the immutable destination frozen at claim, not a ticket's current
|
|
2781
|
+
parent. Labels are sampled from a successful source-ticket read at readiness;
|
|
2782
|
+
unavailable ticket data defers the decision instead of supplying empty labels.
|
|
2783
|
+
|
|
2784
|
+
A leaf becomes ready after verification and finalize on a current base; a node
|
|
2785
|
+
must be complete and verified at its exact head and parent. `landing.decided`
|
|
2786
|
+
records that candidate, the sampled labels, resulting mode, and the full matched
|
|
2787
|
+
rule and index (or explicit default). Editing configuration cannot change this
|
|
2788
|
+
recorded decision. A replacement candidate gets a new decision once ready.
|
|
2789
|
+
Policy is live dispatcher configuration, outside the pinned execution pipeline.
|
|
2790
|
+
|
|
2791
|
+
`ab hold <slug>` durably suppresses landing and revokes previous consent, even
|
|
2792
|
+
before readiness. `ab land <slug>` requires readiness, clears hold, and consents
|
|
2793
|
+
to this build/node landing into its frozen destination. Consent survives head
|
|
2794
|
+
replacement, restacking, verification and re-finalization until another hold or
|
|
2795
|
+
completion. It is consent to the landing, not approval of an immutable diff.
|
|
2796
|
+
Commands and acknowledgements are sequence-correlated; hold acknowledgement
|
|
2797
|
+
requires confirmed native cancellation, while land acknowledgement accepts
|
|
2798
|
+
consent without claiming that merge gates passed. The same actions are available
|
|
2799
|
+
through the MCP/operator build-control tools. The terminal uses `l` for land and
|
|
2800
|
+
`o` for hold on the selected landing. The web has no consent controls.
|
|
2801
|
+
|
|
2802
|
+
The repository auto-merge default and its fan-out are retired. Historical events
|
|
2803
|
+
still replay; explicit old per-build commands map to consent/hold until a new
|
|
2804
|
+
landing command supersedes them, while old default seeds confer no consent.
|
|
2805
|
+
`ab upgrade` samples the target repository's configured journal and writes leaf
|
|
2806
|
+
auto for old ON, leaf consent for old OFF (including no fact), and node consent
|
|
2807
|
+
in either case. Explicit landing arrays remain byte-for-byte unchanged. Missing
|
|
2808
|
+
configuration or unavailable journals fail with recovery guidance. Fresh init
|
|
2809
|
+
uses the no-rules fallback.
|
|
2810
|
+
|
|
2811
|
+
A native-enable failure after the provider's mutation guard requires confirmed
|
|
2812
|
+
cancellation. Its disabled receipt records the candidate, authorization, retry
|
|
2813
|
+
attempt and next eligible time. Retries back off from 30 seconds exponentially
|
|
2814
|
+
to a five-minute maximum interval, surviving dispatcher restarts. A new
|
|
2815
|
+
candidate or land command resets this delay; hold and cancellation never wait
|
|
2816
|
+
for it. Quiet polls append no attempt facts. Native application receipts are
|
|
2817
|
+
bookkeeping, not pipeline execution progress.
|
|
2818
|
+
|
|
2819
|
+
Native auto-merge is reconciled on every janitor poll against durable desired
|
|
2820
|
+
landing state using the native state in the existing PR read, without additional
|
|
2821
|
+
forge reads. A native write is issued only when observed and desired state disagree. It is disabled while held, unauthorized, unready, or replacement
|
|
2822
|
+
publication is pending or just completed; enabling binds to the current head
|
|
2823
|
+
through the forge's expected-head guard. Every replacement publication confirms
|
|
2824
|
+
cancellation first, and its first following poll re-reads and reconciles native
|
|
2825
|
+
state before other build actions. Native receipts bind to exact candidates;
|
|
2826
|
+
consent does not. A stale enable completing after cancellation is repaired by
|
|
2827
|
+
poll reconciliation. This is an explicitly bounded failure model: native merge
|
|
2828
|
+
is used only behind a merge-blocking gate, and checks on a replacement head must
|
|
2829
|
+
take far longer than one poll interval, allowing cancellation before they pass.
|
|
2830
|
+
There is no durable native-effect reservation protocol. An undesired forge
|
|
2831
|
+
landing is classified from the kernel's last durable native application state, without changing provider contracts. A confirmed disabled
|
|
2832
|
+
state with no enable in flight or indeterminate means a deliberate human forge
|
|
2833
|
+
landing, which supplies consent. Record whether it overrode a hold: an unheld
|
|
2834
|
+
human landing needs no operator attention; overriding a hold is informational.
|
|
2835
|
+
If native auto-merge was armed, or an enable was in flight or indeterminate,
|
|
2836
|
+
record a possible stale-enable landing as contrary to policy and raise operator
|
|
2837
|
+
attention. Autobuild never rewrites the target to undo either outcome. Merge
|
|
2838
|
+
gates and the serialized node-writer publication rules remain authoritative.
|
|
2839
|
+
|
|
2840
|
+
**Merge gates are never bypassed.** Landing authorization comes from recorded
|
|
2841
|
+
policy or explicit consent. For root-target leaves, whenever the base branch has
|
|
2842
|
+
any real merge-blocking gate, authorization is applied as GitHub-native auto-merge, so the
|
|
2343
2843
|
forge's own checks decide when the PR lands. Only when the forge
|
|
2344
2844
|
authoritatively reports no gate may the janitor perform a normal,
|
|
2345
2845
|
head-guarded squash itself — never admin, force, or rebase — and only after
|
|
@@ -2354,6 +2854,16 @@ when the classic protection response is incomplete, while an incomplete classic
|
|
|
2354
2854
|
response with no proven ruleset gate still fails closed with a reason naming
|
|
2355
2855
|
the missing subsection.
|
|
2356
2856
|
|
|
2857
|
+
Serialized node-target landing has a stricter path: native auto-merge is
|
|
2858
|
+
cancelled and cancellation confirmed, never enabled. Under the destination
|
|
2859
|
+
writer reservation, refresh the PR's actual base and head and inspect gates on
|
|
2860
|
+
that exact frozen destination immediately before mutation. Only proved-ungated
|
|
2861
|
+
branches permit the guarded fast-forward, regardless of token bypass privileges.
|
|
2862
|
+
Gated branches defer with `gated-node-destination`; unknown or unreadable policy
|
|
2863
|
+
defers with `unproven-gate-state`. Both leave the PR open with actionable human
|
|
2864
|
+
guidance, and every later attempt obtains fresh proof. No native fallback can
|
|
2865
|
+
participate in node serialization. Human node landing remains observable.
|
|
2866
|
+
|
|
2357
2867
|
Inability to prove or apply auto-merge is nonfatal pipeline plumbing, not a PR
|
|
2358
2868
|
creation failure: finalize still records the open PR and completes, and consent
|
|
2359
2869
|
stays pending for later janitor polls, which re-examine it. Deferrals divide by
|
|
@@ -2367,8 +2877,9 @@ one follow-up while the PR is open, and a later `reconcile.completed` or
|
|
|
2367
2877
|
`finalize.completed` supersedes it — the projection shows nothing until the
|
|
2368
2878
|
gate re-examines consent and records a fresh one. A repository
|
|
2369
2879
|
with native auto-merge disabled is left open for a human; Autobuild never
|
|
2370
|
-
changes the setting.
|
|
2371
|
-
setting:
|
|
2880
|
+
changes the setting. For root-target leaves, the local-git forge has no external
|
|
2881
|
+
gate or native setting: authorization produces the same inspected-head guarded
|
|
2882
|
+
squash candidate,
|
|
2372
2883
|
mergeability is recomputed against the current local base, and the exact
|
|
2373
2884
|
`pr-description` becomes the single-parent squash commit message. Its author and
|
|
2374
2885
|
committer are Git's ordinary resolved repository identity, exactly as for a plain
|
|
@@ -2386,7 +2897,7 @@ base ref. A poll after a crash retries that same old-to-landed transition withou
|
|
|
2386
2897
|
rolling back the ref or overwriting operator work; the PR remains open and
|
|
2387
2898
|
retryable until checkout repair succeeds. No merge is ever assumed: a build
|
|
2388
2899
|
reaches `merged` only when a later poll observes the landing and any required
|
|
2389
|
-
checkout synchronization. Without
|
|
2900
|
+
checkout synchronization. Without authorization, the local branch and PR record
|
|
2390
2901
|
remain open for inspection with ordinary Git.
|
|
2391
2902
|
|
|
2392
2903
|
**Conflicts re-enter the pipeline via `reconcile`.** When the janitor's
|
|
@@ -2395,9 +2906,9 @@ build-runner (the dispatcher itself never runs agents). Immediately before
|
|
|
2395
2906
|
each attempt, the runner asks the Forge for its current authoritative base
|
|
2396
2907
|
snapshot when supported, otherwise fetching the build's frozen base branch
|
|
2397
2908
|
fresh from `origin`, and records the resolved SHA on `reconcile.started` — known-stale input is never
|
|
2398
|
-
used (§15.3). The
|
|
2399
|
-
plan, and implement-notes, with the explicit
|
|
2400
|
-
neither; the
|
|
2909
|
+
used (§15.3). The kernel prepares one replay on that frozen base. The agent
|
|
2910
|
+
resolves it guided by the spec, plan, and implement-notes, with the explicit
|
|
2911
|
+
charge to regress against neither side; the result is one commit, and because reconciliation
|
|
2401
2912
|
changed code, **`verify:*` starts a fresh cycle**, subject to the captured
|
|
2402
2913
|
post-reconcile policy (default: re-run all applicable steps). A resolution the agent judges
|
|
2403
2914
|
risky — semantic conflicts, spec-relevant choices — escalates rather than
|
|
@@ -2470,6 +2981,18 @@ The dispatcher emits an actionable operator notice without repeating it for the
|
|
|
2470
2981
|
same failure. Restoring a valid `autobuild.toml` clears the rejection and
|
|
2471
2982
|
ordinary boundary reload resumes.
|
|
2472
2983
|
|
|
2984
|
+
Landing policy is an ordered `[[landing]]` array. Each rule requires
|
|
2985
|
+
`mode = "auto" | "consent"` and may match `into = "root" | "node" | <node-ticket-id>`,
|
|
2986
|
+
`from = "leaf" | "node"`, and an exact, case-sensitive `label`. Predicates
|
|
2987
|
+
within a rule are ANDed; omitted predicates are wildcards; first match wins.
|
|
2988
|
+
The destination is the frozen target identity, and labels are sampled when
|
|
2989
|
+
readiness is recorded. No matching rule, including no rules, means leaf auto /
|
|
2990
|
+
node consent. Policy is hot dispatcher-owned configuration, not pinned build
|
|
2991
|
+
execution settings; each ready candidate retains its immutable `landing.decided`
|
|
2992
|
+
rule snapshot and mode after config edits. Historical `build.auto-merge-requested`
|
|
2993
|
+
and default-attribution fields remain replay-compatible but are not new controls.
|
|
2994
|
+
|
|
2995
|
+
|
|
2473
2996
|
```toml
|
|
2474
2997
|
baseBranch = "main"
|
|
2475
2998
|
capacity = 3 # concurrent builds for this repo
|
|
@@ -2582,7 +3105,7 @@ decide where a build's effective configuration is composed from:
|
|
|
2582
3105
|
|---|---|---|
|
|
2583
3106
|
| Build-owned (pinned) | `[verify]` and `[verify.<step>]`, `[finalize]` and `[finalize.<step>]`, `[commands]`, `[workspace]` (provider and config, including `provisioning` and `runtimeProvisioning`) | The build's own branch: its branch head once it has published commits, otherwise the recorded base commit its workspace was cut from. The exact commit is recorded once per deposit in the effective-config artifact metadata — except in checkout mode when the worktree read cannot be attributed to the branch-head commit: because the worktree file has uncommitted edits, because the clean/dirty comparison could not be performed (non-git workspace or a transient git error), or because the branch head never carried the file. The deposit then records the source `worktree-dirty` and no commit, because no commit claims the worktree bytes (the build still runs them). |
|
|
2584
3107
|
| Deployment-owned (live) | `[roles]` (runtime, model, args, alternates, per-role `sessionBudgetSeconds`) and `[policy]` (budgets, retry bounds, stall and harvest knobs) | The dispatcher's live snapshot; an accepted reload delivers these to active builds. |
|
|
2585
|
-
| Dispatcher-owned | `baseBranch`, `capacity`, `ticketScanIntervalSeconds`, `forge`, `plugins`, `pr`, `tickets`, `orchestrator` | The dispatcher's live snapshot; the build runner never interprets them. |
|
|
3108
|
+
| Dispatcher-owned | `baseBranch`, `capacity`, `ticketScanIntervalSeconds`, `forge`, `plugins`, `pr`, `tickets`, `orchestrator`, `landing` | The dispatcher's live snapshot; the build runner never interprets them. |
|
|
2586
3109
|
|
|
2587
3110
|
A build's pipeline definition is therefore composed from the build's own
|
|
2588
3111
|
branch: in origin mode the dispatcher reads `autobuild.toml` at the build's
|
|
@@ -2808,7 +3331,7 @@ discovery conflicts retain their nonzero contract. Local customization survives
|
|
|
2808
3331
|
upgrades; divergence is visible instead of silent. No other command checks for
|
|
2809
3332
|
or installs releases in the foreground or background.
|
|
2810
3333
|
|
|
2811
|
-
## 17. Out of scope
|
|
3334
|
+
## 17. Out of scope (explicitly)
|
|
2812
3335
|
|
|
2813
3336
|
- True push `subscribe` (interface reserved; polling implementation).
|
|
2814
3337
|
- Live transcript streaming for writers and readers (the stream primitive —
|
|
@@ -2823,9 +3346,11 @@ or installs releases in the foreground or background.
|
|
|
2823
3346
|
1. **[OPEN] Other-ingester detail** — observation harvest is decided (§8.8,
|
|
2824
3347
|
§12); per-source filter design for scheduled `ingest:*` sources remains
|
|
2825
3348
|
open.
|
|
2826
|
-
2. **[OPEN] Retention/archival policy** — the
|
|
3349
|
+
2. **[OPEN] Retention/archival policy** — the pilot's archival gap, now a store
|
|
2827
3350
|
config concern rather than a repo problem. Needs a default (e.g. prune
|
|
2828
|
-
blobs for merged builds after N months, keep events).
|
|
3351
|
+
blobs for merged builds after N months, keep events). Immutable reconcile
|
|
3352
|
+
archive refs are retained indefinitely for now; their retention policy is
|
|
3353
|
+
part of this open thread.
|
|
2829
3354
|
3. **[OPEN] Global capacity** — per-repo capacity is the top-level `capacity`
|
|
2830
3355
|
scalar (§16.1); whether a cross-repo global cap is needed, and where it
|
|
2831
3356
|
lives, is unresolved.
|
|
@@ -2848,13 +3373,13 @@ revisions rather than ignoring them.
|
|
|
2848
3373
|
|
|
2849
3374
|
`ab ticket edit <id>` opens `$VISUAL`, falling back to `$EDITOR`, using TOML
|
|
2850
3375
|
frontmatter and a Markdown body. Only title, body and labels are editable;
|
|
2851
|
-
id, blockers, creation key and reference comments are read-only. It saves only
|
|
3376
|
+
kind, target, id, blockers, creation key and reference comments are read-only. It saves only
|
|
2852
3377
|
changed fields with the opening revision. Unchanged or formatting-only edits
|
|
2853
3378
|
write nothing. On conflict, invalid input or editor failure, the error names an
|
|
2854
3379
|
absolute file path containing the edited text. Read the current ticket and
|
|
2855
3380
|
reapply the intended changes before retrying; conflicts are never merged.
|
|
2856
3381
|
|
|
2857
|
-
File and Linear revisions fingerprint title, body, canonical label/blocker sets
|
|
3382
|
+
File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets
|
|
2858
3383
|
and state; reverting identical content restores its fingerprint. File checks
|
|
2859
3384
|
re-read immediately before writing, with the existing no-lock race window.
|
|
2860
3385
|
Direct file edits and state-directory moves change revisions. File revisions also
|
|
@@ -2903,3 +3428,35 @@ State normalization and the complete operator procedure are documented in
|
|
|
2903
3428
|
[Ticket migration](docs/ticket-migration.md). The same reference is delivered in
|
|
2904
3429
|
the installed guide. Export keeps lifecycle membership without inferring roles;
|
|
2905
3430
|
import reuses unique case-insensitive states and creates normalized missing ones.
|
|
3431
|
+
|
|
3432
|
+
|
|
3433
|
+
### Tree and consent operator reads
|
|
3434
|
+
|
|
3435
|
+
The shared dashboard projection supplies root, node, target, integration build,
|
|
3436
|
+
landing, restack and consent vocabulary. The terminal groups ready decisions in
|
|
3437
|
+
one consent queue, retaining build-slug selection for land/hold controls. Nodes
|
|
3438
|
+
show stored open children/completeness diagnostics, restack state, current-cycle
|
|
3439
|
+
verification and landing readiness. Ordinary repositories omit empty tree sections.
|
|
3440
|
+
The web dashboard consumes shared terminology without introducing a tree surface.
|
|
3441
|
+
|
|
3442
|
+
`ab landings [--json] [--store <ref>]` and registry `landings.list` expose the
|
|
3443
|
+
same deterministic, repository-scoped ready consent/held candidates. A recorded
|
|
3444
|
+
current decision is required; auto-authorized and consented candidates are absent.
|
|
3445
|
+
Source `ab ticket tree` / `tickets.tree` enumerate all ticket states with listing
|
|
3446
|
+
diagnostics; effective build targets remain frozen independently of source metadata.
|
|
3447
|
+
|
|
3448
|
+
Default watch attention includes `integration.landed`, `node.item-conflicted`,
|
|
3449
|
+
and conflicted `restack.replayed`. Derived `build.consent-ready` observations
|
|
3450
|
+
carry target, branch, candidate and the durable readiness entry position in the
|
|
3451
|
+
existing cursor envelope. Cursor identities retain readiness episodes across
|
|
3452
|
+
restart; a new candidate or exit/re-entry can wake again. Explicit event globs
|
|
3453
|
+
remain event-only. Wait adds `consent`, `node-landed`, `restack-conflicted`, and
|
|
3454
|
+
includes these in attention; current-state waits return immediately, backlog
|
|
3455
|
+
replay retains event ordering, including landing before terminal completion.
|
|
3456
|
+
|
|
3457
|
+
Consent/hold readiness is signalled exclusively by `build.consent-ready`,
|
|
3458
|
+
including first discovery in a repository-wide watch. `build.merge-decision`
|
|
3459
|
+
reports current gate deferrals or unsafe forge outcomes, never a second consent
|
|
3460
|
+
or hold wake. Readiness observations and queue entries share the effective
|
|
3461
|
+
target shape `{kind, branch, ticket?, build?}`. Tree display labels are owned
|
|
3462
|
+
by the shared projection vocabulary and reused by terminal and CLI text.
|