@defrex/autobuild 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/SPEC.md +432 -92
- package/bin/ab-dispatch-kernel.ts +1 -0
- package/docs/accounts.md +9 -0
- package/docs/agent-runtimes.md +1 -0
- package/docs/answering-blocked-builds.md +2 -1
- package/docs/architecture.md +282 -127
- package/docs/assets/headline-wide.png +0 -0
- package/docs/build-store.md +33 -3
- package/docs/cli.md +2 -1
- package/docs/configuration-overview.md +9 -0
- package/docs/configuration.md +163 -102
- package/docs/dispatcher-hosting.md +19 -3
- package/docs/dispatcher.md +9 -4
- package/docs/integration-overview.md +2 -2
- package/docs/integration-tree.md +91 -28
- package/docs/merge-policy.md +28 -9
- package/docs/operator-api.md +43 -18
- package/docs/operator-surfaces.md +1 -1
- package/docs/plugin-authoring.md +85 -8
- package/docs/remote-store-protocol.md +25 -7
- package/docs/remote-ticket-protocol.md +126 -12
- package/docs/restacking.md +20 -6
- package/docs/seams.md +2 -2
- package/docs/setup.md +19 -13
- package/docs/spec-standard.md +2 -1
- package/docs/ticket-dependencies.md +26 -8
- package/docs/ticket-migration.md +70 -7
- package/docs/ticket-sources.md +82 -5
- package/docs/tickets.md +34 -2
- package/docs/troubleshooting.md +2 -2
- package/docs/verification.md +5 -5
- package/docs/website.md +8 -0
- package/docs/workspaces.md +1 -1
- package/package.json +4 -3
- package/packages/core/src/accounts/hosted-readiness.ts +21 -0
- package/packages/core/src/cli/attention.ts +1 -0
- package/packages/core/src/cli/build-control.ts +36 -12
- package/packages/core/src/cli/connect.ts +9 -18
- package/packages/core/src/cli/context.ts +44 -0
- package/packages/core/src/cli/dashboard/configuration.ts +11 -0
- package/packages/core/src/cli/dashboard/model.ts +40 -10
- package/packages/core/src/cli/dashboard/queue.ts +21 -0
- package/packages/core/src/cli/dashboard/render.ts +40 -22
- package/packages/core/src/cli/dispatch-frontend.ts +63 -30
- package/packages/core/src/cli/dispatch-mode.ts +35 -16
- package/packages/core/src/cli/dispatch-repository-feed.ts +40 -11
- package/packages/core/src/cli/dispatch.ts +154 -47
- package/packages/core/src/cli/help.ts +59 -22
- package/packages/core/src/cli/init-hosted-accounts.ts +54 -0
- package/packages/core/src/cli/init-readiness-remote.ts +16 -3
- package/packages/core/src/cli/init-validation.ts +144 -42
- package/packages/core/src/cli/issue-links.ts +67 -0
- package/packages/core/src/cli/main.ts +32 -15
- package/packages/core/src/cli/pr-summary-publication.ts +38 -7
- package/packages/core/src/cli/publication-settlement.ts +36 -24
- package/packages/core/src/cli/repository-status.ts +201 -49
- package/packages/core/src/cli/status.ts +41 -3
- package/packages/core/src/cli/terminals.ts +37 -2
- package/packages/core/src/cli/ticket-editor.ts +20 -6
- package/packages/core/src/cli/ticket.ts +264 -46
- package/packages/core/src/cli/triage-count-sampler.ts +59 -0
- package/packages/core/src/cli/watch.ts +4 -0
- package/packages/core/src/config/live.ts +45 -4
- package/packages/core/src/config/load.ts +9 -0
- package/packages/core/src/config/pipeline-source.ts +6 -2
- package/packages/core/src/config/ready-assignee.ts +86 -0
- package/packages/core/src/config/schema.ts +164 -36
- package/packages/core/src/distribution-packaging.ts +1 -1
- package/packages/core/src/events/catalog.ts +5 -0
- package/packages/core/src/events/compatibility.ts +2 -1
- package/packages/core/src/events/payloads.ts +70 -0
- package/packages/core/src/events/policy.ts +8 -0
- package/packages/core/src/events/repository.ts +91 -28
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +41 -0
- package/packages/core/src/kernel/build-identity.ts +12 -0
- package/packages/core/src/kernel/change-presence.ts +139 -6
- package/packages/core/src/kernel/dispatch-capacity.ts +80 -14
- package/packages/core/src/kernel/dispatch-status.ts +10 -1
- package/packages/core/src/kernel/dispatch-upgrade.ts +104 -5
- package/packages/core/src/kernel/engine.ts +4 -2
- package/packages/core/src/kernel/finalize-pr-rejection.ts +95 -0
- package/packages/core/src/kernel/generators/repository-journals.ts +15 -1
- package/packages/core/src/kernel/harvest.ts +4 -1
- package/packages/core/src/kernel/integration-completeness.ts +104 -17
- package/packages/core/src/kernel/integration-landing.ts +17 -0
- package/packages/core/src/kernel/integration-state.ts +17 -0
- package/packages/core/src/kernel/issue-keywords.ts +202 -0
- package/packages/core/src/kernel/janitor-failure.ts +11 -0
- package/packages/core/src/kernel/kernel-git.ts +87 -0
- package/packages/core/src/kernel/landing-readiness.ts +25 -17
- package/packages/core/src/kernel/log-index.ts +1 -1
- package/packages/core/src/kernel/node-issue-links.ts +142 -0
- package/packages/core/src/kernel/node-parent.ts +6 -0
- package/packages/core/src/kernel/node-restack-transaction.ts +2 -0
- package/packages/core/src/kernel/pr-summary.ts +24 -0
- package/packages/core/src/kernel/read-deferrals.ts +75 -12
- package/packages/core/src/kernel/read-facts.ts +32 -1
- package/packages/core/src/kernel/reconcile-restack.ts +1 -1
- package/packages/core/src/kernel/reducer-registry.ts +31 -1
- package/packages/core/src/kernel/reducer.ts +90 -2
- package/packages/core/src/kernel/ticket-preparation.ts +12 -0
- package/packages/core/src/kernel/verify-budget.ts +43 -0
- package/packages/core/src/operator/index.ts +3 -1
- package/packages/core/src/operator/presentation.ts +3 -0
- package/packages/core/src/operator/protocol.ts +38 -2
- package/packages/core/src/operator/query.ts +66 -29
- package/packages/core/src/operator/registry.ts +47 -26
- package/packages/core/src/operator/tickets.ts +77 -10
- package/packages/core/src/plugin-sdk/index.ts +13 -0
- package/packages/core/src/plugins/manifest.ts +1 -1
- package/packages/core/src/plugins/registry.ts +1 -0
- package/packages/core/src/ports/forge/contract.ts +69 -0
- package/packages/core/src/ports/forge/create.ts +5 -0
- package/packages/core/src/ports/forge/fake.ts +184 -3
- package/packages/core/src/ports/forge/git-rewrite.ts +4 -2
- package/packages/core/src/ports/forge/github.ts +175 -38
- package/packages/core/src/ports/forge/local-git.ts +14 -0
- package/packages/core/src/ports/forge/readiness.ts +10 -0
- package/packages/core/src/ports/forge-failure.ts +43 -0
- package/packages/core/src/ports/runner/claude.ts +7 -1
- package/packages/core/src/ports/runner/codex.ts +7 -2
- package/packages/core/src/ports/runner/native-cli-fixture.ts +2 -1
- package/packages/core/src/ports/runner/pi.ts +7 -1
- package/packages/core/src/ports/runner/runtime.ts +3 -0
- package/packages/core/src/ports/runner/start-prompt.ts +37 -0
- package/packages/core/src/ports/tickets/contract.ts +320 -7
- package/packages/core/src/ports/tickets/create.ts +72 -17
- package/packages/core/src/ports/tickets/fake.ts +18 -0
- package/packages/core/src/ports/tickets/file-codec.ts +20 -0
- package/packages/core/src/ports/tickets/file.ts +43 -1
- package/packages/core/src/ports/tickets/github-fake.ts +1123 -0
- package/packages/core/src/ports/tickets/github-issues.ts +431 -0
- package/packages/core/src/ports/tickets/github-validators.ts +194 -0
- package/packages/core/src/ports/tickets/github.ts +2029 -0
- package/packages/core/src/ports/tickets/hosted-index.ts +34 -3
- package/packages/core/src/ports/tickets/issue-links.ts +86 -0
- package/packages/core/src/ports/tickets/lifecycle.ts +60 -4
- package/packages/core/src/ports/tickets/linear.ts +66 -6
- package/packages/core/src/ports/tickets/migration.ts +290 -68
- package/packages/core/src/ports/tickets/operations.ts +98 -12
- package/packages/core/src/ports/tickets/priority.ts +55 -0
- package/packages/core/src/ports/tickets/remote-protocol.ts +195 -29
- package/packages/core/src/ports/tickets/remote.ts +188 -13
- package/packages/core/src/ports/tickets/revision.ts +22 -1
- package/packages/core/src/ports/tickets/states.ts +43 -0
- package/packages/core/src/ports/tickets/tree.ts +58 -12
- package/packages/core/src/ports/tickets/update.ts +12 -2
- package/packages/core/src/ports/types.ts +190 -9
- package/packages/core/src/ports/workspace/commit-preservation.ts +135 -13
- package/packages/core/src/ports/workspace/git-worktree.ts +3 -1
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +118 -27
- package/packages/core/src/processes/build-runner.ts +99 -21
- package/packages/core/src/processes/dispatcher.ts +822 -338
- package/packages/core/src/processes/execution-no-progress.ts +5 -0
- package/packages/core/src/processes/harvest-runner.ts +17 -8
- package/packages/core/src/processes/harvest.ts +5 -8
- package/packages/core/src/processes/tick-publication.ts +12 -2
- package/packages/core/src/processes/ticket-scan-schedule.ts +78 -0
- package/packages/core/src/processes/workspace-preservation.ts +36 -1
- package/packages/core/src/runtime-identity.ts +10 -2
- package/packages/core/src/scenarios/harness.ts +4 -0
- package/packages/core/src/store/adapter.ts +7 -1
- package/packages/core/src/store/contract.ts +83 -2
- package/packages/core/src/store/digest.ts +32 -1
- package/packages/core/src/store/reducer-value-shapes.json +4187 -3391
- package/packages/core/src/store/remote/protocol.ts +2 -0
- package/packages/core/src/store/remote/released-clients.json +11 -0
- package/packages/core/src/store/remote/released-reducer-values/1.5.0.json +26924 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +2 -0
- package/packages/core/src/store/repo-state-events.ts +2 -0
- package/packages/core/src/store/types.ts +5 -0
- package/packages/core/src/testing/dispatch-read-budget.ts +729 -123
- package/packages/core/src/testing/index.ts +18 -1
- package/packages/core/src/testing/presence-history.ts +79 -0
- package/packages/core/src/testing/reduced-read-budget.ts +1085 -31
- package/packages/core/src/testing/upgrade-generations.ts +77 -0
- package/skills/code-review/SKILL.md +4 -3
- package/skills/finalize/SKILL.md +18 -2
- package/skills/guide/SKILL.md +374 -136
- package/skills/guide/references/accounts.md +9 -0
- package/skills/guide/references/integration-tree.md +91 -28
- package/skills/guide/references/merge-policy.md +28 -9
- package/skills/guide/references/operator-api.md +43 -18
- package/skills/guide/references/plugin-authoring.md +85 -8
- package/skills/guide/references/remote-store-protocol.md +25 -7
- package/skills/guide/references/remote-ticket-protocol.md +126 -12
- package/skills/guide/references/restacking.md +20 -6
- package/skills/guide/references/setup.md +19 -13
- package/skills/guide/references/spec-standard.md +2 -1
- package/skills/guide/references/ticket-dependencies.md +26 -8
- package/skills/guide/references/ticket-migration.md +70 -7
- package/skills/harvest-review/SKILL.md +4 -3
- package/skills/implement/SKILL.md +20 -1
- package/skills/operate/SKILL.md +103 -28
- package/skills/plan/SKILL.md +1 -1
- package/skills/reconcile/SKILL.md +5 -4
- package/skills/spec/SKILL.md +15 -2
- package/skills/tickets/SKILL.md +114 -37
- package/templates/autobuild.toml +5 -0
- package/templates/hosted-service/package.json +2 -2
|
@@ -15,9 +15,11 @@ The dispatcher claims eligible tickets, starts and observes build runners, settl
|
|
|
15
15
|
## Viewing from a local checkout
|
|
16
16
|
|
|
17
17
|
A plain `ab dispatch` reads dispatch placement once before starting local execution.
|
|
18
|
-
For a hosted project it opens the
|
|
18
|
+
For a hosted project it opens the viewer automatically, displaying
|
|
19
19
|
`viewer · dispatched by <host>` from the placement origin (including a nondefault
|
|
20
20
|
port). `--once`, `--plain`, and `--interval` retain their viewer meanings.
|
|
21
|
+
The viewer reads its dashboard from the Store; its one ticket-source read is
|
|
22
|
+
the header's triage count, through the source's optional `countStates`.
|
|
21
23
|
`--takeover` explicitly dispatches locally, with a warning that it can displace
|
|
22
24
|
the hosted dispatcher; it cannot be combined with `--viewer`. Startup intake
|
|
23
25
|
flags require `--takeover` when placement selects viewer.
|
|
@@ -26,8 +28,11 @@ An unreadable placement fails closed with a typed error naming the cause:
|
|
|
26
28
|
use `--viewer` to watch or `--takeover` to dispatch locally. Both explicit modes
|
|
27
29
|
skip placement discovery. Older services without the capability and projects
|
|
28
30
|
with unknown or nonhosted placement retain local dispatch behavior. Local stores
|
|
29
|
-
need no placement request.
|
|
30
|
-
|
|
31
|
+
need no placement request. Failing to resolve the checkout's store selection
|
|
32
|
+
(for example, a malformed `autobuild.toml`) is not a placement failure: default
|
|
33
|
+
startup reports it as a repository resolution error naming its cause, and
|
|
34
|
+
neither explicit mode bypasses it. Origin mode (`--repository` or
|
|
35
|
+
`AB_REPOSITORY`) and hosted cron dispatch bypass this check. Placement is a startup snapshot, not a
|
|
31
36
|
liveness probe or a polling input.
|
|
32
37
|
|
|
33
38
|
|
|
@@ -135,6 +140,17 @@ credentials stay on the host and are applied by provider-scoped egress header
|
|
|
135
140
|
transforms.
|
|
136
141
|
See [origin-mode setup](setup.md#running-the-dispatcher-without-a-checkout-origin-mode) and [Workspaces](workspaces.md).
|
|
137
142
|
|
|
143
|
+
Integration nodes need Git on the dispatcher host even in origin mode: the
|
|
144
|
+
kernel bare-clones the origin to snapshot, restack, check presence and land.
|
|
145
|
+
The hosted dispatcher deployment ships its own self-contained `linux-x64` Git
|
|
146
|
+
(its glibc, loader, HTTPS helpers and CA bundle), so it needs only an x86_64
|
|
147
|
+
Linux kernel and a writable `/tmp`; see
|
|
148
|
+
[shipped Git](../packages/hosted-dispatcher/README.md#shipped-git). Kernel Git
|
|
149
|
+
resolves the shipped Git whether the kernel runs it directly or from a shell
|
|
150
|
+
pipeline. When the shipped Git cannot run, the dispatcher records one durable
|
|
151
|
+
`dispatcher.kernel-git-unavailable` repository condition, node janitors defer
|
|
152
|
+
instead of failing per node, and `dispatcher.kernel-git-recovered` ends it.
|
|
153
|
+
|
|
138
154
|
## Writing your own
|
|
139
155
|
|
|
140
156
|
There's no hosting plugin port. Invoke the local or origin dispatcher entrypoints with supported Store, workspace and forge adapters, and keep coordination in durable state, never private channels between processes.
|
package/docs/dispatcher.md
CHANGED
|
@@ -48,7 +48,7 @@ A ticket is claimed when it passes every gate:
|
|
|
48
48
|
- **Blockers.** Every dependency is done.
|
|
49
49
|
- **Destination.** Its target (`main` or an integration node) accepts new work.
|
|
50
50
|
|
|
51
|
-
Others stay queued. See [Tickets and specs](tickets.md) for grooming and [Intake and harvest](intake.md) for proposed work.
|
|
51
|
+
Others stay queued. Urgent tickets are claimed before normal ones, each in the source's order; priority never preempts a running build. See [Tickets and specs](tickets.md) for grooming and [Intake and harvest](intake.md) for proposed work.
|
|
52
52
|
|
|
53
53
|
Each build gets its own workspace (local git worktree or remote sandbox) and a build-runner that owns its pipeline. Capacity caps concurrency: a work build holds a slot while it runs; an integration node holds one only while it verifies, not while collecting children. See [the integration tree](integration-overview.md).
|
|
54
54
|
|
|
@@ -84,9 +84,11 @@ Next: [operator surfaces](operator-surfaces.md) for the controls, [one build end
|
|
|
84
84
|
## Hosted dispatch and local viewing
|
|
85
85
|
|
|
86
86
|
A plain `ab dispatch` reads dispatch placement once before starting local execution.
|
|
87
|
-
For a hosted project it opens the
|
|
87
|
+
For a hosted project it opens the viewer automatically, displaying
|
|
88
88
|
`viewer · dispatched by <host>` from the placement origin (including a nondefault
|
|
89
89
|
port). `--once`, `--plain`, and `--interval` retain their viewer meanings.
|
|
90
|
+
The viewer reads its dashboard from the Store; its one ticket-source read is
|
|
91
|
+
the header's triage count, through the source's optional `countStates`.
|
|
90
92
|
`--takeover` explicitly dispatches locally, with a warning that it can displace
|
|
91
93
|
the hosted dispatcher; it cannot be combined with `--viewer`. Startup intake
|
|
92
94
|
flags require `--takeover` when placement selects viewer.
|
|
@@ -95,6 +97,9 @@ An unreadable placement fails closed with a typed error naming the cause:
|
|
|
95
97
|
use `--viewer` to watch or `--takeover` to dispatch locally. Both explicit modes
|
|
96
98
|
skip placement discovery. Older services without the capability and projects
|
|
97
99
|
with unknown or nonhosted placement retain local dispatch behavior. Local stores
|
|
98
|
-
need no placement request.
|
|
99
|
-
|
|
100
|
+
need no placement request. Failing to resolve the checkout's store selection
|
|
101
|
+
(for example, a malformed `autobuild.toml`) is not a placement failure: default
|
|
102
|
+
startup reports it as a repository resolution error naming its cause, and
|
|
103
|
+
neither explicit mode bypasses it. Origin mode (`--repository` or
|
|
104
|
+
`AB_REPOSITORY`) and hosted cron dispatch bypass this check. Placement is a startup snapshot, not a
|
|
100
105
|
liveness probe or a polling input.
|
|
@@ -39,7 +39,7 @@ Leaves run the [normal build pipeline](builds.md). A node collects, verifies, me
|
|
|
39
39
|
A leaf contributes one canonical net change, however many commits it took.
|
|
40
40
|
|
|
41
41
|
- **Identity.** The `Autobuild-Build: <slug>` trailer carries it across SHA rewrites. Root squash merges keep it; node integration keeps each contributing identity, in order, rather than one node commit.
|
|
42
|
-
- **Restacks.** When a destination moves,
|
|
42
|
+
- **Restacks.** When a destination moves, a leaf restacks onto it at its usual restack points; a node restacks only on demand, and each descendant node needs its own demand. Clean replay is automatic; a conflict attaches a reconcile runner with the source change's context, then verification as required.
|
|
43
43
|
- **Reverification.** Node verification covers the exact node head and parent; a change to either voids merge eligibility until reverified, even after a clean restack. A cleanly restacked waiting leaf can keep its prior verification; reports cite their actual head and base.
|
|
44
44
|
|
|
45
45
|
|
|
@@ -51,7 +51,7 @@ A target says where work integrates; a blocker says what must be available befor
|
|
|
51
51
|
bun ab ticket block <id> <blocker-id>
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
- **With nodes**, a blocker that has a build resolves when its change is present in the dependent's sampled destination. Sibling work may need to merge into a common ancestor
|
|
54
|
+
- **With nodes**, a blocker that has a build resolves when its change is present in the dependent's sampled destination. Sibling work may need to merge into a common ancestor first; presence demand then restacks only the path down to the dependent's destination.
|
|
55
55
|
- **Presence** is checked at claim, without interrupting existing builds; missing or ambiguous evidence keeps the dependent queued.
|
|
56
56
|
- **Without nodes**, and for blockers without builds, the source ticket's done state resolves it.
|
|
57
57
|
|
package/docs/integration-tree.md
CHANGED
|
@@ -78,6 +78,18 @@ label and parent connections are fully paginated and guarded writes are refused.
|
|
|
78
78
|
Kind and target participate in content revisions; file writes retain their
|
|
79
79
|
best-effort unlocked semantics. `ab ticket edit` displays these fields read-only.
|
|
80
80
|
|
|
81
|
+
GitHub also uses the exact `node` label for kind. A ticket targets a node by
|
|
82
|
+
being a sub-issue of the node's issue, so each node's children show in its
|
|
83
|
+
sub-issue list on GitHub. A parent without the `node` label, or in another
|
|
84
|
+
repository, is grouping: it gives no target, never blocks dispatch, and is left
|
|
85
|
+
untouched. `--target` on a sub-issue of a grouping parent is refused, naming the
|
|
86
|
+
parent, and `--no-target` never removes grouping. Setting a target replaces a
|
|
87
|
+
node parent. Adding or removing a sub-issue or the `node` label in the GitHub
|
|
88
|
+
UI reads back the same as `ab ticket`. Sub-issue lists are fully paginated.
|
|
89
|
+
GitHub caps a node at 100 direct sub-issues and 8 levels of nesting. A
|
|
90
|
+
repository label cased otherwise, such as `Node`, must be renamed to `node`
|
|
91
|
+
before tickets can become nodes. There are no guarded writes.
|
|
92
|
+
|
|
81
93
|
A ready node opens `ab-node/<slug>` at its parent's sampled head. Opening intent
|
|
82
94
|
and acknowledgement are durable. Its branch admits children immediately, with
|
|
83
95
|
no placeholder commit or PR. Idle nodes need no provisioned workspace, runner,
|
|
@@ -86,14 +98,19 @@ has commits its current parent lacks; parent-only advancement remains empty.
|
|
|
86
98
|
|
|
87
99
|
|
|
88
100
|
A node requesting reconcile or verification is admitted before new ticket
|
|
89
|
-
claims.
|
|
101
|
+
claims. The request is durable: a prepared verification cycle or a restack
|
|
102
|
+
conflict, with no runner yet. Until the node holds its slot, intake reserves one
|
|
103
|
+
slot for it, and the dispatcher checks its admission every tick regardless of
|
|
104
|
+
idle node polling, so a slot freed in any tick goes to the node, not to a new
|
|
105
|
+
claim. Its candidate occupancy excludes itself and capacity-bearing blocked or
|
|
90
106
|
paused descendants, following accepted source-qualified build target ancestry.
|
|
91
107
|
Running descendants and unrelated builds still count; ordinary blocked and
|
|
92
108
|
paused work retains its slot for every other admission. Provisioning reserves
|
|
93
109
|
node occupancy before the runner starts. This exception never raises the budget
|
|
94
110
|
for new claims. Status and both dashboards report actual occupancy, configured
|
|
95
111
|
capacity, effective display capacity and the nodes using descendant-held slots.
|
|
96
|
-
|
|
112
|
+
Status, `ab builds` and both dashboards report each node waiting for a slot
|
|
113
|
+
ahead of new ticket claims. Idle collecting nodes remain free.
|
|
97
114
|
|
|
98
115
|
Claims freeze the destination build generation and branch. Missing, unopened,
|
|
99
116
|
merged, closed or aborted targets leave work queued with diagnostics. The newest
|
|
@@ -103,28 +120,8 @@ source targets, while build status shows the effective destination.
|
|
|
103
120
|
|
|
104
121
|
## Collect, verify and merge
|
|
105
122
|
|
|
106
|
-
Node `verify:*`
|
|
107
|
-
|
|
108
|
-
identities, event-authorized spec revisions and spec paths, and their commits.
|
|
109
|
-
The index maps every commit in the range using build identity trailers,
|
|
110
|
-
including earlier-cycle contributions and merge side history. Commits without
|
|
111
|
-
an identity are listed as unattributed (a mechanical classification). The manifest
|
|
112
|
-
and index also expose `handPushedCommits: [{sha, originalSha, message}]` for owned
|
|
113
|
-
hand-pushed commits in the frozen range, preserving original identity across restacks.
|
|
114
|
-
Their full messages express maintainer-authorized intent: judge quality and
|
|
115
|
-
consistency, and never fail them solely for lacking a covering spec. Other node
|
|
116
|
-
changes are authorized when covered by the current event-authorized node spec or the spec
|
|
117
|
-
of the contribution introducing it; use the commit mapping to find that spec.
|
|
118
|
-
The dispatcher collects these inputs with repository authority before launching
|
|
119
|
-
verification and atomically deposits a node-owned `node-verification-context`
|
|
120
|
-
artifact cited by exact revision in `integration.prepared`. Contributor specs
|
|
121
|
-
freeze at preparation; resumed and concurrent verifiers read the same cycle input.
|
|
122
|
-
Hydration reads only that node-owned artifact and grants no general contributor
|
|
123
|
-
read authority. Missing or ambiguous provenance prevents preparation; missing,
|
|
124
|
-
corrupt or mismatched prepared inputs fail hydration. Historical agent cycles
|
|
125
|
-
without a citation require a new integration cycle. Leaf context is unchanged.
|
|
126
|
-
See [iterating inside a node](#iterating-inside-a-node) for authoring and evolving
|
|
127
|
-
these sources of intent.
|
|
123
|
+
Node `verify:*` sessions receive frozen contribution provenance; see
|
|
124
|
+
[node verification context](#node-verification-context).
|
|
128
125
|
|
|
129
126
|
Create a node and direct work into it (replace ids with those returned by your
|
|
130
127
|
source):
|
|
@@ -143,9 +140,11 @@ Each leaf runs the normal spec, plan/review, implement/review, verify and finali
|
|
|
143
140
|
pipeline against its frozen destination.
|
|
144
141
|
|
|
145
142
|
A node collects until every ticket targeting it is natively done or cancelled,
|
|
146
|
-
all frozen child claims have settled,
|
|
147
|
-
Triage, backlog and ready children
|
|
148
|
-
|
|
143
|
+
or sits in the configured rejected state, all frozen child claims have settled,
|
|
144
|
+
and at least one contribution has merged. Triage, backlog and ready children
|
|
145
|
+
keep it incomplete; a rejected child does not. Exhaustive enumeration of the
|
|
146
|
+
tickets targeting it (a source's `listTargeting` when present, as the GitHub
|
|
147
|
+
and hosted sources provide, otherwise `listAll`) fails closed. Completeness is sampled again before verification and
|
|
149
148
|
publication; tracker edits cannot be transactional with a forge write.
|
|
150
149
|
|
|
151
150
|
The kernel runs all configured verify steps with normal path applicability on
|
|
@@ -164,12 +163,76 @@ consent. Automatic authorization still requires every readiness and merge gate.
|
|
|
164
163
|
A merged node completes its ticket and closes admission; it is not a perpetual
|
|
165
164
|
staging branch. Releases remain separate maintainer operations.
|
|
166
165
|
|
|
166
|
+
Issue links close when the node lands. On GitHub, a child's PR into a node
|
|
167
|
+
ends with one `Refs #N` line per linked issue, so each issue shows the PR that
|
|
168
|
+
did the work, but it never closes anything, and its landed commit carries no
|
|
169
|
+
lines. As each child lands, its links, downgrades included, are recorded on the
|
|
170
|
+
node, and a nested node passes its own links and its set up to its parent. On a
|
|
171
|
+
forge that closes issues and can update PR bodies (GitHub), the root node's PR
|
|
172
|
+
into the default branch carries one line per issue for the node's own links and
|
|
173
|
+
every contribution, kept current as children land and refreshed before the
|
|
174
|
+
kernel lands it. A downgrade by any child makes the issue `Refs`. Merging the
|
|
175
|
+
root node PR, by the kernel or a human, closes the rest, including the node's
|
|
176
|
+
own issue; landed child commits keep their own messages.
|
|
177
|
+
|
|
167
178
|
Human forge merges are an explicit escape hatch, including while incomplete,
|
|
168
179
|
paused or unverified. The janitor records human provenance and whether the actual
|
|
169
180
|
merged head was verified, then completes the ticket. Closing without merge or
|
|
170
181
|
aborting closes admission and returns the ticket to triage; already claimed
|
|
171
182
|
children retain their frozen destination.
|
|
172
183
|
|
|
184
|
+
### Node verification context
|
|
185
|
+
|
|
186
|
+
In node `verify:*` context, `nodeVerification` in the manifest identifies the
|
|
187
|
+
frozen `range`, `indexPath`, `contributions`, `handPushedCommits` and
|
|
188
|
+
`unattributedCommits`. Each contribution has `build`, its preparation-time
|
|
189
|
+
stored `ticket` identity, `spec: {kind: 'spec', rev}` (the event-authorized
|
|
190
|
+
revision), `specPath` and `commits`. The JSON index repeats this metadata and
|
|
191
|
+
adds the exhaustive ordered `commits: [{sha, build?}]` mapping. Paths are
|
|
192
|
+
workspace-relative and reflect scratch allocation, including legacy
|
|
193
|
+
tracked-file collisions. Contribution specs normally live at
|
|
194
|
+
`$AB_CONTEXT_DIR/contributions/<build>/spec.md` and the index at
|
|
195
|
+
`$AB_CONTEXT_DIR/node-verification.json`; both are marked `derived` in
|
|
196
|
+
`materialized`, with their source build and revision recorded in the metadata.
|
|
197
|
+
Read them through the manifest's allocated paths.
|
|
198
|
+
|
|
199
|
+
Membership comes from build identity trailers on every commit reachable in the
|
|
200
|
+
frozen parent-to-head range, including earlier-cycle contributions and merge
|
|
201
|
+
side history. Commits without an identity are listed as unattributed, a
|
|
202
|
+
mechanical absence of a trailer rather than an authorization verdict.
|
|
203
|
+
`handPushedCommits: [{sha, originalSha, message}]`, in the manifest and the
|
|
204
|
+
index, identifies node-owned hand-pushed commits in the frozen range. Ownership
|
|
205
|
+
uses the durable first-parent contribution boundary; inherited and merge-side
|
|
206
|
+
history are not automatically owned. Confirmed rewrite aliases preserve
|
|
207
|
+
original identity across restacks, and `message` is the full commit message.
|
|
208
|
+
|
|
209
|
+
Hand-pushed messages express maintainer-authorized intent: judge quality and
|
|
210
|
+
consistency, and never fail these commits solely for lacking a covering spec.
|
|
211
|
+
Other node changes are authorized when covered by the current event-authorized
|
|
212
|
+
node spec or the spec of the contribution introducing it; use the commit
|
|
213
|
+
mapping to find that spec.
|
|
214
|
+
|
|
215
|
+
The dispatcher collects these inputs with repository authority while preparing
|
|
216
|
+
the exact cycle head, before launching verification, and atomically deposits a
|
|
217
|
+
versioned node-owned `node-verification-context` artifact cited by exact
|
|
218
|
+
revision in `integration.prepared`. Specs use the event-authorized revision at
|
|
219
|
+
preparation, never an unsanctioned latest deposit or mutable ticket body.
|
|
220
|
+
Contributor specs freeze at preparation; resumed and concurrent verifiers read
|
|
221
|
+
the same cycle input, and a new cycle collects fresh contributor identities and
|
|
222
|
+
specs.
|
|
223
|
+
|
|
224
|
+
Hydration reads only that cited artifact, validates its cycle and range, and
|
|
225
|
+
allocates the public paths. It grants no general contributor read authority and
|
|
226
|
+
performs no Git provenance discovery; session and build scope permissions are
|
|
227
|
+
unchanged. Unknown identities, ambiguous or invalid trailers, and missing
|
|
228
|
+
source data prevent preparation; missing, corrupt or mismatched prepared inputs
|
|
229
|
+
fail hydration without publishing a manifest. Historical agent cycles without a
|
|
230
|
+
citation require a new prepared cycle; check-only cycles need no contributor
|
|
231
|
+
inputs. Leaf verification omits node provenance; leaf context is unchanged.
|
|
232
|
+
|
|
233
|
+
See [iterating inside a node](#iterating-inside-a-node) for authoring and
|
|
234
|
+
evolving these sources of intent.
|
|
235
|
+
|
|
173
236
|
## Iterating inside a node
|
|
174
237
|
|
|
175
238
|
Write the node spec as a finite integration charter: its goal, observable
|
|
@@ -198,7 +261,7 @@ An open node supports three ways to iterate:
|
|
|
198
261
|
restrictions.
|
|
199
262
|
|
|
200
263
|
Open children keep the node incomplete, including triage, backlog and ready
|
|
201
|
-
children. Completion remains finite: merged or otherwise ended nodes close
|
|
264
|
+
children. A child in the configured rejected state is not open. Completion remains finite: merged or otherwise ended nodes close
|
|
202
265
|
admission. Iteration does not relax verification of the exact head and parent,
|
|
203
266
|
or the configured readiness, consent and merge gates described above.
|
|
204
267
|
|
package/docs/merge-policy.md
CHANGED
|
@@ -115,13 +115,19 @@ authoritatively ungated root permits an inspected-head guarded direct squash;
|
|
|
115
115
|
unknown gate state defers. Node targets instead require authoritative proof of
|
|
116
116
|
an ungated destination, cancel native auto-merge and serialize the guarded push.
|
|
117
117
|
Gated or unproven node destinations stay open with actionable diagnostics.
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
A push alone is not evidence of merge: a node-target merge is recorded only
|
|
119
|
+
under the publication readback rule in Forge requirements. Forge
|
|
120
|
+
acknowledgement, a merged-SHA comment and closing an unacknowledged open
|
|
121
|
+
review, is best-effort after the merge is recorded and never decides, retries
|
|
122
|
+
or fails the merge.
|
|
120
123
|
|
|
121
124
|
Native application receipts bind to exact candidates; consent does not. Every
|
|
122
125
|
replacement confirms cancellation first; the next poll reconciles native state
|
|
123
|
-
before other actions. Stale enables are repaired by polling.
|
|
124
|
-
|
|
126
|
+
before other actions. Stale enables are repaired by polling. An
|
|
127
|
+
already-enabled native request counts as applied only after the forge confirms
|
|
128
|
+
its squash method and identity message. Each eligible poll re-reads an armed
|
|
129
|
+
request and repairs it when PR edits or a human arm left it stale. This bounded
|
|
130
|
+
model requires replacement-head checks to take far longer than a poll interval. It
|
|
125
131
|
has no durable native-effect reservation. Human forge merges record whether a
|
|
126
132
|
hold was overridden; possible stale-enable merges raise operator attention.
|
|
127
133
|
No result is undone by rewriting the target.
|
|
@@ -149,10 +155,16 @@ admitting nodes or requesting unsupported retargeting or merge operations.
|
|
|
149
155
|
For the lifecycle see [integration trees](integration-tree.md); for old controls
|
|
150
156
|
and upgrade conversion see [migration](migration-1.0.md).
|
|
151
157
|
|
|
152
|
-
Publication
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
158
|
+
Publication, including a node-target merge, is acknowledged only by exact
|
|
159
|
+
authoritative head readback of the destination: `ls-remote` on an origin
|
|
160
|
+
forge, the shared database for local-git. A node merge is recorded when that
|
|
161
|
+
readback shows exactly the candidate head, or from the durable receipt of an
|
|
162
|
+
accepted guarded write overtaken before readback. A different observed head is
|
|
163
|
+
contention and records no merge; a failed readback records nothing and is
|
|
164
|
+
retried. Interrupted publication recovers by the same exact readback; an
|
|
165
|
+
unconfirmed candidate's descendants do not prove success. Durable confirmed
|
|
166
|
+
receipts preserve historical writes. Local refs cache confirmed heads; remote
|
|
167
|
+
expected-head leases and durable writer reservations still guard writes.
|
|
156
168
|
Local-git's shared database retains authoritative CAS.
|
|
157
169
|
|
|
158
170
|
Native cancellation receipts are candidate- and operation-specific. Publication
|
|
@@ -167,7 +179,14 @@ with one deprecation notice on stderr. `node-landed` remains an alias for the
|
|
|
167
179
|
`ab wait --for node-merged` condition. Ordinary help lists only the current names.
|
|
168
180
|
|
|
169
181
|
The deprecated `[[landing]]` config array has the same semantics as `[[merge]]`
|
|
170
|
-
and warns after validation.
|
|
182
|
+
and warns after validation. Commands that read the file warn each time they run.
|
|
183
|
+
`ab dispatch` reports it once at startup with its other configuration notices
|
|
184
|
+
(stderr, or the dashboard's warning region), and once more for each changed
|
|
185
|
+
`autobuild.toml` it evaluates — including a change it rejects or has not yet
|
|
186
|
+
applied, which is labelled as pending. Repeated evaluation and phase launches
|
|
187
|
+
stay quiet, and a build branch's own `landing` key is not reported because merge
|
|
188
|
+
policy comes from the dispatcher's configuration. Declare only one spelling,
|
|
189
|
+
including empty arrays.
|
|
171
190
|
`ab upgrade` renames the old root key and table headers while preserving policy;
|
|
172
191
|
unsupported spellings require the reported manual edit before retrying.
|
|
173
192
|
|
package/docs/operator-api.md
CHANGED
|
@@ -84,11 +84,11 @@ raw session-event append. External operator harnesses own agent execution.
|
|
|
84
84
|
|---|---|
|
|
85
85
|
| `GET …/builds?scope=active\|queued\|all` | Build summaries, newest update first. `queued` means active plus queued, matching `ab builds --queued`. |
|
|
86
86
|
| `GET …/builds/{slug}` | `{detail, dashboardRow}`; `detail.runnerAttaches` records chronological attach boundaries and their runtime identity (version, commit, source kind/location), with null runtime for unrecorded historical attaches; `dashboardRow` remains a `CLEANING` row after `build.aborted` and becomes `null` only when the dashboard stops listing it (after cleanup's `build.completed`). |
|
|
87
|
-
| `GET …/dashboard` | `{generatedAt, model, settingsHeader}`. `model` is the dashboard's rows, steps, elapsed timing inputs, harvest row, queue/capacity and settings projection. Optional `rollback` contains `correlation`, `lineage`, full `failed` and `restored` runtime identities and rollback event `ts` for the authoritative dispatcher lineage’s unresolved hold. Both dashboards name failed, restored and held runtime plus timestamp. Matching durable different-target hold clearance removes it; a fresh operator lineage hides it only after a committed operational tick or accepted takeover. Run-started and yielded ticks alone cannot replace authority; same-lineage generations retain the notice. Historical rollback records are not fallback notices. Optional `handoffs` lists all accepted unfinished handoffs with predecessor `run`, optional `successor`, `correlation`, full `from`/`to` runtimes, `mode` and optional `deadline`. Outstanding drain-mode builds carry `draining: true`, also on build-detail `dashboardRow`; matching settlement removes it. Accepted completion removes the handoff; neither takeover nor the clock does. Missing historical mode means cutover and missing deadline displays unknown. |
|
|
88
|
-
| `GET …/status` | Repository intake, pause, and default-auto-merge projection. |
|
|
87
|
+
| `GET …/dashboard` | `{generatedAt, model, settingsHeader}`. `model` is the dashboard's rows, steps, elapsed timing inputs, harvest row, triage (when the dispatcher published one)/queue/capacity and settings projection. `model.configuration` is `"no-dispatcher-run"` when the repository records no dispatcher run, and absent otherwise. Optional `rollback` contains `correlation`, `lineage`, full `failed` and `restored` runtime identities and rollback event `ts` for the authoritative dispatcher lineage’s unresolved hold. Both dashboards name failed, restored and held runtime plus timestamp. Matching durable different-target hold clearance removes it; a fresh operator lineage hides it only after a committed operational tick or accepted takeover. Run-started and yielded ticks alone cannot replace authority; same-lineage generations retain the notice. Historical rollback records are not fallback notices. Optional `handoffs` lists all accepted unfinished handoffs with predecessor `run`, optional `successor`, `correlation`, full `from`/`to` runtimes, `mode` and optional `deadline`. Outstanding drain-mode builds carry `draining: true`, also on build-detail `dashboardRow`; matching settlement removes it. Accepted completion removes the handoff; neither takeover nor the clock does. Missing historical mode means cutover and missing deadline displays unknown. |
|
|
88
|
+
| `GET …/status` | Repository intake, pause, and default-auto-merge projection. Its `operator` is `{presence: "unavailable", reason}`: this route does not load presence registrations, so it is not evidence that no operator is present. |
|
|
89
89
|
| `GET …/harvest/status` | Harvest gate, runs, steps, recovery, and attention projection. |
|
|
90
90
|
| `GET …/builds/{slug}/artifacts/{kind}?rev=N` | Raw bytes (`application/octet-stream`) plus content-disposition and `X-Autobuild-Artifact-*` metadata headers. Omit `rev` for latest. |
|
|
91
|
-
| `GET …/tickets?state=S&label=L&limit=N&offset=K&order=O` | `{states,tickets,diagnostics,criteria,triageState,readyState,doneState,total}`. The three lifecycle names come from effective repository configuration (including provider fallback). With no `state`, `criteria.state` is `triageState`; repeated `label` parameters narrow that state with AND filters. An explicit `state` selects that exact backend workflow state. `limit` (0–200) returns one page, after skipping `offset`, in `order` `oldest` (the
|
|
91
|
+
| `GET …/tickets?state=S&label=L&limit=N&offset=K&order=O` | `{states,tickets,diagnostics,criteria,triageState,readyState,doneState,total}`. The three lifecycle names come from effective repository configuration (including provider fallback). With no `state`, `criteria.state` is `triageState`; repeated `label` parameters narrow that state with AND filters. An explicit `state` selects that exact backend workflow state. `limit` (0–200) returns one page, after skipping `offset`, in `order` `oldest` (the default: dispatch order, urgent tickets first, then the source order) or `newest` (newest filed first); `total` counts every match before paging. |
|
|
92
92
|
| `GET …/tickets/states` | Full state metadata `{name,tickets,about?}[]`, including empty states (`tickets.states` in MCP). |
|
|
93
93
|
| `GET …/tickets/{id}` | `{ticket,blockers,build}`. Blockers include native `exists`/`resolved` status; `build` prefers an active matching repository build, otherwise the most recently updated one. |
|
|
94
94
|
|
|
@@ -98,17 +98,25 @@ from `0` through `Number.MAX_SAFE_INTEGER` (`9007199254740991`). All other
|
|
|
98
98
|
supplied forms return `400 validation`.
|
|
99
99
|
|
|
100
100
|
Dashboard reads use the latest durable, run-correlated `effectiveConfig`
|
|
101
|
-
repository artifact.
|
|
101
|
+
repository artifact. A repository with no recorded dispatcher run answers the
|
|
102
|
+
dashboard with `200` and `model.configuration: "no-dispatcher-run"`: no rows,
|
|
103
|
+
repository controls from the journal, and an Active counter that is not
|
|
104
|
+
meaningful. Reads that need configuration (build detail, ticket context without
|
|
105
|
+
a published ticket policy) return a typed `409 no-dispatcher-run` there. When a
|
|
106
|
+
run is recorded, missing, corrupt, or invalid configuration returns a typed
|
|
102
107
|
`409 effective-config-unavailable`; the service never guesses from a checkout.
|
|
103
108
|
Clients poll these reads — the operator HTTP API exposes no push or long-poll
|
|
104
109
|
event transport. Streaming is provided by `ab watch`; unflagged watches are read-only.
|
|
105
110
|
Only CLI `--operator` watches write advisory liveness, never events or authority;
|
|
106
|
-
MCP presence registration is deferred.
|
|
111
|
+
MCP presence registration is deferred. Repository status over this API and MCP
|
|
112
|
+
marks operator presence `unavailable` rather than reporting an empty registration
|
|
113
|
+
list; use `ab repository status --json` for presence. `ab watch`
|
|
107
114
|
streams build and repository events by polling the same event logs client-side
|
|
108
115
|
(the store protocol's `GET /builds/{slug}/events` and `GET /repos/{repo}/events`
|
|
109
116
|
reads), not as a transport on this API. `triageState`, `readyState`,
|
|
110
117
|
`doneState`, and every entry in `states` are backend state names and must be sent back verbatim
|
|
111
|
-
when used
|
|
118
|
+
when used as the move control's `state`. A move may instead name a lifecycle `role`,
|
|
119
|
+
which the service resolves through the repository's `[tickets]` configuration.
|
|
112
120
|
|
|
113
121
|
## Controls
|
|
114
122
|
|
|
@@ -124,9 +132,9 @@ JSON bodies are strict: unknown fields are rejected.
|
|
|
124
132
|
| `POST …/bulk-control` | `{"action":"pause"\|"resume"}`. The hold fact, intake fact, then eligible build events are written in that order. |
|
|
125
133
|
| `POST …/harvest/control` | `{"action":"toggle-gate"}` or `{"action":"run","run":"…"}`. A run action is bound to that concrete projected run. |
|
|
126
134
|
| `POST …/tickets/states` | `{name,about?}` → `{state,created}`; requires attributed operator identity (`tickets.state.create` in MCP). Hosted duplicate names are refused case-insensitively. |
|
|
127
|
-
| `POST …/tickets` | `{"title":"…","body":"…","labels"?:[],"state"?:"…","blockedBy"?:[],"kind"?:"work"|"node","target"?:"id"|null}`; omitted state preserves the backend default. |
|
|
128
|
-
| `PATCH …/tickets/{id}` | Any nonempty subset of `title`, `body`, complete-replacement `labels`, `kind` (`work` or `node`), and nullable `target` (null clears). Body bytes are not normalized. |
|
|
129
|
-
| `POST …/tickets/{id}/move` | `{"state":"backend state name"}`. |
|
|
135
|
+
| `POST …/tickets` | `{"title":"…","body":"…","labels"?:[],"state"?:"…","blockedBy"?:[],"issueLinks"?:[{"issue":N,"intent"?:"closes"|"refs"}],"priority"?:"urgent"|"normal","kind"?:"work"|"node","target"?:"id"|null}`; omitted state preserves the backend default, omitted intent is `closes`, and omitted priority is normal. A backend that cannot store issue links refuses with `code: "issue-links-unsupported"`; one that cannot store priority refuses `urgent` with `code: "priority-unsupported"` and accepts `normal` as a no-op. |
|
|
136
|
+
| `PATCH …/tickets/{id}` | Any nonempty subset of `title`, `body`, complete-replacement `labels`, complete-replacement `issueLinks` (`[]` clears), `priority` (`urgent` or `normal`; refusals as for create), `kind` (`work` or `node`), and nullable `target` (null clears). Body bytes are not normalized. |
|
|
137
|
+
| `POST …/tickets/{id}/move` | Exactly one of `{"state":"backend state name"}` or `{"role":"triage"\|"ready"\|"backlog"\|"rejected"}`; both or neither is `400 validation` (`tickets.move` in MCP takes the same target). A role resolves to the configured `triageState`, `readyState`, `backlogState`, or `rejectedState`. An unset `backlogState` or `rejectedState` refuses with a message naming the key to set, and never guesses a native state. A source that can create states creates a missing role state before moving. |
|
|
130
138
|
| `POST …/tickets/{id}/block` | `{"blockerIds":["…"]}`. |
|
|
131
139
|
| `POST …/tickets/{id}/unblock` | `{"blockerIds":["…"]}`. |
|
|
132
140
|
|
|
@@ -214,6 +222,11 @@ skew and unavailable projections are `409 conflict`. A build outside the URL's
|
|
|
214
222
|
repository is deliberately hidden as `404 not-found` with `unknown build`,
|
|
215
223
|
consistently for detail, control, answer, and artifact routes. Control refusals are `409
|
|
216
224
|
refusal` and preserve the shared `BuildControlError` code and exact reason text.
|
|
225
|
+
A `land` control whose merge candidate is not ready is refused with code
|
|
226
|
+
`merge-not-ready`, and its reason names the unmet condition; a node that fails
|
|
227
|
+
the live completeness check is refused with code `node-incomplete`, naming any
|
|
228
|
+
open children. Neither records consent or starts a merge, so refresh the
|
|
229
|
+
build's status and retry once the reason is resolved.
|
|
217
230
|
A partial bulk failure uses code `bulk-partial` and includes the durable write
|
|
218
231
|
progress and unattempted builds. Unexpected failures are `500 internal`.
|
|
219
232
|
|
|
@@ -280,7 +293,8 @@ The default watch reports actionable conditions only:
|
|
|
280
293
|
build/PR; it does not duplicate consent or hold attention.
|
|
281
294
|
- Repository `harvest.escalated`, `harvest.recovery-exhausted`,
|
|
282
295
|
`dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
|
|
283
|
-
`restartRequired`, `dispatcher.upgrade-failed`, `dispatcher.runtime-rolled-back`,
|
|
296
|
+
`restartRequired`, `dispatcher.upgrade-failed`, `dispatcher.runtime-rolled-back`,
|
|
297
|
+
`dispatcher.kernel-git-unavailable`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
|
|
284
298
|
- `dispatcher.ticket-source-persistent`: degradation past its advertised
|
|
285
299
|
reset time, once a tick started at or after reset has completed or failed
|
|
286
300
|
with the episode still open; crossing reset alone is silent. Without a reset,
|
|
@@ -343,8 +357,8 @@ when no events are available. Repository event reads have a 1,000-position
|
|
|
343
357
|
window; build history itself remains available through explicit pages.
|
|
344
358
|
|
|
345
359
|
|
|
346
|
-
Hosted ticket tools resolve independent project ticket policy
|
|
347
|
-
configuration. Queue, detail, state discovery and mutations work before any build
|
|
360
|
+
Hosted ticket tools resolve independent project ticket policy, including its
|
|
361
|
+
backlog and rejected roles for role moves, before legacy uploaded configuration. Queue, detail, state discovery and mutations work before any build
|
|
348
362
|
or dispatcher run; detail reports a null matching build. Ticket policy publication
|
|
349
363
|
never creates synthetic build or repository history.
|
|
350
364
|
|
|
@@ -379,13 +393,22 @@ non-node, unopened and terminal builds and enforces repository ownership.
|
|
|
379
393
|
|
|
380
394
|
Repository status includes `upgrades.runs`, keyed by originating dispatcher run,
|
|
381
395
|
with latest successful `resolved` target, detected target, failure, handoff and
|
|
382
|
-
completion evidence.
|
|
396
|
+
completion evidence. It retains at most 16 runs: the authoritative run, the run
|
|
397
|
+
holding the newest accepted handoff, the newest settled outcomes, then the most
|
|
398
|
+
recently active, keeping incomplete handoffs longest. Full upgrade history stays
|
|
399
|
+
in the repository journal for explicit history reads. `dispatcher.upgrade-target-resolved` carries strict
|
|
383
400
|
`{run, lineage, target}` data; the target has mode (`pinned`, `installed`, or
|
|
384
401
|
`source`), content key, source provenance and optional version/base/SHA. Source
|
|
385
402
|
mode names the authoritative base commit, which can advance without changing
|
|
386
403
|
packaged inputs or the running runtime. Status text renders the resolved mode,
|
|
387
404
|
base and SHA separately, so an older handoff cannot hide a newer target. Identical
|
|
388
|
-
observations append nothing
|
|
405
|
+
observations append nothing. A failure fact stays on its run until a later
|
|
406
|
+
successful preparation or handoff clears it; status marks it superseded once a
|
|
407
|
+
later resolved target with a different key, or a later generation, exists.
|
|
408
|
+
Human status shows at most the live handoff, the current generation's resolved
|
|
409
|
+
target and latest outcome, and the latest settled outcome from an earlier
|
|
410
|
+
generation; JSON `upgradeStatus` (`handoff`, `current`, `previous`, with
|
|
411
|
+
`superseded` on a replaced failure) carries the same projection. Facts carry launcher
|
|
389
412
|
lineage, from/to runtimes, resolution mode and authoritative base SHA/ref or original
|
|
390
413
|
installation provenance, plus prepared cache identity. Completion names the successor
|
|
391
414
|
and records completed retirement separately from takeover. During a handoff the
|
|
@@ -397,9 +420,11 @@ relaunch; their separate handoff capture never holds retirement open. `dispatche
|
|
|
397
420
|
attention; the current generation remains active and identical failed inputs are
|
|
398
421
|
suppressed across native handoff until target or selected-store compatibility evidence changes or a fresh operator launch.
|
|
399
422
|
|
|
400
|
-
Repository status additionally exposes `upgrades.lastRollback` (
|
|
401
|
-
when cleared), `upgrades.holds` keyed by launcher lineage
|
|
402
|
-
|
|
423
|
+
Repository status additionally exposes `upgrades.lastRollback` (the single latest
|
|
424
|
+
rollback, retained when cleared), `upgrades.holds` keyed by launcher lineage (up to
|
|
425
|
+
16 lineages, always including the authoritative lineage's hold), `upgrades.lineages`
|
|
426
|
+
keyed by generation run (the 16 most recent generation starts, always including the
|
|
427
|
+
authoritative run), optional `upgrades.authoritativeRun` from rollback, accepted takeover or committed operational tick (never startup/yield alone), `upgrades.rollbackIds` for idempotent rollback correlations (the 16 most recent), and `rollbackHold` for the effective dispatcher lineage.
|
|
403
428
|
`dispatcher.runtime-rolled-back` names failed/restored runtime identities and cache
|
|
404
429
|
roots, target, original handoff/takeover, three failed exits and reason. It is default
|
|
405
430
|
repository attention. `dispatcher.rollback-hold-cleared` records a different
|
|
@@ -543,7 +568,7 @@ permission or retention failures leave deletion pending. Vercel Blob cleanup use
|
|
|
543
568
|
the same store identity, token and prefixed pathname as uploads. Missing objects
|
|
544
569
|
are successful cleanup; provider errors never count as completed deletion.
|
|
545
570
|
|
|
546
|
-
Paged ticket listings use the source's optional native `listPage(criteria, page)` capability when present, otherwise read the full listing and
|
|
571
|
+
Paged ticket listings use the source's optional native `listPage(criteria, page)` capability when present, otherwise read the full listing, order it, and slice it: by default urgent tickets first, then normal ones, each in source order; for `newest`, the reversed source order. Native errors propagate. PostgreSQL counts matches without bodies and reads only the requested window. Zero limits and offsets past the end still report the full matching total. Unpaged listings remain exhaustive; the wire payload is the same for both paths.
|
|
547
572
|
|
|
548
573
|
|
|
549
574
|
### Forge cooldown admission and explicit recovery
|
|
@@ -35,7 +35,7 @@ bun ab build status example-build --json
|
|
|
35
35
|
- Interactive `dispatch` shows the terminal dashboard.
|
|
36
36
|
- A shell-capable agent follows progress and acts through the CLI, including `bun ab watch` and `bun ab wait`.
|
|
37
37
|
- A standing CLI operator uses `bun ab watch --operator --json` after checking `bun ab repository status --json` for existing presence. It operates the builds the repository's dispatcher dispatches and adopts new ones.
|
|
38
|
-
- Presence is advisory
|
|
38
|
+
- Presence is advisory and allows multiple registrations. MCP repository status marks it `unavailable`, which is not evidence of absence. Termination attempts withdrawal; routine timeout/count re-arms keep the five-minute grace. SIGKILL and failed withdrawal rely on TTL expiry.
|
|
39
39
|
- Dashboard and API share one lifecycle vocabulary.
|
|
40
40
|
|
|
41
41
|
A local CLI can use a remote Store:
|