@defrex/autobuild 1.12.0 → 1.13.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 +435 -160
- package/bin/ab-build-runner.ts +8 -0
- package/docs/answering-blocked-builds.md +25 -3
- package/docs/architecture.md +124 -53
- package/docs/cli.md +1 -1
- package/docs/configuration.md +110 -15
- package/docs/dispatcher.md +19 -8
- package/docs/integration-overview.md +1 -1
- package/docs/integration-tree.md +12 -9
- package/docs/merge-policy.md +7 -2
- package/docs/operating.md +5 -3
- package/docs/operator-api.md +46 -23
- package/docs/operator-surfaces.md +7 -6
- package/docs/optimization-nodes.md +7 -6
- package/docs/plugin-authoring.md +46 -18
- package/docs/remote-store-protocol.md +51 -12
- package/docs/remote-ticket-protocol.md +85 -38
- package/docs/restacking.md +48 -3
- package/docs/setup.md +2 -1
- package/docs/ticket-migration.md +2 -2
- package/docs/ticket-sources.md +23 -8
- package/docs/tickets.md +4 -4
- package/docs/troubleshooting.md +17 -2
- package/docs/verification.md +3 -1
- package/package.json +3 -3
- package/packages/core/src/cli/build-control.ts +72 -6
- package/packages/core/src/cli/dashboard/actions.ts +4 -0
- package/packages/core/src/cli/dashboard/integration-row.ts +43 -19
- package/packages/core/src/cli/dashboard/model.ts +14 -8
- package/packages/core/src/cli/dashboard/poll.ts +218 -10
- package/packages/core/src/cli/dashboard/queue.ts +21 -10
- package/packages/core/src/cli/dashboard/row-text.ts +2 -1
- package/packages/core/src/cli/dashboard/vocabulary.ts +5 -1
- package/packages/core/src/cli/dispatch-frontend.ts +2 -1
- package/packages/core/src/cli/dispatch-tickets.ts +33 -12
- package/packages/core/src/cli/dispatch.ts +527 -144
- package/packages/core/src/cli/help.ts +38 -24
- package/packages/core/src/cli/main.ts +7 -5
- package/packages/core/src/cli/publication-settlement.ts +4 -0
- package/packages/core/src/cli/remote-poll.ts +22 -5
- package/packages/core/src/cli/repository-status.ts +19 -9
- package/packages/core/src/cli/status.ts +23 -11
- package/packages/core/src/cli/store-opening.ts +12 -0
- package/packages/core/src/cli/ticket-start.ts +3 -3
- package/packages/core/src/cli/ticket.ts +12 -11
- package/packages/core/src/cli/wait.ts +8 -28
- package/packages/core/src/cli/watch.ts +113 -50
- package/packages/core/src/config/reference-metadata.ts +7 -1
- package/packages/core/src/config/reference.ts +5 -2
- package/packages/core/src/config/schema.ts +51 -16
- package/packages/core/src/events/payloads.ts +74 -14
- package/packages/core/src/events/repository.ts +14 -3
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +27 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/0a10010ee5cf2e47.json +577 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/227701361be6d1e0.json +490 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/76e5043bae7a80ab.json +86 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/87a917802870bbed.json +87 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9d85616e5b9e24c1.json +500 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/c7c94fbe7f63cf07.json +84 -0
- package/packages/core/src/kernel/clean-restack-policy.ts +40 -0
- package/packages/core/src/kernel/dispatch-capacity.ts +243 -107
- package/packages/core/src/kernel/done-escalations.ts +269 -0
- package/packages/core/src/kernel/engine.ts +28 -9
- package/packages/core/src/kernel/integration-landing.ts +24 -4
- package/packages/core/src/kernel/integration-stack.ts +39 -0
- package/packages/core/src/kernel/janitor-failure.ts +20 -1
- package/packages/core/src/kernel/log-index-value.ts +3 -0
- package/packages/core/src/kernel/log-index.ts +41 -2
- package/packages/core/src/kernel/open-pr-backpressure.ts +3 -3
- package/packages/core/src/kernel/reducer-registry.ts +3 -0
- package/packages/core/src/kernel/reducer-revisions.ts +15 -0
- package/packages/core/src/kernel/reducer.ts +27 -7
- package/packages/core/src/kernel/repository-attention.ts +14 -5
- package/packages/core/src/kernel/ticket-starts.ts +15 -4
- package/packages/core/src/kernel/verify-stages.ts +46 -7
- package/packages/core/src/operator/attention.ts +28 -3
- package/packages/core/src/operator/done-escalations.ts +38 -0
- package/packages/core/src/operator/presentation.ts +1 -1
- package/packages/core/src/operator/protocol.ts +8 -5
- package/packages/core/src/operator/query.ts +33 -19
- package/packages/core/src/operator/registry.ts +17 -13
- package/packages/core/src/operator/ticket-start.ts +8 -7
- package/packages/core/src/operator/tickets.ts +28 -9
- package/packages/core/src/plugin-sdk/index.ts +10 -0
- package/packages/core/src/plugins/manifest.ts +14 -1
- package/packages/core/src/ports/forge/create.ts +8 -0
- package/packages/core/src/ports/forge/github-transport.ts +5 -1
- package/packages/core/src/ports/forge/github.ts +3 -0
- package/packages/core/src/ports/tickets/contract.ts +147 -76
- package/packages/core/src/ports/tickets/create.ts +47 -7
- package/packages/core/src/ports/tickets/fake.ts +8 -4
- package/packages/core/src/ports/tickets/file-codec.ts +4 -3
- package/packages/core/src/ports/tickets/file.ts +7 -3
- package/packages/core/src/ports/tickets/github.ts +1 -0
- package/packages/core/src/ports/tickets/grants.ts +11 -3
- package/packages/core/src/ports/tickets/hosted-index.ts +5 -0
- package/packages/core/src/ports/tickets/linear.ts +28 -9
- package/packages/core/src/ports/tickets/migration.ts +4 -4
- package/packages/core/src/ports/tickets/operations.ts +4 -2
- package/packages/core/src/ports/tickets/priority-labels.ts +213 -0
- package/packages/core/src/ports/tickets/priority.ts +127 -21
- package/packages/core/src/ports/tickets/remote-protocol.ts +10 -0
- package/packages/core/src/ports/tickets/remote.ts +104 -11
- package/packages/core/src/ports/tickets/revision.ts +5 -3
- package/packages/core/src/ports/tickets/search.ts +9 -0
- package/packages/core/src/ports/tickets/tree.ts +8 -6
- package/packages/core/src/ports/types.ts +30 -15
- package/packages/core/src/ports/workspace/build-execution.ts +4 -0
- package/packages/core/src/ports/workspace/builtin-capabilities.ts +4 -0
- package/packages/core/src/ports/workspace/create.ts +16 -3
- package/packages/core/src/ports/workspace/execution-exit-marker.ts +41 -0
- package/packages/core/src/ports/workspace/recovery-step.ts +101 -0
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +510 -145
- package/packages/core/src/processes/build-execution-state.ts +4 -0
- package/packages/core/src/processes/build-runner.ts +14 -1
- package/packages/core/src/processes/dispatcher.ts +544 -212
- package/packages/core/src/processes/execution-settlement.ts +1 -0
- package/packages/core/src/processes/harvest-runner.ts +12 -7
- package/packages/core/src/processes/infrastructure-failure-budget.ts +7 -2
- package/packages/core/src/processes/invocation-budget.ts +176 -0
- package/packages/core/src/processes/publication-loss.ts +38 -3
- package/packages/core/src/processes/workspace-preservation.ts +86 -15
- package/packages/core/src/store/contract.ts +81 -3
- package/packages/core/src/store/event-reads.ts +30 -1
- package/packages/core/src/store/reduced-reads.ts +23 -0
- package/packages/core/src/store/reducer-value-shapes.json +6628 -6469
- package/packages/core/src/store/reducer-value-validation.ts +181 -33
- package/packages/core/src/store/remote/client.ts +169 -29
- package/packages/core/src/store/remote/compatibility.ts +113 -56
- package/packages/core/src/store/remote/credentials.ts +4 -1
- package/packages/core/src/store/remote/protocol.ts +3 -0
- package/packages/core/src/store/remote/released-clients.json +11 -0
- package/packages/core/src/store/remote/released-reducer-values/1.13.0.json +35966 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +18 -16
- package/packages/core/src/store/remote/released-value-policy.ts +144 -0
- package/packages/core/src/store/remote/retry.ts +406 -0
- package/packages/core/src/testing/dispatch-read-budget.ts +144 -10
- package/packages/core/src/testing/index.ts +2 -0
- package/packages/core/src/testing/invocation-budget.ts +42 -0
- package/packages/core/src/testing/reduced-read-budget.ts +381 -18
- package/packages/core/src/testing/released-value-coverage.ts +423 -0
- package/packages/core/src/web/overview-source.ts +19 -6
- package/skills/guide/SKILL.md +138 -67
- package/skills/guide/references/integration-tree.md +12 -9
- package/skills/guide/references/merge-policy.md +7 -2
- package/skills/guide/references/operator-api.md +46 -23
- package/skills/guide/references/optimization-nodes.md +7 -6
- package/skills/guide/references/plugin-authoring.md +46 -18
- package/skills/guide/references/remote-store-protocol.md +51 -12
- package/skills/guide/references/remote-ticket-protocol.md +85 -38
- package/skills/guide/references/restacking.md +48 -3
- package/skills/guide/references/setup.md +2 -1
- package/skills/guide/references/ticket-migration.md +2 -2
- package/skills/operate/SKILL.md +82 -51
- package/skills/plan/SKILL.md +4 -3
- package/skills/spec/SKILL.md +9 -5
- package/skills/tickets/SKILL.md +25 -17
- package/templates/hosted-service/package.json +2 -2
package/bin/ab-build-runner.ts
CHANGED
|
@@ -7,6 +7,10 @@ import {
|
|
|
7
7
|
} from '../packages/core/src/processes/build-child-exit'
|
|
8
8
|
import { watchBuildParent } from '../packages/core/src/processes/build-parent-watch'
|
|
9
9
|
import { BUILD_RUNNER_OPTIONS_ENV } from '../packages/core/src/ports/workspace/local-build-execution'
|
|
10
|
+
import {
|
|
11
|
+
EXECUTION_EXIT_FILE_ENV,
|
|
12
|
+
writeExecutionExitSync,
|
|
13
|
+
} from '../packages/core/src/ports/workspace/execution-exit-marker'
|
|
10
14
|
import {
|
|
11
15
|
parseBuildChildLaunch,
|
|
12
16
|
type BuildChildLaunch,
|
|
@@ -51,5 +55,9 @@ if (input.supervision.kind === 'local-parent') {
|
|
|
51
55
|
} catch {
|
|
52
56
|
exitCode = 1
|
|
53
57
|
}
|
|
58
|
+
// A stopped persistent sandbox no longer reports the command's exit, so the
|
|
59
|
+
// runner records it on the environment's own filesystem for re-observation.
|
|
60
|
+
const exitFile = process.env[EXECUTION_EXIT_FILE_ENV]
|
|
61
|
+
if (exitFile) writeExecutionExitSync(exitFile, input.instance, exitCode)
|
|
54
62
|
process.exit(exitCode)
|
|
55
63
|
}
|
|
@@ -6,8 +6,8 @@ Every action below is sessionless, records a human-authored fact, and accepts
|
|
|
6
6
|
`--store <ref>`.
|
|
7
7
|
|
|
8
8
|
A blocked build holds no capacity slot once nothing is still working on it.
|
|
9
|
-
Answering doesn't give it one: it waits as a `resume` request ahead of
|
|
10
|
-
|
|
9
|
+
Answering doesn't give it one: it waits as a `resume` request ahead of ticket
|
|
10
|
+
claims at its level, higher levels first, and runs once a slot frees. A build whose
|
|
11
11
|
work goes on keeps its slot through the answer and requests nothing: another
|
|
12
12
|
step of its verify stage still running, a launch in flight, or a running
|
|
13
13
|
execution launched with the slot. A `--revise-spec` answer requests nothing
|
|
@@ -91,7 +91,7 @@ RESUME on a waiting build answers it. The dispatcher ends the wait on its
|
|
|
91
91
|
first tick after every named ticket completes; a wait with some tickets still
|
|
92
92
|
open stays in place. To end it early, for example when the work landed another
|
|
93
93
|
way, `ab answer <slug> <text>` or a bare `ab answer <slug>` ends the wait.
|
|
94
|
-
Either way the build waits as a `resume` request and takes the next free slot ahead of
|
|
94
|
+
Either way the build waits as a `resume` request and takes the next free slot ahead of ticket claims at its level (higher levels first; `ab priority <slug> urgent` expedites it). If its target
|
|
95
95
|
branch has moved past the base the build's work sits on, the build first
|
|
96
96
|
restacks onto the target's current head so the resumed phase sees the merged blockers; a conflicting
|
|
97
97
|
restack shows as `reconcile` and resolves first. The phase that declared the
|
|
@@ -189,3 +189,25 @@ uncited artifacts are inert. Leaves still require an open escalation and
|
|
|
189
189
|
restart from `plan` after any unfinished reconcile resumes under the revised
|
|
190
190
|
spec and its publication is confirmed. A settled, unmerged leaf awaiting merge
|
|
191
191
|
revises without an escalation through `ab reopen`.
|
|
192
|
+
|
|
193
|
+
## Acknowledging an escalation on a completed build
|
|
194
|
+
|
|
195
|
+
A done build can still gain an escalation: the post-landing integration audit
|
|
196
|
+
raises one when a node's merged result does not match what was verified, after
|
|
197
|
+
the build completed. Answer it like any other:
|
|
198
|
+
|
|
199
|
+
- `ab answer <slug> <text>` or `builds.answer` `guidance` records the text.
|
|
200
|
+
- `ab answer <slug>` or `builds.answer` `retry` records a bare acknowledgement.
|
|
201
|
+
|
|
202
|
+
Either closes every open escalation with `escalation.answered`. The build stays
|
|
203
|
+
done: nothing resumes, restarts or reopens. Every other answer form
|
|
204
|
+
(`--revise-spec`, `--revise-spec-from-ticket`, `--dismiss`, `--accept-target`,
|
|
205
|
+
`--review-round-ceiling`) is refused with `inactive`, and so is a done build
|
|
206
|
+
with nothing open.
|
|
207
|
+
|
|
208
|
+
`ab build status` / `builds.get`, `ab watch` / `ab wait` attention, both
|
|
209
|
+
dashboards, `ab web` and `operator.attention` show the escalation while it is
|
|
210
|
+
open and drop it once acknowledged. On a dashboard the build reads red
|
|
211
|
+
`BLOCKED` with the note `done` and its question, and holds no slot. Completion
|
|
212
|
+
closes no escalation, so a question still open when abort cleanup completed
|
|
213
|
+
shows the same way until it is acknowledged.
|
package/docs/architecture.md
CHANGED
|
@@ -98,7 +98,7 @@ remote-store protocol requires matching client and server versions.
|
|
|
98
98
|
| `packages/core/src/ports/` | TicketSource / Workspace / Forge / AgentRunner / Telemetry interfaces, adapters, and fakes; registry-aware builtin/plugin construction; eager primary/alternate runtime routing and provider-failure classification, awaited native identity observation and optional fresh-process native resume under `ports/runner/` | §3.2, §9, §13 |
|
|
99
99
|
| `packages/core/src/plugins/` | Strict versioned plugin manifests, dual-root repository/package Bun loading, owner-aware adapter registration, contract/credential metadata, and runtime-factory materialization | §3.2.1, §9 |
|
|
100
100
|
| `packages/core/src/plugin-sdk/` | The sole supported `@defrex/autobuild/plugin-sdk` barrel: port/manifest types, contract suites, and reference fakes | §3.2.1 |
|
|
101
|
-
| `packages/core/src/processes/` | build-runner and standalone child composition, durable execution config/diagnostics, dispatcher (+ janitor duty, sandbox idle settlement and harvest trigger), harvest deterministic core + runner, configured hook delivery (`hooks.ts`, `hook-command.ts`, `hook-webhook.ts`), repository agent-context capture (`agent-context.ts`, pure selection in `agent-context-assemble.ts`) | §3.3, §7.1.2, §12, §15.7, §16.1 |
|
|
101
|
+
| `packages/core/src/processes/` | build-runner and standalone child composition, durable execution config/diagnostics, dispatcher (+ janitor duty, sandbox idle settlement and harvest trigger), bounded-invocation budget (`invocation-budget.ts`), harvest deterministic core + runner, configured hook delivery (`hooks.ts`, `hook-command.ts`, `hook-webhook.ts`), repository agent-context capture (`agent-context.ts`, pure selection in `agent-context-assemble.ts`) | §3.3, §7.1.2, §12, §15.7, §16.1 |
|
|
102
102
|
| `packages/core/src/cli/` and `bin/` | The `ab` CLI — the only agent↔store channel — plus the shared presentation-only durable-progress projection, init/upgrade, the filesystem-only dispatch launcher and immutable generation cache, the dispatch frontend (Store-backed, plus the viewer's ticket-source triage count) and its in-process web server, its private supervised kernel entry, and `bin/ab-build-runner.ts` (one child per build) | §8, §14, §16.3 |
|
|
103
103
|
| `packages/core/src/cli/dashboard/` | `ab dispatch`'s fixed live frame: pure projection, renderer, poll cache, and deterministic image renderer | §14 |
|
|
104
104
|
| `bin/agent/ab` | Private launcher placed first on agent-session `PATH`; delegates to the canonical `bin/ab.ts` | §8.1 |
|
|
@@ -245,11 +245,16 @@ identity, receive answers projected onto their
|
|
|
245
245
|
frozen released contracts in `store/remote/released-reducer-values/` and stamped
|
|
246
246
|
with their released reducer versions, including projection-capable published clients.
|
|
247
247
|
The projection covers both named reducer values and historical stream seeds.
|
|
248
|
-
`reducerValueForClient` omits optional `lastEvent` fields
|
|
248
|
+
`reducerValueForClient` omits optional `lastEvent` fields the release cannot
|
|
249
|
+
represent (newer event variants, or well-formed events with newer payload values),
|
|
249
250
|
including nested build state, and filters `seenTypes` to known event types while
|
|
250
|
-
preserving canonical cursor, progress, and compatibility facts.
|
|
251
|
-
or
|
|
252
|
-
|
|
251
|
+
preserving canonical cursor, progress, and compatibility facts. Widened literals are
|
|
252
|
+
rewritten or omitted at the sites declared in `store/remote/released-value-policy.ts`;
|
|
253
|
+
`released-value-coverage.integration.test.ts` sweeps populated values covering every
|
|
254
|
+
union variant against every supported contract and fails on an undeclared divergence.
|
|
255
|
+
An invalid envelope or an unrepresentable required value raises
|
|
256
|
+
`ReducerValueIncompatibilityError` with client/server versions, validation detail and
|
|
257
|
+
upgrade advice; `ab watch` and `ab wait` treat it as terminal. See the
|
|
253
258
|
[reduced-value protocol](remote-store-protocol.md) for the response
|
|
254
259
|
contract. No remote named read replays events.
|
|
255
260
|
Repository digest batches likewise return the server batch with one scoped
|
|
@@ -287,7 +292,11 @@ registered build reducer, a pure invertible contribution, an accumulator with
|
|
|
287
292
|
histograms of `store/histogram.ts`. `kernel/build-roster.ts` is the second:
|
|
288
293
|
its `buildRosterEntry` build reducer feeds `buildRoster`, the live builds plus
|
|
289
294
|
a capped history of the newest finished ones, which `ab web`'s overview starts
|
|
290
|
-
from. `
|
|
295
|
+
from. `kernel/done-escalations.ts` is the third: its `doneEscalationEntry`
|
|
296
|
+
build reducer mirrors the build reducer's open-escalation rules and feeds
|
|
297
|
+
`doneEscalations`, the done builds whose escalation still awaits
|
|
298
|
+
acknowledgement, which every dashboard and `operator.attention` read beside
|
|
299
|
+
the open builds. `store/rollups.ts` is the one engine every
|
|
291
300
|
adapter runs over a narrow `RollupStorage` port: fast path on an unchanged
|
|
292
301
|
change position, otherwise an advance by the changed-builds feed, serialized
|
|
293
302
|
per key and committed atomically with each build's absorbed contribution in
|
|
@@ -528,8 +537,9 @@ head is a no-op; Git/Forge failures stay failure-tolerant observations.
|
|
|
528
537
|
**Verify gating.** `packages/core/src/ontology.ts` owns the canonical
|
|
529
538
|
`pass | fail | skipped` outcome (only `fail` routes back to implement or
|
|
530
539
|
consumes attempts; a skip satisfies one step without being passing
|
|
531
|
-
evidence).
|
|
532
|
-
post-reconcile policy, approved plan selection, and
|
|
540
|
+
evidence). Four kernel-authored skip sources narrow the configured universe:
|
|
541
|
+
post-reconcile policy, clean-restack policy, approved plan selection, and
|
|
542
|
+
changed paths.
|
|
533
543
|
The engine captures the ordered effective `afterReconcile` policy in
|
|
534
544
|
`verify.reconcile-policy-captured` at the action after reconciliation completes,
|
|
535
545
|
before verification starts. Log-index replay keeps it scoped to that completion;
|
|
@@ -540,6 +550,14 @@ and carry `skipCause: "post-reconcile-policy"` plus a setting-specific reason.
|
|
|
540
550
|
The shared dashboard model renders that reason, as does the PR summary.
|
|
541
551
|
Excluded steps do not re-verify merged code, so combination-only breakage can
|
|
542
552
|
merge; forge requirements and reconcile budgets remain independent.
|
|
553
|
+
The clean-restack policy is frozen earlier, in the restack intent itself:
|
|
554
|
+
`kernel/clean-restack-policy.ts` resolves `afterCleanRestack` for a
|
|
555
|
+
root-targeting leaf's awaiting-landing intent in `BuildRunner.restack`, and
|
|
556
|
+
the intent, rewrite and completion all carry it as `cleanRestackPolicy`, so no
|
|
557
|
+
gap exists between the restack and the policy capture. While that completion
|
|
558
|
+
is the newest code boundary (`cleanRestackPolicyInForce` in
|
|
559
|
+
`kernel/verify-stages.ts`), disabled steps skip with
|
|
560
|
+
`skipCause: "clean-restack-policy"` before plan/path applicability.
|
|
543
561
|
For enabled steps,
|
|
544
562
|
`packages/core/src/kernel/plan-verify-selection.ts` resolves an approved plan's front-matter
|
|
545
563
|
selection (applied at the planner's `ab done` in `packages/core/src/cli/terminals.ts`,
|
|
@@ -720,16 +738,30 @@ standalone `dispatcher.tick-failed` diagnostic before the next operational tick.
|
|
|
720
738
|
An unacknowledged diagnostic remains pending and may be duplicated after a lost
|
|
721
739
|
response. Reporting never closes a later tick boundary or gates committed
|
|
722
740
|
handoff acceptance. Explicit shutdown, supersession and fatal forge publication
|
|
723
|
-
still stop the loop
|
|
724
|
-
|
|
741
|
+
still stop the loop. Once mode ends its run after its tick: a durably reported tick
|
|
742
|
+
failure records a normal `dispatcher.run-stopped` with exit code 1 and the error
|
|
743
|
+
(`DispatchTickFailedError` carries it to `abDispatch`), then rethrows the original
|
|
744
|
+
error; an unreported failure, fatal forge publication or fatal ticket preparation
|
|
745
|
+
stops abnormally. Stopping before recovery leaves only local warnings for
|
|
746
|
+
unreported failures. A tick-failure episode in `kernel/repository-attention.ts`
|
|
747
|
+
spans runs, so consecutive one-tick hosted runs still reach the five-minute
|
|
748
|
+
persistent-tick attention.
|
|
749
|
+
|
|
750
|
+
`dispatcherTicketSource` returns a hosted source with its preparation deferred:
|
|
751
|
+
`DispatchLoop.prepareTickets` publishes the ticket policy and settles targeted
|
|
752
|
+
listing at the first tick boundary, once it succeeds. A transient
|
|
753
|
+
(`RemoteUnavailableError`) failure there is an ordinary tick failure;
|
|
754
|
+
any other is wrapped as `FatalTicketPreparationError` and stops the run
|
|
755
|
+
abnormally with the original error. `abDispatch` scopes the invocation deadline
|
|
756
|
+
(`withRemoteRetryDeadline`) so it also bounds client retries.
|
|
725
757
|
Failure settlement writes through the fenced backing store without reading the
|
|
726
758
|
failed projection. Repository view writes distinguish a committed result from a
|
|
727
759
|
subsequent refresh failure, retaining the last complete snapshot while propagating
|
|
728
760
|
the read error to the operational caller. Exact metadata confirmation acknowledges
|
|
729
761
|
lost finish responses without requiring another projection read or duplicating
|
|
730
762
|
boundaries. Every operational tick refreshes facts before routing work. Startup
|
|
731
|
-
configuration errors, fatal forge publication errors
|
|
732
|
-
|
|
763
|
+
configuration errors, fatal forge publication errors and lease fencing retain
|
|
764
|
+
their existing semantics.
|
|
733
765
|
|
|
734
766
|
Timeout escalation is held while the matching repository tick observation is open
|
|
735
767
|
(with historical `tick-started` journal fallback when no observation exists),
|
|
@@ -788,7 +820,9 @@ SHAs could not be inspected. An environment that never started executing holds
|
|
|
788
820
|
no unpublished work: objects its checkout lacks mean nothing to preserve, so
|
|
789
821
|
cleanup records `workspace.commits-preserved` (or `workspace.commits-retained`)
|
|
790
822
|
carrying forward earlier preserved heads, then releases and replaces it. Unknown fencing, inspection, transport, or
|
|
791
|
-
receipt-write outcomes leave the workspace and snapshots intact
|
|
823
|
+
receipt-write outcomes leave the workspace and snapshots intact, except under
|
|
824
|
+
abort cleanup, which records `workspace.commits-lost` and tears the workspace
|
|
825
|
+
down. A workspace
|
|
792
826
|
flagged by `workspace.cleanup-required` is never launched into: the dispatcher
|
|
793
827
|
releases it and provisions the next generation. Provisioning cut off by a
|
|
794
828
|
recorded dispatcher teardown is the exception: the next invocation asks the
|
|
@@ -897,17 +931,19 @@ restart boundary, so the engine re-runs implement, review, verify and finalize
|
|
|
897
931
|
without special cases, and the terminal guard lets the re-run finalize and
|
|
898
932
|
verify attempts complete again.
|
|
899
933
|
Slot admission order (SPEC §12) is arithmetic in `kernel/dispatch-capacity.ts`:
|
|
900
|
-
waiting entries carry the build's
|
|
901
|
-
`
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
its own
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
934
|
+
waiting entries carry the build's level (`buildPriority` over the reduced
|
|
935
|
+
`priority` and `priorityLevel` that `build.created` and `build.priority-set`
|
|
936
|
+
set), `startClaimDemand` counts pending start requests by tier (`startTierOf`),
|
|
937
|
+
`reservedAhead` counts, ahead of a waiter at one level, the manual requests and
|
|
938
|
+
every higher level's waiters, start requests and the latest admission scan's
|
|
939
|
+
claim demand (`urgentWaiting`, `highWaiting`, `normalWaiting`, read by
|
|
940
|
+
`claimDemand`), `intakeCapacity` gives each level's ordinary claims its own
|
|
941
|
+
budget, and `startCapacity` gives each start tier its own. The dispatcher's
|
|
942
|
+
`leafAdmission`, `nodeAdmission` and proposer admission defer a non-urgent
|
|
943
|
+
waiter that fits while claims can run and a higher-level claim can exist
|
|
944
|
+
(`higherClaimsPossible`); `dispatch` forces that tick's admission scan once per
|
|
945
|
+
deferral key, and `admitDeferredParked` retries the deferred admissions only
|
|
946
|
+
after the scan decided claims at every level: a leaf
|
|
911
947
|
through the build sweep, a node reconcile through `cascadeNode`, any other node
|
|
912
948
|
need through `admitNode`, and a proposal through `admitProposers`.
|
|
913
949
|
Ticket waits (SPEC §11) span four seams. `cli/terminals.ts` (`waitOn`, routed
|
|
@@ -1317,7 +1353,13 @@ appending `runner.attached`; resume and workspace-using decisions stay behind
|
|
|
1317
1353
|
successful setup. For a request arriving during an AgentRunner turn, the runner
|
|
1318
1354
|
observes the BuildStore subscription, forwards an `AbortSignal`, deposits/ends
|
|
1319
1355
|
the session without a phase failure, and acknowledges abort. The execution
|
|
1320
|
-
supervisor keeps the lease until every local descendant is reaped.
|
|
1356
|
+
supervisor keeps the lease until every local descendant is reaped. A leaf with
|
|
1357
|
+
no runner to hear the request is acknowledged by the dispatcher instead:
|
|
1358
|
+
`dispatcherAcknowledgesAbort` (`kernel/janitor-failure.ts`) selects a queued,
|
|
1359
|
+
paused or blocked leaf with a pending abort, and with no live execution lease the
|
|
1360
|
+
janitor appends `build.aborted` itself. The lease sweep, startup resume and
|
|
1361
|
+
dispatch recovery stand aside on the same predicate, so no workspace is
|
|
1362
|
+
provisioned and no runner launched only to acknowledge abort. `dispatcher.ts`
|
|
1321
1363
|
defers destructive abort, discard, and terminal-PR cleanup while that lease is
|
|
1322
1364
|
live, then resumes the event-checkpointed janitor saga that closes an unmerged PR,
|
|
1323
1365
|
releases the workspace, deletes exact remote/local branch
|
|
@@ -1330,7 +1372,13 @@ back to triage and records the requested role and missing parts. The
|
|
|
1330
1372
|
`abort.ticket-returned` checkpoint commits the move and comment, then the
|
|
1331
1373
|
repository `ticket.handed-back` report is appended before abandoned completion;
|
|
1332
1374
|
once that report exists the dispatcher writes nothing more to the ticket, so it
|
|
1333
|
-
is the safe boundary for a subsequent ticket move.
|
|
1375
|
+
is the safe boundary for a subsequent ticket move. Abort's workspace release
|
|
1376
|
+
makes one best-effort preservation attempt (`preserveBeforeAbortRelease`):
|
|
1377
|
+
any failure but lost authority, a mixed-version deferral or a live lease
|
|
1378
|
+
(`WorkspaceLeaseLive`), forge deferrals included, records
|
|
1379
|
+
`workspace.commits-lost` and the release proceeds; an uncompleted publication is
|
|
1380
|
+
recorded lost without settlement (`recordPublicationLossBeforeRelease`). A
|
|
1381
|
+
failed provider reap stays due on the next tick. An optimization attempt
|
|
1334
1382
|
is the exception: cleanup settles it `aborted` on the node's log (or settles a
|
|
1335
1383
|
merged attempt as a merge), skips the label, ticket move, comment,
|
|
1336
1384
|
`abort.ticket-returned` checkpoint and `ticket.handed-back` report whatever
|
|
@@ -1463,8 +1511,9 @@ effective-config changes and bounded enrichment refreshes while retaining the
|
|
|
1463
1511
|
cached log and reduction. `repository-poll.ts` serializes the complete presentation
|
|
1464
1512
|
snapshot in both terminal paths. It samples `getRepoChangePosition` before reads,
|
|
1465
1513
|
acknowledges it only after complete admitted reads, and reuses unchanged snapshots
|
|
1466
|
-
for up to ten seconds.
|
|
1467
|
-
|
|
1514
|
+
for up to ten seconds. Discovery never lists builds: the poll cache cold-starts
|
|
1515
|
+
from `listOpenBuilds` and the `doneEscalations` rollup, then advances by
|
|
1516
|
+
`listBuildsChangedSince`; unchanged focused frames make one counter request. Session feeds remain independent.
|
|
1468
1517
|
|
|
1469
1518
|
Both dashboard frontends render one vocabulary. `cli/dashboard/vocabulary.ts`
|
|
1470
1519
|
holds the browser-safe terms: status words and tones, step marks, and the
|
|
@@ -1473,8 +1522,8 @@ clock-dependent step timers. Its only value import is `cells.ts`.
|
|
|
1473
1522
|
header, dispatcher-mode, attention-list, finished-row and overview text. The
|
|
1474
1523
|
terminal renderer paints those values, and `web/protocol.ts` aliases the same
|
|
1475
1524
|
types for the web frame, so a term changes in one place.
|
|
1476
|
-
`web/overview-source.ts` builds `ab web`'s overview from `buildRoster
|
|
1477
|
-
changed-builds feed, through the poll cache's shared row and header helpers
|
|
1525
|
+
`web/overview-source.ts` builds `ab web`'s overview from `buildRoster`,
|
|
1526
|
+
`doneEscalations` and the changed-builds feed, through the poll cache's shared row and header helpers
|
|
1478
1527
|
(`readRowEnrichment`, `projectRowWithEnrichment`, `repositoryDashboardHeader`
|
|
1479
1528
|
in `cli/dashboard/poll.ts`), so the terminal and the web project rows the same
|
|
1480
1529
|
way.
|
|
@@ -1672,11 +1721,18 @@ from `dispatch.failed`, which completes an already established build.
|
|
|
1672
1721
|
(`ticket.identity-recorded`) into `repositoryReadFacts`. `operator/ticket-start.ts`
|
|
1673
1722
|
is the one request/cancel seam behind `ab start` (`cli/ticket-start.ts`), the
|
|
1674
1723
|
`tickets.start` tool and the HTTP start routes. The dispatcher's
|
|
1675
|
-
`honorStartRequests` stage runs
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1724
|
+
`honorStartRequests` stage runs for `manual` and `urgent` requests before
|
|
1725
|
+
intake, and for `high`, `normal` and `low` requests inside intake, before the
|
|
1726
|
+
first ready ticket at their level, or after intake and the deferred parked
|
|
1727
|
+
admissions. The early pass reads at most `START_REQUESTS_PER_TICK` requests and
|
|
1728
|
+
the late passes share as many. It admits pending requests through `dispatch()`
|
|
1729
|
+
in its targeted mode, which skips the ready listing and scan checkpoint, budgets
|
|
1730
|
+
each ticket by its request's tier, but keeps every admission gate. A request the
|
|
1731
|
+
allowance leaves unread is the tick's start barrier (`startBarrier` in
|
|
1732
|
+
`kernel/dispatch-capacity.ts`), sampled when the tick starts.
|
|
1733
|
+
`admissionBarred` is the one guard that applies it: `slotAdmission` consults it
|
|
1734
|
+
for parked leaves, nodes and proposers, intake for ordinary claims, and the
|
|
1735
|
+
start passes for lower tiers.
|
|
1680
1736
|
`kernel/build-creation.ts` derives the keyed canonical slug that the dispatcher and
|
|
1681
1737
|
the hosted server share. The optional `BuildStore.buildCreationIdentity` port says
|
|
1682
1738
|
whether a store creates at the exact slug (method absent), at that derived slug for
|
|
@@ -1746,7 +1802,11 @@ and an explicit opt-in. When
|
|
|
1746
1802
|
adding an adapter, start from its contract suite, not only the interface.
|
|
1747
1803
|
|
|
1748
1804
|
The two remote clients get client-only coverage in core itself, against an
|
|
1749
|
-
injected `fetchFn` with responses built from the protocol's wire schemas.
|
|
1805
|
+
injected `fetchFn` with responses built from the protocol's wire schemas. Both
|
|
1806
|
+
send every request through `store/remote/retry.ts`, which retries transient
|
|
1807
|
+
failures by safety class under one bounded retry window (SPEC "Transient remote
|
|
1808
|
+
retries"); its seams (`sleep`, `timeout`, `now`, `random`) keep retry tests free
|
|
1809
|
+
of real timers, and single-answer tests pass `retry: false`.
|
|
1750
1810
|
`HostedTicketSource` (`ports/tickets/remote.test.ts`) is in-memory unit
|
|
1751
1811
|
coverage that runs in `bun run test`. `RemoteBuildStore`
|
|
1752
1812
|
(`store/remote/client.test.ts`, which also pins scoped-token
|
|
@@ -1949,8 +2009,8 @@ absolute file path containing the edited text. Read the current ticket and
|
|
|
1949
2009
|
reapply the intended changes before retrying; conflicts are never merged.
|
|
1950
2010
|
|
|
1951
2011
|
File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets,
|
|
1952
|
-
state and
|
|
1953
|
-
fingerprint kind, target, title, body, canonical label/blocker sets, state and issue links,
|
|
2012
|
+
state and any priority other than normal; file revisions also cover nonempty issue links. GitHub revisions
|
|
2013
|
+
fingerprint kind, target, title, body, canonical label/blocker sets (priority labels included), state and issue links,
|
|
1954
2014
|
including the ticket's own issue; GitHub tickets carry no comments. Reverting
|
|
1955
2015
|
identical content restores its fingerprint. File checks
|
|
1956
2016
|
re-read immediately before writing, with the existing no-lock race window.
|
|
@@ -1991,20 +2051,27 @@ column that every listing already selects. Dependency states carry each blocker'
|
|
|
1991
2051
|
native `state` for clients that send `x-autobuild-ticket-dependency-state: 1`,
|
|
1992
2052
|
read from the row each lookup already loads; the dispatcher applies the
|
|
1993
2053
|
configured rejected role on top (`markRejected` in `processes/dispatcher.ts`).
|
|
1994
|
-
Priority follows the issue-link pattern
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
2054
|
+
Priority follows the issue-link pattern, stored in the `ab_tickets.priority`
|
|
2055
|
+
column that every listing already selects. Clients sending
|
|
2056
|
+
`x-autobuild-ticket-priority-levels: 1` see all four levels; clients sending
|
|
2057
|
+
only the older `x-autobuild-ticket-priority: 1` see `urgent` or `normal`
|
|
2058
|
+
(`high` and `low` downgrade to normal). The ready listing and default paged
|
|
2059
|
+
order run urgent, high, normal, low, each in filing order.
|
|
1998
2060
|
|
|
1999
2061
|
Ticket integration metadata lives in `ports/tickets/tree.ts`: source compatibility
|
|
2000
2062
|
normalization, capability refusal, graph validation and the pure tree projection.
|
|
2001
|
-
Ticket priority lives in `ports/tickets/priority.ts`: the
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2063
|
+
Ticket priority lives in `ports/tickets/priority.ts`: the four levels
|
|
2064
|
+
(`TICKET_PRIORITIES`), the `priority` capability's typed refusal, the normal
|
|
2065
|
+
no-op strip, `dispatchPriority` (urgent tickets claim urgent builds, every other
|
|
2066
|
+
level normal) and `urgentFirst`, the stable partition the dispatcher applies to
|
|
2067
|
+
its ready listing. `ports/tickets/priority-labels.ts` holds
|
|
2068
|
+
`priorityLabelSource`, the label fallback the compatibility facade wraps around
|
|
2069
|
+
a source without the capability (GitHub, plugins): one `priority:<level>` label
|
|
2070
|
+
per ticket, read from labels already fetched. Normalized tickets omit normal;
|
|
2071
|
+
the hosted service answers `priority` only to clients sending a priority
|
|
2072
|
+
capability header, so published strict wire schemas never see the key. The
|
|
2073
|
+
Linear adapter maps Urgent, High and Low to the matching levels and Medium or
|
|
2074
|
+
No priority to normal; on `normal` it clears only Urgent, High or Low.
|
|
2008
2075
|
File/fake/Linear adapters validate metadata at write boundaries; `operations.ts`
|
|
2009
2076
|
and CLI/operator source opening wrap injected or plugin sources with the same
|
|
2010
2077
|
compatibility facade. Metadata is excluded from hosted persistence/protocols.
|
|
@@ -2066,7 +2133,9 @@ different SHA) and classified transient failures never fall back. Node writes
|
|
|
2066
2133
|
use the same order and record `node.history-retained`; node recovery restores
|
|
2067
2134
|
reserved inputs before reading them and abandons a reservation whose inputs are
|
|
2068
2135
|
kept nowhere. Workspace preservation (`preserveRetained`, `retainPreservedCopy`)
|
|
2069
|
-
is strict: archive ref, else store copy, else release is refused
|
|
2136
|
+
is strict: archive ref, else store copy, else release is refused. Abort cleanup
|
|
2137
|
+
is the one exception: when preservation fails, `recordAbortPreservationFailure`
|
|
2138
|
+
records `workspace.commits-lost` and the release proceeds. A reused copy
|
|
2070
2139
|
keeps its saved base, which preservation retains in turn and
|
|
2071
2140
|
`restoreRetainedHead` follows to a bounded depth.
|
|
2072
2141
|
GitHub uses explicit Git transport leases; local-git uses shared-database
|
|
@@ -2112,9 +2181,11 @@ A clean wait-resume `restack.completed` for a wait declared in `verify:*` or
|
|
|
2112
2181
|
`waitResumeVerifyBoundary`, the reducer moves `verify.cycleSince`, and the
|
|
2113
2182
|
engine's stage selection and cycle boundary both read it through
|
|
2114
2183
|
`leafVerifyCycleInputs`. It is not a replay boundary, so the verify-entry
|
|
2115
|
-
restack does not run again.
|
|
2116
|
-
|
|
2117
|
-
|
|
2184
|
+
restack does not run again. A leaf `restack.completed` carrying a frozen
|
|
2185
|
+
`cleanRestackPolicy` is the same kind of boundary, recorded as
|
|
2186
|
+
`cleanRestackVerifyBoundary`. Otherwise clean awaiting-merge leaf rewrites
|
|
2187
|
+
preserve completed verification when build-owned config is unchanged, even
|
|
2188
|
+
when the old pin commit is no longer an ancestor. Changed config still supersedes while waiting.
|
|
2118
2189
|
Ancestry gates cycles that run further steps; those cycles capture fresh config.
|
|
2119
2190
|
Object packs retain newly introduced replay trees/blobs as well as commit bytes.
|
|
2120
2191
|
Replay retention stores thin Git packs in bounded binary chunks, with a fixed-size completion manifest written only after every chunk is acknowledged. Digest-keyed chunks make interrupted writes retryable; incomplete uploads are never restored. Recovery validates all chunk sizes and the pack digest before installation, and requires the base objects (restoring node prefixes in order). Existing single-artifact base64 packs remain readable. Retained replay artifacts are read only when the requested commit is missing locally, never by idle polling.
|
package/docs/cli.md
CHANGED
|
@@ -39,7 +39,7 @@ Run `bun ab <command>`; `bun ab help <command>` lists flags and subcommands. See
|
|
|
39
39
|
- `answer` — Answer escalations or request a retry.
|
|
40
40
|
- `abort` — Request irreversible build termination and cleanup.
|
|
41
41
|
- `restack` — Request a node restack onto its current parent.
|
|
42
|
-
- `priority` — Set an active build's slot-admission
|
|
42
|
+
- `priority` — Set an active build's slot-admission level: urgent, high, normal or low.
|
|
43
43
|
- `objective` — Show, revise or stop an optimization node's objective and progress.
|
|
44
44
|
- `hold` — Hold a merge, withdrawing consent.
|
|
45
45
|
- `merge` — Consent to a ready merge.
|
package/docs/configuration.md
CHANGED
|
@@ -356,10 +356,14 @@ non-ancestor source records `verify.config-superseded` and starts a fresh cycle
|
|
|
356
356
|
before constructing any further member. Already launched siblings settle first.
|
|
357
357
|
A leaf awaiting merge with completed verification retains its receipts after a
|
|
358
358
|
clean rewrite when build-owned config is unchanged, even when the rewrite
|
|
359
|
-
replaces the pin commit's ancestry.
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
359
|
+
replaces the pin commit's ancestry. Two clean restacks are different: each
|
|
360
|
+
starts a new verification cycle even when config is unchanged, and the earlier
|
|
361
|
+
results cannot satisfy it. A clean landing restack of a root-targeting leaf
|
|
362
|
+
whose frozen `afterCleanRestack` policy enables any step re-verifies on the
|
|
363
|
+
restacked base and head (see
|
|
364
|
+
[Clean-restack re-verification](restacking.md#clean-restack-re-verification)).
|
|
365
|
+
A clean wait-resume restack after a verify or finalize ticket wait re-verifies
|
|
366
|
+
on the resumed base. Changed config still supersedes while waiting; a
|
|
363
367
|
future verification cycle always captures fresh config before running steps.
|
|
364
368
|
Old pass/skip receipts cannot satisfy that cycle, and supersession creates no
|
|
365
369
|
failure or failure-budget charge. Unchanged config on a descendant head retains
|
|
@@ -585,7 +589,7 @@ any table header.
|
|
|
585
589
|
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
586
590
|
- **Local override:** Allowed in .autobuild/local.toml.
|
|
587
591
|
|
|
588
|
-
**Description:** Slots for this repository. A build holds one from admission (a ticket claim, a start request or an admitted slot request) until it waits on a human, another ticket, the forge or its children, or ends. A build whose outside wait ends is admitted again ahead of
|
|
592
|
+
**Description:** Slots for this repository. A build holds one from admission (a ticket claim, a start request or an admitted slot request) until it waits on a human, another ticket, the forge or its children, or ends. A build whose outside wait ends is admitted again ahead of ticket claims at its level, higher levels first (see [slot admission order](dispatcher.md#slot-admission-order)). Occupancy never exceeds capacity.
|
|
589
593
|
|
|
590
594
|
**Constraints:** safe integer; > 0
|
|
591
595
|
|
|
@@ -1201,6 +1205,7 @@ image = "vercel/sandbox/universal:latest"
|
|
|
1201
1205
|
vcpus = 4
|
|
1202
1206
|
timeoutSeconds = 2700
|
|
1203
1207
|
operationTimeoutMs = 30000
|
|
1208
|
+
recoveryTimeoutMs = 120000
|
|
1204
1209
|
snapshotExpirationSeconds = 86400
|
|
1205
1210
|
region = "iad1"
|
|
1206
1211
|
failoverRegions = ["sfo1"]
|
|
@@ -1291,6 +1296,20 @@ preflight = "test \"$(pi --version)\" = \"0.84.4\" && pi update --models"
|
|
|
1291
1296
|
|
|
1292
1297
|
**Constraints:** safe integer; ≥ 1000; ≤ 300000
|
|
1293
1298
|
|
|
1299
|
+
#### `workspace.config.recoveryTimeoutMs`
|
|
1300
|
+
|
|
1301
|
+
**TOML key:** `workspace.config.recoveryTimeoutMs`
|
|
1302
|
+
|
|
1303
|
+
- **Type:** `number`
|
|
1304
|
+
- **Default:** `120000`
|
|
1305
|
+
- **Required:** Optional
|
|
1306
|
+
- **Reload:** Dispatcher restart required; startup adapters retain their configuration. Build-owned pipeline: captured from the execution checkout each verify cycle; later base-branch edits do not replace it. Workspace provisioning applies at the next build launch. A running invocation keeps its captured values.
|
|
1307
|
+
- **Local override:** Committed only: set in autobuild.toml.
|
|
1308
|
+
|
|
1309
|
+
**Description:** Budget in milliseconds for one stopped-sandbox recovery: an explicit cold resume plus the guest git work that follows it, including a push. Any invocation deadline bounds it further. Separate from operationTimeoutMs.
|
|
1310
|
+
|
|
1311
|
+
**Constraints:** safe integer; ≥ 1000; ≤ 600000
|
|
1312
|
+
|
|
1294
1313
|
#### `workspace.config.snapshotExpirationSeconds`
|
|
1295
1314
|
|
|
1296
1315
|
**TOML key:** `workspace.config.snapshotExpirationSeconds`
|
|
@@ -1586,7 +1605,27 @@ and verified Git checkpoints remain authoritative. See the
|
|
|
1586
1605
|
Paused and policy-blocked builds release their sandbox after the execution
|
|
1587
1606
|
lease expires. Resume creates a replacement and reruns setup. Graceful shutdown
|
|
1588
1607
|
bounds stop/delete calls by `operationTimeoutMs`; an unknown acknowledgement
|
|
1589
|
-
keeps ownership fenced until lease expiry and is retried visibly.
|
|
1608
|
+
keeps ownership fenced until lease expiry and is retried visibly.
|
|
1609
|
+
|
|
1610
|
+
A persistent sandbox that stopped (for example, on its own timeout) is never
|
|
1611
|
+
treated as running:
|
|
1612
|
+
|
|
1613
|
+
- **Finished work settles.** The guest runner records its exit on the
|
|
1614
|
+
sandbox filesystem. Observing a stopped sandbox resumes it, reads that
|
|
1615
|
+
record, and stops it again, so a finished session's `publication.requested`
|
|
1616
|
+
is published instead of the execution being declared lost.
|
|
1617
|
+
- **Resume has its own budget.** Preservation and publication resume a
|
|
1618
|
+
stopped sandbox explicitly under `recoveryTimeoutMs` (default 120 s), which
|
|
1619
|
+
covers the cold resume plus the guest git work and push.
|
|
1620
|
+
`operationTimeoutMs` still bounds each metadata acknowledgement.
|
|
1621
|
+
- **The invocation deadline wins.** A hosted invocation stops recovery early
|
|
1622
|
+
enough to restore policy and stop the sandbox before it ends. Work that
|
|
1623
|
+
cannot fit is deferred to the next invocation with nothing recorded.
|
|
1624
|
+
- **No redundant stops.** Fence and cleanup skip `stop()` for a sandbox the
|
|
1625
|
+
provider already reports stopped.
|
|
1626
|
+
- **Failures name their step.** `infrastructure.failed` and the exhaustion
|
|
1627
|
+
escalation say which step failed: `resume`, `fence`, `preserve`, or
|
|
1628
|
+
`cleanup`. See [troubleshooting](troubleshooting.md#infrastructure-escalation-names-a-recovery-step). After abrupt
|
|
1590
1629
|
supervisor loss, Vercel's configured `timeoutSeconds` bounds orphan compute, and
|
|
1591
1630
|
the next dispatcher waits for lease expiry before exact-name cleanup. Provider
|
|
1592
1631
|
quota/vCPU/duration messages are retained verbatim in infrastructure events and
|
|
@@ -1832,6 +1871,19 @@ and a reason naming the setting. Dashboards and PR summaries call this
|
|
|
1832
1871
|
checks and branch protections still gate merge. For excluded steps, merged code
|
|
1833
1872
|
is not re-verified, so breakage that only exists in the combination can merge.
|
|
1834
1873
|
|
|
1874
|
+
Clean-restack re-verification defaults to disabled: omitting
|
|
1875
|
+
`[verify].afterCleanRestack` means `false`. An optional boolean
|
|
1876
|
+
`[verify.<step>].afterCleanRestack` overrides it in either direction. When a
|
|
1877
|
+
root-targeting leaf waiting to land restacks cleanly (including a
|
|
1878
|
+
`[[generated]]` regeneration), opted-in steps re-run on the restacked head
|
|
1879
|
+
before it lands; the rest record `skipped` with
|
|
1880
|
+
`skipCause = "clean-restack-policy"` ("skipped by clean-restack policy").
|
|
1881
|
+
A failure routes through the ordinary repair loop. Opt in per step on cheap
|
|
1882
|
+
deterministic checks, for example `afterCleanRestack = true` in
|
|
1883
|
+
`[verify.lint]`: every target move under a waiting leaf re-runs them. Leaves
|
|
1884
|
+
targeting an integration node rely on the node's verification instead. See
|
|
1885
|
+
[Restacking](restacking.md#clean-restack-re-verification).
|
|
1886
|
+
|
|
1835
1887
|
|
|
1836
1888
|
`[verify].steps` defines the configured universe and execution order. It is
|
|
1837
1889
|
optional and defaults to no verify phases. Every listed name needs one matching
|
|
@@ -1889,6 +1941,20 @@ There are two strict step variants:
|
|
|
1889
1941
|
|
|
1890
1942
|
**Constraints:** None beyond the input type.
|
|
1891
1943
|
|
|
1944
|
+
#### `verify.afterCleanRestack`
|
|
1945
|
+
|
|
1946
|
+
**TOML key:** `verify.afterCleanRestack`
|
|
1947
|
+
|
|
1948
|
+
- **Type:** `boolean`
|
|
1949
|
+
- **Default:** `false (omission is preserved)`
|
|
1950
|
+
- **Required:** Optional
|
|
1951
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. Build-owned pipeline: captured from the execution checkout each verify cycle; later base-branch edits do not replace it. Workspace provisioning applies at the next build launch. A running invocation keeps its captured values.
|
|
1952
|
+
- **Local override:** Committed only: set in autobuild.toml.
|
|
1953
|
+
|
|
1954
|
+
**Description:** Whether verification re-runs on the restacked head after a clean awaiting-landing restack of a root-targeting leaf, before it lands. A step override takes precedence.
|
|
1955
|
+
|
|
1956
|
+
**Constraints:** None beyond the input type.
|
|
1957
|
+
|
|
1892
1958
|
#### `verify.<step>`
|
|
1893
1959
|
|
|
1894
1960
|
**TOML key:** `verify.<step>`
|
|
@@ -1959,6 +2025,20 @@ There are two strict step variants:
|
|
|
1959
2025
|
|
|
1960
2026
|
**Constraints:** None beyond the input type.
|
|
1961
2027
|
|
|
2028
|
+
#### `verify.<step>.afterCleanRestack` (kind = "check")
|
|
2029
|
+
|
|
2030
|
+
**TOML key:** `verify.<step>.afterCleanRestack`
|
|
2031
|
+
|
|
2032
|
+
- **Type:** `boolean`
|
|
2033
|
+
- **Default:** `omitted`
|
|
2034
|
+
- **Required:** Optional when kind = "check"
|
|
2035
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. Build-owned pipeline: captured from the execution checkout each verify cycle; later base-branch edits do not replace it. Workspace provisioning applies at the next build launch. A running invocation keeps its captured values.
|
|
2036
|
+
- **Local override:** Committed only: set in autobuild.toml.
|
|
2037
|
+
|
|
2038
|
+
**Description:** Step override wins over `[verify].afterCleanRestack`; true re-runs this step on the restacked head after a clean awaiting-landing restack of a root-targeting leaf, false records it skipped.
|
|
2039
|
+
|
|
2040
|
+
**Constraints:** None beyond the input type.
|
|
2041
|
+
|
|
1962
2042
|
#### `verify.<step>.paths` (kind = "check")
|
|
1963
2043
|
|
|
1964
2044
|
**TOML key:** `verify.<step>.paths`
|
|
@@ -2043,6 +2123,20 @@ There are two strict step variants:
|
|
|
2043
2123
|
|
|
2044
2124
|
**Constraints:** None beyond the input type.
|
|
2045
2125
|
|
|
2126
|
+
#### `verify.<step>.afterCleanRestack` (kind = "agent")
|
|
2127
|
+
|
|
2128
|
+
**TOML key:** `verify.<step>.afterCleanRestack`
|
|
2129
|
+
|
|
2130
|
+
- **Type:** `boolean`
|
|
2131
|
+
- **Default:** `omitted`
|
|
2132
|
+
- **Required:** Optional when kind = "agent"
|
|
2133
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. Build-owned pipeline: captured from the execution checkout each verify cycle; later base-branch edits do not replace it. Workspace provisioning applies at the next build launch. A running invocation keeps its captured values.
|
|
2134
|
+
- **Local override:** Committed only: set in autobuild.toml.
|
|
2135
|
+
|
|
2136
|
+
**Description:** Step override wins over `[verify].afterCleanRestack`; true re-runs this step on the restacked head after a clean awaiting-landing restack of a root-targeting leaf, false records it skipped.
|
|
2137
|
+
|
|
2138
|
+
**Constraints:** None beyond the input type.
|
|
2139
|
+
|
|
2046
2140
|
#### `verify.<step>.paths` (kind = "agent")
|
|
2047
2141
|
|
|
2048
2142
|
**TOML key:** `verify.<step>.paths`
|
|
@@ -2172,9 +2266,10 @@ approved plan; reconciliation reuses it.
|
|
|
2172
2266
|
If the approved selection later names any step absent from the cycle's pinned
|
|
2173
2267
|
configured universe, the entire selection falls back to all configured optional
|
|
2174
2268
|
steps. The kernel records one observation per cycle and plan revision naming
|
|
2175
|
-
the unknown steps. Mandatory steps, path applicability and post-reconcile
|
|
2176
|
-
still apply. A valid selection continues to skip
|
|
2177
|
-
steps. Strict validation when depositing a new plan
|
|
2269
|
+
the unknown steps. Mandatory steps, path applicability and post-reconcile and
|
|
2270
|
+
clean-restack policies still apply. A valid selection continues to skip
|
|
2271
|
+
genuinely omitted optional steps. Strict validation when depositing a new plan
|
|
2272
|
+
is unchanged.
|
|
2178
2273
|
|
|
2179
2274
|
For each step the kernel evaluates approved-plan selection first, then path
|
|
2180
2275
|
applicability. Exclusion by either mechanism records a queryable `skipped`
|
|
@@ -3061,7 +3156,7 @@ that defaults to `false`.
|
|
|
3061
3156
|
|
|
3062
3157
|
While open unmerged root PRs (leaves and integration nodes; not children of a
|
|
3063
3158
|
node) reach `maxOpenPrs`, the dispatcher makes no new ordinary ready-queue
|
|
3064
|
-
claim of a `normal
|
|
3159
|
+
claim of a `high`, `normal` or `low` ticket until the count drops to `resumeOpenPrs`. Reaching `maxOpenPrs` takes
|
|
3065
3160
|
precedence: when `resumeOpenPrs` equals `maxOpenPrs`, intake stays paused at
|
|
3066
3161
|
that count and resumes once the count falls below it. Urgent claims, in-flight
|
|
3067
3162
|
builds, reconciles and landings continue; capacity is unchanged. Every `ab start`
|
|
@@ -3347,7 +3442,7 @@ status` reports the state as `capacity.backpressure`.
|
|
|
3347
3442
|
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
3348
3443
|
- **Local override:** Committed only: set in autobuild.toml.
|
|
3349
3444
|
|
|
3350
|
-
**Description:** Open unmerged root build PRs (leaves and integration nodes) at which the dispatcher stops ordinary ready-queue claims of `normal
|
|
3445
|
+
**Description:** Open unmerged root build PRs (leaves and integration nodes) at which the dispatcher stops ordinary ready-queue claims of `high`, `normal` and `low` tickets. In-flight work, reconciles, landings, `urgent` claims and every `ab start` (`tickets.start`) request continue, subject to capacity and repository pause. Unset disables open-PR backpressure.
|
|
3351
3446
|
|
|
3352
3447
|
**Constraints:** safe integer; > 0
|
|
3353
3448
|
|
|
@@ -3361,7 +3456,7 @@ status` reports the state as `capacity.backpressure`.
|
|
|
3361
3456
|
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
3362
3457
|
- **Local override:** Committed only: set in autobuild.toml.
|
|
3363
3458
|
|
|
3364
|
-
**Description:** Open root PR count at or below which paused
|
|
3459
|
+
**Description:** Open root PR count at or below which paused high, normal and low intake resumes; defaults to `maxOpenPrs - 1`. Reaching `maxOpenPrs` takes precedence, so when this equals `maxOpenPrs` intake stays paused at that count and resumes once the count falls below `maxOpenPrs`. Inert without `maxOpenPrs`.
|
|
3365
3460
|
|
|
3366
3461
|
**Constraints:** safe integer; ≥ 0; Must not exceed `maxOpenPrs`.
|
|
3367
3462
|
|
|
@@ -4249,7 +4344,7 @@ build or repository catalog, or `dispatcher.lost`; a glob that matches nothing
|
|
|
4249
4344
|
is rejected. Every error names the hook, at startup and on reload.
|
|
4250
4345
|
|
|
4251
4346
|
**Default filter.** A hook without `events` receives exactly `ab watch`'s default
|
|
4252
|
-
attention set: the build attention events,
|
|
4347
|
+
attention set: the build attention events, the derived
|
|
4253
4348
|
`build.consent-ready` and `build.merge-decision` observations, repository
|
|
4254
4349
|
attention including `hook.failing`, `hook.recovered` and `hook.skipped`, the
|
|
4255
4350
|
derived persistent-failure observations, and `dispatcher.lost`. Supplying
|
|
@@ -4729,8 +4824,8 @@ action. Check the gates in this order:
|
|
|
4729
4824
|
next move, runner or not. Paused builds, builds blocked on a question once
|
|
4730
4825
|
nothing is still working on them, builds waiting for a merge decision or
|
|
4731
4826
|
merge gates, and builds waiting on other tickets hold none. An answered or resumed build, one whose ticket wait ended,
|
|
4732
|
-
and one that must re-verify or reconcile reserve a slot ahead of
|
|
4733
|
-
|
|
4827
|
+
and one that must re-verify or reconcile reserve a slot ahead of claims at
|
|
4828
|
+
their level until admitted; higher levels go first (see
|
|
4734
4829
|
[slot admission order](dispatcher.md#slot-admission-order)). Inspect `ab repository status`, `ab builds --queued` and
|
|
4735
4830
|
`ab build status <slug>` rather than looking only for a live process.
|
|
4736
4831
|
7. **Duplicate work:** a ready ticket already represented by an active build is
|