@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/bin/ab-build-runner.ts
CHANGED
|
@@ -7,6 +7,10 @@ import {
|
|
|
7
7
|
} from '../packages/core/src/processes/build-child-exit'
|
|
8
8
|
import { watchBuildParent } from '../packages/core/src/processes/build-parent-watch'
|
|
9
9
|
import { BUILD_RUNNER_OPTIONS_ENV } from '../packages/core/src/ports/workspace/local-build-execution'
|
|
10
|
+
import {
|
|
11
|
+
EXECUTION_EXIT_FILE_ENV,
|
|
12
|
+
writeExecutionExitSync,
|
|
13
|
+
} from '../packages/core/src/ports/workspace/execution-exit-marker'
|
|
10
14
|
import {
|
|
11
15
|
parseBuildChildLaunch,
|
|
12
16
|
type BuildChildLaunch,
|
|
@@ -51,5 +55,9 @@ if (input.supervision.kind === 'local-parent') {
|
|
|
51
55
|
} catch {
|
|
52
56
|
exitCode = 1
|
|
53
57
|
}
|
|
58
|
+
// A stopped persistent sandbox no longer reports the command's exit, so the
|
|
59
|
+
// runner records it on the environment's own filesystem for re-observation.
|
|
60
|
+
const exitFile = process.env[EXECUTION_EXIT_FILE_ENV]
|
|
61
|
+
if (exitFile) writeExecutionExitSync(exitFile, input.instance, exitCode)
|
|
54
62
|
process.exit(exitCode)
|
|
55
63
|
}
|
|
@@ -5,6 +5,14 @@ A build is **blocked** while one or more escalations are open. Inspect them with
|
|
|
5
5
|
Every action below is sessionless, records a human-authored fact, and accepts
|
|
6
6
|
`--store <ref>`.
|
|
7
7
|
|
|
8
|
+
A blocked build holds no capacity slot once nothing is still working on it.
|
|
9
|
+
Answering doesn't give it one: it waits as a `resume` request ahead of ticket
|
|
10
|
+
claims at its level, higher levels first, and runs once a slot frees. A build whose
|
|
11
|
+
work goes on keeps its slot through the answer and requests nothing: another
|
|
12
|
+
step of its verify stage still running, a launch in flight, or a running
|
|
13
|
+
execution launched with the slot. A `--revise-spec` answer requests nothing
|
|
14
|
+
until the revision lands.
|
|
15
|
+
|
|
8
16
|
| Need | Command | Effect |
|
|
9
17
|
|---|---|---|
|
|
10
18
|
| Give the phase a decision or missing information | `ab answer <slug> <text>` | Records `guidance`. In a review loop it feeds the next producer round; a ticket wait's answer instead resumes the phase that declared it, including the same review round. |
|
|
@@ -76,14 +84,14 @@ refusal as guidance.
|
|
|
76
84
|
Once accepted, the build's escalation question begins `Waiting on`,
|
|
77
85
|
`ab build status <slug>` shows a `waiting on:` line naming the tickets, its
|
|
78
86
|
ticket lists those tickets in `blockedBy`, and the build holds no capacity
|
|
79
|
-
slot. `ab builds` and both dashboards show it as `
|
|
87
|
+
slot. `ab builds` and both dashboards show it as `WAITING` on those tickets
|
|
80
88
|
rather than as a blocked question; in `ab builds --json` its `status` stays
|
|
81
89
|
`blocked` and a `wait` field names the tickets. On either dashboard, `r` or
|
|
82
90
|
RESUME on a waiting build answers it. The dispatcher ends the wait on its
|
|
83
91
|
first tick after every named ticket completes; a wait with some tickets still
|
|
84
92
|
open stays in place. To end it early, for example when the work landed another
|
|
85
93
|
way, `ab answer <slug> <text>` or a bare `ab answer <slug>` ends the wait.
|
|
86
|
-
Either way the build takes the next free slot ahead of
|
|
94
|
+
Either way the build waits as a `resume` request and takes the next free slot ahead of ticket claims at its level (higher levels first; `ab priority <slug> urgent` expedites it). If its target
|
|
87
95
|
branch has moved past the base the build's work sits on, the build first
|
|
88
96
|
restacks onto the target's current head so the resumed phase sees the merged blockers; a conflicting
|
|
89
97
|
restack shows as `reconcile` and resolves first. The phase that declared the
|
|
@@ -181,3 +189,25 @@ uncited artifacts are inert. Leaves still require an open escalation and
|
|
|
181
189
|
restart from `plan` after any unfinished reconcile resumes under the revised
|
|
182
190
|
spec and its publication is confirmed. A settled, unmerged leaf awaiting merge
|
|
183
191
|
revises without an escalation through `ab reopen`.
|
|
192
|
+
|
|
193
|
+
## Acknowledging an escalation on a completed build
|
|
194
|
+
|
|
195
|
+
A done build can still gain an escalation: the post-landing integration audit
|
|
196
|
+
raises one when a node's merged result does not match what was verified, after
|
|
197
|
+
the build completed. Answer it like any other:
|
|
198
|
+
|
|
199
|
+
- `ab answer <slug> <text>` or `builds.answer` `guidance` records the text.
|
|
200
|
+
- `ab answer <slug>` or `builds.answer` `retry` records a bare acknowledgement.
|
|
201
|
+
|
|
202
|
+
Either closes every open escalation with `escalation.answered`. The build stays
|
|
203
|
+
done: nothing resumes, restarts or reopens. Every other answer form
|
|
204
|
+
(`--revise-spec`, `--revise-spec-from-ticket`, `--dismiss`, `--accept-target`,
|
|
205
|
+
`--review-round-ceiling`) is refused with `inactive`, and so is a done build
|
|
206
|
+
with nothing open.
|
|
207
|
+
|
|
208
|
+
`ab build status` / `builds.get`, `ab watch` / `ab wait` attention, both
|
|
209
|
+
dashboards, `ab web` and `operator.attention` show the escalation while it is
|
|
210
|
+
open and drop it once acknowledged. On a dashboard the build reads red
|
|
211
|
+
`BLOCKED` with the note `done` and its question, and holds no slot. Completion
|
|
212
|
+
closes no escalation, so a question still open when abort cleanup completed
|
|
213
|
+
shows the same way until it is acknowledged.
|
package/docs/architecture.md
CHANGED
|
@@ -98,7 +98,7 @@ remote-store protocol requires matching client and server versions.
|
|
|
98
98
|
| `packages/core/src/ports/` | TicketSource / Workspace / Forge / AgentRunner / Telemetry interfaces, adapters, and fakes; registry-aware builtin/plugin construction; eager primary/alternate runtime routing and provider-failure classification, awaited native identity observation and optional fresh-process native resume under `ports/runner/` | §3.2, §9, §13 |
|
|
99
99
|
| `packages/core/src/plugins/` | Strict versioned plugin manifests, dual-root repository/package Bun loading, owner-aware adapter registration, contract/credential metadata, and runtime-factory materialization | §3.2.1, §9 |
|
|
100
100
|
| `packages/core/src/plugin-sdk/` | The sole supported `@defrex/autobuild/plugin-sdk` barrel: port/manifest types, contract suites, and reference fakes | §3.2.1 |
|
|
101
|
-
| `packages/core/src/processes/` | build-runner and standalone child composition, durable execution config/diagnostics, dispatcher (+ janitor duty, sandbox idle settlement and harvest trigger), harvest deterministic core + runner, configured hook delivery (`hooks.ts`, `hook-command.ts`, `hook-webhook.ts`), repository agent-context capture (`agent-context.ts`, pure selection in `agent-context-assemble.ts`) | §3.3, §7.1.2, §12, §15.7, §16.1 |
|
|
101
|
+
| `packages/core/src/processes/` | build-runner and standalone child composition, durable execution config/diagnostics, dispatcher (+ janitor duty, sandbox idle settlement and harvest trigger), bounded-invocation budget (`invocation-budget.ts`), harvest deterministic core + runner, configured hook delivery (`hooks.ts`, `hook-command.ts`, `hook-webhook.ts`), repository agent-context capture (`agent-context.ts`, pure selection in `agent-context-assemble.ts`) | §3.3, §7.1.2, §12, §15.7, §16.1 |
|
|
102
102
|
| `packages/core/src/cli/` and `bin/` | The `ab` CLI — the only agent↔store channel — plus the shared presentation-only durable-progress projection, init/upgrade, the filesystem-only dispatch launcher and immutable generation cache, the dispatch frontend (Store-backed, plus the viewer's ticket-source triage count) and its in-process web server, its private supervised kernel entry, and `bin/ab-build-runner.ts` (one child per build) | §8, §14, §16.3 |
|
|
103
103
|
| `packages/core/src/cli/dashboard/` | `ab dispatch`'s fixed live frame: pure projection, renderer, poll cache, and deterministic image renderer | §14 |
|
|
104
104
|
| `bin/agent/ab` | Private launcher placed first on agent-session `PATH`; delegates to the canonical `bin/ab.ts` | §8.1 |
|
|
@@ -245,11 +245,16 @@ identity, receive answers projected onto their
|
|
|
245
245
|
frozen released contracts in `store/remote/released-reducer-values/` and stamped
|
|
246
246
|
with their released reducer versions, including projection-capable published clients.
|
|
247
247
|
The projection covers both named reducer values and historical stream seeds.
|
|
248
|
-
`reducerValueForClient` omits optional `lastEvent` fields
|
|
248
|
+
`reducerValueForClient` omits optional `lastEvent` fields the release cannot
|
|
249
|
+
represent (newer event variants, or well-formed events with newer payload values),
|
|
249
250
|
including nested build state, and filters `seenTypes` to known event types while
|
|
250
|
-
preserving canonical cursor, progress, and compatibility facts.
|
|
251
|
-
or
|
|
252
|
-
|
|
251
|
+
preserving canonical cursor, progress, and compatibility facts. Widened literals are
|
|
252
|
+
rewritten or omitted at the sites declared in `store/remote/released-value-policy.ts`;
|
|
253
|
+
`released-value-coverage.integration.test.ts` sweeps populated values covering every
|
|
254
|
+
union variant against every supported contract and fails on an undeclared divergence.
|
|
255
|
+
An invalid envelope or an unrepresentable required value raises
|
|
256
|
+
`ReducerValueIncompatibilityError` with client/server versions, validation detail and
|
|
257
|
+
upgrade advice; `ab watch` and `ab wait` treat it as terminal. See the
|
|
253
258
|
[reduced-value protocol](remote-store-protocol.md) for the response
|
|
254
259
|
contract. No remote named read replays events.
|
|
255
260
|
Repository digest batches likewise return the server batch with one scoped
|
|
@@ -287,7 +292,11 @@ registered build reducer, a pure invertible contribution, an accumulator with
|
|
|
287
292
|
histograms of `store/histogram.ts`. `kernel/build-roster.ts` is the second:
|
|
288
293
|
its `buildRosterEntry` build reducer feeds `buildRoster`, the live builds plus
|
|
289
294
|
a capped history of the newest finished ones, which `ab web`'s overview starts
|
|
290
|
-
from. `
|
|
295
|
+
from. `kernel/done-escalations.ts` is the third: its `doneEscalationEntry`
|
|
296
|
+
build reducer mirrors the build reducer's open-escalation rules and feeds
|
|
297
|
+
`doneEscalations`, the done builds whose escalation still awaits
|
|
298
|
+
acknowledgement, which every dashboard and `operator.attention` read beside
|
|
299
|
+
the open builds. `store/rollups.ts` is the one engine every
|
|
291
300
|
adapter runs over a narrow `RollupStorage` port: fast path on an unchanged
|
|
292
301
|
change position, otherwise an advance by the changed-builds feed, serialized
|
|
293
302
|
per key and committed atomically with each build's absorbed contribution in
|
|
@@ -528,8 +537,9 @@ head is a no-op; Git/Forge failures stay failure-tolerant observations.
|
|
|
528
537
|
**Verify gating.** `packages/core/src/ontology.ts` owns the canonical
|
|
529
538
|
`pass | fail | skipped` outcome (only `fail` routes back to implement or
|
|
530
539
|
consumes attempts; a skip satisfies one step without being passing
|
|
531
|
-
evidence).
|
|
532
|
-
post-reconcile policy, approved plan selection, and
|
|
540
|
+
evidence). Four kernel-authored skip sources narrow the configured universe:
|
|
541
|
+
post-reconcile policy, clean-restack policy, approved plan selection, and
|
|
542
|
+
changed paths.
|
|
533
543
|
The engine captures the ordered effective `afterReconcile` policy in
|
|
534
544
|
`verify.reconcile-policy-captured` at the action after reconciliation completes,
|
|
535
545
|
before verification starts. Log-index replay keeps it scoped to that completion;
|
|
@@ -540,6 +550,14 @@ and carry `skipCause: "post-reconcile-policy"` plus a setting-specific reason.
|
|
|
540
550
|
The shared dashboard model renders that reason, as does the PR summary.
|
|
541
551
|
Excluded steps do not re-verify merged code, so combination-only breakage can
|
|
542
552
|
merge; forge requirements and reconcile budgets remain independent.
|
|
553
|
+
The clean-restack policy is frozen earlier, in the restack intent itself:
|
|
554
|
+
`kernel/clean-restack-policy.ts` resolves `afterCleanRestack` for a
|
|
555
|
+
root-targeting leaf's awaiting-landing intent in `BuildRunner.restack`, and
|
|
556
|
+
the intent, rewrite and completion all carry it as `cleanRestackPolicy`, so no
|
|
557
|
+
gap exists between the restack and the policy capture. While that completion
|
|
558
|
+
is the newest code boundary (`cleanRestackPolicyInForce` in
|
|
559
|
+
`kernel/verify-stages.ts`), disabled steps skip with
|
|
560
|
+
`skipCause: "clean-restack-policy"` before plan/path applicability.
|
|
543
561
|
For enabled steps,
|
|
544
562
|
`packages/core/src/kernel/plan-verify-selection.ts` resolves an approved plan's front-matter
|
|
545
563
|
selection (applied at the planner's `ab done` in `packages/core/src/cli/terminals.ts`,
|
|
@@ -605,10 +623,27 @@ worktree. Excluded-file commits change observed provenance without adoption.
|
|
|
605
623
|
`dispatch-upgrade-controller.ts` checks immediately and every 60 seconds, suppresses
|
|
606
624
|
failed target inputs and publishes durable prepared targets. `dispatch-preflight.ts`
|
|
607
625
|
checks target configuration, provider compatibility and actual protocol-write
|
|
608
|
-
admission before requesting yield. `
|
|
626
|
+
admission before requesting yield. `dispatch-yield-observer.ts` watches the reduced
|
|
627
|
+
upgrade value at a fixed cadence and step limit while the run has a prepared
|
|
628
|
+
target, and queues acceptance through the tick serialization.
|
|
629
|
+
`dispatch-release-observer.ts` holds the successor's two-read post-yield
|
|
630
|
+
observation step and its pause schedule: 25 ms for at most 240 observations,
|
|
631
|
+
doubling to 500 ms, never shorter than the last observation.
|
|
632
|
+
`kernel/dispatch-upgrade.ts` folds correlated
|
|
609
633
|
acceptance, terminal release, takeover, per-execution retirement and completion.
|
|
610
634
|
The runtime-owned `dispatch-handoff.ts` reader lets the filesystem-only launcher
|
|
611
635
|
supervise overlapping generations without owning Store or config decisions.
|
|
636
|
+
Each reader is a fresh process, so it initializes only what its operation uses:
|
|
637
|
+
`dispatch-handoff.ts` loads store, reducer and argument modules at first use; a
|
|
638
|
+
journal-bound reader opens through `cli/production-store.ts` without
|
|
639
|
+
repository configuration, and a local journal reference also avoids the remote
|
|
640
|
+
adapter, which HTTP(S) references load when opened; `store/local/capabilities.ts`
|
|
641
|
+
loads write validation and the other unused local-store capabilities on first
|
|
642
|
+
use, before the write's transaction; and `kernel/reducer-value-index.ts` loads
|
|
643
|
+
only the requested module for the indexed reader reducers (`dispatchUpgrade`,
|
|
644
|
+
`repositoryReadFacts` and `dispatcherRunFacts`), while any other name loads the
|
|
645
|
+
full `REDUCERS` registry on first demand. Both paths build entries with the same
|
|
646
|
+
`valueReadEntry`.
|
|
612
647
|
A runtime-owned repository-record projection binds the journal transport before
|
|
613
648
|
initial spawn and across handoffs, including when later config edits are invalid.
|
|
614
649
|
The optional conditional `--read-upgrade` environment extension in
|
|
@@ -625,6 +660,11 @@ conditional state; a separate predecessor-reader cache uses the active run's
|
|
|
625
660
|
journal context when the target cannot load. Old peers keep full v1 responses.
|
|
626
661
|
Polling stays at 1 second idle / 250 ms pending, and cached projections still
|
|
627
662
|
pass through ordinary child-exit, pending-preflight and recovery handling.
|
|
663
|
+
`dispatch-launcher-cadence.ts` paces supervision: while the active run's
|
|
664
|
+
durably detected upgrade has no prepared target, failure, request or handoff,
|
|
665
|
+
the reader's advisory `preparing` correlation earns 50 ms checks, at most 600
|
|
666
|
+
per detection, before the idle cadence resumes. Older readers omit the field
|
|
667
|
+
and keep the ordinary cadence; operator shutdown ends any pause.
|
|
628
668
|
`dispatch-frontend.ts` acknowledges terminal release only after joining input
|
|
629
669
|
and rendering. The old kernel releases repository authority but retains local
|
|
630
670
|
execution supervision until completion or the hot policy deadline. Build-log
|
|
@@ -698,16 +738,30 @@ standalone `dispatcher.tick-failed` diagnostic before the next operational tick.
|
|
|
698
738
|
An unacknowledged diagnostic remains pending and may be duplicated after a lost
|
|
699
739
|
response. Reporting never closes a later tick boundary or gates committed
|
|
700
740
|
handoff acceptance. Explicit shutdown, supersession and fatal forge publication
|
|
701
|
-
still stop the loop
|
|
702
|
-
|
|
741
|
+
still stop the loop. Once mode ends its run after its tick: a durably reported tick
|
|
742
|
+
failure records a normal `dispatcher.run-stopped` with exit code 1 and the error
|
|
743
|
+
(`DispatchTickFailedError` carries it to `abDispatch`), then rethrows the original
|
|
744
|
+
error; an unreported failure, fatal forge publication or fatal ticket preparation
|
|
745
|
+
stops abnormally. Stopping before recovery leaves only local warnings for
|
|
746
|
+
unreported failures. A tick-failure episode in `kernel/repository-attention.ts`
|
|
747
|
+
spans runs, so consecutive one-tick hosted runs still reach the five-minute
|
|
748
|
+
persistent-tick attention.
|
|
749
|
+
|
|
750
|
+
`dispatcherTicketSource` returns a hosted source with its preparation deferred:
|
|
751
|
+
`DispatchLoop.prepareTickets` publishes the ticket policy and settles targeted
|
|
752
|
+
listing at the first tick boundary, once it succeeds. A transient
|
|
753
|
+
(`RemoteUnavailableError`) failure there is an ordinary tick failure;
|
|
754
|
+
any other is wrapped as `FatalTicketPreparationError` and stops the run
|
|
755
|
+
abnormally with the original error. `abDispatch` scopes the invocation deadline
|
|
756
|
+
(`withRemoteRetryDeadline`) so it also bounds client retries.
|
|
703
757
|
Failure settlement writes through the fenced backing store without reading the
|
|
704
758
|
failed projection. Repository view writes distinguish a committed result from a
|
|
705
759
|
subsequent refresh failure, retaining the last complete snapshot while propagating
|
|
706
760
|
the read error to the operational caller. Exact metadata confirmation acknowledges
|
|
707
761
|
lost finish responses without requiring another projection read or duplicating
|
|
708
762
|
boundaries. Every operational tick refreshes facts before routing work. Startup
|
|
709
|
-
configuration errors, fatal forge publication errors
|
|
710
|
-
|
|
763
|
+
configuration errors, fatal forge publication errors and lease fencing retain
|
|
764
|
+
their existing semantics.
|
|
711
765
|
|
|
712
766
|
Timeout escalation is held while the matching repository tick observation is open
|
|
713
767
|
(with historical `tick-started` journal fallback when no observation exists),
|
|
@@ -766,7 +820,9 @@ SHAs could not be inspected. An environment that never started executing holds
|
|
|
766
820
|
no unpublished work: objects its checkout lacks mean nothing to preserve, so
|
|
767
821
|
cleanup records `workspace.commits-preserved` (or `workspace.commits-retained`)
|
|
768
822
|
carrying forward earlier preserved heads, then releases and replaces it. Unknown fencing, inspection, transport, or
|
|
769
|
-
receipt-write outcomes leave the workspace and snapshots intact
|
|
823
|
+
receipt-write outcomes leave the workspace and snapshots intact, except under
|
|
824
|
+
abort cleanup, which records `workspace.commits-lost` and tears the workspace
|
|
825
|
+
down. A workspace
|
|
770
826
|
flagged by `workspace.cleanup-required` is never launched into: the dispatcher
|
|
771
827
|
releases it and provisions the next generation. Provisioning cut off by a
|
|
772
828
|
recorded dispatcher teardown is the exception: the next invocation asks the
|
|
@@ -825,8 +881,45 @@ build-owned identity and source ancestry at settled stage boundaries. Typed
|
|
|
825
881
|
`verify.config-captured` and `verify.config-superseded` facts advance the result
|
|
826
882
|
boundary in the reducer and log index, independently of reconcile identity.
|
|
827
883
|
The advisory `pipeline.settled` fact records that the engine reached a leaf's
|
|
828
|
-
`wait awaiting-pr
|
|
829
|
-
|
|
884
|
+
`wait awaiting-pr`. Leaf slots (SPEC §12 "What holds a slot") are durable
|
|
885
|
+
facts: the build reducer folds `slotAdmittedSeq` (`build.created`, or the
|
|
886
|
+
advisory `slot.admitted` the dispatcher's `leafAdmission` appends with
|
|
887
|
+
`appendIfCurrent` before any lease, provisioning or launch) and
|
|
888
|
+
`slotReleasedSeq` (`pipeline.settled`, an answer closing an open escalation
|
|
889
|
+
or a `wait.ended` while the build is not carried, `build.paused`).
|
|
890
|
+
`kernel/dispatch-capacity.ts`'s `leafHoldsSlot` holds a leaf admitted since
|
|
891
|
+
its last release that does not wait on the outside world (`leafOutsideWait`:
|
|
892
|
+
blocked, an acknowledged pause, a pending `revise-spec`, or a finished
|
|
893
|
+
pipeline with no epilogue work due), or whose only wait is open escalations
|
|
894
|
+
that `escalationCarried` (`kernel/verify-stage-state.ts`) carries: (A) a
|
|
895
|
+
verify stage member's question while another member runs, the engine's stage
|
|
896
|
+
exemption; (E) an open execution whose launch record precedes it, with no launch
|
|
897
|
+
failure or refusal between them; (L) a launch
|
|
898
|
+
record newer than the latest `execution.started`, launch failure and open
|
|
899
|
+
`execution-no-progress` refusal; or (B) an execution older than the earliest
|
|
900
|
+
open raise. Apart from (L)'s refusal, which the progress guard raises in place
|
|
901
|
+
of a launch, only (A) looks at escalations.
|
|
902
|
+
The answer fold applies the same predicate. Runner liveness never enters; only
|
|
903
|
+
launch records and execution facts do. Every other leaf without a slot
|
|
904
|
+
requests one, `resume` unless an epilogue reason names another.
|
|
905
|
+
`leafAdmission` admits a leaf that holds its slot at once, appending
|
|
906
|
+
`slot.admitted {}` as its launch record unless one is in flight or a live
|
|
907
|
+
lease will refuse the launch; it neither gates nor records for a leaf that
|
|
908
|
+
still waits on the outside world or acknowledges a pause or abort.
|
|
909
|
+
Node slots use the same seqs. The dispatcher's `nodeAdmission` appends
|
|
910
|
+
`slot.admitted {request, need}` before provisioning, where `need` is the
|
|
911
|
+
runner need's key from `nodeRunnerNeeds` (an active restack, a measurement, a
|
|
912
|
+
proposal or an integration cycle); the reducer keeps it as `slotAdmittedNeed`.
|
|
913
|
+
`nodeHoldsSlot` holds a node admitted since its last release, not waiting on
|
|
914
|
+
the outside world (`nodeOutsideWait`), whose admitted need is still current, so
|
|
915
|
+
finished work releases the slot with no write and a workspace, lease or
|
|
916
|
+
provisioning marker never counts. `nodeAdmission` admits a holder at once and
|
|
917
|
+
sends every other request (`nodeSlotNeed`) through the same tiers as leaves;
|
|
918
|
+
`nodeRunnerWork` finds holders whose runner must be relaunched. The version
|
|
919
|
+
transition is `legacyNodeRunner`: a node runner an older dispatcher launched
|
|
920
|
+
without an admission counts as holding its slot, and
|
|
921
|
+
`adoptLegacyNodeRunners` records its admission once. Node admission counts
|
|
922
|
+
every slot holder.
|
|
830
923
|
Reopening a settled leaf (SPEC §15.7) spans the same seams. The shared
|
|
831
924
|
`cli/build-control.ts` control appends the human `build.reopened` and, for a
|
|
832
925
|
spec, publishes the kernel's operator `spec.revised`; `ab reopen` and the
|
|
@@ -838,18 +931,21 @@ restart boundary, so the engine re-runs implement, review, verify and finalize
|
|
|
838
931
|
without special cases, and the terminal guard lets the re-run finalize and
|
|
839
932
|
verify attempts complete again.
|
|
840
933
|
Slot admission order (SPEC §12) is arithmetic in `kernel/dispatch-capacity.ts`:
|
|
841
|
-
waiting entries carry the build's
|
|
842
|
-
`
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
its own
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
934
|
+
waiting entries carry the build's level (`buildPriority` over the reduced
|
|
935
|
+
`priority` and `priorityLevel` that `build.created` and `build.priority-set`
|
|
936
|
+
set), `startClaimDemand` counts pending start requests by tier (`startTierOf`),
|
|
937
|
+
`reservedAhead` counts, ahead of a waiter at one level, the manual requests and
|
|
938
|
+
every higher level's waiters, start requests and the latest admission scan's
|
|
939
|
+
claim demand (`urgentWaiting`, `highWaiting`, `normalWaiting`, read by
|
|
940
|
+
`claimDemand`), `intakeCapacity` gives each level's ordinary claims its own
|
|
941
|
+
budget, and `startCapacity` gives each start tier its own. The dispatcher's
|
|
942
|
+
`leafAdmission`, `nodeAdmission` and proposer admission defer a non-urgent
|
|
943
|
+
waiter that fits while claims can run and a higher-level claim can exist
|
|
944
|
+
(`higherClaimsPossible`); `dispatch` forces that tick's admission scan once per
|
|
945
|
+
deferral key, and `admitDeferredParked` retries the deferred admissions only
|
|
946
|
+
after the scan decided claims at every level: a leaf
|
|
947
|
+
through the build sweep, a node reconcile through `cascadeNode`, any other node
|
|
948
|
+
need through `admitNode`, and a proposal through `admitProposers`.
|
|
853
949
|
Ticket waits (SPEC §11) span four seams. `cli/terminals.ts` (`waitOn`, routed
|
|
854
950
|
as `ab wait-on`) appends the agent's terminal `wait.requested`; the build
|
|
855
951
|
digest marks it pending. The dispatcher's lease-sweep pass validates a pending
|
|
@@ -1257,7 +1353,13 @@ appending `runner.attached`; resume and workspace-using decisions stay behind
|
|
|
1257
1353
|
successful setup. For a request arriving during an AgentRunner turn, the runner
|
|
1258
1354
|
observes the BuildStore subscription, forwards an `AbortSignal`, deposits/ends
|
|
1259
1355
|
the session without a phase failure, and acknowledges abort. The execution
|
|
1260
|
-
supervisor keeps the lease until every local descendant is reaped.
|
|
1356
|
+
supervisor keeps the lease until every local descendant is reaped. A leaf with
|
|
1357
|
+
no runner to hear the request is acknowledged by the dispatcher instead:
|
|
1358
|
+
`dispatcherAcknowledgesAbort` (`kernel/janitor-failure.ts`) selects a queued,
|
|
1359
|
+
paused or blocked leaf with a pending abort, and with no live execution lease the
|
|
1360
|
+
janitor appends `build.aborted` itself. The lease sweep, startup resume and
|
|
1361
|
+
dispatch recovery stand aside on the same predicate, so no workspace is
|
|
1362
|
+
provisioned and no runner launched only to acknowledge abort. `dispatcher.ts`
|
|
1261
1363
|
defers destructive abort, discard, and terminal-PR cleanup while that lease is
|
|
1262
1364
|
live, then resumes the event-checkpointed janitor saga that closes an unmerged PR,
|
|
1263
1365
|
releases the workspace, deletes exact remote/local branch
|
|
@@ -1270,7 +1372,13 @@ back to triage and records the requested role and missing parts. The
|
|
|
1270
1372
|
`abort.ticket-returned` checkpoint commits the move and comment, then the
|
|
1271
1373
|
repository `ticket.handed-back` report is appended before abandoned completion;
|
|
1272
1374
|
once that report exists the dispatcher writes nothing more to the ticket, so it
|
|
1273
|
-
is the safe boundary for a subsequent ticket move.
|
|
1375
|
+
is the safe boundary for a subsequent ticket move. Abort's workspace release
|
|
1376
|
+
makes one best-effort preservation attempt (`preserveBeforeAbortRelease`):
|
|
1377
|
+
any failure but lost authority, a mixed-version deferral or a live lease
|
|
1378
|
+
(`WorkspaceLeaseLive`), forge deferrals included, records
|
|
1379
|
+
`workspace.commits-lost` and the release proceeds; an uncompleted publication is
|
|
1380
|
+
recorded lost without settlement (`recordPublicationLossBeforeRelease`). A
|
|
1381
|
+
failed provider reap stays due on the next tick. An optimization attempt
|
|
1274
1382
|
is the exception: cleanup settles it `aborted` on the node's log (or settles a
|
|
1275
1383
|
merged attempt as a merge), skips the label, ticket move, comment,
|
|
1276
1384
|
`abort.ticket-returned` checkpoint and `ticket.handed-back` report whatever
|
|
@@ -1403,8 +1511,9 @@ effective-config changes and bounded enrichment refreshes while retaining the
|
|
|
1403
1511
|
cached log and reduction. `repository-poll.ts` serializes the complete presentation
|
|
1404
1512
|
snapshot in both terminal paths. It samples `getRepoChangePosition` before reads,
|
|
1405
1513
|
acknowledges it only after complete admitted reads, and reuses unchanged snapshots
|
|
1406
|
-
for up to ten seconds.
|
|
1407
|
-
|
|
1514
|
+
for up to ten seconds. Discovery never lists builds: the poll cache cold-starts
|
|
1515
|
+
from `listOpenBuilds` and the `doneEscalations` rollup, then advances by
|
|
1516
|
+
`listBuildsChangedSince`; unchanged focused frames make one counter request. Session feeds remain independent.
|
|
1408
1517
|
|
|
1409
1518
|
Both dashboard frontends render one vocabulary. `cli/dashboard/vocabulary.ts`
|
|
1410
1519
|
holds the browser-safe terms: status words and tones, step marks, and the
|
|
@@ -1413,8 +1522,8 @@ clock-dependent step timers. Its only value import is `cells.ts`.
|
|
|
1413
1522
|
header, dispatcher-mode, attention-list, finished-row and overview text. The
|
|
1414
1523
|
terminal renderer paints those values, and `web/protocol.ts` aliases the same
|
|
1415
1524
|
types for the web frame, so a term changes in one place.
|
|
1416
|
-
`web/overview-source.ts` builds `ab web`'s overview from `buildRoster
|
|
1417
|
-
changed-builds feed, through the poll cache's shared row and header helpers
|
|
1525
|
+
`web/overview-source.ts` builds `ab web`'s overview from `buildRoster`,
|
|
1526
|
+
`doneEscalations` and the changed-builds feed, through the poll cache's shared row and header helpers
|
|
1418
1527
|
(`readRowEnrichment`, `projectRowWithEnrichment`, `repositoryDashboardHeader`
|
|
1419
1528
|
in `cli/dashboard/poll.ts`), so the terminal and the web project rows the same
|
|
1420
1529
|
way.
|
|
@@ -1612,11 +1721,18 @@ from `dispatch.failed`, which completes an already established build.
|
|
|
1612
1721
|
(`ticket.identity-recorded`) into `repositoryReadFacts`. `operator/ticket-start.ts`
|
|
1613
1722
|
is the one request/cancel seam behind `ab start` (`cli/ticket-start.ts`), the
|
|
1614
1723
|
`tickets.start` tool and the HTTP start routes. The dispatcher's
|
|
1615
|
-
`honorStartRequests` stage runs
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1724
|
+
`honorStartRequests` stage runs for `manual` and `urgent` requests before
|
|
1725
|
+
intake, and for `high`, `normal` and `low` requests inside intake, before the
|
|
1726
|
+
first ready ticket at their level, or after intake and the deferred parked
|
|
1727
|
+
admissions. The early pass reads at most `START_REQUESTS_PER_TICK` requests and
|
|
1728
|
+
the late passes share as many. It admits pending requests through `dispatch()`
|
|
1729
|
+
in its targeted mode, which skips the ready listing and scan checkpoint, budgets
|
|
1730
|
+
each ticket by its request's tier, but keeps every admission gate. A request the
|
|
1731
|
+
allowance leaves unread is the tick's start barrier (`startBarrier` in
|
|
1732
|
+
`kernel/dispatch-capacity.ts`), sampled when the tick starts.
|
|
1733
|
+
`admissionBarred` is the one guard that applies it: `slotAdmission` consults it
|
|
1734
|
+
for parked leaves, nodes and proposers, intake for ordinary claims, and the
|
|
1735
|
+
start passes for lower tiers.
|
|
1620
1736
|
`kernel/build-creation.ts` derives the keyed canonical slug that the dispatcher and
|
|
1621
1737
|
the hosted server share. The optional `BuildStore.buildCreationIdentity` port says
|
|
1622
1738
|
whether a store creates at the exact slug (method absent), at that derived slug for
|
|
@@ -1686,7 +1802,11 @@ and an explicit opt-in. When
|
|
|
1686
1802
|
adding an adapter, start from its contract suite, not only the interface.
|
|
1687
1803
|
|
|
1688
1804
|
The two remote clients get client-only coverage in core itself, against an
|
|
1689
|
-
injected `fetchFn` with responses built from the protocol's wire schemas.
|
|
1805
|
+
injected `fetchFn` with responses built from the protocol's wire schemas. Both
|
|
1806
|
+
send every request through `store/remote/retry.ts`, which retries transient
|
|
1807
|
+
failures by safety class under one bounded retry window (SPEC "Transient remote
|
|
1808
|
+
retries"); its seams (`sleep`, `timeout`, `now`, `random`) keep retry tests free
|
|
1809
|
+
of real timers, and single-answer tests pass `retry: false`.
|
|
1690
1810
|
`HostedTicketSource` (`ports/tickets/remote.test.ts`) is in-memory unit
|
|
1691
1811
|
coverage that runs in `bun run test`. `RemoteBuildStore`
|
|
1692
1812
|
(`store/remote/client.test.ts`, which also pins scoped-token
|
|
@@ -1889,8 +2009,8 @@ absolute file path containing the edited text. Read the current ticket and
|
|
|
1889
2009
|
reapply the intended changes before retrying; conflicts are never merged.
|
|
1890
2010
|
|
|
1891
2011
|
File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets,
|
|
1892
|
-
state and
|
|
1893
|
-
fingerprint kind, target, title, body, canonical label/blocker sets, state and issue links,
|
|
2012
|
+
state and any priority other than normal; file revisions also cover nonempty issue links. GitHub revisions
|
|
2013
|
+
fingerprint kind, target, title, body, canonical label/blocker sets (priority labels included), state and issue links,
|
|
1894
2014
|
including the ticket's own issue; GitHub tickets carry no comments. Reverting
|
|
1895
2015
|
identical content restores its fingerprint. File checks
|
|
1896
2016
|
re-read immediately before writing, with the existing no-lock race window.
|
|
@@ -1931,20 +2051,27 @@ column that every listing already selects. Dependency states carry each blocker'
|
|
|
1931
2051
|
native `state` for clients that send `x-autobuild-ticket-dependency-state: 1`,
|
|
1932
2052
|
read from the row each lookup already loads; the dispatcher applies the
|
|
1933
2053
|
configured rejected role on top (`markRejected` in `processes/dispatcher.ts`).
|
|
1934
|
-
Priority follows the issue-link pattern
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
2054
|
+
Priority follows the issue-link pattern, stored in the `ab_tickets.priority`
|
|
2055
|
+
column that every listing already selects. Clients sending
|
|
2056
|
+
`x-autobuild-ticket-priority-levels: 1` see all four levels; clients sending
|
|
2057
|
+
only the older `x-autobuild-ticket-priority: 1` see `urgent` or `normal`
|
|
2058
|
+
(`high` and `low` downgrade to normal). The ready listing and default paged
|
|
2059
|
+
order run urgent, high, normal, low, each in filing order.
|
|
1938
2060
|
|
|
1939
2061
|
Ticket integration metadata lives in `ports/tickets/tree.ts`: source compatibility
|
|
1940
2062
|
normalization, capability refusal, graph validation and the pure tree projection.
|
|
1941
|
-
Ticket priority lives in `ports/tickets/priority.ts`: the
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
2063
|
+
Ticket priority lives in `ports/tickets/priority.ts`: the four levels
|
|
2064
|
+
(`TICKET_PRIORITIES`), the `priority` capability's typed refusal, the normal
|
|
2065
|
+
no-op strip, `dispatchPriority` (urgent tickets claim urgent builds, every other
|
|
2066
|
+
level normal) and `urgentFirst`, the stable partition the dispatcher applies to
|
|
2067
|
+
its ready listing. `ports/tickets/priority-labels.ts` holds
|
|
2068
|
+
`priorityLabelSource`, the label fallback the compatibility facade wraps around
|
|
2069
|
+
a source without the capability (GitHub, plugins): one `priority:<level>` label
|
|
2070
|
+
per ticket, read from labels already fetched. Normalized tickets omit normal;
|
|
2071
|
+
the hosted service answers `priority` only to clients sending a priority
|
|
2072
|
+
capability header, so published strict wire schemas never see the key. The
|
|
2073
|
+
Linear adapter maps Urgent, High and Low to the matching levels and Medium or
|
|
2074
|
+
No priority to normal; on `normal` it clears only Urgent, High or Low.
|
|
1948
2075
|
File/fake/Linear adapters validate metadata at write boundaries; `operations.ts`
|
|
1949
2076
|
and CLI/operator source opening wrap injected or plugin sources with the same
|
|
1950
2077
|
compatibility facade. Metadata is excluded from hosted persistence/protocols.
|
|
@@ -2006,7 +2133,9 @@ different SHA) and classified transient failures never fall back. Node writes
|
|
|
2006
2133
|
use the same order and record `node.history-retained`; node recovery restores
|
|
2007
2134
|
reserved inputs before reading them and abandons a reservation whose inputs are
|
|
2008
2135
|
kept nowhere. Workspace preservation (`preserveRetained`, `retainPreservedCopy`)
|
|
2009
|
-
is strict: archive ref, else store copy, else release is refused
|
|
2136
|
+
is strict: archive ref, else store copy, else release is refused. Abort cleanup
|
|
2137
|
+
is the one exception: when preservation fails, `recordAbortPreservationFailure`
|
|
2138
|
+
records `workspace.commits-lost` and the release proceeds. A reused copy
|
|
2010
2139
|
keeps its saved base, which preservation retains in turn and
|
|
2011
2140
|
`restoreRetainedHead` follows to a bounded depth.
|
|
2012
2141
|
GitHub uses explicit Git transport leases; local-git uses shared-database
|
|
@@ -2052,9 +2181,11 @@ A clean wait-resume `restack.completed` for a wait declared in `verify:*` or
|
|
|
2052
2181
|
`waitResumeVerifyBoundary`, the reducer moves `verify.cycleSince`, and the
|
|
2053
2182
|
engine's stage selection and cycle boundary both read it through
|
|
2054
2183
|
`leafVerifyCycleInputs`. It is not a replay boundary, so the verify-entry
|
|
2055
|
-
restack does not run again.
|
|
2056
|
-
|
|
2057
|
-
|
|
2184
|
+
restack does not run again. A leaf `restack.completed` carrying a frozen
|
|
2185
|
+
`cleanRestackPolicy` is the same kind of boundary, recorded as
|
|
2186
|
+
`cleanRestackVerifyBoundary`. Otherwise clean awaiting-merge leaf rewrites
|
|
2187
|
+
preserve completed verification when build-owned config is unchanged, even
|
|
2188
|
+
when the old pin commit is no longer an ancestor. Changed config still supersedes while waiting.
|
|
2058
2189
|
Ancestry gates cycles that run further steps; those cycles capture fresh config.
|
|
2059
2190
|
Object packs retain newly introduced replay trees/blobs as well as commit bytes.
|
|
2060
2191
|
Replay retention stores thin Git packs in bounded binary chunks, with a fixed-size completion manifest written only after every chunk is acknowledged. Digest-keyed chunks make interrupted writes retryable; incomplete uploads are never restored. Recovery validates all chunk sizes and the pack digest before installation, and requires the base objects (restoring node prefixes in order). Existing single-artifact base64 packs remain readable. Retained replay artifacts are read only when the requested commit is missing locally, never by idle polling.
|
|
Binary file
|
package/docs/cli.md
CHANGED
|
@@ -39,7 +39,7 @@ Run `bun ab <command>`; `bun ab help <command>` lists flags and subcommands. See
|
|
|
39
39
|
- `answer` — Answer escalations or request a retry.
|
|
40
40
|
- `abort` — Request irreversible build termination and cleanup.
|
|
41
41
|
- `restack` — Request a node restack onto its current parent.
|
|
42
|
-
- `priority` — Set an active build's slot-admission
|
|
42
|
+
- `priority` — Set an active build's slot-admission level: urgent, high, normal or low.
|
|
43
43
|
- `objective` — Show, revise or stop an optimization node's objective and progress.
|
|
44
44
|
- `hold` — Hold a merge, withdrawing consent.
|
|
45
45
|
- `merge` — Consent to a ready merge.
|