@defrex/autobuild 1.11.1 → 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 +601 -203
- package/bin/ab-build-runner.ts +8 -0
- package/docs/answering-blocked-builds.md +32 -2
- package/docs/architecture.md +188 -57
- package/docs/assets/headline-wide.png +0 -0
- package/docs/cli.md +1 -1
- package/docs/configuration.md +120 -23
- package/docs/dispatcher.md +19 -8
- package/docs/integration-overview.md +1 -1
- package/docs/integration-tree.md +33 -18
- package/docs/merge-policy.md +7 -2
- package/docs/operating.md +5 -3
- package/docs/operator-api.md +48 -25
- package/docs/operator-surfaces.md +39 -3
- package/docs/optimization-nodes.md +10 -8
- 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/ambient-errors.ts +17 -0
- package/packages/core/src/cli/bounded-io.ts +174 -0
- 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 +93 -29
- package/packages/core/src/cli/dashboard/poll.ts +231 -34
- package/packages/core/src/cli/dashboard/queue.ts +21 -10
- package/packages/core/src/cli/dashboard/render.ts +14 -37
- package/packages/core/src/cli/dashboard/row-text.ts +26 -8
- package/packages/core/src/cli/dashboard/tone-ansi.ts +39 -0
- package/packages/core/src/cli/dashboard/vocabulary.ts +165 -20
- package/packages/core/src/cli/dispatch-frontend.ts +2 -1
- package/packages/core/src/cli/dispatch-handoff.ts +41 -10
- package/packages/core/src/cli/dispatch-launch-contract.ts +5 -0
- package/packages/core/src/cli/dispatch-launcher-cadence.ts +80 -0
- package/packages/core/src/cli/dispatch-launcher.ts +9 -10
- package/packages/core/src/cli/dispatch-preflight.ts +12 -3
- package/packages/core/src/cli/dispatch-release-observer.ts +53 -0
- package/packages/core/src/cli/dispatch-runtime-cache.ts +204 -82
- package/packages/core/src/cli/dispatch-runtime-dependencies.ts +250 -43
- package/packages/core/src/cli/dispatch-tickets.ts +33 -12
- package/packages/core/src/cli/dispatch-upgrade-install.ts +36 -16
- package/packages/core/src/cli/dispatch-upgrade-source.ts +8 -2
- package/packages/core/src/cli/dispatch-yield-observer.ts +82 -0
- package/packages/core/src/cli/dispatch.ts +595 -149
- package/packages/core/src/cli/env.ts +2 -15
- package/packages/core/src/cli/help.ts +43 -28
- package/packages/core/src/cli/main.ts +11 -7
- package/packages/core/src/cli/production-store.ts +102 -0
- 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/repo-state.ts +2 -3
- package/packages/core/src/cli/repository-status.ts +44 -28
- package/packages/core/src/cli/sessionless-store.ts +26 -0
- package/packages/core/src/cli/status.ts +188 -47
- package/packages/core/src/cli/store-opening.ts +26 -57
- package/packages/core/src/cli/store-ref.ts +6 -1
- 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/distribution-packaging.ts +156 -18
- package/packages/core/src/events/catalog-identity.ts +28 -0
- package/packages/core/src/events/catalog.ts +3 -9
- package/packages/core/src/events/compatibility.ts +2 -30
- package/packages/core/src/events/payloads.ts +85 -14
- package/packages/core/src/events/policy.ts +3 -0
- package/packages/core/src/events/repository.ts +15 -4
- package/packages/core/src/events/sessions.ts +1 -1
- package/packages/core/src/events/validation-error.ts +12 -0
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +36 -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/3064e337cc75f8d6.json +310 -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/a1e90a969d32a367.json +307 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/c7c94fbe7f63cf07.json +84 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/da3bc91c49211eab.json +310 -0
- package/packages/core/src/kernel/auto-merge-default.ts +2 -1
- package/packages/core/src/kernel/capacity-build.ts +21 -0
- package/packages/core/src/kernel/clean-restack-policy.ts +40 -0
- package/packages/core/src/kernel/discard-in-flight.ts +13 -0
- package/packages/core/src/kernel/dispatch-capacity.ts +578 -235
- package/packages/core/src/kernel/done-escalations.ts +269 -0
- package/packages/core/src/kernel/engine.ts +30 -17
- 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/measurement.ts +24 -0
- package/packages/core/src/kernel/open-pr-backpressure.ts +3 -3
- package/packages/core/src/kernel/read-facts.ts +8 -370
- package/packages/core/src/kernel/reducer-registry.ts +43 -125
- package/packages/core/src/kernel/reducer-revisions.ts +18 -0
- package/packages/core/src/kernel/reducer-value-entry.ts +98 -0
- package/packages/core/src/kernel/reducer-value-index.ts +75 -0
- package/packages/core/src/kernel/reducer.ts +84 -16
- package/packages/core/src/kernel/reopen-state.ts +10 -0
- package/packages/core/src/kernel/repository-attention.ts +14 -5
- package/packages/core/src/kernel/repository-read-facts.ts +375 -0
- package/packages/core/src/kernel/ticket-starts.ts +15 -4
- package/packages/core/src/kernel/verify-stage-state.ts +145 -3
- 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 +14 -1
- package/packages/core/src/operator/protocol.ts +8 -5
- package/packages/core/src/operator/query.ts +72 -57
- package/packages/core/src/operator/registry.ts +19 -15
- 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/fake.ts +15 -3
- 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 +777 -288
- package/packages/core/src/processes/execution-no-progress.ts +1 -0
- 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/local/capabilities.ts +115 -0
- package/packages/core/src/store/local/store.ts +86 -56
- package/packages/core/src/store/reduced-reads.ts +32 -1
- package/packages/core/src/store/reducer-value-read.ts +235 -0
- package/packages/core/src/store/reducer-value-shapes.json +6722 -6475
- package/packages/core/src/store/reducer-value-validation.ts +181 -33
- package/packages/core/src/store/reducer-values.ts +36 -204
- 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 +22 -0
- package/packages/core/src/store/remote/released-reducer-values/1.12.0.json +35806 -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 +20 -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/store/rollup-lease.ts +41 -0
- package/packages/core/src/store/rollups.ts +7 -38
- package/packages/core/src/store/snapshots.ts +1 -1
- package/packages/core/src/testing/dispatch-read-budget.ts +409 -14
- package/packages/core/src/testing/import-graph.ts +78 -0
- 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 +602 -40
- package/packages/core/src/testing/released-value-coverage.ts +423 -0
- package/packages/core/src/testing/slot-agreement.ts +52 -0
- package/packages/core/src/web/assets/app.js +5 -5
- package/packages/core/src/web/overview-source.ts +19 -6
- package/skills/guide/SKILL.md +245 -103
- package/skills/guide/references/integration-tree.md +33 -18
- package/skills/guide/references/merge-policy.md +7 -2
- package/skills/guide/references/operator-api.md +48 -25
- package/skills/guide/references/optimization-nodes.md +10 -8
- 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 +114 -65
- 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/SPEC.md
CHANGED
|
@@ -196,7 +196,8 @@ linear history and root freshness as recommendations. Archive refs are optional
|
|
|
196
196
|
forge-side backup of displaced leaf and node history and of unpublished
|
|
197
197
|
workspace commits: where the forge refuses them, rewrites and node writes keep a
|
|
198
198
|
BuildStore copy or warn and proceed, and workspace preservation keeps a
|
|
199
|
-
BuildStore copy or refuses the release
|
|
199
|
+
BuildStore copy or refuses the release, except under abort cleanup, which
|
|
200
|
+
records the commits lost and releases (§15.7). Results are pass, fail, or unknown; incomplete
|
|
200
201
|
inspection never proves permission. Local Git passes trivially; legacy plugins
|
|
201
202
|
report unknown. Known hard failures fail init validation and produce one durable
|
|
202
203
|
`dispatcher.forge-readiness-failed` repository fact per run/check; historical
|
|
@@ -315,7 +316,12 @@ manufacturing durable facts. Errors discard conditional state; an unloadable
|
|
|
315
316
|
target still uses the healthy predecessor reader with the active query. The
|
|
316
317
|
launcher retains its filesystem/process-only boundary and polling cadence of
|
|
317
318
|
1 second idle or 250 ms pending, processing child exits and pending actions on
|
|
318
|
-
cached answers too.
|
|
319
|
+
cached answers too. While the active run has a durably detected upgrade with no
|
|
320
|
+
prepared target, failure, yield request or handoff yet, the reader reports that
|
|
321
|
+
correlation as advisory `preparing`, and the launcher checks every 50 ms for at
|
|
322
|
+
most 600 checks per detection before returning to the idle cadence. Readers
|
|
323
|
+
that omit the field keep the ordinary cadence; operator shutdown ends any
|
|
324
|
+
pause. Legacy peers remain functional with full reads.
|
|
319
325
|
|
|
320
326
|
The launcher observes presentation stop/continue liveness so Ctrl-Z returns the
|
|
321
327
|
shell prompt and `fg` resumes only the presentation; the kernel keeps running.
|
|
@@ -334,8 +340,10 @@ pathname retained across handoffs. A launch from a source root in the dispatched
|
|
|
334
340
|
repository's Git common-directory topology selects source mode instead. That
|
|
335
341
|
eligibility and its initial packaged snapshot are frozen across successors. The
|
|
336
342
|
target is the forge-authoritative base commit, exported into private cache staging
|
|
337
|
-
without changing any operator or build worktree. A frozen-lockfile, script-free
|
|
338
|
-
Bun install
|
|
343
|
+
without changing any operator or build worktree. A frozen-lockfile, script-free,
|
|
344
|
+
production-only Bun install of the root package's dependency closure supplies
|
|
345
|
+
dependencies, each resolved inside the export; development-only dependencies and
|
|
346
|
+
workspaces are not materialized. The completed immutable runtime records the
|
|
339
347
|
exact commit and follows ordinary cache retention and pruning. Source adoption
|
|
340
348
|
compares packaged contents and production-reachable dependency resolution rather
|
|
341
349
|
than version or commit: excluded-file advances do not hand off. Included shipped
|
|
@@ -373,10 +381,18 @@ retain recovery accounting.
|
|
|
373
381
|
|
|
374
382
|
The predecessor serializes acceptance with ticks and launch admission, joins
|
|
375
383
|
repository-owned harvest and provisioning work, and records the exact local
|
|
376
|
-
executions, start time and deadline.
|
|
384
|
+
executions, start time and deadline. While a prepared target is outstanding, the
|
|
385
|
+
predecessor also observes its durable yield request between ticks at a bounded
|
|
386
|
+
cadence, one reduced read per step, and attempts acceptance through the same
|
|
387
|
+
serialization. The observation carries no outcome, and ordinary tick cadence is
|
|
388
|
+
unchanged. Its terminal frontend removes and joins
|
|
377
389
|
input/render work before acknowledging terminal release. Only after that durable
|
|
378
390
|
acknowledgement and a successful repository lease claim may the successor draw
|
|
379
|
-
or consume input.
|
|
391
|
+
or consume input. After its yield request, the successor observes the durable
|
|
392
|
+
handoff, release and stop facts through the same reduced reads at a bounded
|
|
393
|
+
cadence: a finite fast window, then backoff to an ordinary 500 ms pause. No
|
|
394
|
+
pause is shorter than the last observation took, and operator abort ends the
|
|
395
|
+
pause. Takeover still requires every check and the atomic lease claim. Only the successor ticks, claims, runs janitor/harvest and
|
|
380
396
|
launches runners. Execution leases remain with existing local runners; remote
|
|
381
397
|
executions detach immediately. Their exact instances and recorded guest runtimes
|
|
382
398
|
are captured separately on `dispatcher.handoff-started.remoteBuilds`. This
|
|
@@ -468,7 +484,7 @@ files, including development configs, remain exactly as installed.
|
|
|
468
484
|
- **dispatcher** — watches the TicketSource for tickets passing the configured
|
|
469
485
|
ready gate, claims, establishes the final conforming spec, chooses a short
|
|
470
486
|
immutable build slug, provisions a workspace, and launches build-runners up
|
|
471
|
-
to capacity, which counts builds
|
|
487
|
+
to capacity, which counts builds holding a slot (§12). On process startup it attempts every current build for its
|
|
472
488
|
repo, so re-running `ab dispatch` resumes durable work rather than only
|
|
473
489
|
looking for new tickets. Every ordinary tick also completes queued dispatch
|
|
474
490
|
records whose pre-run sequence was interrupted: it reconstructs a missing
|
|
@@ -555,13 +571,16 @@ clock rollback, rescans, and resets the cache to the current clock.
|
|
|
555
571
|
|
|
556
572
|
**Single-ticket start requests.** An operator can ask the running dispatcher,
|
|
557
573
|
local or hosted, to start one named ticket whether or not intake is on:
|
|
558
|
-
`ab start <ticket-id> [--priority manual|urgent|normal]`, the operator tool
|
|
574
|
+
`ab start <ticket-id> [--priority manual|urgent|high|normal|low]`, the operator tool
|
|
559
575
|
`tickets.start {priority?}`, or HTTP `POST …/tickets/{id}/start` with an
|
|
560
576
|
optional `{priority}` body. The priority is the request's slot-admission tier
|
|
561
577
|
(§12 "Slot admission order") and defaults to `manual`. The request
|
|
562
578
|
canonicalizes the id through the configured source's `get` (refusing an
|
|
563
579
|
unknown ticket) and appends one human-attributed repository
|
|
564
|
-
`ticket.start-requested {ticket, priority}` naming the canonical ref.
|
|
580
|
+
`ticket.start-requested {ticket, priority, level?}` naming the canonical ref.
|
|
581
|
+
`priority` keeps its persisted `manual | urgent | normal` domain; a `high` or
|
|
582
|
+
`low` request writes `priority: normal` refined by `level`, which an older
|
|
583
|
+
reader drops and reads as a normal request. A pending
|
|
565
584
|
request with the same priority makes it a no-op; one with another priority is
|
|
566
585
|
updated by the new event, keeping the first request's sequence, so settlement
|
|
567
586
|
and cancellation still name one request. `ab start --cancel`
|
|
@@ -572,12 +591,25 @@ pending. A reduced `ticketStarts` part of the repository read facts holds the
|
|
|
572
591
|
pending requests and the eight most recent settlements; a settlement or
|
|
573
592
|
cancellation applies only to the request sequence it names.
|
|
574
593
|
|
|
575
|
-
Each tick
|
|
576
|
-
|
|
594
|
+
Each tick reads at most eight pending `manual` and `urgent` requests, and at
|
|
595
|
+
most eight `high`, `normal` and `low` requests shared by their passes, each in
|
|
596
|
+
tier order and then oldest first, and claims nothing else for them:
|
|
577
597
|
`manual` and `urgent` requests after node admission and before ordinary
|
|
578
|
-
intake
|
|
579
|
-
|
|
580
|
-
|
|
598
|
+
intake. Each of `high`, `normal` and `low` runs inside ordinary intake just
|
|
599
|
+
before intake's first ready ticket at that level or below. A level that intake
|
|
600
|
+
does not reach runs after intake and the deferred parked admissions. So the
|
|
601
|
+
higher-level claims and the waiting work reserved in the same tick go first,
|
|
602
|
+
and each level's requests are claimed, oldest first, before its ready tickets.
|
|
603
|
+
A request a tick leaves unread is a barrier for that tick, set from the
|
|
604
|
+
pending requests when the tick starts: while one at level L is unread, nothing
|
|
605
|
+
below L is admitted (no ready-ticket claim, optimization attempt, parked leaf,
|
|
606
|
+
node or proposer), and L's own ready tickets wait too. L's waiting work keeps
|
|
607
|
+
its place ahead of L's claims, and higher levels are unaffected. The barrier
|
|
608
|
+
adds no reads; a later tick reads the request once the requests ahead of it
|
|
609
|
+
settle.
|
|
610
|
+
Ordinary intake leaves a ticket with a pending non-`manual` request to the
|
|
611
|
+
start pass. A request settled without starting frees the slot that intake had
|
|
612
|
+
reserved for it. Each request belongs to one pass. With none pending a pass
|
|
581
613
|
reads nothing; otherwise it makes one targeted `get` per request. Every tier
|
|
582
614
|
bypasses intake off, and open-PR backpressure, without enabling intake for any
|
|
583
615
|
other ticket. A request whose ticket has an active build settles
|
|
@@ -591,9 +623,9 @@ skips the ready listing, the scan checkpoint and the standing queue report but
|
|
|
591
623
|
keeps every gate: creation holds, profile conflicts, node targets, dependency
|
|
592
624
|
verdicts, the spec-standard quality gate and its bounce, the claim and its
|
|
593
625
|
preparation journal, capacity, repository pause, accounts and forge health.
|
|
594
|
-
A claimed build's
|
|
595
|
-
|
|
596
|
-
|
|
626
|
+
A claimed build's level (§13) is the request's level for a non-`manual`
|
|
627
|
+
request and its ticket's level for a `manual` one; `manual` is admission-only
|
|
628
|
+
and never a build priority.
|
|
597
629
|
Outcomes are `started` with the slug, `invalid` for a bounce (with the missing
|
|
598
630
|
parts) or a profile conflict, `blocked` for unresolved blockers or an
|
|
599
631
|
unavailable target, and `claim-refused` for a refused claim. A pause, no free
|
|
@@ -669,6 +701,7 @@ One name, used everywhere. Every noun lives in exactly one layer.
|
|
|
669
701
|
| **Node ticket** | A named integration point represented by a ticket of kind `node`; its integration build owns a branch collecting child work |
|
|
670
702
|
| **Build** | One ticket execution with a slug; either a work pipeline or an integration branch lifecycle; the unit the operator sees |
|
|
671
703
|
| **Integration build** | A node build that opens its branch without a runner or capacity charge, collects child work, verifies its complete head and merges under ordered policy (node consent by default) |
|
|
704
|
+
| **Slot** | One unit of a repository's `capacity`. A build holds one from admission until it waits on a human, another ticket, the forge or its children, or ends (§12 "What holds a slot") |
|
|
672
705
|
| **Harvest run** | One repository-scoped claimed observation snapshot and staged proposal workflow; never a build |
|
|
673
706
|
| **Phase** | A named stage of the build pipeline grammar (§5) |
|
|
674
707
|
| **Round** | One iteration inside a review loop |
|
|
@@ -720,8 +753,8 @@ while an auto rule authorizes a complete, verified candidate without a command.
|
|
|
720
753
|
Nodes never enter plan, implement, code-review or finalize; they enter
|
|
721
754
|
reconcile, and optimization nodes also enter `propose`. A node conflict uses
|
|
722
755
|
source-aware reconcile. Idle collecting nodes own no execution resources;
|
|
723
|
-
reconcile, verification and propose
|
|
724
|
-
|
|
756
|
+
reconcile, verification and propose take a slot like any other runner work
|
|
757
|
+
(§12 "What holds a slot"). Empty nodes have no PR.
|
|
725
758
|
|
|
726
759
|
The **propose** phase is an optimization node's own agent phase. The
|
|
727
760
|
dispatcher requests it (`optimization.proposal-requested`) only when the node
|
|
@@ -731,8 +764,8 @@ two consecutive empty proposals, and when its room is positive. Room is the
|
|
|
731
764
|
smaller of the free concurrency slots (`proposer.concurrency` minus attempts
|
|
732
765
|
queued or running) and the remaining attempts budget, and is zero once the
|
|
733
766
|
attempts or hours budget is spent. A paused, blocked or otherwise held node
|
|
734
|
-
is deferred instead. The request takes a slot ahead of
|
|
735
|
-
like node reconcile and verification (§12 "Slot admission order"), and is re-checked against current state
|
|
767
|
+
is deferred instead. The request takes a slot ahead of ticket claims at the
|
|
768
|
+
node's level, like node reconcile and verification (§12 "Slot admission order"), and is re-checked against current state
|
|
736
769
|
before it is admitted. The session runs the `ab-propose` skill on the node
|
|
737
770
|
head's tree and ends with `ab propose <file>`, `ab propose --none <reason>` or
|
|
738
771
|
`ab escalate`; `ab done` and `ab verdict` are refused. The proposer only
|
|
@@ -745,7 +778,7 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
|
|
|
745
778
|
Verification uses ordered stages. A string in `[verify].steps` is a singleton
|
|
746
779
|
stage; a nonempty array groups members that start together. Empty stages and
|
|
747
780
|
repeated names are errors. Plain string lists retain serial event sequences.
|
|
748
|
-
Every member resolves post-reconcile policy, approved selection/`always`, then
|
|
781
|
+
Every member resolves post-reconcile and clean-restack policy, approved selection/`always`, then
|
|
749
782
|
path applicability at stage entry. Only pass or skip satisfies a member. The
|
|
750
783
|
next stage, or finalize after the last, waits for every member to pass or skip.
|
|
751
784
|
On a normal stage transition the runner drains agent turns before stage-local
|
|
@@ -829,7 +862,10 @@ For a node-targeted leaf, published finalize-step commits also schedule one
|
|
|
829
862
|
waiting restack, even when the target SHA is unchanged, so guarded merge
|
|
830
863
|
preserves one canonical build identity.
|
|
831
864
|
Clean awaiting-merge restacks retain existing verification when build-owned config is
|
|
832
|
-
unchanged (§16.1), including when replay replaces the pin commit's ancestry
|
|
865
|
+
unchanged (§16.1), including when replay replaces the pin commit's ancestry,
|
|
866
|
+
unless the clean-restack policy (§16.2) opts steps in for a root-targeting
|
|
867
|
+
leaf. Then the completion opens a fresh cycle: opted-in steps re-run on the
|
|
868
|
+
restacked head and the rest record policy skips.
|
|
833
869
|
Conflicts use reconcile and its captured post-reconcile policy. A conflict before initial verification,
|
|
834
870
|
including one at a wait resume, cannot skip initial checks through that policy.
|
|
835
871
|
|
|
@@ -1458,8 +1494,9 @@ The base-selection invariants make this safe with Git:
|
|
|
1458
1494
|
fast-forward (`restack.advanced`). Every new verify start and
|
|
1459
1495
|
result, including skips, cites the cycle's base and head. Those citations stay
|
|
1460
1496
|
frozen throughout the cycle and survive clean awaiting-merge restacks; a clean
|
|
1461
|
-
wait-resume restack after a `verify:*` or `finalize` wait
|
|
1462
|
-
that
|
|
1497
|
+
wait-resume restack after a `verify:*` or `finalize` wait, or a clean
|
|
1498
|
+
awaiting-merge restack that froze an opted-in clean-restack policy (§16.2),
|
|
1499
|
+
starts a fresh cycle that cites the restacked base and head. Historical facts without citations
|
|
1463
1500
|
remain readable. Upstream-only paths are excluded.
|
|
1464
1501
|
- **Work distance is advisory durable telemetry.** Each admitted work target poll
|
|
1465
1502
|
samples destination-only commits (`BUILD..TARGET`), even when only the build
|
|
@@ -1649,10 +1686,52 @@ and cannot re-admit themselves. Missing/corrupt checkpoint coverage fails with
|
|
|
1649
1686
|
a typed integrity error. Appends never depend on checkpoint availability.
|
|
1650
1687
|
Expired resume cursors terminate watch/wait with fresh-attachment instructions:
|
|
1651
1688
|
re-arm without `--since`, reconcile status, and acknowledge the unavailable gap.
|
|
1689
|
+
Live following reads only the events after each stream's position, with no
|
|
1690
|
+
per-poll seed read. Watch retires a terminal, settled build that was not named
|
|
1691
|
+
once its events through settlement are delivered: it leaves tracking and every
|
|
1692
|
+
emitted cursor, so recurring watch cost and cursor size follow active builds.
|
|
1652
1693
|
Explicit harvest history uses reverse indexed filtered pages rather than a
|
|
1653
1694
|
journal replay. See `docs/remote-store-protocol.md` for the wire contract,
|
|
1654
1695
|
initial migration bootstrap and generation-retirement recovery.
|
|
1655
1696
|
|
|
1697
|
+
### Transient remote retries
|
|
1698
|
+
|
|
1699
|
+
The remote build store client and the hosted ticket client retry a request that
|
|
1700
|
+
failed transiently, and only then. The happy path is exactly one request: no
|
|
1701
|
+
timer, buffering, probe or extra read.
|
|
1702
|
+
|
|
1703
|
+
- **Transient** means `429`, `502`, `503`, `504`, a `500` whose body is not a
|
|
1704
|
+
protocol error or has `kind: "internal"`, or a transport failure. Other `4xx`
|
|
1705
|
+
statuses, `501`, authentication failures, `checkpoint-integrity`, a caller's
|
|
1706
|
+
abort and reducer incompatibility (raised after a successful response) are
|
|
1707
|
+
never retried.
|
|
1708
|
+
- **Safety classes.** Idempotent requests retry any transient failure: every
|
|
1709
|
+
`GET`, `PUT` and `DELETE`; the reducer and rollup value reads; the
|
|
1710
|
+
expected-sequence appends; the holder-checked lease and node-writer claims,
|
|
1711
|
+
renewals and releases; repository, scan-cadence and operator-presence upserts;
|
|
1712
|
+
a keyed build creation when the server advertises the creation key; and the
|
|
1713
|
+
hosted ticket reads, `transition`, `update`, `add-blocker`, `remove-blocker`,
|
|
1714
|
+
`mutate-if-revision`, policy publication and keyed `create`. Every other write
|
|
1715
|
+
retries only a `429` or a transport failure that provably preceded delivery
|
|
1716
|
+
(connection refused, unresolvable host, connect timeout).
|
|
1717
|
+
- **A retried keyed build creation** that the server answers with a conflict
|
|
1718
|
+
found an earlier attempt's build: that attempt landed and lost its response.
|
|
1719
|
+
The client point-reads the key's derived slug within the same retry bound
|
|
1720
|
+
and returns that build. A conflict on a first attempt is still a conflict.
|
|
1721
|
+
- **Limits.** At most three attempts, with equal-jitter backoff of 250–500 ms
|
|
1722
|
+
then 500–1000 ms. `Retry-After` (seconds or an HTTP date) lengthens a delay;
|
|
1723
|
+
one over 5 s is not retried.
|
|
1724
|
+
- **The retry bound.** The first retryable failure fixes a bound: 10 s later, or
|
|
1725
|
+
the invocation deadline when sooner. Retry sleeps, retry requests and the
|
|
1726
|
+
buffered reading of every response body after that failure end at the bound;
|
|
1727
|
+
no retry starts at or after it. First attempts are never bounded, so a held
|
|
1728
|
+
read still waits its full window, but a retried long-poll read is cut to the
|
|
1729
|
+
bound. The caller's own cancellation ends retry work with the caller's abort.
|
|
1730
|
+
- **Exhausted failures are typed.** A final transient status, a transport
|
|
1731
|
+
failure, or retry work cut off by the bound surfaces as
|
|
1732
|
+
`RemoteUnavailableError`, keeping the server's message. Typed protocol errors
|
|
1733
|
+
are unchanged.
|
|
1734
|
+
|
|
1656
1735
|
### 7.7 Derived reducers
|
|
1657
1736
|
|
|
1658
1737
|
A derived reducer answers a question across builds, such as P90 plan time over
|
|
@@ -1785,6 +1864,23 @@ repository's live builds and its most recently finished ones.
|
|
|
1785
1864
|
saved row is O(live builds + 50) bytes however many builds the repository
|
|
1786
1865
|
has ever had.
|
|
1787
1866
|
|
|
1867
|
+
#### `doneEscalations`
|
|
1868
|
+
|
|
1869
|
+
Folds every build's `doneEscalationEntry` (§15.5) into the repository's `done`
|
|
1870
|
+
builds that still have an open escalation, such as a post-landing integration
|
|
1871
|
+
audit raised after the node merged. Operator surfaces list them beside the
|
|
1872
|
+
open builds until an operator acknowledges them (§14).
|
|
1873
|
+
|
|
1874
|
+
- **Contribution:** a build whose status is `done` and which has at least one
|
|
1875
|
+
open escalation contributes `{slug, kind}`. Any other build contributes
|
|
1876
|
+
nothing. Completion closes no escalation, so a build completed while blocked,
|
|
1877
|
+
abort cleanup included, is listed until its escalation is answered.
|
|
1878
|
+
- **Arguments:** none, so each repository has one key. Nothing expires.
|
|
1879
|
+
- **Answer:** `{position, builds: [{slug, kind}]}` by slug, with `cursor: 0`.
|
|
1880
|
+
Readers confirm each listed build against its build-reducer state.
|
|
1881
|
+
- **Cost:** a read with nothing changed is the two constant reads, and the
|
|
1882
|
+
saved row is O(escalated done builds) however many builds have finished.
|
|
1883
|
+
|
|
1788
1884
|
## 8. The `ab` CLI
|
|
1789
1885
|
|
|
1790
1886
|
The **only** channel between agents and the store — and the enforcement
|
|
@@ -1891,7 +1987,15 @@ owner delegation is short-lived, repository-bound and operator-only. The hosted
|
|
|
1891
1987
|
dispatcher issues stored credentials with immutable dispatcher purpose (raw
|
|
1892
1988
|
store and tickets only) per repository invocation. It deletes each credential on
|
|
1893
1989
|
completion, including failures. Crash-safety expiry is the earlier of the configured
|
|
1894
|
-
TTL upper bound and the invocation deadline plus 60 seconds. Each
|
|
1990
|
+
TTL upper bound and the invocation deadline plus 60 seconds. Each invocation's
|
|
1991
|
+
budget is a wall-time bound: work stops, and in-flight store, ticket, forge and
|
|
1992
|
+
workspace requests are cancelled, at the work deadline, which is the budget minus
|
|
1993
|
+
a teardown reserve of `min(30 s, budget/4)`. Teardown (provisioning abandonment,
|
|
1994
|
+
repository-lease release, `dispatcher.run-stopped`) is bounded by the budget end;
|
|
1995
|
+
a write storage cannot finish by then is abandoned and the lease left to expire.
|
|
1996
|
+
A budget stop is a normal run stop. Credential deletion then gets the remaining
|
|
1997
|
+
budget and at least 5 seconds; issuance or deletion unsettled by then is
|
|
1998
|
+
reported and left to the capped expiry. Each served tick
|
|
1895
1999
|
prunes at most 100 expired or revoked dispatcher rows using indexed probes;
|
|
1896
2000
|
unexpired legacy rows retain their recorded expiry before eventual pruning.
|
|
1897
2001
|
Already issued delegated grants do not depend on the parent row or its expiry.
|
|
@@ -2318,7 +2422,7 @@ handoff naming a draining predecessor, even with an empty drain map. It uses
|
|
|
2318
2422
|
existing projections and adds no reads; only durable retirement clears evidence.
|
|
2319
2423
|
The controls include: ticket intake, the
|
|
2320
2424
|
repository-wide pause, and the harvest gate, plus pending and recently settled
|
|
2321
|
-
single-ticket start requests with their
|
|
2425
|
+
single-ticket start requests with their tier, `manual`, `urgent`, `high`, `normal` or `low` (`ticketStarts`, present when either is nonempty). It uses the same
|
|
2322
2426
|
dispatch-settings reducer as dispatcher decisions and the dashboard. An absent
|
|
2323
2427
|
repository stream reduces as an empty journal and reports intake on, repository
|
|
2324
2428
|
pause off; the query does not create that stream,
|
|
@@ -2399,8 +2503,11 @@ call — the open escalations `builds.get` reports, the `merges.list` consent
|
|
|
2399
2503
|
queue, the attention page of `repository.events` and the `repository.status`
|
|
2400
2504
|
projection — adds the builds waiting on operator action (paused, stalled,
|
|
2401
2505
|
failing node verification or forge CI), and names a resolving registry tool per
|
|
2402
|
-
item.
|
|
2403
|
-
|
|
2506
|
+
item. Its escalations also include each `done` build with an open escalation,
|
|
2507
|
+
found through the `doneEscalations` rollup (§7.7), with status `done` and
|
|
2508
|
+
`builds.answer` as its acknowledgement. It takes the `repository.events`
|
|
2509
|
+
cursor, never waits, reads only open builds and those escalated done builds,
|
|
2510
|
+
and reads zero event rows when nothing changed since the cursor.
|
|
2404
2511
|
|
|
2405
2512
|
Each registered project also has a per-repository binding at
|
|
2406
2513
|
`<resource>/<host><path>`, derived from its identity. It serves the same table
|
|
@@ -2958,7 +3065,8 @@ The reducer reads a `wait-unresolvable` raise against an open wait as its end:
|
|
|
2958
3065
|
wait's own escalation closes as answered `guidance` with the question as its
|
|
2959
3066
|
answer, and the new escalation carries the wait's `wait: {id}` marker. The
|
|
2960
3067
|
build is `blocked` on an ordinary policy escalation, in the default attention
|
|
2961
|
-
filter, and
|
|
3068
|
+
filter, and, like any build blocked on a question, holds no slot (§12 "What
|
|
3069
|
+
holds a slot"). Because the digest clears on the raise it is never
|
|
2962
3070
|
raised twice. Its answer routes and delivers like a wait answer: a reviewer
|
|
2963
3071
|
resumes the same review round, the session's `guidance.json` carries the
|
|
2964
3072
|
`wait` block, and after the answer the ended wait requests its resume slot; a
|
|
@@ -2968,8 +3076,8 @@ nothing, reports a diagnostic and is retried on the next tick. Hosted clients
|
|
|
2968
3076
|
read `ticketWait` from the digest wire answer; an older service that omits it
|
|
2969
3077
|
yields no automatic release, and operators still end waits by answering.
|
|
2970
3078
|
|
|
2971
|
-
An ended wait requests a `resume` slot and is admitted before
|
|
2972
|
-
|
|
3079
|
+
An ended wait requests a `resume` slot and is admitted before ticket claims at
|
|
3080
|
+
its level, as a parked finished build is (§12 "Slot admission order"); a `revise-spec` answer instead waits for
|
|
2973
3081
|
the revision. The dispatcher observes the leaf's target when it launches the
|
|
2974
3082
|
resume. Before the declaring phase resumes, and ahead of the plan and code
|
|
2975
3083
|
loops, the engine decides a `restack` with trigger `wait-resume` and cycle
|
|
@@ -3053,70 +3161,89 @@ signals (telemetry, observations)
|
|
|
3053
3161
|
→ build → PR → merge
|
|
3054
3162
|
```
|
|
3055
3163
|
|
|
3056
|
-
**Intake order.** When a slot is free, dispatch
|
|
3057
|
-
|
|
3058
|
-
priority in §13). Every admission gate is unchanged
|
|
3059
|
-
creation holds, capacity, intake off and repository pause
|
|
3060
|
-
ticket never holds back
|
|
3061
|
-
|
|
3164
|
+
**Intake order.** When a slot is free, dispatch claims ready candidates by
|
|
3165
|
+
level, `urgent`, `high`, `normal` and then `low`, each level in the source's
|
|
3166
|
+
listing order (see Ticket priority in §13). Every admission gate is unchanged
|
|
3167
|
+
— blockers, labels, creation holds, capacity, intake off and repository pause
|
|
3168
|
+
— so a blocked ticket never holds back lower-level work. Priority never
|
|
3169
|
+
preempts: no level stops, pauses or displaces a running build.
|
|
3062
3170
|
|
|
3063
|
-
**Slot admission order.** Free slots are admitted in
|
|
3171
|
+
**Slot admission order.** Free slots are admitted in this order:
|
|
3064
3172
|
|
|
3065
3173
|
1. `manual` single-ticket start requests (the `ab start` default, §11);
|
|
3066
|
-
2. urgent
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3174
|
+
2. urgent waiting work, then urgent ticket claims;
|
|
3175
|
+
3. high waiting work, then high ticket claims;
|
|
3176
|
+
4. normal waiting work, then normal ticket claims;
|
|
3177
|
+
5. low waiting work, then low ticket claims.
|
|
3178
|
+
|
|
3179
|
+
Waiting work is parked nodes and leaves that hold no slot and request one:
|
|
3180
|
+
`resume`, `reconcile`, `verification`, `reopen` or `propose` ("What holds a
|
|
3181
|
+
slot" below). A level's ticket claims are that level's start requests, oldest
|
|
3182
|
+
first, then its ordinary ready tickets while intake is on, in the source's
|
|
3183
|
+
listing order. Within each level, waiting work goes ahead of claims, and both
|
|
3184
|
+
go ahead of every lower level. Ordinary intake never claims a ticket with a
|
|
3185
|
+
pending start request at a non-`manual` tier: that request's start pass claims
|
|
3186
|
+
it at its tier. An
|
|
3187
|
+
optimization attempt's ready ticket claims at its node's level: the node's
|
|
3188
|
+
current build priority, any of the four, decided at claim. Nothing is
|
|
3189
|
+
reserved for attempts, and they never jump ahead of other work at their level.
|
|
3077
3190
|
|
|
3078
3191
|
Each tier keeps its own order: start requests oldest first, parked leaves in
|
|
3079
3192
|
the tick's visit order, nodes in slug order, tickets in the source's listing
|
|
3080
3193
|
order. Start requests bypass intake off and open-PR backpressure; ordinary
|
|
3081
|
-
ready tickets do not. A build's
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
`
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3194
|
+
ready tickets do not. A build's level is frozen at claim on `build.created`:
|
|
3195
|
+
the request's level for a build started by a non-`manual` start request, and
|
|
3196
|
+
its ticket's level otherwise. It is changed by the human-authored advisory
|
|
3197
|
+
`build.priority-set` (`ab priority <slug> urgent|high|normal|low`, the operator
|
|
3198
|
+
`builds.control` action `priority`); a later ticket priority edit does not
|
|
3199
|
+
reach an existing build. Both facts encode the level compatibly:
|
|
3200
|
+
`build.created` carries `priority: urgent` for an urgent build and `level:
|
|
3201
|
+
high | low` for a high or low one, both omitted for normal;
|
|
3202
|
+
`build.priority-set` carries `{priority: urgent | normal, level?: high |
|
|
3203
|
+
low}`, with `priority: normal` for high and low. A reader takes `level` over
|
|
3204
|
+
`priority`. A reader older than this encoding drops the `level` key and reads a
|
|
3205
|
+
high or low build as normal, and every log written before it reads as urgent
|
|
3206
|
+
or normal, exactly as before.
|
|
3207
|
+
|
|
3208
|
+
Admission is arithmetic over reduced facts: a waiter is admitted when the
|
|
3209
|
+
slots occupied by every other build plus the slots reserved ahead of it are
|
|
3210
|
+
below `capacity`. Pending start requests are durable demand: the reduced
|
|
3211
|
+
`ticketStarts` counts them by tier, whatever intake says, and nothing while
|
|
3212
|
+
the repository is paused. Each reserves one slot ahead of the tiers below it
|
|
3213
|
+
until it settles or is cancelled, and never preempts. Reserved ahead of a
|
|
3214
|
+
waiter at level L are the `manual` requests and, for every level above L,
|
|
3215
|
+
that level's other waiters, its start requests and its ticket claim demand
|
|
3216
|
+
from the latest admission scan: `dispatcher.ticket-scan-completed` records
|
|
3217
|
+
`urgentWaiting`, `highWaiting` and `normalWaiting`, the non-node ready tickets
|
|
3218
|
+
at that level that passed every intake gate except capacity (each omitted when
|
|
3219
|
+
none; counted only while intake is on and the repository unpaused). Urgent
|
|
3220
|
+
demand is always counted; high and normal demand only while work of a lower
|
|
3221
|
+
level waits (a parked waiter or a start request), and low demand never, since
|
|
3222
|
+
nothing ranks below it. A start request at level L waits for waiters at L or
|
|
3223
|
+
above, every start request of a higher tier and the claim demand of every
|
|
3224
|
+
higher level. An ordinary claim at level L waits for waiters at L or above and
|
|
3225
|
+
every pending start request at L or above; a claim spends a slot of every
|
|
3226
|
+
level, and ready tickets are visited highest level first. Because demand
|
|
3227
|
+
discovered by an earlier scan can be stale, the dispatcher also defers, within
|
|
3228
|
+
a tick, any non-urgent parked admission into a free slot while a higher-level
|
|
3229
|
+
claim can exist and ticket claims can run (intake is on, the repository is
|
|
3230
|
+
unpaused, accounts are present and the forge is not cooling down). A
|
|
3231
|
+
higher-level claim can exist at every level when the source supports
|
|
3232
|
+
priority, and always for low work, since normal tickets exist in every
|
|
3233
|
+
source; without the capability, a high or normal waiter defers only while an
|
|
3234
|
+
open optimization node of a higher level can claim attempts. A deferral writes
|
|
3235
|
+
nothing and keeps the build's reservation against claims at its level; it
|
|
3236
|
+
makes that tick's admission scan due, and the deferred admissions are retried
|
|
3237
|
+
after the tick's dispatch only when that scan decided claims at every level
|
|
3238
|
+
(its claim loop ran to the end, or it proved no ticket could claim or count as
|
|
3239
|
+
demand). Otherwise they are decided again on a later tick. A forced scan is
|
|
3240
|
+
bounded per deferral state: an unchanged set of deferred builds and occupancy
|
|
3241
|
+
lists again only when a scan is due on its own. Only gate-passing tickets
|
|
3242
|
+
count, so a ticket blocked on a dependency reserves nothing at any level. Free
|
|
3243
|
+
slots only: priority never interrupts a running build or session.
|
|
3244
|
+
|
|
3245
|
+
**Open-PR backpressure.** An optional intake throttle, off by default and
|
|
3246
|
+
independent of slots. When `[policy].maxOpenPrs` is set, the dispatcher
|
|
3120
3247
|
counts open unmerged root PRs: nonterminal builds with an open or conflicted
|
|
3121
3248
|
PR and no integration-node target, root leaves and root integration nodes
|
|
3122
3249
|
alike. Children targeting a node do not count. A PR whose active landing
|
|
@@ -3125,7 +3252,7 @@ engages when the count reaches `maxOpenPrs` and stays engaged until the count
|
|
|
3125
3252
|
drops to or below `resumeOpenPrs` (default `maxOpenPrs - 1`). Reaching
|
|
3126
3253
|
`maxOpenPrs` takes precedence, so with `resumeOpenPrs = maxOpenPrs` intake
|
|
3127
3254
|
stays paused at that count and resumes once it falls below. While engaged,
|
|
3128
|
-
the dispatcher claims no new `normal
|
|
3255
|
+
the dispatcher claims no new `high`, `normal` or `low` ready ticket; `urgent` claims,
|
|
3129
3256
|
in-flight builds, parked-build admission, reconciles, verification and
|
|
3130
3257
|
landings continue, and capacity accounting is unchanged. The count is derived
|
|
3131
3258
|
from the reduced build facts each tick already holds. The dispatcher records
|
|
@@ -3134,29 +3261,85 @@ from the reduced build facts each tick already holds. The dispatcher records
|
|
|
3134
3261
|
transitions (a cleared fact names `drained`, or `disabled` when the key is
|
|
3135
3262
|
removed while engaged); the engaged fact is the hysteresis memory a fresh
|
|
3136
3263
|
process reads. Repository status and both dashboards report the count,
|
|
3137
|
-
watermarks and whether normal intake is paused.
|
|
3138
|
-
backpressure entirely.
|
|
3139
|
-
|
|
3140
|
-
**What holds a slot.** `capacity`
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3264
|
+
watermarks and whether high, normal and low intake is paused. `maxOpenPrs` is unset by
|
|
3265
|
+
default, which disables backpressure entirely.
|
|
3266
|
+
|
|
3267
|
+
**What holds a slot.** `capacity` is the repository's number of slots. A
|
|
3268
|
+
build takes a slot only by admission: a ticket claim, a start request (§11), or
|
|
3269
|
+
an admitted slot request (below). It holds that slot until it waits on
|
|
3270
|
+
something outside Autobuild, or ends. While Autobuild owes the build's next
|
|
3271
|
+
move, the build keeps its slot whether or not a runner is working. That covers:
|
|
3272
|
+
|
|
3273
|
+
- the boundaries between phases and steps;
|
|
3274
|
+
- provisioning its workspace and launching its runner;
|
|
3275
|
+
- relaunching after a crashed runner or an expired lease;
|
|
3276
|
+
- the dispatcher publishing its spec, retrying a forge publication or deciding
|
|
3277
|
+
a requested ticket wait;
|
|
3278
|
+
- a mixed-version deferral or a verify stage holding it;
|
|
3279
|
+
- a requested pause or abort waiting for its runner to stop;
|
|
3280
|
+
- a session a stopped dispatcher suspended;
|
|
3281
|
+
- an escalation that does not stop the build: one verify step's question
|
|
3282
|
+
while other steps of its stage still run, on any runner (§5); a launch
|
|
3283
|
+
recorded before the raise that has not started, failed or been refused by
|
|
3284
|
+
the progress guard's `execution-no-progress` escalation; or an execution
|
|
3285
|
+
launched while the build held its slot that has not ended.
|
|
3286
|
+
|
|
3287
|
+
So a slot is never dropped and picked up again mid-flight, and a build whose
|
|
3288
|
+
runner is working always holds one.
|
|
3289
|
+
|
|
3290
|
+
A build releases its slot as soon as it waits on the outside world:
|
|
3291
|
+
|
|
3292
|
+
| Waiting on | Cases |
|
|
3293
|
+
|---|---|
|
|
3294
|
+
| a human | an open escalation nothing above still carries, an acknowledged pause, a `revise-spec` answer waiting for its revision, a finished pipeline waiting for a merge decision or on hold |
|
|
3295
|
+
| another ticket | an entered ticket wait (§11) |
|
|
3296
|
+
| the forge | a finished pipeline waiting for merge gates or for the forge to merge |
|
|
3297
|
+
| its children | an integration build with no cycle, conflict, measurement or proposal that needs a runner: collecting child work, or waiting for a repair child |
|
|
3298
|
+
| nothing | `done` or `aborted`; abort cleanup holds no slot |
|
|
3299
|
+
|
|
3300
|
+
A pipeline is finished once every verify step and every finalize post-step for
|
|
3301
|
+
the current spec has passed. The dispatcher records the finish as an advisory
|
|
3302
|
+
`pipeline.settled` fact when the engine first decides `wait awaiting-pr`.
|
|
3303
|
+
|
|
3304
|
+
Release follows state; acquisition never does. An answer that lands while the
|
|
3305
|
+
build is still carried releases nothing: the build keeps its slot and requests
|
|
3306
|
+
none. A build whose outside wait ends holds no slot until it is admitted. It is then **parked work**: it requests a
|
|
3307
|
+
slot, and intake reserves one for it ahead of ticket claims at its level
|
|
3308
|
+
(higher levels first, "Slot admission order"). The requests are:
|
|
3309
|
+
|
|
3310
|
+
| Request | Raised by |
|
|
3311
|
+
|---|---|
|
|
3312
|
+
| `resume` | an answered escalation that had stopped the build, a resumed pause, an ended ticket wait, or a parked leaf whose target was rewritten |
|
|
3313
|
+
| `reconcile` | a conflicted PR, or a node restack conflict with no open escalation |
|
|
3314
|
+
| `verification` | a finished leaf that must restack or re-verify, a node verification cycle, or a requested optimization measurement (§13.1.1) |
|
|
3315
|
+
| `reopen` | a leaf an operator reopened (§15.7), once any replacement spec is published |
|
|
3316
|
+
| `propose` | an optimization node's open proposal request |
|
|
3317
|
+
|
|
3318
|
+
A request records nothing, consumes no attempt and raises no attention. A paused
|
|
3319
|
+
or blocked build requests nothing until its pause or question ends. Admission is
|
|
3320
|
+
durable. A ticket claim or start request is admitted by its `build.created`.
|
|
3321
|
+
When the dispatcher admits a build that holds no slot, it records an
|
|
3322
|
+
advisory `slot.admitted { request?, need? }` fact before it claims a lease,
|
|
3323
|
+
provisions or launches anything. A node's fact also names the runner need it
|
|
3324
|
+
admitted (`need`), and the node holds its slot while that need remains: a
|
|
3325
|
+
verification cycle, a measurement, a proposal, or an active restack it was
|
|
3326
|
+
admitted to reconcile. For a work build, the dispatcher also records one before
|
|
3327
|
+
every launch that holds its slot, unless a recorded launch is still in flight
|
|
3328
|
+
or another runner's live lease will refuse the launch; a claim's
|
|
3329
|
+
`build.created` is its first launch's record. An acknowledgement launch
|
|
3330
|
+
records none and confers no slot. A runner allocation never admits by itself,
|
|
3331
|
+
so a runner or execution left over from before a release, such as a pause or
|
|
3332
|
+
abort acknowledgement or one still winding down, never takes a slot back. From
|
|
3333
|
+
then on the build holds its slot through relaunches until its next release.
|
|
3334
|
+
|
|
3335
|
+
Occupancy never exceeds `capacity`. Every admission counts every build that
|
|
3336
|
+
holds a slot, node admission included, and no build uses another's slot.
|
|
3337
|
+
Abort and pause acknowledgements are not gated, and neither is an
|
|
3338
|
+
acknowledgement for a build that still waits on the outside world afterwards,
|
|
3339
|
+
such as resuming a paused build that is blocked or finished; none of them
|
|
3340
|
+
confers a slot. A build that holds no slot
|
|
3341
|
+
keeps its branch, workspace and completed phase work, so retained workspaces
|
|
3342
|
+
can exceed `capacity`; slots cannot.
|
|
3160
3343
|
|
|
3161
3344
|
Additional scheduled ingesters such as `ingest:sentry` remain an open design
|
|
3162
3345
|
thread and have no shipped config surface. Observation harvest is
|
|
@@ -3447,33 +3630,76 @@ anything is written; it never drops them. Writes that name no links are
|
|
|
3447
3630
|
unaffected. `ab ticket create` and `update` take `--issues N[:refs],...`;
|
|
3448
3631
|
operator and MCP ticket requests take `issueLinks`.
|
|
3449
3632
|
|
|
3450
|
-
**Ticket priority.** A ticket's priority is
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3633
|
+
**Ticket priority.** A ticket's priority is one of four levels, highest
|
|
3634
|
+
first: `urgent`, `high`, `normal`, `low`. Absent means `normal`, the default.
|
|
3635
|
+
Normalized tickets omit the field for normal; JSON ticket output (`ab ticket
|
|
3636
|
+
show --json`, listings, operator `tickets.get` and `tickets.search`) always
|
|
3637
|
+
names exactly one level.
|
|
3638
|
+
|
|
3639
|
+
- **Dispatch.** Ready work is claimed by level, `urgent`, `high`, `normal`
|
|
3640
|
+
then `low`, each level in the source's listing order, and each level's
|
|
3641
|
+
claims go after that level's parked work and ahead of every lower level's
|
|
3642
|
+
(§12 "Slot admission order"). A ticket's build takes its level, and among
|
|
3643
|
+
ready tickets only urgent claims bypass open-PR backpressure. A claim
|
|
3644
|
+
freezes the build's level and nothing else changes; `ab priority` changes
|
|
3645
|
+
the build's level and never the ticket. A single-ticket start request has
|
|
3646
|
+
its own admission tier (§11), and a non-`manual` request sets its build's
|
|
3647
|
+
level.
|
|
3648
|
+
- **Optimization attempts** (§13.1.1) are the exception: an in-flight attempt
|
|
3649
|
+
of an open, unstopped optimization node claims at the node's current build
|
|
3650
|
+
level, any of the four, whatever its ticket says or whether its source
|
|
3651
|
+
stores priority. `ab priority <node> urgent|high|normal|low` therefore
|
|
3652
|
+
reaches the node's attempts claimed afterwards; an attempt already claimed
|
|
3653
|
+
keeps its build's level, as any build does. No slot is reserved for
|
|
3654
|
+
attempts, they preempt nothing, and within a level the source's order
|
|
3655
|
+
applies.
|
|
3656
|
+
- **Writes.** `ab ticket create` and `update` take `--priority
|
|
3657
|
+
urgent|high|normal|low`; operator and MCP `tickets.create` and
|
|
3658
|
+
`tickets.update` take the same `priority` values. Any other value is refused
|
|
3659
|
+
before anything is written, with an error naming the four levels. An update
|
|
3660
|
+
that omits priority never changes it. Harvest files every proposal normal;
|
|
3661
|
+
grooming sets another level.
|
|
3662
|
+
- **Native storage.** Sources that store all four levels declare the
|
|
3663
|
+
`priority` capability. The file source stores `priority = "<level>"` in its
|
|
3664
|
+
frontmatter for `urgent`, `high` and `low` and writes no key for normal; the
|
|
3665
|
+
in-memory fake behaves the same way. The hosted source stores all four in
|
|
3666
|
+
the hosted ticket store and lists ready tickets urgent, then high, then
|
|
3667
|
+
normal, then low, each in filing order. The Linear source maps Urgent (1),
|
|
3668
|
+
High (2) and Low (4) to `urgent`, `high` and `low`, and Medium (3) or No
|
|
3669
|
+
priority (0) to `normal`; writing `urgent`, `high` or `low` sets the
|
|
3670
|
+
matching Linear priority, and writing `normal` sets No priority only when the
|
|
3671
|
+
issue is Urgent, High or Low, leaving Medium untouched. File, hosted and
|
|
3672
|
+
Linear revisions cover priority.
|
|
3673
|
+
- **Label fallback.** A source without the capability (the GitHub source, and
|
|
3674
|
+
any plugin that does not declare it) gets priority through the ticket-source
|
|
3675
|
+
compatibility facade, which stores a level other than normal as exactly one
|
|
3676
|
+
label: `priority:urgent`, `priority:high` or `priority:low`; normal is none
|
|
3677
|
+
of them. Priority labels are matched case-insensitively, including
|
|
3678
|
+
hand-added ones; when several are present the highest wins, and the next
|
|
3679
|
+
priority write leaves exactly one (none for normal). They are reported as
|
|
3680
|
+
the ticket's `priority`, never in its `labels`. A labels replacement neither
|
|
3681
|
+
adds nor removes them, and a priority write never touches other labels,
|
|
3682
|
+
except that a source declaring `kindLabel` (GitHub's `node`) keeps that
|
|
3683
|
+
label in step with a kind change written beside the priority.
|
|
3684
|
+
Label writes, listing and search criteria, and `[tickets].readyLabels` or
|
|
3685
|
+
`createLabels` entries naming a priority label are refused (writes point to
|
|
3686
|
+
`--priority`; configuration fails at startup), so priority labels never
|
|
3687
|
+
satisfy or block `readyLabels`. Reading priority costs no extra request, and
|
|
3688
|
+
the revision changes with priority because labels are in it.
|
|
3689
|
+
- **Refusal.** Outside the facade, a raw source without the capability
|
|
3690
|
+
refuses a create or update naming any level but `normal` with a typed
|
|
3691
|
+
`TicketPriorityUnsupported` error naming the source, before anything is
|
|
3692
|
+
written; naming `normal` is a successful no-op. Through Autobuild this
|
|
3693
|
+
arises only from a hosted service that cannot store the level.
|
|
3694
|
+
- **Hosted version skew.** Current clients send, and current servers echo on
|
|
3695
|
+
every ticket response, the capability header
|
|
3696
|
+
`x-autobuild-ticket-priority-levels: 1`. A server answering a client that
|
|
3697
|
+
sends only the older `x-autobuild-ticket-priority: 1` keeps `urgent` and
|
|
3698
|
+
reports `high` and `low` as `normal`; without either header it names no
|
|
3699
|
+
priority. A current client refuses to write `high` or `low` to a server that
|
|
3700
|
+
does not echo the levels header, with `TicketPriorityUnsupported` naming the
|
|
3701
|
+
`hosted` source, before anything is written. Search hits carry an optional
|
|
3702
|
+
`priority`, projected the same way.
|
|
3477
3703
|
|
|
3478
3704
|
**Ticket assignees.** A ticket may carry the usernames it is assigned to.
|
|
3479
3705
|
Sources declare support with the `assignees` capability; only the GitHub source
|
|
@@ -3643,25 +3869,23 @@ the branch is open to targeting tickets immediately, without a PR. Idle integrat
|
|
|
3643
3869
|
builds use no provisioned workspace, runner, execution lease, or dispatch capacity.
|
|
3644
3870
|
|
|
3645
3871
|
A node requesting reconcile, verification or, for an optimization node,
|
|
3646
|
-
propose is admitted before
|
|
3647
|
-
admission order"). The request is durable: a
|
|
3872
|
+
propose is admitted before ticket claims at its level (higher levels first,
|
|
3873
|
+
§12 "Slot admission order"). The request is durable: a
|
|
3648
3874
|
prepared verification cycle, a restack conflict or an open proposal request,
|
|
3649
3875
|
with no runner yet. Until the node holds its slot, intake reserves one
|
|
3650
3876
|
slot for it, and the dispatcher checks its admission every tick regardless of
|
|
3651
3877
|
idle node polling, so a slot freed in any tick goes to the node, not to a new
|
|
3652
|
-
|
|
3653
|
-
paused descendants
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
for
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
parked work, and report a finished work build waiting to run again the same
|
|
3664
|
-
way. Idle collecting nodes remain free.
|
|
3878
|
+
claim at its level or below. A node's admission counts every build that holds a slot, as every
|
|
3879
|
+
admission does. Blocked and paused descendants hold none (§12 "What holds a
|
|
3880
|
+
slot"), so they never stand between a node and the slot it needs to unblock
|
|
3881
|
+
them, and no node uses a descendant's slot. Admission is durable and precedes
|
|
3882
|
+
provisioning; a node's workspace never counts toward occupancy. Status and both dashboards report
|
|
3883
|
+
occupancy against configured capacity. Status, `ab builds` and both dashboards
|
|
3884
|
+
report each node waiting for a slot ahead of ticket claims at its level,
|
|
3885
|
+
marking urgent, high and low waiters, the pending start requests of each tier
|
|
3886
|
+
and the urgent, high and normal ticket claims waiting ahead of lower-level
|
|
3887
|
+
parked work, and report every other parked
|
|
3888
|
+
build waiting to run again the same way. Idle collecting nodes remain free.
|
|
3665
3889
|
|
|
3666
3890
|
An empty node has no PR and reports `integration`, `target`, and `empty`.
|
|
3667
3891
|
Once it holds commits its current parent lacks, the dispatcher opens or adopts
|
|
@@ -3703,7 +3927,13 @@ children's, and is refreshed before landing, so merging it closes them (see
|
|
|
3703
3927
|
Forge issue links).
|
|
3704
3928
|
Authoritative enforced up-to-date protection records fenced merge; uncertainty
|
|
3705
3929
|
records unfenced merge and triggers immutable merged-tree comparison. A mismatch
|
|
3706
|
-
raises operator attention and never rewrites the shared parent.
|
|
3930
|
+
raises operator attention and never rewrites the shared parent. A verified commit
|
|
3931
|
+
that is empty (its tree equals its parent's) and whose identity is missing from
|
|
3932
|
+
an otherwise tree-identical merge is accounted for, since forge rebase merges
|
|
3933
|
+
drop empty commits; duplicates, non-empty omissions and tree mismatches still
|
|
3934
|
+
raise attention. That attention, like any escalation raised after completion,
|
|
3935
|
+
stays on the dashboards and `repository.attention` until it is closed with
|
|
3936
|
+
`ab answer`, which does not change the build's done status.
|
|
3707
3937
|
The repository build digest carries an additive optional pending-audit signal from
|
|
3708
3938
|
`integration.landed` with an operation until `integration.audited` settles it.
|
|
3709
3939
|
Settled nodes without that signal require no full build reads; completion does
|
|
@@ -4323,8 +4553,8 @@ runtime compatibility is not requested; the dispatcher instead records
|
|
|
4323
4553
|
`optimization.proposal-deferred {reason}` (`paused`, `blocked`, `command`,
|
|
4324
4554
|
`restack`, `integration`, `landing` or `compatibility`), and reconsiders the
|
|
4325
4555
|
node only after a fact that can clear the blocker lands on its log. The
|
|
4326
|
-
request is the node's `propose` slot request, admitted ahead of
|
|
4327
|
-
|
|
4556
|
+
request is the node's `propose` slot request, admitted ahead of ticket claims
|
|
4557
|
+
at the node's level (§13.1, §12 "Slot admission order"). Before admission the dispatcher re-checks it against current
|
|
4328
4558
|
state: a request whose node has stopped, whose active-hours budget is spent,
|
|
4329
4559
|
whose room fell to zero or below the recorded room, or whose node has no free
|
|
4330
4560
|
concurrency slot, and for which no session has started, records
|
|
@@ -4645,8 +4875,9 @@ over one server-sent event stream. It appends nothing, takes no lease and
|
|
|
4645
4875
|
registers no presence.
|
|
4646
4876
|
|
|
4647
4877
|
Its frame is the repository header and notice plus the overview. A fresh
|
|
4648
|
-
process starts the overview from the `buildRoster`
|
|
4649
|
-
reads of its live
|
|
4878
|
+
process starts the overview from the `buildRoster` and `doneEscalations`
|
|
4879
|
+
rollups (§7.7) and targeted reads of its live and escalated done builds, then
|
|
4880
|
+
advances it by the changed-builds feed. Its
|
|
4650
4881
|
recurring reads, made only while a browser is subscribed:
|
|
4651
4882
|
|
|
4652
4883
|
| Occurrence | Reads | Cost |
|
|
@@ -4656,13 +4887,14 @@ recurring reads, made only while a browser is subscribed:
|
|
|
4656
4887
|
| Per changed build | `getBuild`, `buildReadFacts`, and while the build is visible `listStreams` and its pinned effective-config artifact | 4 calls, that build's new rows |
|
|
4657
4888
|
| A changed build started, finished, aborted or is done | `buildRoster` | 1 call per poll |
|
|
4658
4889
|
| New effective-config ref | `getRepoArtifact` | 1 call per ref |
|
|
4659
|
-
| Cold start: first read, repository reset | `buildRoster`, the per-build reads for each live build
|
|
4890
|
+
| Cold start: first read, repository reset | `buildRoster`, `doneEscalations`, the per-build reads for each live build, each aborted entry among the roster's newest finished builds and each done build with an open escalation | O(live builds + escalated done builds), independent of history |
|
|
4660
4891
|
|
|
4661
4892
|
No read grows with history, build count or tab count, and nothing is read
|
|
4662
4893
|
while no browser is connected. The overview never lists builds, analytics
|
|
4663
4894
|
requests read one listing page, and nothing reads events. A
|
|
4664
|
-
remote store that lacks the roster or the feed
|
|
4665
|
-
|
|
4895
|
+
remote store that lacks the roster, `doneEscalations` or the feed, or serves a
|
|
4896
|
+
different rollup version, fails the read with its typed error and never falls
|
|
4897
|
+
back to either. Until the dispatcher records an
|
|
4666
4898
|
effective configuration the frame has no `overview` and makes no build read.
|
|
4667
4899
|
The web protocol's overview and rows carry the shared dashboard projection's
|
|
4668
4900
|
terms: status, phase, attention, waits, step timers, finished outcomes, the
|
|
@@ -4806,10 +5038,15 @@ compared numerically. Build creation and every build event also record the new
|
|
|
4806
5038
|
position as that build's latest change position, in the same transaction, which
|
|
4807
5039
|
the changed-builds feed (§7.2) reads.
|
|
4808
5040
|
Unchanged positions reuse the complete presentation snapshot; an ordinary refresh, focused or unfocused,
|
|
4809
|
-
then makes exactly one store request. Discovery
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
5041
|
+
then makes exactly one store request. Discovery never lists builds: a cold
|
|
5042
|
+
start (initial hydration or a feed reset) samples the change position, then
|
|
5043
|
+
reads `listOpenBuilds(repo)` and the `doneEscalations` rollup (§7.7); every
|
|
5044
|
+
later refresh reads only `listBuildsChangedSince` from that watermark and
|
|
5045
|
+
re-reads the builds it reports. Position or configuration changes, and at most
|
|
5046
|
+
ten seconds between full reads, refresh the snapshot, including the visible
|
|
5047
|
+
builds' stream and artifact enrichment. A remote store on a different
|
|
5048
|
+
`doneEscalations` version, or without the open-builds or feed routes, fails the
|
|
5049
|
+
refresh with its typed error and never falls back to a listing. Failed or
|
|
4813
5050
|
cancelled reads do not acknowledge the sampled position. Open session feeds poll
|
|
4814
5051
|
independently; kernel ticks and watch/wait retain their existing reads.
|
|
4815
5052
|
|
|
@@ -4916,8 +5153,20 @@ standalone `dispatcher.tick-failed` diagnostic before the next operational tick.
|
|
|
4916
5153
|
An unacknowledged diagnostic remains pending and may be duplicated after a lost
|
|
4917
5154
|
response. Reporting never closes a later tick boundary or gates committed
|
|
4918
5155
|
handoff acceptance. Explicit shutdown, supersession and fatal forge publication
|
|
4919
|
-
still stop the loop
|
|
4920
|
-
|
|
5156
|
+
still stop the loop. Once mode ends its run after its single tick: a failed tick
|
|
5157
|
+
whose `dispatcher.tick-failed` is durable records a normal `dispatcher.run-stopped`
|
|
5158
|
+
with exit code 1 and the error, then rethrows the original error; an unreported
|
|
5159
|
+
failure, a fatal forge publication or a fatal ticket preparation stops abnormally.
|
|
5160
|
+
Stopping before recovery leaves only local warnings for unreported failures.
|
|
5161
|
+
|
|
5162
|
+
A dispatcher with a hosted ticket source publishes its ticket policy and settles
|
|
5163
|
+
targeted listing at its first tick boundary, as ticket preparation, not while it
|
|
5164
|
+
is constructed. A transient preparation failure is a tick failure retried on the
|
|
5165
|
+
next tick; a permanent one (authentication, a service predating the policy, a
|
|
5166
|
+
validation error) is fatal. A tick-failure episode spans runs, so consecutive
|
|
5167
|
+
one-tick runs accumulate one: any completed tick ends it, as does a clean,
|
|
5168
|
+
abnormal or forced stop of the run that last failed, but a new run or a one-tick
|
|
5169
|
+
run's normal stop after its failed tick does not.
|
|
4921
5170
|
|
|
4922
5171
|
Repository tick telemetry is bounded mutable operational metadata, like leases.
|
|
4923
5172
|
`beginRepoTick` persists the open boundary before unsafe work; `finishRepoTick`
|
|
@@ -4969,7 +5218,11 @@ setup failures, and blockers. Dashboard rows derive from build and repository ev
|
|
|
4969
5218
|
effective configuration only, so heartbeat or lease renewal without an event
|
|
4970
5219
|
does not alter them. Every nonterminal build, including `queued`, has a
|
|
4971
5220
|
dashboard row; a pre-run row names its pending dispatch boundary or latest
|
|
4972
|
-
durable failure. A
|
|
5221
|
+
durable failure. A `done` build with an open escalation, such as a
|
|
5222
|
+
post-landing integration audit raised after it completed or a question still
|
|
5223
|
+
open when abort cleanup completed, also has a row, `BLOCKED` with the note
|
|
5224
|
+
`done` and its question, until an operator acknowledges it with `ab answer`;
|
|
5225
|
+
it holds no slot and offers no other control. A human may discard only such a queued build. Discard is
|
|
4973
5226
|
dispatcher cleanup, returns the ticket to its
|
|
4974
5227
|
configured Ready state, and completes with
|
|
4975
5228
|
`discarded`; it is deliberately distinct from abort, which returns work to
|
|
@@ -4977,8 +5230,50 @@ Triage for human judgment by default, or to Ready when the operator asks. Any se
|
|
|
4977
5230
|
the list or detail view with `a`; Enter confirms and Escape cancels, so the first
|
|
4978
5231
|
keypress never writes destructive intent. CLI and dashboard both append the same
|
|
4979
5232
|
`build.abort-requested` fact through the shared control service. The concrete
|
|
4980
|
-
presentation
|
|
4981
|
-
implementation and its tests.
|
|
5233
|
+
presentation (layout, key bindings, exact colors) is owned by the dashboard
|
|
5234
|
+
implementation and its tests. The status words and their tones are not: they
|
|
5235
|
+
are fixed below.
|
|
5236
|
+
|
|
5237
|
+
**Status words.** Every nonterminal build row shows one status word from a
|
|
5238
|
+
closed vocabulary. Both dashboards, `ab builds` and build status render the
|
|
5239
|
+
same words from the shared dashboard projection. A word's tone is its color
|
|
5240
|
+
(`DESIGN.md`, "The Color Is State Rule"), and tones nest inside the slot model
|
|
5241
|
+
(§12 "What holds a slot"): each tone falls wholly on one side of it. Every
|
|
5242
|
+
green word holds a slot. Every other word holds none. Words refine their
|
|
5243
|
+
tone's category and never cross it, so the color tells whether a build is
|
|
5244
|
+
using a slot and the word tells why.
|
|
5245
|
+
|
|
5246
|
+
| Tone | Slot | Word | Shown when |
|
|
5247
|
+
|---|---|---|---|
|
|
5248
|
+
| green (`ok`) | held | `RUNNING` | a runner is working |
|
|
5249
|
+
| | held | `STARTING` | no runner is working yet: provisioning, a relaunch, spec publication, a publication retry, a pending ticket-wait decision, an upgrade drain, a suspended session |
|
|
5250
|
+
| | held | `PAUSING` | a pause was requested and the runner is still stopping |
|
|
5251
|
+
| | held | `ABORTING` | an abort was requested and the runner is still stopping |
|
|
5252
|
+
| teal (`live`) | requested | `QUEUED` | parked work waiting for admission; the note names the request (`resume`, `reconcile`, `verification`, `reopen`, `propose`) and marks urgent, high and low waiters |
|
|
5253
|
+
| amber (`held`) | none | `WAITING` | a finished pipeline waiting for a merge decision or on hold, an entered ticket wait, or a `revise-spec` answer waiting for its revision; the note says which (`merge decision`, `on hold`, `on <tickets>`, `spec revision`) |
|
|
5254
|
+
| | none | `MERGING` | a finished pipeline with merge consent, waiting for merge gates or for the forge to merge |
|
|
5255
|
+
| | none | `PAUSED` | an acknowledged pause |
|
|
5256
|
+
| | none | `COLLECTING` | an integration build collecting child work |
|
|
5257
|
+
| red (`alert`) | none | `BLOCKED` | an open escalation, other than a ticket wait's own, or a failed node verification waiting for a repair child; the note `done` marks a completed build whose escalation awaits acknowledgement |
|
|
5258
|
+
| dim (`pending`) | none | `CLEANING` | abort cleanup |
|
|
5259
|
+
|
|
5260
|
+
A build's slot state picks its tone first, then the word within that tone.
|
|
5261
|
+
`BLOCKED` outranks `PAUSED` for a paused build with an open question.
|
|
5262
|
+
`PAUSING` and `ABORTING` describe a runner winding down, so only a build
|
|
5263
|
+
holding a slot shows them. A build without a slot keeps its word until the
|
|
5264
|
+
acknowledgement, which is not gated. A resumed pause is `QUEUED` until it is
|
|
5265
|
+
admitted again; there is no separate resuming word. The reducer's `queued` and
|
|
5266
|
+
`running` statuses are lifecycle facts, not display words: a newly claimed
|
|
5267
|
+
build shows `STARTING`, and a settled build shows `WAITING` or `MERGING`.
|
|
5268
|
+
|
|
5269
|
+
A harvest run is never a build and never holds a slot. Its row shows
|
|
5270
|
+
`HARVESTING` (teal) while it works, `PAUSED` or `SUSPENDED` (amber) while it is
|
|
5271
|
+
stopped, and `ESCALATED` or `FAILED` (red) when it needs a human. Finished rows
|
|
5272
|
+
show their outcome (`MERGED`, `CLOSED`, `ABORTED`) in their own section, and
|
|
5273
|
+
step marks keep their own tones. The capacity line reads
|
|
5274
|
+
`<occupied>/<capacity>`, where occupied equals the number of green build rows,
|
|
5275
|
+
followed by the parked work and start requests waiting for a slot, in
|
|
5276
|
+
admission order.
|
|
4982
5277
|
|
|
4983
5278
|
## 15. Event vocabulary
|
|
4984
5279
|
|
|
@@ -5066,7 +5361,10 @@ rejection is `EventValidationError`.
|
|
|
5066
5361
|
require a boundary. The store is the *only* coordination surface — no side
|
|
5067
5362
|
channel — and polling covers commands exactly the way it covers
|
|
5068
5363
|
`subscribe`. A runner that is dead still receives pause/resume/abort
|
|
5069
|
-
commands and escalation answers on resume.
|
|
5364
|
+
commands and escalation answers on resume. Abort is the exception: the
|
|
5365
|
+
dispatcher acknowledges it itself for any node, and for a queued, paused
|
|
5366
|
+
or blocked leaf with no live execution lease. It never provisions a
|
|
5367
|
+
workspace or starts a runner to do so. While a turn is live, the runner
|
|
5070
5368
|
subscribes from its session boundary and forwards pause or abort as caller-owned
|
|
5071
5369
|
cancellation to the AgentRunner; it closes the session transcript without
|
|
5072
5370
|
recording `phase.failed`, records suspension for pause, and acknowledges the
|
|
@@ -5083,17 +5381,17 @@ with illustrative members:
|
|
|
5083
5381
|
|
|
5084
5382
|
| Family | Examples |
|
|
5085
5383
|
|---|---|
|
|
5086
|
-
| Build lifecycle | `build.created` (carrying `assets`, the claim-time pin, §6.3), `workspace.provisioned`, `workspace.cleanup-required`, `workspace.fenced`, `workspace.commits-preserved`, decisive `workspace.commits-retained` (the same receipt when some head is a BuildStore copy, §15.7), `workspace.commits-lost`, `workspace.released`, `execution.started`, `execution.ended`, `infrastructure.failed`, `infrastructure.cleanup-attempted`, `dispatch.comment-posted`, `dispatch.failed`, `runner.attached`, `runner.runtime-recorded`, `runner.setup-failed`, `abort.remote-branch-deleted`, `abort.local-branch-deleted`, `abort.ticket-returned`, `build.ticket-returned`, `build.completed` |
|
|
5087
|
-
| Operator commands [D2] | `build.abort-requested {reason?, to?, origin?: {kind: optimization-stop, node}}` → `build.aborted` (a human, or the dispatcher for an attempt of a stopped optimization node, §13.1.1); `build.pause-requested` → `build.paused`; `build.discard-requested`; `build.hold-requested {reason?}`; `build.priority-set {priority}` (advisory slot-admission
|
|
5384
|
+
| Build lifecycle | `build.created` (carrying `assets`, the claim-time pin, §6.3), `workspace.provisioned`, `workspace.cleanup-required`, `workspace.fenced`, `workspace.commits-preserved`, decisive `workspace.commits-retained` (the same receipt when some head is a BuildStore copy, §15.7), `workspace.commits-lost`, `workspace.released`, `execution.started`, `execution.ended`, `infrastructure.failed`, `infrastructure.cleanup-attempted`, `dispatch.comment-posted`, `dispatch.failed`, `runner.attached`, `runner.runtime-recorded`, `runner.setup-failed`, `abort.remote-branch-deleted`, `abort.local-branch-deleted`, `abort.ticket-returned`, `build.ticket-returned`, advisory `slot.admitted {request?, need?}` (§12), `build.completed` |
|
|
5385
|
+
| Operator commands [D2] | `build.abort-requested {reason?, to?, origin?: {kind: optimization-stop, node}}` → `build.aborted` (a human, or the dispatcher for an attempt of a stopped optimization node, §13.1.1); `build.pause-requested` → `build.paused`; `build.discard-requested`; `build.hold-requested {reason?}`; `build.priority-set {priority, level?}` (advisory slot-admission level, §12); `build.land-requested` → `landing.command-acknowledged`; decisive human `build.reopened {feedback?, spec?: {artifact, assets?}}` (§15.7); `escalation.answered` (optionally carrying a validated `reviewRoundCeiling`, or the `assets` sampled with a revise-from-ticket authorization) |
|
|
5088
5386
|
| Merge policy | `landing.decided` (candidate, matched rule/default, labels, target, mode, matched `paths?` summary); advisory `landing.deferred` (candidate, reason, rule, policy); kernel `landing.consent-revoked {commandSeq, source, rule, previousHead, head, consentedHead?, paths}`; `landing.native-enable-started`; `landing.native-applied`; advisory dispatcher `landing.polling-selected {candidate, decisionSeq, commandSeq?, detail}` and `landing.human-merge-required {candidate, decisionSeq, commandSeq?, cause: merge-queue-rule \| merge-queue-activity \| merge-refused, detail}` |
|
|
5089
5387
|
| Spec | `spec.imported`, `spec.authored`, `spec.revised` (either positive `escalation` sequence or exclusive `operator: {user, via?}` provenance for an idle node or a settled leaf's reopen, §15.7; optionally carrying `assets`, a re-pin of the ticket's assets, §6.3) |
|
|
5090
5388
|
| Sessions | `session.started` (including optional write-ahead continuation intent, budget ceiling, and the effective first `prompt` the bracket sent: the start prompt, the live continuation message, or the interruption notice); `session.suspended` with partial transcript and active duration; `session.resumed` acceptance (stale reports are inert); reasoned `session.resume-fallback`; kernel-only `session.native-handle-recorded` with bracket and native execution identity; `session.ended` with transcript ref and usage (ordinary completion — the analysis corpus), or `session.ended {outcome: reclaimed, reclaimedBy: {instance, resumedFromSeq}}` (explicit transcriptless takeover) |
|
|
5091
5389
|
| Plan/code loops | `plan.started` … `plan-review.verdict`; `implement.started` … `code-review.verdict`; agent `implement.declined {round, reason, artifact?}` (decisive), an optimization attempt's alternative implement terminal: the build completes `closed-unmerged` and the dispatcher writes `attempt.settled {outcome: declined, note}` on the node (§13.1.1) |
|
|
5092
|
-
| Verify/finalize | `verify.started {step, attempt, feedback?, baseSha?, headSha?, restackId?}`, `verify.completed {step, outcome, skipCause
|
|
5390
|
+
| Verify/finalize | `verify.started {step, attempt, feedback?, baseSha?, headSha?, restackId?}`, `verify.completed {step, outcome, skipCause?: post-reconcile-policy \| clean-restack-policy, baseSha?, headSha?, restackId?}`, `verify.cancelled {step, attempt, cause: {step}, baseSha?, headSha?, restackId?}`, `verify.stage-failed {attempt, cycle, stage, failed, cancelled, baseSha?, headSha?, restackId?}`, `verify.reconcile-policy-captured {reconcileSeq, steps}`, `finalize.completed {pr}`, `finalize.step-started {step}`, `finalize.step-completed {step, ok, headSha?}` |
|
|
5093
5391
|
| Integration attention | Kernel/dispatcher `integration.verification-failed {id, head, parent, steps, guidance}`: one durable failed-cycle notification, recovered from exact verification receipts |
|
|
5094
5392
|
| PR summary | Kernel-authored `pr-summary.requested {occurrence, boundary}`, `pr-summary.attempted {occurrence, boundary, pr}`, `pr-summary.result {attempt, outcome, eligibleAfter?}`, `pr-summary.settled {request, disposition}`; sequence identities correlate durable starts, completed boundaries, attempts, and handoffs (§7.5) |
|
|
5095
5393
|
| PR attachments | `pr-attachment.designated`, `pr-attachment.hosted`, `pr-attachment.reclaimed`, `pr-attachment.reclaim-failed` |
|
|
5096
|
-
| Leaf restacking | `target.moved {branch, sha, lineage?}`, `target.rewritten {branch, previousSha, sha}`, `target.rewrite-cleared {branch, sha, lineage?}`, kernel `target.rewrite-reprovision-prepared {branch, previousSha, base, from, sha}` and `target.rewrite-recovered {branch, previousSha, sha, base, recovery: reprovisioned \| accepted, escalation?, pendingLocal?}`, advisory `target.distance {branch, sha, head, count}`, `restack.prepared`, `restack.replayed`, `restack.publish-intended`, `restack.rewritten`, `restack.contended`, `restack.completed` (trigger `verify-entry`, `wait-resume` or `awaiting-landing`), `restack.advanced {trigger: wait-resume, cycle, observation, branch, from, to}`, kernel `restack.regenerated {id, files, commands, outcome, head?, reason?}`, kernel or dispatcher decisive `history.retained {operation: restack \| reconcile, id, base, store, target, unretained}` (leaf restacks and reconciles, §15.7) |
|
|
5394
|
+
| Leaf restacking | `target.moved {branch, sha, lineage?}`, `target.rewritten {branch, previousSha, sha}`, `target.rewrite-cleared {branch, sha, lineage?}`, kernel `target.rewrite-reprovision-prepared {branch, previousSha, base, from, sha}` and `target.rewrite-recovered {branch, previousSha, sha, base, recovery: reprovisioned \| accepted, escalation?, pendingLocal?}`, advisory `target.distance {branch, sha, head, count}`, `restack.prepared`, `restack.replayed`, `restack.publish-intended`, `restack.rewritten`, `restack.contended`, `restack.completed` (trigger `verify-entry`, `wait-resume` or `awaiting-landing`; an awaiting-landing intent, rewrite and completion may carry a frozen `cleanRestackPolicy {steps}`), `restack.advanced {trigger: wait-resume, cycle, observation, branch, from, to}`, kernel `restack.regenerated {id, files, commands, outcome, head?, reason?}`, kernel or dispatcher decisive `history.retained {operation: restack \| reconcile, id, base, store, target, unretained}` (leaf restacks and reconciles, §15.7) |
|
|
5097
5395
|
| Head path facts | advisory `head.paths-recorded {source, head, destination, mergeBase, total, preview, resolution?, artifact}` |
|
|
5098
5396
|
| Propose (§5, §13.1.1) | Kernel `propose.started {round, request}`; agent `propose.completed {round, request, proposals, artifact}` (the deposited proposal ids and the `attempts` artifact) |
|
|
5099
5397
|
| Post-PR [D1] | `pr.merged`, `pr.conflicted`, advisory dispatcher `pr.checks-failed {pr, head, buildHead, checks, total, digest}` and `pr.checks-cleared {pr, head, cause}` (forge CI on finished leaves, §15.7), `reconcile.progress-checked`, `reconcile.started`, `reconcile.prepared`, `reconcile.replayed`, `reconcile.publish-intended`, `reconcile.rewritten`, `reconcile.contended`, `reconcile.completed`, kernel `reconcile.superseded {attempt, cycle, cause: wait-resume, restackId?}` (§11 "Ticket waits") |
|
|
@@ -5103,10 +5401,14 @@ with illustrative members:
|
|
|
5103
5401
|
| Judge panels (§13.1.1) | Kernel `panel.started {panel, candidate, baseline, harnessPin, purpose, rubric, harness, judges}` (judges 1–20); kernel `panel.judge-started {panel, judge, session, order: candidate-first \| baseline-first, runner, model?, account?, stream?, substitution?}`; agent (judge) `panel.preferred {panel, judge, session, preference: A \| B \| tie, reason}` (nonblank reason, no order); kernel `panel.judged {panel, judge, session, order, preference, reason}`; kernel `panel.judge-ended {panel, judge, session, outcome: completed \| no-terminal \| failed \| expired \| interrupted \| reclaimed, error?, transcript?}`. All live on the log of the build that runs the panel, and all are decisive. |
|
|
5104
5402
|
| Repository journal | dispatcher setting facts; run lifecycle, effective config, tick/queue diagnostics, reload and runner outcomes; the `harvest.*` workflow, recovery, and ledger facts; `ticket-preparation.*` claim boundaries; `ticket.handed-back` and `ticket.handback-settled`; `ticket.start-requested`, `ticket.start-cancelled`, `ticket.start-settled` and the advisory `ticket.identity-recorded`; configured hook health `hook.failing`, `hook.recovered` and `hook.skipped` (advisory attention, §16.1) |
|
|
5105
5403
|
|
|
5106
|
-
Abort cleanup is a dispatcher-owned ordered saga.
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5404
|
+
Abort cleanup is a dispatcher-owned ordered saga. A runner acknowledges abort
|
|
5405
|
+
for a running leaf; for a queued, paused or blocked leaf with no live execution
|
|
5406
|
+
lease, and for a node, the dispatcher appends `build.aborted` itself and runs
|
|
5407
|
+
the saga, never provisioning a workspace or starting a runner first. While an
|
|
5408
|
+
execution lease is live, the janitor defers the saga so it cannot race
|
|
5409
|
+
process-tree teardown. Once that supervisor releases the lease, or an abruptly
|
|
5410
|
+
orphaned lease expires, cleanup closes an open unmerged PR without overriding a
|
|
5411
|
+
racing merge, releases the workspace,
|
|
5110
5412
|
deletes the exact published remote branch and exact local branch, unions the
|
|
5111
5413
|
`autobuild:aborted` label into the current ticket labels, moves the ticket once
|
|
5112
5414
|
to its destination and posts an abort notice, reports the hand-back, and only
|
|
@@ -5124,6 +5426,16 @@ move, the `abort.ticket-returned` checkpoint and the hand-back report, because
|
|
|
5124
5426
|
its node's sweep moves the ticket to the rejected role (§13.1.1). A closed
|
|
5125
5427
|
attempt PR likewise records no `build.ticket-returned`.
|
|
5126
5428
|
|
|
5429
|
+
Abort's workspace release attempts commit preservation once. When preservation
|
|
5430
|
+
fails, including when the forge defers or cools down the archive, it records
|
|
5431
|
+
`workspace.commits-lost` (reason `abort: commit preservation failed — …`) and
|
|
5432
|
+
releases anyway: abort discards the build's work, and the receipt is its paper
|
|
5433
|
+
trail. Only lost repository authority, a mixed-version deferral or a live
|
|
5434
|
+
execution lease stop the release. An uncompleted publication request is
|
|
5435
|
+
recorded `publication.lost` without a settlement attempt. A failed provider
|
|
5436
|
+
teardown records `infrastructure.cleanup-attempted` with pending cleanup and
|
|
5437
|
+
stays due on the next tick, so no orphan environment is left behind.
|
|
5438
|
+
|
|
5127
5439
|
Every dispatcher hand-back of a claimed or ready ticket other than completion —
|
|
5128
5440
|
abort, spec-standard bounce, preparation recovery returning a confirmed claim,
|
|
5129
5441
|
closed-unmerged PR and discard — appends one repository `ticket.handed-back`
|
|
@@ -5238,14 +5550,24 @@ version is the server's cache identity, not a compatibility gate. The client
|
|
|
5238
5550
|
drops object properties its shape does not know, so additive server changes
|
|
5239
5551
|
reach older readers. Invalid envelopes and values the client cannot represent
|
|
5240
5552
|
(a missing field, an unknown variant) fail with a typed incompatibility error
|
|
5241
|
-
naming the reducer
|
|
5553
|
+
naming the reducer, client/server versions and upgrade advice. The error is
|
|
5554
|
+
terminal for every reader: `ab watch` and `ab wait` exit 1 at once instead of
|
|
5555
|
+
retrying, and never reconstruct the value from history. Clients send
|
|
5242
5556
|
`x-autobuild-reducer-value-projection: 1`. The service retains frozen contracts for
|
|
5243
5557
|
every supported published client, including clients with projection capability.
|
|
5244
5558
|
It adapts canonical answers to the released finished shape and reducer version.
|
|
5245
|
-
|
|
5246
|
-
state,
|
|
5247
|
-
|
|
5248
|
-
|
|
5559
|
+
An optional `lastEvent` the release cannot represent is omitted, also in nested
|
|
5560
|
+
build state, when its type is unknown to the release or when it is a well-formed
|
|
5561
|
+
event under the server's catalog whose payload carries values the release
|
|
5562
|
+
predates; a malformed display event leaves the answer unchanged. Cursor,
|
|
5563
|
+
progress, and compatibility facts remain canonical. The required `seenTypes` set
|
|
5564
|
+
retains the event types known to that released reader. A declared
|
|
5565
|
+
released-value policy rewrites a widened literal to an older equivalent, or omits
|
|
5566
|
+
it when the field is optional, only where released readers then behave the same.
|
|
5567
|
+
A value that drives released decisions, such as an escalation's policy cause, and
|
|
5568
|
+
other unrepresentable required values remain typed incompatibilities. Every divergence from a supported contract is declared in that
|
|
5569
|
+
policy, and populated values covering every union variant are tested against
|
|
5570
|
+
every supported contract. A request may
|
|
5249
5571
|
identify its generated finished-value catalog in `x-autobuild-catalog-identity`;
|
|
5250
5572
|
a recorded published identity selects its frozen contract. An unrecognized catalog
|
|
5251
5573
|
identity with projection capability retains the canonical answer, including source
|
|
@@ -5303,8 +5625,9 @@ remain readable with explicit unavailable-title/file fallbacks; display metadata
|
|
|
5303
5625
|
never authorizes collection or merge.
|
|
5304
5626
|
A rewrite receipt alone never promotes the boundary; only completed settlement
|
|
5305
5627
|
does. CLI status exposes pending/active work, reachable build identities and
|
|
5306
|
-
node-owned foreign changes. A node stays `collecting` while
|
|
5307
|
-
runner is attached
|
|
5628
|
+
node-owned foreign changes. A node's lifecycle status stays `collecting` while
|
|
5629
|
+
its narrow reconcile runner is attached, and its row shows `RUNNING` (§14
|
|
5630
|
+
"Status words"); it does not acquire a leaf pipeline.
|
|
5308
5631
|
|
|
5309
5632
|
**Declined attempts.** `implement.declined` completes the implement phase
|
|
5310
5633
|
and sets `declined {round, reason, seq}`. The engine decides
|
|
@@ -5576,6 +5899,16 @@ rollup (§7.7): the build's `kind` (from `build.created`, default `work`), its
|
|
|
5576
5899
|
{outcome, completedAt}`. It applies the build reducer's terminal rule, so
|
|
5577
5900
|
`finished` is present exactly when the build's status is `done` or `aborted`.
|
|
5578
5901
|
|
|
5902
|
+
#### Done escalation entry
|
|
5903
|
+
|
|
5904
|
+
`doneEscalationEntry` is a registered build-scope value for the
|
|
5905
|
+
`doneEscalations` rollup (§7.7): the build's `kind`, its latest terminal fact
|
|
5906
|
+
(`done` or `aborted`) and its open escalation ids in raise order. It applies the build reducer's open-escalation
|
|
5907
|
+
rules exactly: raises, deferrals, janitor escalations and entered ticket waits
|
|
5908
|
+
open; answers, wait ends, janitor recovery, `wait-unresolvable` and verify
|
|
5909
|
+
supersession close. Its ids always equal the build reducer's
|
|
5910
|
+
`openEscalations`.
|
|
5911
|
+
|
|
5579
5912
|
### 15.6 Walkthroughs
|
|
5580
5913
|
|
|
5581
5914
|
**Happy path** (elided: `session.started/ended` brackets around every agent
|
|
@@ -5656,7 +5989,10 @@ verdict's finding marks `persists: [f1]` → round 3 again → kernel:
|
|
|
5656
5989
|
names the exact replacement artifact it authorizes. `accept-target` answers only
|
|
5657
5990
|
a leaf's `policy/target-rewritten` escalation (§7.4): it waives the rejected base
|
|
5658
5991
|
and restacks the build's own commits onto the current target; other answer forms
|
|
5659
|
-
skip that escalation. `
|
|
5992
|
+
skip that escalation. Answering a `done` build only acknowledges its open
|
|
5993
|
+
escalations: guidance or a bare retry records `escalation.answered`, requests no
|
|
5994
|
+
resume and leaves the build done, and every other answer form is refused.
|
|
5995
|
+
`guidance` feeds the answer
|
|
5660
5996
|
into the next producer round as authoritative feedback; `dismiss-finding`
|
|
5661
5997
|
marks the chain human-resolved and the next reviewer round is told so. Engine-routed
|
|
5662
5998
|
guidance is latest-only per destination (`plan`, `code`, or one exact agent
|
|
@@ -5766,7 +6102,9 @@ SHAs could not be inspected. An environment that never started executing holds
|
|
|
5766
6102
|
no unpublished work: objects its checkout lacks mean nothing to preserve, so
|
|
5767
6103
|
cleanup records `workspace.commits-preserved` (or `workspace.commits-retained`)
|
|
5768
6104
|
carrying forward earlier preserved heads, then releases and replaces it. Unknown fencing, inspection, transport, or
|
|
5769
|
-
receipt-write outcomes leave the workspace and snapshots intact
|
|
6105
|
+
receipt-write outcomes leave the workspace and snapshots intact, except under
|
|
6106
|
+
abort cleanup, which records `workspace.commits-lost` and tears the workspace
|
|
6107
|
+
down. A workspace
|
|
5770
6108
|
flagged by `workspace.cleanup-required` is never launched into: the dispatcher
|
|
5771
6109
|
releases it and provisions the next generation. Provisioning cut off by a
|
|
5772
6110
|
recorded dispatcher teardown is the exception: the next invocation asks the
|
|
@@ -5890,6 +6228,14 @@ no pipeline decision reads it (§12). A leaf counts as finished when its latest
|
|
|
5890
6228
|
settlement follows the spec restart, or when that restart published its reopen's
|
|
5891
6229
|
spec (§15.5).
|
|
5892
6230
|
|
|
6231
|
+
`slot.admitted { request?, need? }` is advisory capacity evidence: the
|
|
6232
|
+
dispatcher appends it when its slot gate admits a build that holds no slot
|
|
6233
|
+
(§12), with `need` naming a node's admitted runner need; no pipeline decision
|
|
6234
|
+
reads it. A node whose runner was started before node admissions were recorded
|
|
6235
|
+
(its log has none naming a need) keeps counting as holding its slot; the
|
|
6236
|
+
dispatcher records that runner's admission once, so new intake never
|
|
6237
|
+
overcommits it.
|
|
6238
|
+
|
|
5893
6239
|
### 15.7 Post-PR lifecycle [D1 — confirmed]
|
|
5894
6240
|
|
|
5895
6241
|
Walking the happy path exposed a gap in the grammar: `finalize` creates the
|
|
@@ -5953,8 +6299,8 @@ reopen re-enters the mainline at `implement` or `plan`, and the leaf reaches
|
|
|
5953
6299
|
merge only through `finalize` again.
|
|
5954
6300
|
|
|
5955
6301
|
**Forge CI on finished leaves.** A clean restack or a change on the base can
|
|
5956
|
-
leave a finished leaf's own CI red on the forge without
|
|
5957
|
-
re-running. On the same janitor poll of a finished, open leaf PR (no phase or
|
|
6302
|
+
leave a finished leaf's own CI red on the forge without the local verify steps
|
|
6303
|
+
re-running (a clean-restack policy, §16.2, re-runs only opted-in steps). On the same janitor poll of a finished, open leaf PR (no phase or
|
|
5958
6304
|
session running), the dispatcher reads the check runs and commit statuses at the
|
|
5959
6305
|
PR's live head through the optional Forge `inspectHeadChecks` capability
|
|
5960
6306
|
(GitHub: two ETag-conditional REST reads, so an unchanged head costs two 304s).
|
|
@@ -6046,7 +6392,8 @@ Workspace commit preservation (§12 D) is the strict exception: its unpublished
|
|
|
6046
6392
|
commits may exist nowhere else. It tries the forge archive ref, then a
|
|
6047
6393
|
`history-objects-<sha>` store copy excluding the preservation base, and never
|
|
6048
6394
|
classifies a commit as `target` or proceeds unretained. When both fail, release
|
|
6049
|
-
is refused and cleanup stays pending.
|
|
6395
|
+
is refused and cleanup stays pending. Abort cleanup is the one exception: it
|
|
6396
|
+
records `workspace.commits-lost` and releases. A history copy is identified by its head:
|
|
6050
6397
|
a later retention of the same commit reuses the existing copy and its saved
|
|
6051
6398
|
base. Preservation records that base and, when it is no longer an ancestor of
|
|
6052
6399
|
the current preservation base, retains the base itself the same way, to a
|
|
@@ -6613,7 +6960,7 @@ also carries the hook's `command` or `url`.
|
|
|
6613
6960
|
|
|
6614
6961
|
```toml
|
|
6615
6962
|
baseBranch = "main"
|
|
6616
|
-
capacity = 3 #
|
|
6963
|
+
capacity = 3 # slots; a build waiting on a human, another ticket or a merge holds none
|
|
6617
6964
|
ticketScanIntervalSeconds = 60 # positive integer; ready scans, with tick spacing as floor
|
|
6618
6965
|
forge = "github" # builtin: github | local-git; or a plugin name
|
|
6619
6966
|
plugins = ["./plugins/local.ts", "@acme/autobuild-plugin"]
|
|
@@ -6634,6 +6981,7 @@ automatic = true # immediate/60-second target checks; false requi
|
|
|
6634
6981
|
#vcpus = 4
|
|
6635
6982
|
#timeoutSeconds = 2700
|
|
6636
6983
|
#operationTimeoutMs = 30000 # provider calls, not VM/session lifetime
|
|
6984
|
+
#recoveryTimeoutMs = 120000 # one stopped-sandbox resume plus guest git
|
|
6637
6985
|
#environmentVariables = ["ANTHROPIC_API_KEY"]
|
|
6638
6986
|
|
|
6639
6987
|
#[pr.imageHost] # optional public inline rendering for attached images
|
|
@@ -6791,7 +7139,11 @@ non-ancestor source records `verify.config-superseded` and starts a fresh cycle
|
|
|
6791
7139
|
before constructing any further member. Already launched siblings settle first.
|
|
6792
7140
|
A waiting leaf with completed verification retains its receipts after a clean
|
|
6793
7141
|
rewrite when build-owned config is unchanged, even when the rewrite replaces
|
|
6794
|
-
the pin commit's ancestry.
|
|
7142
|
+
the pin commit's ancestry. Two clean restacks instead start a new cycle that
|
|
7143
|
+
the earlier receipts cannot satisfy: a root-targeting leaf's clean landing
|
|
7144
|
+
restack whose frozen `afterCleanRestack` policy enables any step re-verifies on
|
|
7145
|
+
the restacked base and head, and a clean wait-resume restack after a verify or
|
|
7146
|
+
finalize ticket wait re-verifies on the resumed base. Changed config still supersedes while waiting; a
|
|
6795
7147
|
future verification cycle always captures fresh config before running steps.
|
|
6796
7148
|
Old pass/skip receipts cannot satisfy that cycle, and supersession creates no
|
|
6797
7149
|
failure or failure-budget charge. Unchanged config on a descendant head retains
|
|
@@ -6802,12 +7154,16 @@ replace its build-owned sections. Historical streams capture before further
|
|
|
6802
7154
|
verification. Deployment-owned reloads remain live; environments are not
|
|
6803
7155
|
re-provisioned.
|
|
6804
7156
|
|
|
6805
|
-
|
|
7157
|
+
Four configurable narrowing mechanisms govern which verify steps run, all
|
|
6806
7158
|
resolving to the ordinary `skipped` outcome so exclusions stay queryable:
|
|
6807
7159
|
|
|
6808
7160
|
- **Post-reconcile policy.** The cycle snapshot resolves repository and step
|
|
6809
7161
|
`afterReconcile` settings before any plan or path exclusions, including for
|
|
6810
7162
|
`always` steps. It applies only after a completed reconcile.
|
|
7163
|
+
- **Clean-restack policy.** A root-targeting leaf's clean awaiting-merge
|
|
7164
|
+
restack freezes repository and step `afterCleanRestack` settings in its
|
|
7165
|
+
restack intent. When any step is opted in, the cycle it opens skips the
|
|
7166
|
+
rest before any plan or path exclusions, including for `always` steps.
|
|
6811
7167
|
- **Plan selection.** An approved plan may declare the complete subset of
|
|
6812
7168
|
optional verify steps warranted by the spec, in strict front matter
|
|
6813
7169
|
validated at deposit. The selection paired with the approving review
|
|
@@ -6817,7 +7173,7 @@ resolving to the ordinary `skipped` outcome so exclusions stay queryable:
|
|
|
6817
7173
|
the cycle's pinned configured universe, the entire selection falls back to
|
|
6818
7174
|
all configured optional steps. The kernel records one observation per cycle
|
|
6819
7175
|
and plan revision naming the unknown steps. Mandatory steps, paths and
|
|
6820
|
-
post-reconcile
|
|
7176
|
+
post-reconcile and clean-restack policies still apply. A valid selection continues to skip
|
|
6821
7177
|
genuinely omitted optional steps. Strict new-plan validation is unchanged.
|
|
6822
7178
|
- **Path applicability.** A step may declare positive changed-path selectors,
|
|
6823
7179
|
evaluated by the kernel immediately before the step on every verify cycle,
|
|
@@ -6855,6 +7211,41 @@ and a reason naming the setting. Dashboards and PR summaries call this
|
|
|
6855
7211
|
checks and branch protections still gate merge. For excluded steps, merged code
|
|
6856
7212
|
is not re-verified, so breakage that only exists in the combination can merge.
|
|
6857
7213
|
|
|
7214
|
+
#### Clean-restack verification policy
|
|
7215
|
+
|
|
7216
|
+
Clean-restack re-verification defaults to disabled: omitting
|
|
7217
|
+
`[verify].afterCleanRestack` means `false`, and omission is preserved in the
|
|
7218
|
+
captured configuration. An optional boolean `[verify.<step>].afterCleanRestack`
|
|
7219
|
+
overrides the repository setting in either direction. Opt in per step on
|
|
7220
|
+
deterministic checks, for example `afterCleanRestack = true` in
|
|
7221
|
+
`[verify.lint]` and `[verify.types]`; an agent step re-runs only when opted
|
|
7222
|
+
in. Each target move under a waiting leaf re-runs every opted-in step, so
|
|
7223
|
+
keep the set to checks that are cheap and catch semantic drift.
|
|
7224
|
+
|
|
7225
|
+
The policy applies only to a root-targeting leaf's clean awaiting-merge
|
|
7226
|
+
restack, including one whose conflicts were all `[[generated]]` files and
|
|
7227
|
+
were regenerated. A leaf targeting an integration node relies on that node's
|
|
7228
|
+
own verification before root. When the runner builds the restack intent, it
|
|
7229
|
+
resolves the ordered policy from the configuration it decided with and, only
|
|
7230
|
+
if at least one step is enabled, freezes it as `cleanRestackPolicy` in
|
|
7231
|
+
`restack.publish-intended`. The same value is recorded on `restack.rewritten`
|
|
7232
|
+
and `restack.completed`, so a crash between intent and completion keeps the
|
|
7233
|
+
frozen policy. That completion is a verify cycle boundary, not a replay
|
|
7234
|
+
boundary: no further restack runs. While it is the newest code boundary,
|
|
7235
|
+
each step the policy disables records `verify.completed` with outcome
|
|
7236
|
+
`skipped`, `skipCause = "clean-restack-policy"`, and a reason naming the
|
|
7237
|
+
setting ("skipped by clean-restack policy: verify.afterCleanRestack = false").
|
|
7238
|
+
Enabled steps follow plan selection and path rules and cite the restacked
|
|
7239
|
+
base and head. A step absent from the frozen policy runs.
|
|
7240
|
+
|
|
7241
|
+
The leaf does not land until the cycle is satisfied. A failure routes through
|
|
7242
|
+
the ordinary repair loop (implement → code-review → verify-entry restack →
|
|
7243
|
+
ordinary verification) and counts toward `maxVerifyAttempts`. When every
|
|
7244
|
+
step passes or is skipped, the build returns to waiting, and landing consent
|
|
7245
|
+
survives as it does for any clean restack. An omitted or all-false policy
|
|
7246
|
+
records nothing, so existing event streams and decisions are unchanged. Node
|
|
7247
|
+
verification and optimization measurement invalidation are unaffected.
|
|
7248
|
+
|
|
6858
7249
|
### 16.3 Skill installation: vendored, namespaced, editable [D11]
|
|
6859
7250
|
|
|
6860
7251
|
This project ships 14 canonical default skills for the fixed phases, the
|
|
@@ -7069,8 +7460,8 @@ absolute file path containing the edited text. Read the current ticket and
|
|
|
7069
7460
|
reapply the intended changes before retrying; conflicts are never merged.
|
|
7070
7461
|
|
|
7071
7462
|
File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets,
|
|
7072
|
-
state and
|
|
7073
|
-
fingerprint kind, target, title, body, canonical label/blocker sets, state and issue links,
|
|
7463
|
+
state and any priority other than normal; file revisions also cover nonempty issue links. GitHub revisions
|
|
7464
|
+
fingerprint kind, target, title, body, canonical label/blocker sets (priority labels included), state and issue links,
|
|
7074
7465
|
including the ticket's own issue; GitHub tickets carry no comments, and assignees
|
|
7075
7466
|
are not part of a GitHub revision. Reverting
|
|
7076
7467
|
identical content restores its fingerprint. File checks
|
|
@@ -7183,13 +7574,20 @@ consent was given at (null without consent), and a current forge CI failure
|
|
|
7183
7574
|
Source `ab ticket tree` / `tickets.tree` enumerate all ticket states with listing
|
|
7184
7575
|
diagnostics; effective build targets remain frozen independently of source metadata.
|
|
7185
7576
|
|
|
7186
|
-
Default watch attention includes `integration.verification-failed`, `integration.landed`,
|
|
7187
|
-
`landing.consent-revoked`, `pr.checks-failed`, `optimization.noise-exceeded
|
|
7577
|
+
Default watch attention includes `integration.verification-failed`, `integration.landed`,
|
|
7578
|
+
`landing.consent-revoked`, `pr.checks-failed`, and `optimization.noise-exceeded`.
|
|
7579
|
+
Conflicted `restack.replayed` and `node.item-conflicted` are routine: reconcile or
|
|
7580
|
+
generated-file regeneration resolves them, so they stay out of default watch and
|
|
7581
|
+
wait attention, as they do in `repository.attention`. An unresolvable conflict
|
|
7582
|
+
reaches the operator only as `escalation.raised` (a reconcile escalation,
|
|
7583
|
+
exhausted reconcile attempts, or no progress) or `landing.consent-revoked`.
|
|
7584
|
+
Derived `build.consent-ready` observations
|
|
7188
7585
|
carry target, branch, candidate and the durable readiness entry position in the
|
|
7189
7586
|
existing cursor envelope. Cursor identities retain readiness episodes across
|
|
7190
7587
|
restart; a new candidate or exit/re-entry can wake again. Explicit event globs
|
|
7191
|
-
remain event-only. Wait adds `consent`, `node-merged`, `restack-conflicted
|
|
7192
|
-
includes
|
|
7588
|
+
remain event-only. Wait adds `consent`, `node-merged`, and `restack-conflicted`;
|
|
7589
|
+
attention includes consent and node merges but not restack conflicts, which
|
|
7590
|
+
`restack-conflicted` opts into. Current-state waits return immediately, backlog
|
|
7193
7591
|
replay retains event ordering, including merge before terminal completion.
|
|
7194
7592
|
|
|
7195
7593
|
Consent/hold readiness is signalled exclusively by `build.consent-ready`,
|