@defrex/autobuild 1.0.0-beta.2 → 1.0.0-beta.4
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/SPEC.md +342 -23
- package/bin/ab-dispatch-generation.ts +93 -0
- package/docs/answering-blocked-builds.md +21 -3
- package/docs/architecture.md +170 -7
- package/docs/configuration.md +173 -5
- package/docs/integration-tree.md +91 -4
- package/docs/integration.md +54 -0
- package/docs/operator-api.md +58 -5
- package/docs/remote-store-protocol.md +9 -1
- package/docs/remote-ticket-protocol.md +5 -0
- package/docs/restacking.md +4 -1
- package/docs/setup.md +24 -0
- package/docs/spec-standard.md +94 -5
- package/docs/ticket-migration.md +50 -4
- package/package.json +3 -3
- package/packages/core/src/cli/artifact.ts +5 -4
- package/packages/core/src/cli/attention.ts +2 -0
- package/packages/core/src/cli/binary-direct.ts +190 -0
- package/packages/core/src/cli/binary-lifecycle.ts +46 -0
- package/packages/core/src/cli/binary.ts +24 -210
- package/packages/core/src/cli/build-control.ts +108 -5
- package/packages/core/src/cli/context.ts +41 -1
- package/packages/core/src/cli/dashboard/hand-pushed.ts +24 -0
- package/packages/core/src/cli/dashboard/handoff.ts +64 -0
- package/packages/core/src/cli/dashboard/integration-detail.ts +11 -6
- package/packages/core/src/cli/dashboard/integration-row.ts +15 -8
- package/packages/core/src/cli/dashboard/model.ts +41 -10
- package/packages/core/src/cli/dashboard/render.ts +24 -2
- package/packages/core/src/cli/dashboard/rollback.ts +30 -0
- package/packages/core/src/cli/dispatch-args.ts +53 -0
- package/packages/core/src/cli/dispatch-crash-budget.ts +15 -0
- package/packages/core/src/cli/dispatch-frontend.ts +57 -5
- package/packages/core/src/cli/dispatch-handoff.ts +276 -0
- package/packages/core/src/cli/dispatch-launch-contract.ts +170 -0
- package/packages/core/src/cli/dispatch-launcher.ts +580 -0
- package/packages/core/src/cli/dispatch-parent-watch.ts +44 -0
- package/packages/core/src/cli/dispatch-preflight.ts +272 -0
- package/packages/core/src/cli/dispatch-presentation-job.ts +46 -0
- package/packages/core/src/cli/dispatch-presentation-ownership.ts +9 -0
- package/packages/core/src/cli/dispatch-process.ts +22 -90
- package/packages/core/src/cli/dispatch-readiness.ts +47 -0
- package/packages/core/src/cli/dispatch-repository-feed.ts +6 -1
- package/packages/core/src/cli/dispatch-runtime-cache.ts +522 -0
- package/packages/core/src/cli/dispatch-runtime-dependencies.ts +291 -0
- package/packages/core/src/cli/dispatch-runtime-use.ts +336 -0
- package/packages/core/src/cli/dispatch-upgrade-controller.ts +221 -0
- package/packages/core/src/cli/dispatch-upgrade-install.ts +258 -0
- package/packages/core/src/cli/dispatch-upgrade-source.ts +309 -0
- package/packages/core/src/cli/dispatch-upgrade-target.ts +190 -0
- package/packages/core/src/cli/dispatch.ts +609 -60
- package/packages/core/src/cli/dispatcher-liveness.ts +1 -1
- package/packages/core/src/cli/harvest.ts +28 -11
- package/packages/core/src/cli/help.ts +7 -3
- package/packages/core/src/cli/installation.ts +5 -3
- package/packages/core/src/cli/main-checkout.ts +59 -0
- package/packages/core/src/cli/main.ts +26 -53
- package/packages/core/src/cli/node-verification-provenance.ts +97 -0
- package/packages/core/src/cli/repo-state.ts +3 -58
- package/packages/core/src/cli/repository-status.ts +74 -4
- package/packages/core/src/cli/runtime-spawn.ts +16 -0
- package/packages/core/src/cli/status.ts +57 -3
- package/packages/core/src/cli/ticket.ts +35 -11
- package/packages/core/src/cli/upgrade-followup.ts +25 -0
- package/packages/core/src/cli/wait.ts +3 -0
- package/packages/core/src/cli/watch.ts +7 -0
- package/packages/core/src/config/live.ts +1 -0
- package/packages/core/src/config/schema.ts +8 -4
- package/packages/core/src/distribution-packaging.ts +116 -0
- package/packages/core/src/events/catalog.ts +6 -0
- package/packages/core/src/events/payloads.ts +55 -9
- package/packages/core/src/events/policy.ts +26 -0
- package/packages/core/src/events/repository.ts +205 -4
- package/packages/core/src/events/runtime.ts +16 -0
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +6537 -4053
- package/packages/core/src/kernel/change-presence.ts +7 -1
- package/packages/core/src/kernel/dispatch-capacity.ts +12 -4
- package/packages/core/src/kernel/dispatch-drain-recovery.ts +121 -0
- package/packages/core/src/kernel/dispatch-status.ts +4 -2
- package/packages/core/src/kernel/dispatch-upgrade.ts +171 -0
- package/packages/core/src/kernel/dispatcher-liveness.ts +7 -0
- package/packages/core/src/kernel/generators/repository-journals.ts +82 -0
- package/packages/core/src/kernel/guarded-forge.ts +1 -1
- package/packages/core/src/kernel/harvest.ts +98 -4
- package/packages/core/src/kernel/integration-attention.ts +20 -0
- package/packages/core/src/kernel/integration-completeness.ts +54 -16
- package/packages/core/src/kernel/integration-state.ts +80 -11
- package/packages/core/src/kernel/landing-readiness.ts +6 -1
- package/packages/core/src/kernel/mixed-version.ts +34 -0
- package/packages/core/src/kernel/node-parent.ts +35 -10
- package/packages/core/src/kernel/node-polling.ts +160 -0
- package/packages/core/src/kernel/read-facts.ts +47 -5
- package/packages/core/src/kernel/reducer-registry.ts +6 -0
- package/packages/core/src/kernel/reducer.ts +75 -14
- package/packages/core/src/kernel/service-facts.ts +11 -4
- package/packages/core/src/kernel/ticket-migrations.ts +139 -0
- package/packages/core/src/operator/presentation.ts +7 -0
- package/packages/core/src/operator/query.ts +13 -3
- package/packages/core/src/operator/registry.ts +1 -1
- package/packages/core/src/operator/tickets.ts +30 -26
- package/packages/core/src/plugins/load.ts +4 -1
- package/packages/core/src/plugins/runtime-snapshot.ts +128 -0
- package/packages/core/src/ports/forge/contract.ts +29 -0
- package/packages/core/src/ports/forge/github.ts +189 -61
- package/packages/core/src/ports/forge-failure.ts +1 -0
- package/packages/core/src/ports/forge-telemetry.ts +3 -0
- package/packages/core/src/ports/runner/session-env.ts +1 -0
- package/packages/core/src/ports/tickets/linear.ts +180 -12
- package/packages/core/src/ports/tickets/migration.ts +92 -9
- package/packages/core/src/ports/types.ts +17 -0
- package/packages/core/src/ports/workspace/distribution-archive.ts +22 -149
- package/packages/core/src/ports/workspace/distribution-release.ts +56 -0
- package/packages/core/src/ports/workspace/git-worktree.ts +2 -1
- package/packages/core/src/ports/workspace/local-build-execution.ts +37 -17
- package/packages/core/src/processes/build-child-exit.ts +5 -26
- package/packages/core/src/processes/build-runner.ts +81 -11
- package/packages/core/src/processes/dispatcher.ts +418 -59
- package/packages/core/src/processes/execution-no-progress.ts +6 -0
- package/packages/core/src/processes/execution-relaunch.ts +30 -0
- package/packages/core/src/processes/execution-settlement.ts +16 -7
- package/packages/core/src/processes/harvest-runner.ts +328 -292
- package/packages/core/src/processes/process-group-reaper.ts +17 -10
- package/packages/core/src/runtime-identity.ts +22 -3
- package/packages/core/src/store/contract.ts +183 -0
- package/packages/core/src/store/local/store.ts +197 -72
- package/packages/core/src/store/reduced-reads.ts +8 -0
- package/packages/core/src/store/reducer-value-shapes.json +8915 -6344
- package/packages/core/src/store/remote/client.ts +43 -0
- package/packages/core/src/store/repo-state-events.ts +21 -3
- package/packages/core/src/store/types.ts +7 -0
- package/packages/core/src/testing/dispatch-read-budget.ts +3 -2
- package/skills/guide/SKILL.md +234 -24
- package/skills/guide/references/integration-tree.md +91 -4
- package/skills/guide/references/operator-api.md +53 -4
- package/skills/guide/references/plugin-authoring.md +45 -4
- package/skills/guide/references/remote-store-protocol.md +9 -1
- package/skills/guide/references/remote-ticket-protocol.md +5 -0
- package/skills/guide/references/restacking.md +4 -1
- package/skills/guide/references/setup.md +24 -0
- package/skills/guide/references/spec-standard.md +94 -5
- package/skills/guide/references/ticket-migration.md +50 -4
- package/skills/harvest/SKILL.md +4 -0
- package/skills/harvest-review/SKILL.md +4 -0
- package/skills/operate/SKILL.md +78 -8
- package/skills/spec/SKILL.md +35 -5
- package/skills/tickets/SKILL.md +19 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
clientIdentityError,
|
|
3
|
+
classifyClient,
|
|
4
|
+
releaseVersion,
|
|
5
|
+
supportedClientRangeSchema,
|
|
6
|
+
} from './compatibility'
|
|
1
7
|
import { stampCompatibility, buildEventPolicy, repositoryEventPolicy } from '../../events/policy'
|
|
2
8
|
import { READ_CATALOG_IDENTITY, projectStoredEvents } from '../../events/compatibility'
|
|
3
9
|
import { CATALOG_IDENTITY_HEADER } from './version'
|
|
@@ -197,6 +203,43 @@ export class RemoteBuildStore implements BuildStore {
|
|
|
197
203
|
}
|
|
198
204
|
}
|
|
199
205
|
|
|
206
|
+
async inspectDispatcherOverlap(signal: AbortSignal) {
|
|
207
|
+
const response = await this.raw('GET', '/health', undefined, signal)
|
|
208
|
+
if (response.status === 404 || response.status === 405)
|
|
209
|
+
return { compatible: false, evidence: 'hosted admission metadata unavailable' }
|
|
210
|
+
if (!response.ok) throw await this.toError(response)
|
|
211
|
+
const health = (await response.json().catch(() => null)) as {
|
|
212
|
+
autobuildVersion?: string
|
|
213
|
+
protocolVersion?: string
|
|
214
|
+
supportedClientRange?: unknown
|
|
215
|
+
} | null
|
|
216
|
+
const range = supportedClientRangeSchema.safeParse(health?.supportedClientRange)
|
|
217
|
+
if (
|
|
218
|
+
!range.success ||
|
|
219
|
+
!health?.autobuildVersion ||
|
|
220
|
+
!releaseVersion(health.autobuildVersion) ||
|
|
221
|
+
!health.protocolVersion
|
|
222
|
+
)
|
|
223
|
+
return { compatible: false, evidence: 'hosted admission metadata unavailable' }
|
|
224
|
+
if (classifyClient(this.identity.autobuildVersion, range.data) !== 'supported')
|
|
225
|
+
return {
|
|
226
|
+
compatible: false,
|
|
227
|
+
evidence: `hosted service rejects client ${this.identity.autobuildVersion}; supported >=${range.data.minVersion} <${range.data.maxVersionExclusive}`,
|
|
228
|
+
}
|
|
229
|
+
const error = clientIdentityError(
|
|
230
|
+
this.identity.autobuildVersion,
|
|
231
|
+
this.identity.protocolVersion,
|
|
232
|
+
health.autobuildVersion,
|
|
233
|
+
health.protocolVersion,
|
|
234
|
+
)
|
|
235
|
+
return {
|
|
236
|
+
compatible: !error,
|
|
237
|
+
evidence:
|
|
238
|
+
error ??
|
|
239
|
+
`hosted service ${health.autobuildVersion} admits client ${this.identity.autobuildVersion} protocol ${this.identity.protocolVersion}`,
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
200
243
|
scopeBuild(slug: string): BuildScopedStore {
|
|
201
244
|
return createBuildScopedStore(this, slug)
|
|
202
245
|
}
|
|
@@ -17,12 +17,28 @@ import {
|
|
|
17
17
|
/** The anchor fact a bounded read's tail hangs from. */
|
|
18
18
|
const RUN_STARTED = 'dispatcher.run-started'
|
|
19
19
|
|
|
20
|
+
/** Handoff correlation spans dispatcher generations. These facts must survive
|
|
21
|
+
* later run anchors, including failures that invalidate prepared requests. */
|
|
22
|
+
export const DISPATCH_HANDOFF_EVENT_TYPES = [
|
|
23
|
+
'dispatcher.target-prepared',
|
|
24
|
+
'dispatcher.yield-requested',
|
|
25
|
+
'dispatcher.upgrade-failed',
|
|
26
|
+
'dispatcher.handoff-started',
|
|
27
|
+
'dispatcher.terminal-released',
|
|
28
|
+
'dispatcher.takeover',
|
|
29
|
+
'dispatcher.drain-deadline',
|
|
30
|
+
'dispatcher.drain-settled',
|
|
31
|
+
'dispatcher.handoff-completed',
|
|
32
|
+
] as const satisfies readonly RepositoryEventType[]
|
|
33
|
+
|
|
20
34
|
/** Durable, slow-growing repository event types: every fact a state reducer
|
|
21
35
|
* may consult at full replay depth. Derived from the catalog groups so a new
|
|
22
36
|
* harvest or sandbox event type joins automatically; the three dispatcher
|
|
23
37
|
* setting types are enumerated because they share one schema group with the
|
|
24
38
|
* run-correlated `dispatcher.config-reloaded`. */
|
|
25
39
|
export const REPOSITORY_STATE_EVENT_TYPES: readonly RepositoryEventType[] = [
|
|
40
|
+
'tickets.migration-recorded',
|
|
41
|
+
...DISPATCH_HANDOFF_EVENT_TYPES,
|
|
26
42
|
'dispatcher.forge-degraded',
|
|
27
43
|
'dispatcher.forge-recovered',
|
|
28
44
|
...Object.keys(changePresenceEventPayloadSchemas),
|
|
@@ -45,7 +61,9 @@ const LATEST_TYPES = new Set<string>(REPOSITORY_LATEST_EVENT_TYPES)
|
|
|
45
61
|
* `dispatcher.run-started` contains everything those consumers keep. */
|
|
46
62
|
export const REPOSITORY_RUN_SCOPED_EVENT_TYPES: readonly RepositoryEventType[] = [
|
|
47
63
|
...Object.keys(dispatcherStatusEventPayloadSchemas).filter(
|
|
48
|
-
(type) =>
|
|
64
|
+
(type) =>
|
|
65
|
+
!REPOSITORY_LATEST_EVENT_TYPES.includes(type as RepositoryEventType) &&
|
|
66
|
+
!REPOSITORY_STATE_EVENT_TYPES.includes(type as RepositoryEventType),
|
|
49
67
|
),
|
|
50
68
|
'dispatcher.config-reloaded',
|
|
51
69
|
] as RepositoryEventType[]
|
|
@@ -105,7 +123,7 @@ export interface RepositoryStateEventsAcc {
|
|
|
105
123
|
}
|
|
106
124
|
|
|
107
125
|
/** Bump when `RepositoryStateEventsAcc` or its fold changes. */
|
|
108
|
-
export const REPOSITORY_STATE_EVENTS_REDUCER_VERSION =
|
|
126
|
+
export const REPOSITORY_STATE_EVENTS_REDUCER_VERSION = 6
|
|
109
127
|
|
|
110
128
|
const keeps = (event: RepositoryEvent, anchor: number | undefined): boolean =>
|
|
111
129
|
STATE_TYPES.has(event.type) ||
|
|
@@ -153,7 +171,7 @@ export interface JournalViewAcc {
|
|
|
153
171
|
}
|
|
154
172
|
|
|
155
173
|
/** Bump when `JournalViewAcc` or its fold changes. */
|
|
156
|
-
export const JOURNAL_VIEW_REDUCER_VERSION =
|
|
174
|
+
export const JOURNAL_VIEW_REDUCER_VERSION = 7
|
|
157
175
|
|
|
158
176
|
/** Fold seq-ordered events into a journal view in place. */
|
|
159
177
|
export function foldJournalView(acc: JournalViewAcc, events: readonly RepositoryEvent[]): void {
|
|
@@ -272,6 +272,13 @@ export interface SubscribeOptions {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
export interface BuildStore {
|
|
275
|
+
/** Optional provider-owned evidence. Absent/unknown evidence requires
|
|
276
|
+
* cutover; journal write admission is checked separately before yield. */
|
|
277
|
+
inspectDispatcherOverlap?(signal: AbortSignal): Promise<{
|
|
278
|
+
compatible: boolean
|
|
279
|
+
evidence: string
|
|
280
|
+
}>
|
|
281
|
+
|
|
275
282
|
/** Catalog used for event-derived batch answers, when known by this adapter. */
|
|
276
283
|
readonly catalogIdentity?: string
|
|
277
284
|
/** Reads cross a network boundary; presentation polling may use a relaxed cadence. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { dispatchFrontendReducer } from '../cli/dispatch-repository-feed'
|
|
1
2
|
import { loadReducerSnapshot } from '../store/snapshots'
|
|
2
3
|
import { expect } from 'bun:test'
|
|
3
4
|
import { DispatchFrontend } from '../cli/dispatch-frontend'
|
|
@@ -152,7 +153,7 @@ export async function dispatchReadBudget(store: BuildStore, backing: BuildStore)
|
|
|
152
153
|
{ getReducerSnapshot: getSnapshot },
|
|
153
154
|
{ kind: 'repo', repo },
|
|
154
155
|
'dispatchFrontend',
|
|
155
|
-
{ version:
|
|
156
|
+
{ version: dispatchFrontendReducer.version },
|
|
156
157
|
)
|
|
157
158
|
)?.state,
|
|
158
159
|
).length
|
|
@@ -192,7 +193,7 @@ export async function dispatchReadBudget(store: BuildStore, backing: BuildStore)
|
|
|
192
193
|
{ getReducerSnapshot: getSnapshot },
|
|
193
194
|
{ kind: 'repo', repo },
|
|
194
195
|
'dispatchFrontend',
|
|
195
|
-
{ version:
|
|
196
|
+
{ version: dispatchFrontendReducer.version },
|
|
196
197
|
)
|
|
197
198
|
)?.state,
|
|
198
199
|
).length
|
package/skills/guide/SKILL.md
CHANGED
|
@@ -23,6 +23,7 @@ Idle nodes consume no runner capacity and empty nodes have no PR.
|
|
|
23
23
|
- [Landing policy, examples and forge requirements](references/landing-policy.md)
|
|
24
24
|
- [Restacking, identity and recovery](references/restacking.md)
|
|
25
25
|
- [Migration from 0.x](references/migration-1.0.md)
|
|
26
|
+
- [Moving ticket sources](references/ticket-migration.md): recorded migrations preserve in-flight build continuity.
|
|
26
27
|
|
|
27
28
|
## How to use this skill
|
|
28
29
|
|
|
@@ -210,8 +211,84 @@ The distinctions that change an administrator's answer:
|
|
|
210
211
|
graceful until an open claim tick reaches a recoverable boundary; non-SIGINT
|
|
211
212
|
termination is replayed only after that drain. Durable normal/forced/abnormal
|
|
212
213
|
evidence retains available process detail, and parent-death detection prevents
|
|
213
|
-
a detached kernel.
|
|
214
|
-
|
|
214
|
+
a detached kernel. Resident checkout dispatch first runs a filesystem-only
|
|
215
|
+
launcher that snapshots the invoking installation and its installed production
|
|
216
|
+
dependencies offline into `.autobuild/runtime/`. The generation's frontend,
|
|
217
|
+
kernel, later local runners and agent PATH CLI execute from that immutable
|
|
218
|
+
root. The launcher owns no Store/lease and uses only the versioned v1 process
|
|
219
|
+
contract. Automatic upgrades default on: the kernel checks immediately and every
|
|
220
|
+
60 seconds, resolving a declared Autobuild dependency and Bun lock from the same
|
|
221
|
+
authoritative base-branch commit. Unpinned repositories reread the original
|
|
222
|
+
installation pathname, retained across handoffs. Launching from a source root
|
|
223
|
+
sharing the dispatched repository's Git common directory selects source mode
|
|
224
|
+
first; that eligibility and the initial packaged baseline stay frozen across
|
|
225
|
+
successors. Source mode follows the forge-authoritative base commit, exported
|
|
226
|
+
into private cache staging with a frozen-lockfile, script-free dependency
|
|
227
|
+
install. The immutable runtime records the exact commit. Adoption compares
|
|
228
|
+
actual packaged contents and production-reachable lock records, so same-version
|
|
229
|
+
changes adopt while excluded-file and unrelated workspace-lock advances do not.
|
|
230
|
+
Shipped documentation counts as packaged content. The advisory successful
|
|
231
|
+
target-resolution fact exposes mode/base/SHA independently of the running
|
|
232
|
+
commit and earlier failures or handoffs; identical polls append nothing.
|
|
233
|
+
Feature branches and checkout pins never choose the target. Preparation validates an exact runtime in isolation;
|
|
234
|
+
failures retain the current generation and raise repository attention, suppressed
|
|
235
|
+
for the same input until target or selected-store compatibility evidence changes or a fresh operator launch. The successor
|
|
236
|
+
preflights config, selected-store compatibility and durable protocol writes before
|
|
237
|
+
requesting yield. SQLite compares semantic schema requirements, accepting equivalent
|
|
238
|
+
migrated catalogs without initializing the live store. A failed request cannot be
|
|
239
|
+
accepted or revived by detection; a newly prepared attempt must pass preflight.
|
|
240
|
+
Compatible generations drain: the predecessor releases terminal
|
|
241
|
+
input/rendering and repository authority, then supervises only captured local
|
|
242
|
+
executions while the successor owns ticks and launches. Local and remote runners finish
|
|
243
|
+
their current phase, compare their immutable attach runtime with the accepted
|
|
244
|
+
target using existing boundary facts, and durably request relaunch on mismatch.
|
|
245
|
+
Confirmed teardown has the neutral `relaunch` outcome; the current repository
|
|
246
|
+
owner resumes from durable state on its runtime, even after an ownership gap.
|
|
247
|
+
Equal or absent targets preserve normal execution. Unknown/incompatible
|
|
248
|
+
provider evidence selects immediate-suspension cutover. Rejected protocol writes
|
|
249
|
+
fail preflight and preserve the predecessor. The hot `policy.upgradeDrainSeconds`
|
|
250
|
+
defaults to 900; remaining local sessions suspend at that deadline and resume
|
|
251
|
+
natively where eligible, with reasoned fresh fallback otherwise. Remote runners
|
|
252
|
+
detach with leases and heartbeats intact. Their exact instances and guest runtimes
|
|
253
|
+
are captured separately, authorize boundary relaunch even after local retirement,
|
|
254
|
+
and never delay predecessor exit. Recovery reads only open-execution builds,
|
|
255
|
+
once per build per tick, so ended historical captures add no build reads.
|
|
256
|
+
Re-attachment reinstalls the target archive.
|
|
257
|
+
Cached registry generations resolve and cache their version’s validated GitHub
|
|
258
|
+
release asset on first guest use; local launch requires no GitHub fetch.
|
|
259
|
+
Source generations deliver their exact packed code. Repository-owned harvest/provisioning work joins before lease release.
|
|
260
|
+
Durable takeover and retirement completion are separate; status exposes both
|
|
261
|
+
runtimes, outstanding draining executions and deadline. The launcher keeps live
|
|
262
|
+
runtimes reserved and joins all children on operator stop.
|
|
263
|
+
|
|
264
|
+
With rollback-capable launcher and generation peers, three failed successor exits
|
|
265
|
+
within ten minutes of the original durable takeover restore the immediately previous
|
|
266
|
+
cached runtime. The first two failures restart the same runtime without repeating
|
|
267
|
+
preflight. Preflight failures never count; outside that window ordinary failure
|
|
268
|
+
exit behavior applies. Rollback goes back one runtime only. The launcher opens no
|
|
269
|
+
store: it passes a validated, versioned recovery context to the restored generation,
|
|
270
|
+
which records `dispatcher.runtime-rolled-back` under repository authority and holds
|
|
271
|
+
the failed target for that launcher lineage. Store compatibility changes, resolution
|
|
272
|
+
errors and disabling/re-enabling upgrades do not clear this hold. A successfully
|
|
273
|
+
resolved different target records `dispatcher.rollback-hold-cleared`; a fresh operator
|
|
274
|
+
launch starts a new lineage. Both previous and held runtimes remain protected from
|
|
275
|
+
cache pruning. Existing phase executions keep their leases and continue on the
|
|
276
|
+
restored runtime at the next boundary; unreadable decisive facts defer a build with
|
|
277
|
+
attention before any action. Peers without negotiated rollback capability retain
|
|
278
|
+
existing failure behavior and report that capable runtimes are required.
|
|
279
|
+
`[upgrade] automatic = false` disables preparation. A target or launcher without negotiated preflight/overlap capability, or a changed
|
|
280
|
+
launcher contract, requires manual restart.
|
|
281
|
+
|
|
282
|
+
Local harvest suspends durably before repository lease release on handoff or
|
|
283
|
+
clean stop. The next generation resumes eligible native sessions with fresh
|
|
284
|
+
logical credentials, or records a reasoned `harvest.session.resume-fallback`
|
|
285
|
+
and starts fresh. Orderly suspension spends no recovery attempt; real
|
|
286
|
+
crashes retain recovery accounting.
|
|
287
|
+
Current, distinct previous, held and live-process runtimes survive pruning.
|
|
288
|
+
Cached Bun entries disable auto-install and explicitly pin a neutral compiler
|
|
289
|
+
config. Third-party files remain as installed. `--plain`/non-TTY run directly
|
|
290
|
+
within the generation; `--once`, origin/hosted and hot development paths bypass
|
|
291
|
+
the launcher. `--once` remains one tick plus drain.
|
|
215
292
|
- **Live configuration** has two explicit contexts. A running dispatcher owns
|
|
216
293
|
the last valid snapshot from the **main checkout**; dispatch, setup, and each
|
|
217
294
|
pipeline step capture it at their action boundary, without interrupting an
|
|
@@ -548,6 +625,20 @@ should treat a `design` asset as part of the contract, a contract on observable
|
|
|
548
625
|
visual and reference outcomes, not on implementation, and judge the result
|
|
549
626
|
against it.
|
|
550
627
|
|
|
628
|
+
Node `verify:*` context additionally exposes `nodeVerification`: the frozen
|
|
629
|
+
range, a JSON index path, contribution build slugs, current stored ticket
|
|
630
|
+
identities, event-authorized spec revisions and spec paths, and their commits.
|
|
631
|
+
The index maps every commit in the range using build identity trailers,
|
|
632
|
+
including earlier-cycle contributions and merge side history. Commits without
|
|
633
|
+
an identity are listed as unattributed (a mechanical classification). The manifest
|
|
634
|
+
and index also expose `handPushedCommits: [{sha, originalSha, message}]` for owned
|
|
635
|
+
hand-pushed commits in the frozen range, preserving original identity across restacks.
|
|
636
|
+
Their full messages express maintainer-authorized intent: judge quality and
|
|
637
|
+
consistency, and never fail them solely for lacking a covering spec. Other node
|
|
638
|
+
changes are authorized when covered by the node spec or the spec
|
|
639
|
+
of the contribution introducing it; use the commit mapping to find that spec.
|
|
640
|
+
Missing or ambiguous provenance fails hydration. Leaf context is unchanged.
|
|
641
|
+
|
|
551
642
|
An agent verify step selects `[roles.<step>]` by its **logical step name** —
|
|
552
643
|
the name in `[verify].steps`, not the skill it runs. An agent finalize
|
|
553
644
|
post-step follows the same rule.
|
|
@@ -607,7 +698,7 @@ Agent verifiers may also use `ab verdict pass`,
|
|
|
607
698
|
skip reason is required and
|
|
608
699
|
must be non-blank; no failure report is required. Either kind of skip satisfies
|
|
609
700
|
that step for the current cycle and advances, but it is not a pass and never
|
|
610
|
-
masks another step's failure.
|
|
701
|
+
masks another step's failure. For leaves, failures return the build to `implement` and
|
|
611
702
|
consume `[policy].maxVerifyAttempts` once per distinct failed cycle since the
|
|
612
703
|
latest spec revision. Passing target-movement cycles cost zero; cycle identifiers
|
|
613
704
|
remain monotonic across restacks and reconciles. Skips retain the cycle's attempt number
|
|
@@ -616,6 +707,11 @@ without consuming that budget.
|
|
|
616
707
|
|
|
617
708
|
Classified session deferrals consume no phase failures. Unsupported decisive
|
|
618
709
|
facts retain the mixed-version wait gate and durable compatibility diagnostic.
|
|
710
|
+
During an accepted drain, an unsettled build-log authorization suppresses restart
|
|
711
|
+
attention only for the exact predecessor runtime and execution instance. The old
|
|
712
|
+
runner records relaunch intent when the accepted target is known and exits
|
|
713
|
+
without crossing the decisive-fact fence; a later execution never inherits
|
|
714
|
+
authorization.
|
|
619
715
|
When the scoped `ab context` initial own-build read fails, the CLI best-effort
|
|
620
716
|
writes `session.build-read-failed` with exact session, phase, round, operation
|
|
621
717
|
`context`, reason `own-build-read`, and diagnostic. A valid terminal from that
|
|
@@ -787,7 +883,11 @@ alternates in order without consuming extra phase attempts. Authentication,
|
|
|
787
883
|
permission, and local runtime-configuration failures do not. Every target has
|
|
788
884
|
its own session/transcript; a continuation fallback starts fresh from durable
|
|
789
885
|
context. Selection is not sticky, so the next phase, continuation, or retry
|
|
790
|
-
starts from the primary.
|
|
886
|
+
starts from the primary. A suspended Harvest turn first retries its recorded
|
|
887
|
+
route, then tries the remaining configured targets in order. Its substitution
|
|
888
|
+
and failure evidence retain configured indexes even when that order starts at
|
|
889
|
+
an alternate; only a successful primary can remain live for producer revisions.
|
|
890
|
+
Only chain exhaustion writes the phase failure, and
|
|
791
891
|
the final failure controls retry behavior. Substitution starts and exhausted
|
|
792
892
|
failures retain the targets and verbatim errors durably. Core phases, agent
|
|
793
893
|
verify/finalize, and Harvest use the chain; tool-free one-shots do not.
|
|
@@ -816,6 +916,7 @@ nonnegative integer so zero can disable that trigger.
|
|
|
816
916
|
|
|
817
917
|
| Field | Default | Allowed / constraints | Effect |
|
|
818
918
|
|---|---|---|---|
|
|
919
|
+
| `upgradeDrainSeconds` | `900` | positive integer | Local generation drain deadline from handoff start; hot-reloaded while draining. |
|
|
819
920
|
| `sessionBudgetSeconds` | `3600` | positive integer | Active-time bound for each build agent session unless its logical role overrides it; native continuation retains accumulated time and excludes suspension. |
|
|
820
921
|
| `stallRounds` | `3` | positive integer | The same finding surviving this many review rounds auto-escalates to a human — the anti-loop guard. |
|
|
821
922
|
| `maxVerifyAttempts` | `3` | positive integer | Caps distinct failed verify cycles since the latest spec revision; passed and skipped cycles cost zero. |
|
|
@@ -826,6 +927,8 @@ nonnegative integer so zero can disable that trigger.
|
|
|
826
927
|
| `maxReviewRounds` | `6` | positive integer | Default `maxRounds` for the `plan ⇄ plan-review` and `implement ⇄ code-review` convergence loops. When that cap parks a build, `ab answer <slug> --review-round-ceiling <n>` may replace it for only the escalation's loop and current spec revision. |
|
|
827
928
|
| `harvestThreshold` | `5` | positive integer | Newly unclaimed `observation.recorded` occurrences required to start one repository harvest run. |
|
|
828
929
|
| `janitorFailureAttentionSeconds` | `600` | positive integer | Consecutive janitor failure duration before build attention. |
|
|
930
|
+
| `nodeIdleAfterSeconds` | `600` | positive integer | Quiet period before opened integration nodes enter idle polling. |
|
|
931
|
+
| `nodeIdlePollSeconds` | `120` | positive integer | Interval between idle node checks; durable activity wakes the next tick. |
|
|
829
932
|
| `janitorBackoffMaxSeconds` | `300` | positive integer | Cap on exponential janitor retry delay, starting at 30 seconds. |
|
|
830
933
|
| `harvestMaxDrift` | `3` | nonnegative integer | Other builds merged after the oldest unclaimed observation required to start a run; `0` disables drift. |
|
|
831
934
|
|
|
@@ -840,7 +943,8 @@ progress. Execution start/end, runner attachment and workspace lifecycle
|
|
|
840
943
|
bookkeeping do not count as progress. Pipeline, session, spec, publication/PR,
|
|
841
944
|
observation and acknowledged operator facts reset the streak; infrastructure,
|
|
842
945
|
budget and provider failures do not consume the allowance and retain their own
|
|
843
|
-
retry limits.
|
|
946
|
+
retry limits. Phase-boundary relaunch outcomes consume no allowance or failure
|
|
947
|
+
budget and raise no attention. Before a fourth actionable launch, the dispatcher raises one
|
|
844
948
|
setup-targeted `execution-no-progress` policy escalation naming the count and
|
|
845
949
|
the next action it expected the runner to take. Waiting, paused and terminal
|
|
846
950
|
builds are left parked, and pending operator commands remain executable.
|
|
@@ -986,7 +1090,7 @@ changing it requires a dispatcher restart.
|
|
|
986
1090
|
| `model` | — (required when `enabled = true`) | nonblank provider-qualified string, same vocabulary as `[roles]` | The turn runner's model, resolved through the deployment's gateway credential; a leading `vercel-ai-gateway/` prefix is accepted and stripped. |
|
|
987
1091
|
| `invocationBudgetSeconds` | `240` | positive integer, clamped to 300 | Wall-clock budget for one turn invocation. A larger value is clamped — not rejected — to the 300-second hosted function limit the runner executes under. |
|
|
988
1092
|
| `approvals` | `["builds.control:abort", "builds.control:discard", "builds.answer:revise-spec", "sandbox.publish", "tickets.move:ready"]` | array of `tool` or `tool:qualifier` strings | Registry tool calls that suspend a turn until the operator answers. Empty (`[]`) means none — autonomous operation. An entry naming an absent or unknown tool is **inert by design**, never an error. A qualified entry applies to one discriminator value only (`tickets.move:ready` approves moving a ticket to `ready`); for a tool without a discriminator, only the bare form matches. |
|
|
989
|
-
| `wake` | inherits the default | array of event-type globs | The attention events a **new** session wakes for. Absent inherits the legacy hosted wake event set
|
|
1093
|
+
| `wake` | inherits the default | array of event-type globs | The attention events a **new** session wakes for. Absent inherits the legacy hosted wake event set including `integration.verification-failed`, independent of CLI watch defaults; an explicit `[]` means never wake — message-only. Each glob must match at least one build event type. Existing sessions never retroactively inherit; an explicit wake update always wins. |
|
|
990
1094
|
| `sandbox` | — | strict subtable | The sandbox behavior knobs; absence reads as the defaults below. |
|
|
991
1095
|
|
|
992
1096
|
`[orchestrator.sandbox]` fields:
|
|
@@ -1024,6 +1128,25 @@ repository, so a later publish updates the same PR's head. A publication is a
|
|
|
1024
1128
|
repository-journal fact naming the operator, the session, the branch, the
|
|
1025
1129
|
commit, and the PR; a refused or failed attempt is journaled too.
|
|
1026
1130
|
|
|
1131
|
+
### `[upgrade]`
|
|
1132
|
+
|
|
1133
|
+
| Field | Default | Meaning |
|
|
1134
|
+
| --- | --- | --- |
|
|
1135
|
+
| `automatic` | `true` | Check and adopt changed runtime targets automatically. |
|
|
1136
|
+
|
|
1137
|
+
`[upgrade] automatic` is a strict boolean, defaults to `true`, and hot-reloads.
|
|
1138
|
+
Resident checkout dispatchers check every 60 seconds, independently of tick cadence.
|
|
1139
|
+
Exact changed targets can include downgrades. Missing or inconsistent declared-pin
|
|
1140
|
+
metadata never falls back to installed mode. Self-hosting source launches follow
|
|
1141
|
+
the authoritative base commit using packaged-content and production-lock equality,
|
|
1142
|
+
without modifying operator or build worktrees. Equal-content advances still record
|
|
1143
|
+
the latest resolved target SHA. Compatible generations overlap through the durable draining handoff described above. `--once`, origin/hosted and direct hot
|
|
1144
|
+
presentation modes bypass automatic adoption. Operator stop wins over cutover.
|
|
1145
|
+
Repository status exposes per-run resolved target, upgrade target, failure and handoff facts, both
|
|
1146
|
+
generations, takeover, outstanding draining builds and deadline;
|
|
1147
|
+
`dispatcher.upgrade-failed` and `dispatcher.runtime-rolled-back` are actionable attention. Status also exposes the last rollback and current-lineage hold. Unrelated base commits do not
|
|
1148
|
+
retry an unchanged failed target. No registry credentials belong in these facts.
|
|
1149
|
+
|
|
1027
1150
|
## Setup and upgrades
|
|
1028
1151
|
|
|
1029
1152
|
For 0.x upgrades, first read the [migration reference](references/migration-1.0.md):
|
|
@@ -1164,6 +1287,22 @@ cannot snapshot the worktree's Git index, it warns and declines to stage. A
|
|
|
1164
1287
|
staging or commit failure restores that exact pre-attempt index and reports the
|
|
1165
1288
|
original Git failure without touching merged worktree files. The report's
|
|
1166
1289
|
existing exit code is unchanged; upgrade never pushes or rewrites history.
|
|
1290
|
+
With automatic upgrades enabled, pinned dispatchers adopt the changed version
|
|
1291
|
+
once the commit reaches the configured base branch. Installed-mode dispatchers
|
|
1292
|
+
follow their original installation when its version changes. Source-mode
|
|
1293
|
+
dispatchers follow packaged changes merged to the base, including canonical skills
|
|
1294
|
+
shipped by that distribution, without requiring a version bump. A consuming
|
|
1295
|
+
repository's vendored-skill-only merge does not change the installed runtime.
|
|
1296
|
+
The successor passes config/store and
|
|
1297
|
+
protocol-write preflight before yield; compatible generations drain, otherwise
|
|
1298
|
+
cutover suspends local sessions immediately. Existing runners keep execution leases while the
|
|
1299
|
+
successor owns repository work. At completed phase boundaries local and remote runners
|
|
1300
|
+
request relaunch onto the accepted target; the current owner resumes them from
|
|
1301
|
+
durable state. Remaining local sessions suspend at the hot drain
|
|
1302
|
+
deadline and resume through their durable session records. After an automatic runtime
|
|
1303
|
+
rollback, phase work continues on the restored runtime at the next boundary;
|
|
1304
|
+
unreadable decisive facts defer with attention. The held target waits for a changed
|
|
1305
|
+
resolved target or a fresh operator launch, independently of store compatibility.
|
|
1167
1306
|
|
|
1168
1307
|
The agent gets a fixed per-file deadline of at least ten minutes. While it is
|
|
1169
1308
|
resolving and stdout is interactive, `ab upgrade` continuously redraws one line
|
|
@@ -1403,6 +1542,22 @@ in-session `put|get` still require ambient phase auth.
|
|
|
1403
1542
|
|
|
1404
1543
|
## Dispatch dashboard
|
|
1405
1544
|
|
|
1545
|
+
Both dashboards also show the current authoritative dispatcher's unresolved
|
|
1546
|
+
rollback: failed and restored runtime (version and commit), held failed runtime,
|
|
1547
|
+
and rollback event timestamp. A matching durable different-target hold clearance
|
|
1548
|
+
removes the notice. An operator restart hides the previous lineage's notice once
|
|
1549
|
+
its new lineage commits an operational tick or accepted takeover. A run-started
|
|
1550
|
+
fact or yielded tick alone cannot hide it; same-lineage generation changes retain
|
|
1551
|
+
it. Historical rollbacks and other lineages' holds are never fallback notices.
|
|
1552
|
+
|
|
1553
|
+
Both dashboards show each accepted unfinished handoff: source and target runtime
|
|
1554
|
+
version and abbreviated commit, mode, and drain deadline (unknown when unrecorded).
|
|
1555
|
+
Outstanding predecessor executions in drain mode carry `(draining)` alongside
|
|
1556
|
+
their lifecycle status. Matching durable settlement clears a build marker;
|
|
1557
|
+
accepted completion clears its handoff banner. Takeover, an overdue deadline
|
|
1558
|
+
and an empty outstanding set do not complete a handoff. Multiple unfinished
|
|
1559
|
+
generations remain visible; cutover does not mark builds draining.
|
|
1560
|
+
|
|
1406
1561
|
Integration list rows show parent commit distance (current or unknown when appropriate),
|
|
1407
1562
|
name the destination and show children landed out of the
|
|
1408
1563
|
known total, with the remainder split into building and queued. Cancelled
|
|
@@ -1617,8 +1772,8 @@ to the build's event log and apply the same write-time checks.
|
|
|
1617
1772
|
| Answer blockers with guidance | `ab answer <slug> <text> [--store <ref>]` | Select a blocked build, press `r`, enter text, then Enter. | One `escalation.answered` with `resolution: guidance` per applicable blocker. |
|
|
1618
1773
|
| Retry blockers without guidance | `ab answer <slug> [--store <ref>]` | Open the same `r` field and press Enter empty or whitespace-only. | One `escalation.answered` with `resolution: retry` per applicable blocker. |
|
|
1619
1774
|
| Dismiss cited finding chains | `ab answer <slug> --dismiss [--store <ref>]` | CLI only; build detail names the command. | One `escalation.answered` with `resolution: dismiss-finding` per blocker that cites a real review finding. |
|
|
1620
|
-
| Revise spec from a file | `ab answer <slug> --revise-spec <file> [--store <ref>]` | CLI only; build detail names the command. |
|
|
1621
|
-
| Re-import revised ticket spec | `ab answer <slug> --revise-spec-from-ticket [--store <ref>]` | CLI only; build detail names the command. | The same
|
|
1775
|
+
| Revise spec from a file | `ab answer <slug> --revise-spec <file> [--store <ref>]` | CLI only; build detail names the command. | For leaves, human `escalation.answered` then kernel `spec.revised`; eligible nodes publish `spec.revised` with operator provenance. |
|
|
1776
|
+
| Re-import revised ticket spec | `ab answer <slug> --revise-spec-from-ticket [--store <ref>]` | CLI only; build detail names the command. | The same leaf answer or direct node `spec.revised` protocol. |
|
|
1622
1777
|
| Abort | `ab abort <slug> [--store <ref>]` | Select any non-terminal build and press `a`, then Enter to confirm (Escape cancels). | `build.abort-requested` |
|
|
1623
1778
|
|
|
1624
1779
|
The two `--all` forms and the global-row keys are one walk behind two surfaces.
|
|
@@ -1644,12 +1799,15 @@ abort: abort returns the ticket to Triage.
|
|
|
1644
1799
|
|
|
1645
1800
|
Abort accepts queued, running, paused, or blocked builds. A live turn receives a
|
|
1646
1801
|
cancellation signal and the runner acknowledges the request. Its execution
|
|
1647
|
-
supervisor
|
|
1648
|
-
|
|
1802
|
+
supervisor signals the local runner leader and waits for it to finish persistence
|
|
1803
|
+
and exit, then reaps remaining descendants with bounded TERM-then-KILL cleanup.
|
|
1804
|
+
Only then does it release the lease. Graceful dispatcher shutdown likewise waits
|
|
1805
|
+
for runner suspension without a wall-clock force-exit deadline.
|
|
1649
1806
|
The dispatcher defers cleanup while that lease is live, then performs the
|
|
1650
1807
|
checkpointed, retry-safe cleanup: close an open unmerged PR, release the workspace,
|
|
1651
1808
|
delete the exact remote and local build branches, preserve existing ticket labels
|
|
1652
|
-
while adding `autobuild:aborted`,
|
|
1809
|
+
while adding `autobuild:aborted`, return the ticket to configured Triage, and post
|
|
1810
|
+
an abort notice before
|
|
1653
1811
|
completing as `abandoned`. Missing
|
|
1654
1812
|
Forge cleanup capabilities or provider outages leave cleanup pending with an
|
|
1655
1813
|
actionable diagnostic for the next tick.
|
|
@@ -1713,21 +1871,39 @@ and must use a fresh id without `persists` if a genuinely different problem
|
|
|
1713
1871
|
touches the same code. Dismissal settles a chain, not a file or the reviewer's
|
|
1714
1872
|
ability to report new problems.
|
|
1715
1873
|
|
|
1716
|
-
|
|
1874
|
+
Leaf spec revision requires an open escalation. `--revise-spec` reads a conforming
|
|
1717
1875
|
replacement from a file; `--revise-spec-from-ticket` re-imports the build's
|
|
1718
1876
|
recorded ticket after an operator amends it. The human `escalation.answered`
|
|
1719
1877
|
fact names the exact deposited revision it authorizes, then kernel
|
|
1720
1878
|
`spec.revised` publishes it. If interrupted between those facts, a retry
|
|
1721
1879
|
completes the recorded body and does not use a newly supplied one. A
|
|
1722
|
-
non-conforming body records nothing. The
|
|
1880
|
+
non-conforming body records nothing. The leaf restarts from `plan` on the new
|
|
1723
1881
|
revision and keeps any open PR. A build's spec can therefore change under it:
|
|
1724
1882
|
phase runs after the revision read the new revision, while historical runs
|
|
1725
1883
|
remain readable at the revision they actually saw.
|
|
1726
1884
|
|
|
1885
|
+
Operators may explicitly revise an opened idle collecting node or a node blocked on failed
|
|
1886
|
+
integration verification without an escalation. Use
|
|
1887
|
+
`ab answer <node> --revise-spec replacement.md` or, after amending its ticket,
|
|
1888
|
+
`ab answer <node> --revise-spec-from-ticket`. Ticket edits alone do not revise
|
|
1889
|
+
the build. Both forms enforce the same spec standard as leaf revisions.
|
|
1890
|
+
Each kernel `spec.revised` records the exact artifact and operator identity
|
|
1891
|
+
(with optional transport provenance); earlier revisions remain readable.
|
|
1892
|
+
Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
|
|
1893
|
+
The node recollects and verifies the new revision, including on the same head
|
|
1894
|
+
and parent after a failed cycle. Earlier cycles remain historical evidence
|
|
1895
|
+
and cannot block or authorize landing under the replacement. Children keep
|
|
1896
|
+
their specs, claims and targets; contributions are not restarted.
|
|
1897
|
+
Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
1898
|
+
pending controls, landing intent and ended PRs refuse the no-escalation path.
|
|
1899
|
+
A concurrent state change refuses publication with a retry explanation;
|
|
1900
|
+
uncited artifacts are inert. Leaves still require an open escalation and
|
|
1901
|
+
restart from `plan`.
|
|
1902
|
+
|
|
1727
1903
|
Every command requires an applicable target in this repository. Pause and
|
|
1728
1904
|
resume require an active build; abort and hold also accept queued builds.
|
|
1729
1905
|
Land requires a ready candidate and cannot bypass verification or merge gates;
|
|
1730
|
-
`ab answer`
|
|
1906
|
+
`ab answer` requires an open escalation except for eligible node spec revisions. A stale, missing, done,
|
|
1731
1907
|
aborted, or otherwise inapplicable target is an error and gets no new event. Attribution uses `USER`, then `USERNAME`, then the
|
|
1732
1908
|
same stable fallback on both surfaces. These commands run sessionless and
|
|
1733
1909
|
accept `--store <ref>` with the usual explicit flag > `AB_STORE` > `[store] url` > repository
|
|
@@ -1782,7 +1958,8 @@ object including the canonical `repo`, and `--store` follows the usual explicit
|
|
|
1782
1958
|
flag > `AB_STORE` > `[store] url` >
|
|
1783
1959
|
repository-local precedence. The command uses the same reducer as the
|
|
1784
1960
|
dispatcher and dashboard, writes no state, claims no ticket, attaches no runner,
|
|
1785
|
-
and starts no dispatcher work.
|
|
1961
|
+
and starts no dispatcher work. Dispatcher identity includes the held run’s recorded
|
|
1962
|
+
runtime; historical starts without metadata display `runtime unrecorded`.
|
|
1786
1963
|
|
|
1787
1964
|
**`ab builds`** summarizes this repository's builds, one row each. It reports
|
|
1788
1965
|
**active** builds by default — `running`, `paused`, `blocked` — because those
|
|
@@ -1806,6 +1983,10 @@ or `--all` before concluding a build doesn't exist.
|
|
|
1806
1983
|
**`ab build status <slug>`** details one build: unresolved escalations, open
|
|
1807
1984
|
sessions, chronological durable observations, verify progress for the current
|
|
1808
1985
|
cycle, PR lifecycle, latest event, durable progress age, heartbeat, and lease.
|
|
1986
|
+
Every runner attach appears chronologically with its recorded runtime (version,
|
|
1987
|
+
commit, source kind/location), or `runtime unrecorded` for historical attaches;
|
|
1988
|
+
JSON exposes nullable runtime in `runnerAttaches`. Phases belong to the preceding
|
|
1989
|
+
attach boundary.
|
|
1809
1990
|
For an open PR, the current work-owner decision reads the build-owned
|
|
1810
1991
|
configuration from the store's deposited `build-runner-effective-config`
|
|
1811
1992
|
artifact — deposited at every runner launch and refreshed on effective-config
|
|
@@ -1845,9 +2026,9 @@ ordinary fresh-session recovery applies. Unrelated open sessions are reclaimed
|
|
|
1845
2026
|
without inventing transcripts. Dashboard history shows suspended and resumed
|
|
1846
2027
|
segments separately, with their individual transcript refs and usage.
|
|
1847
2028
|
|
|
1848
|
-
The phase budget counts active time across interruptions using the original
|
|
2029
|
+
The build phase budget counts active time across interruptions using the original
|
|
1849
2030
|
ceiling. Suspended intervals do not consume it; abrupt loss is conservatively
|
|
1850
|
-
charged through recovery.
|
|
2031
|
+
charged through recovery. Build pause immediately suspends a live turn with cause
|
|
1851
2032
|
`pause`, including remote sessions and sessions without a native handle. Resume
|
|
1852
2033
|
continues the local native session where eligible; otherwise the recorded
|
|
1853
2034
|
fallback explains the fresh rerun. Pause acknowledgement follows turn stop and
|
|
@@ -1866,7 +2047,9 @@ the harvest runner's synthesize and review brackets each get one stream
|
|
|
1866
2047
|
(`phase` spelled `harvest:<step>`), with `harvest.session.started` carrying
|
|
1867
2048
|
the stream id. `ab harvest status` shows each run's sessions the way build
|
|
1868
2049
|
status does — one row per session with its stream id and open/closed status
|
|
1869
|
-
(`session hs_… (harvest, synthesize@1) stream st_… (open)`).
|
|
2050
|
+
(`session hs_… (harvest, synthesize@1, open) stream st_… (open)`).
|
|
2051
|
+
Suspended turns show `suspended`, a closed stream and partial transcript evidence.
|
|
2052
|
+
The next dispatcher automatically continues them; the harvest gate remains independent. Once a stream
|
|
1870
2053
|
closes, its finalized document is a repository-scoped `stream:<id>` artifact,
|
|
1871
2054
|
and `ab artifact download stream:<id>` retrieves it; the stream form is an
|
|
1872
2055
|
operator-only read (ambient phase identity fails closed).
|
|
@@ -1882,6 +2065,8 @@ With no slugs the repository journal is included; named watches add it with
|
|
|
1882
2065
|
|
|
1883
2066
|
The default watch reports actionable conditions only:
|
|
1884
2067
|
|
|
2068
|
+
- `integration.verification-failed`: failed node verification, once per prepared cycle, with failed steps, verified head and parent, and guidance to file a repair child targeting the node. Recovery reports only the latest prepared cycle while its head and parent remain current; superseded failures are not backfilled.
|
|
2069
|
+
|
|
1885
2070
|
- `build.janitor-failing`: a build has failed janitor attempts for the configured attention threshold. A successful attempt clears it.
|
|
1886
2071
|
- `dispatcher.forge-persistent`: forge degradation remains after a post-reset retry tick; recovery clears the episode.
|
|
1887
2072
|
|
|
@@ -1893,7 +2078,7 @@ The default watch reports actionable conditions only:
|
|
|
1893
2078
|
authorized landings awaiting application are silent. One merge decision is reported per build/PR.
|
|
1894
2079
|
- Repository `harvest.escalated`, `harvest.recovery-exhausted`,
|
|
1895
2080
|
`dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
|
|
1896
|
-
`restartRequired`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
|
|
2081
|
+
`restartRequired`, `dispatcher.upgrade-failed`, `dispatcher.runtime-rolled-back`, abnormal `dispatcher.run-stopped`, and `dispatcher.lost`.
|
|
1897
2082
|
- `dispatcher.ticket-source-persistent`: degradation past its advertised
|
|
1898
2083
|
reset time, once a tick started at or after reset has completed or failed
|
|
1899
2084
|
with the episode still open; crossing reset alone is silent. Without a reset,
|
|
@@ -1949,7 +2134,8 @@ cursor from a different repository or store is rejected.
|
|
|
1949
2134
|
|
|
1950
2135
|
Dispatcher liveness is also visible through `ab repository status --json`:
|
|
1951
2136
|
`dispatcher.holder` identifies the unexpired repository lease owner, independently
|
|
1952
|
-
of `latestRun`.
|
|
2137
|
+
of `latestRun`. Each run includes its recorded `runtime` (version, commit, and
|
|
2138
|
+
source kind/location), or null for unrecorded historical starts. Heartbeat age measures attributable renewals; tick age measures
|
|
1953
2139
|
actual tick completion. Successful unchanged ticks leave no journal pair; bounded,
|
|
1954
2140
|
lease-fenced repository telemetry still records each actual completion and its
|
|
1955
2141
|
outcome. Last-tick age refreshes independently of the event cursor and never uses
|
|
@@ -2032,7 +2218,7 @@ vocabulary is closed: `blocked`, `paused`, `running`, `collecting`, `done`, `abo
|
|
|
2032
2218
|
`terminal` (done or aborted), `pr=open`, `pr=merged`, `pr=closed`,
|
|
2033
2219
|
`pr=conflicted`, `phase=<phase>` (a core phase — `plan`, `plan-review`,
|
|
2034
2220
|
`implement`, `code-review`, `finalize`, `reconcile` — or `verify:<step>`), and
|
|
2035
|
-
`attention` (an open escalation, janitor failure attention, or a build waiting for a merge decision). Repeatable `--event`
|
|
2221
|
+
`attention` (current failed node verification, an open escalation, janitor failure attention, or a build waiting for a merge decision). Repeatable `--event`
|
|
2036
2222
|
globs follow the `ab watch` rules. Multiple values are alternatives: the first
|
|
2037
2223
|
one satisfied ends the wait — all `--for` values in supply order, then all
|
|
2038
2224
|
globs in supply order — and the record names what matched.
|
|
@@ -2043,9 +2229,9 @@ means an open escalation exactly as everywhere else. In the manner of `kubectl
|
|
|
2043
2229
|
wait`, a condition that already holds when the command starts returns
|
|
2044
2230
|
immediately with that build's latest event (`--since` does not suppress this);
|
|
2045
2231
|
otherwise the first later event whose reduction produces it ends the wait.
|
|
2046
|
-
`attention` is also a current-state condition: existing janitor failure attention, an already open escalation or
|
|
2232
|
+
`attention` is also a current-state condition: current failed node verification, existing janitor failure attention, an already open escalation or
|
|
2047
2233
|
merge decision returns immediately, including with `--since`. Merge matches
|
|
2048
|
-
use the same observation as watch. During replay, only new escalation events
|
|
2234
|
+
use the same observation as watch. During replay, only new failed-node verification or escalation events
|
|
2049
2235
|
or undelivered eligible merge decisions satisfy attention. `--event` conditions
|
|
2050
2236
|
fire only on new events or a cursor-resumed backlog.
|
|
2051
2237
|
|
|
@@ -2107,7 +2293,9 @@ run plus relevant open/latest context from the same journal the runner resumes.
|
|
|
2107
2293
|
Each section distinguishes recoverable from terminal and shows that run's
|
|
2108
2294
|
automatic attempts/limit, stopped step/round, attention, exact retained snapshot
|
|
2109
2295
|
before exhaustion or released observation/proposal keys afterward, workflow
|
|
2110
|
-
occurrences, review rounds, and filed ticket refs.
|
|
2296
|
+
occurrences, review rounds, and filed ticket refs. A durably suspended local turn
|
|
2297
|
+
shows `suspended` in status and both dashboards, with timing frozen and no human
|
|
2298
|
+
resume action: continuation is automatic when a dispatcher next runs. Repository event history is
|
|
2111
2299
|
shown once. It is read-only and also reports an idle or paused repository with
|
|
2112
2300
|
no run. The dispatch header always shows its acknowledged `harvest ON/OFF` gate
|
|
2113
2301
|
and global `h` controls it. The optional, non-color-only `Harvest` row omits the
|
|
@@ -2281,6 +2469,28 @@ ordered by descending count then build name; repository requests are unattribute
|
|
|
2281
2469
|
Repository status names a hotspot only when one build makes at least two requests
|
|
2282
2470
|
and more than half of attributed requests. Telemetry never controls workflow.
|
|
2283
2471
|
|
|
2472
|
+
GitHub shares in-flight and completed PR, branch/ref and comparison observations
|
|
2473
|
+
across builds within one dispatcher tick. Opened nodes prime their tips and
|
|
2474
|
+
commit distance with at most two reads: PR plus comparison, or parent branch
|
|
2475
|
+
plus reversed comparison without a PR. Priming is best-effort: failures add a
|
|
2476
|
+
diagnostic and ordinary parent/target observations continue, so a deleted parent
|
|
2477
|
+
can still be replaced. Forge cooldowns and rate limits retain their gates.
|
|
2478
|
+
Each admitted poll revalidates mutable resources
|
|
2479
|
+
using exact-resource ETags; authenticated 304s spare the REST primary quota.
|
|
2480
|
+
Adapter caches are bounded and restart/eviction falls back to fresh reads.
|
|
2481
|
+
Writes, including Git publication and rewrites, invalidate observations before
|
|
2482
|
+
attempting the mutation so acknowledgement reads remain fresh. Leaf PR polling
|
|
2483
|
+
keeps its existing cadence. Readiness and landing inspections remain fresh.
|
|
2484
|
+
|
|
2485
|
+
For node cadence, durable wakes, restart behavior and CLI evidence, see
|
|
2486
|
+
[node polling and status](references/integration-tree.md#polling-and-status).
|
|
2487
|
+
|
|
2488
|
+
The total includes all attempted requests. Optional `restPrimary`,
|
|
2489
|
+
`restNotModified` and `graphql` counts distinguish REST responses charged to the
|
|
2490
|
+
primary quota, REST 304s and GraphQL calls. Transport failures and historical or
|
|
2491
|
+
legacy observations can remain unclassified; absent fields never imply zero.
|
|
2492
|
+
Shared requests are attributed to their first requester; cache hits count zero.
|
|
2493
|
+
|
|
2284
2494
|
### Requesting node freshness
|
|
2285
2495
|
|
|
2286
2496
|
`ab restack <node>` and `builds.restack {repo, slug}` record durable demand.
|