@defrex/autobuild 1.3.0 → 1.4.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 +302 -26
- package/docs/accounts.md +38 -0
- package/docs/architecture.md +187 -19
- package/docs/build-store.md +18 -0
- package/docs/builds.md +5 -1
- package/docs/cli.md +1 -1
- package/docs/configuration.md +38 -19
- package/docs/dispatcher-hosting.md +42 -0
- package/docs/dispatcher.md +41 -0
- package/docs/forges.md +5 -0
- package/docs/integration-tree.md +8 -0
- package/docs/operating.md +11 -3
- package/docs/operator-api.md +37 -4
- package/docs/plugin-authoring.md +45 -1
- package/docs/remote-store-protocol.md +258 -42
- package/docs/remote-ticket-protocol.md +12 -10
- package/docs/restacking.md +60 -3
- package/docs/setup.md +37 -8
- package/docs/skills.md +1 -1
- package/docs/spec-standard.md +37 -3
- package/docs/troubleshooting.md +9 -0
- package/docs/workspaces.md +1 -1
- package/package.json +4 -3
- package/packages/core/src/accounts/availability.ts +96 -0
- package/packages/core/src/accounts/local-owner.ts +49 -2
- package/packages/core/src/cli/attention.ts +2 -0
- package/packages/core/src/cli/binary.ts +17 -1
- package/packages/core/src/cli/context.ts +62 -0
- package/packages/core/src/cli/dashboard/model.ts +12 -3
- package/packages/core/src/cli/dashboard/poll.ts +65 -8
- package/packages/core/src/cli/dashboard/refresh.ts +2 -0
- package/packages/core/src/cli/dashboard/render.ts +46 -5
- package/packages/core/src/cli/dispatch-args.ts +27 -3
- package/packages/core/src/cli/dispatch-frontend.ts +178 -52
- package/packages/core/src/cli/dispatch-mode.ts +94 -0
- package/packages/core/src/cli/dispatch-preflight.ts +43 -0
- package/packages/core/src/cli/dispatch-repository-feed.ts +45 -9
- package/packages/core/src/cli/dispatch.ts +145 -11
- package/packages/core/src/cli/harvest.ts +2 -1
- package/packages/core/src/cli/help.ts +16 -3
- package/packages/core/src/cli/historical-build-state.ts +6 -0
- package/packages/core/src/cli/main.ts +15 -2
- package/packages/core/src/cli/publication-settlement.ts +17 -0
- package/packages/core/src/cli/remote-poll.ts +11 -1
- package/packages/core/src/cli/repository-status.ts +11 -0
- package/packages/core/src/cli/status.ts +7 -1
- package/packages/core/src/cli/wait.ts +9 -2
- package/packages/core/src/cli/watch.ts +38 -3
- package/packages/core/src/config/roles.ts +16 -1
- package/packages/core/src/events/catalog.ts +7 -0
- package/packages/core/src/events/payloads.ts +85 -2
- package/packages/core/src/events/policy.ts +10 -0
- package/packages/core/src/events/repository.ts +35 -0
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +189 -0
- package/packages/core/src/kernel/dispatch-placement.ts +30 -0
- package/packages/core/src/kernel/engine.ts +19 -12
- package/packages/core/src/kernel/generators/leaf-restack-log.ts +17 -1
- package/packages/core/src/kernel/leaf-restack-state.ts +24 -2
- package/packages/core/src/kernel/log-index.ts +1 -1
- package/packages/core/src/kernel/node-landing.ts +27 -10
- package/packages/core/src/kernel/node-restack-demand.ts +1 -0
- package/packages/core/src/kernel/node-restack-state.ts +16 -1
- package/packages/core/src/kernel/node-restack-transaction.ts +14 -0
- package/packages/core/src/kernel/read-facts.ts +114 -9
- package/packages/core/src/kernel/reconcile-head.ts +34 -11
- package/packages/core/src/kernel/reconcile-restack.ts +106 -72
- package/packages/core/src/kernel/reducer-registry.ts +3 -0
- package/packages/core/src/kernel/reducer.ts +20 -2
- package/packages/core/src/kernel/replay-retention.ts +176 -0
- package/packages/core/src/kernel/target-lineage.ts +65 -0
- package/packages/core/src/kernel/target-observation.ts +117 -0
- package/packages/core/src/operator/registry.ts +5 -13
- package/packages/core/src/operator/tickets.ts +8 -2
- package/packages/core/src/plugin-sdk/index.ts +1 -0
- package/packages/core/src/ports/forge/fake.ts +22 -0
- package/packages/core/src/ports/forge/git-rewrite.ts +49 -12
- package/packages/core/src/ports/forge/github.ts +42 -10
- package/packages/core/src/ports/forge/local-git.ts +16 -1
- package/packages/core/src/ports/types.ts +58 -4
- package/packages/core/src/ports/workspace/account-policy.ts +2 -1
- package/packages/core/src/ports/workspace/commit-preservation.ts +175 -0
- package/packages/core/src/ports/workspace/create.ts +2 -0
- package/packages/core/src/ports/workspace/fake.ts +4 -0
- package/packages/core/src/ports/workspace/git-worktree.ts +22 -1
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +304 -56
- package/packages/core/src/processes/build-runner.ts +240 -111
- package/packages/core/src/processes/dispatcher-selectors.ts +3 -2
- package/packages/core/src/processes/dispatcher.ts +262 -80
- package/packages/core/src/processes/execution-no-progress.ts +7 -0
- package/packages/core/src/processes/harvest-runner.ts +6 -7
- package/packages/core/src/processes/publication-state.ts +2 -1
- package/packages/core/src/processes/repo-view.ts +22 -0
- package/packages/core/src/processes/workspace-preservation.ts +164 -0
- package/packages/core/src/scenarios/harness.ts +7 -0
- package/packages/core/src/store/adapter.ts +9 -0
- package/packages/core/src/store/build-scope.ts +28 -0
- package/packages/core/src/store/contract.ts +125 -0
- package/packages/core/src/store/event-reads.ts +156 -0
- package/packages/core/src/store/local/schema.ts +11 -0
- package/packages/core/src/store/local/store.ts +117 -2
- package/packages/core/src/store/memory.ts +237 -0
- package/packages/core/src/store/phase-session.ts +47 -0
- package/packages/core/src/store/reduced-reads.ts +8 -0
- package/packages/core/src/store/reducer-value-shapes.json +6262 -5227
- package/packages/core/src/store/reducer-value-validation.ts +3 -0
- package/packages/core/src/store/reducer-values.ts +62 -2
- package/packages/core/src/store/remote/client.ts +161 -16
- package/packages/core/src/store/remote/compatibility.ts +177 -46
- package/packages/core/src/store/remote/errors.ts +16 -0
- package/packages/core/src/store/remote/index.ts +11 -0
- package/packages/core/src/store/remote/protocol.ts +22 -0
- package/packages/core/src/store/remote/released-clients.json +37 -0
- package/packages/core/src/store/remote/released-clients.ts +88 -0
- package/packages/core/src/store/remote/released-reducer-values/1.3.0.json +25093 -0
- package/packages/core/src/store/remote/released-reducer-values/1.4.0.json +26128 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +13 -0
- package/packages/core/src/store/remote/version.ts +5 -2
- package/packages/core/src/store/repo-state-events.ts +4 -3
- package/packages/core/src/store/scan-cadence.ts +15 -0
- package/packages/core/src/store/session-handle.ts +18 -0
- package/packages/core/src/store/types.ts +27 -6
- package/packages/core/src/testing/dispatch-read-budget.ts +313 -2
- package/packages/core/src/testing/index.ts +5 -0
- package/packages/core/src/testing/reduced-read-budget.ts +728 -5
- package/skills/guide/SKILL.md +177 -16
- package/skills/guide/references/accounts.md +38 -0
- package/skills/guide/references/integration-tree.md +8 -0
- package/skills/guide/references/operator-api.md +37 -4
- package/skills/guide/references/plugin-authoring.md +45 -1
- package/skills/guide/references/remote-store-protocol.md +258 -42
- package/skills/guide/references/remote-ticket-protocol.md +12 -10
- package/skills/guide/references/restacking.md +60 -3
- package/skills/guide/references/setup.md +37 -8
- package/skills/guide/references/spec-standard.md +37 -3
- package/skills/implement/SKILL.md +12 -3
- package/skills/operate/SKILL.md +64 -7
- package/skills/plan/SKILL.md +27 -4
- package/skills/plan-review/SKILL.md +22 -2
- package/skills/reconcile/SKILL.md +10 -1
- package/skills/spec/SKILL.md +7 -4
- package/templates/hosted-service/package.json +2 -2
package/docs/architecture.md
CHANGED
|
@@ -148,6 +148,13 @@ shape changes without a bump. Current-state consumers use the typed persisted
|
|
|
148
148
|
read helpers in `store/reduced-reads.ts`; whole-array reducers remain pure
|
|
149
149
|
reference projections for tests and explicit historical output.
|
|
150
150
|
|
|
151
|
+
**Ticket scan cadence.** BuildStore keeps one replaceable `scan_cadence` row
|
|
152
|
+
per repository, shared by fresh dispatcher processes. It acknowledges the
|
|
153
|
+
canonical changed-outcome scan event by sequence and stores only its scheduling
|
|
154
|
+
baseline, mode and input fingerprints. It is disposable coordination metadata,
|
|
155
|
+
not a reducer snapshot or authoritative outcome; loss permits a safe extra scan.
|
|
156
|
+
Keyed reads and atomic upserts have constant cost and never read journal rows.
|
|
157
|
+
|
|
151
158
|
**Reducer snapshots.** The `BuildStore` port can keep, per scope (one build log
|
|
152
159
|
or the repository journal) and registered reducer, that reducer's accumulator as
|
|
153
160
|
of a cursor: `getReducerSnapshot(scope, reducer, version)` and
|
|
@@ -186,16 +193,23 @@ describes recovery and the supported-window boundary.
|
|
|
186
193
|
All event-derived checkpoints include the combined read-catalog fingerprint in
|
|
187
194
|
their keys, independently of numeric reducer versions. Snapshot envelopes validate
|
|
188
195
|
that fingerprint; another catalog's rows remain untouched. Remote named values
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
keep their strict three-field JSON body `{version, cursor, value}`. Clients sending
|
|
197
|
+
both `x-autobuild-reducer-value-projection: 1` and an unrecognized
|
|
198
|
+
`x-autobuild-catalog-identity` receive the canonical answer, including source clients
|
|
199
|
+
whose catalog identity differs from the service's. The client projects the value
|
|
200
|
+
onto its own shape (`projectReducerValue` in `store/reducer-value-validation.ts`),
|
|
201
|
+
dropping unknown properties, so reducer version skew alone is not an error.
|
|
202
|
+
Published clients with a recorded published catalog identity, or without a catalog
|
|
203
|
+
identity, receive answers projected onto their
|
|
204
|
+
frozen released contracts in `store/remote/released-reducer-values/` and stamped
|
|
205
|
+
with their released reducer versions, including projection-capable published clients.
|
|
206
|
+
`reducerValueForClient` omits optional `lastEvent` fields with newer event variants,
|
|
207
|
+
including nested build state, and filters `seenTypes` to known event types while
|
|
208
|
+
preserving canonical cursor, progress, and compatibility facts. An invalid envelope
|
|
209
|
+
or an unrepresentable required value raises `ReducerValueIncompatibilityError`
|
|
210
|
+
with client/server versions and validation detail. See the
|
|
211
|
+
[reduced-value protocol](remote-store-protocol.md) for the response
|
|
212
|
+
contract. No remote named read replays events.
|
|
199
213
|
Repository digest batches likewise return the server batch with one scoped
|
|
200
214
|
request and no discovery or per-build fallback.
|
|
201
215
|
|
|
@@ -274,7 +288,12 @@ Operator passes are single-flight per repository, with requests arriving during
|
|
|
274
288
|
pass queued for one trailing pass. Fresh readers use persisted cache rows too;
|
|
275
289
|
steady-state event-row cost depends on newly appended events at fixed build/run
|
|
276
290
|
cardinality, not on log length. Reduced collections may legitimately grow in JSON
|
|
277
|
-
size.
|
|
291
|
+
size. Ordinary reducer cache loss or corruption can replay history once to recover
|
|
292
|
+
the same answer. Checkpoint-backed `buildStreamSeed` and `repositoryAttention`
|
|
293
|
+
generations instead fail with typed `checkpoint-integrity` for missing admitted
|
|
294
|
+
canonical state, corrupt existing state or unreadable storage. New-identity rebuilds
|
|
295
|
+
and valid legacy-coverage repair remain separate cases; see the
|
|
296
|
+
[checkpoint rules](remote-store-protocol.md#hosted-event-bounds-and-exact-resume).
|
|
278
297
|
|
|
279
298
|
Watch and wait register from a compound persisted `buildStreamSeed` at cursor C.
|
|
280
299
|
Its build accumulator, deferral ledger and insertion-ordered historical PR
|
|
@@ -282,8 +301,11 @@ eligibility describe that same prefix. Ordinary polling, including the first
|
|
|
282
301
|
batch on an old build, reads only events after the cursor and advances that seed
|
|
283
302
|
event by event, preserving state at event N in each emitted record. Watch uses
|
|
284
303
|
historical eligibility for baseline suppression; wait retains its separate
|
|
285
|
-
current-attention registration policy.
|
|
286
|
-
|
|
304
|
+
current-attention registration policy. For an explicit `--since` older than C,
|
|
305
|
+
hosted stores retrieve an exact server-owned checkpoint and read only the bounded delta; local adapters retain
|
|
306
|
+
historical prefix reconstruction in `cli/historical-build-state.ts`. Hosted
|
|
307
|
+
cursors outside the tail window fail without replay; see
|
|
308
|
+
[hosted event bounds and exact resume](remote-store-protocol.md#hosted-event-bounds-and-exact-resume).
|
|
287
309
|
Actual event listings, transcripts and cursor streams remain raw reads. The
|
|
288
310
|
interactive terminal frontend retains its independently established incremental
|
|
289
311
|
feed. `tools/persisted-reduced-reads.test.ts` scans production TypeScript calls
|
|
@@ -590,6 +612,33 @@ counts actual schedules, not suppressed polls. Open session history is never a
|
|
|
590
612
|
lock: a legacy dead session may remain open, while an actual takeover closes it
|
|
591
613
|
explicitly.
|
|
592
614
|
|
|
615
|
+
`processes/workspace-preservation.ts` owns the non-destructive fence, immutable
|
|
616
|
+
checkpoint and durable receipt ordering shared by both release paths in the
|
|
617
|
+
dispatcher. `ports/workspace/commit-preservation.ts` inventories the unpublished
|
|
618
|
+
change and restores exact refs, keeping detached producer objects separate from
|
|
619
|
+
the named branch. Provider provisioning and start failures signal
|
|
620
|
+
`WorkspaceCleanupRequired`; they cannot delete an existing build checkout.
|
|
621
|
+
|
|
622
|
+
Before releasing or replacing a build workspace, the dispatcher confirms a
|
|
623
|
+
non-destructive execution fence for the exact workspace and execution generation.
|
|
624
|
+
It preserves unpublished branch commits and distinct detached producer candidates
|
|
625
|
+
under immutable `refs/autobuild/archive/<build>/<sha>` refs, verifies their exact
|
|
626
|
+
readback, and records `workspace.commits-preserved` before cleanup. Replacement
|
|
627
|
+
provisioning restores those exact refs before starting an agent. Preservation
|
|
628
|
+
never advances the public build branch. A confirmed absent environment records
|
|
629
|
+
`workspace.commits-lost`, naming known candidates and explicitly noting that any
|
|
630
|
+
additional unpublished SHAs could not be inspected. Unknown fencing, inspection,
|
|
631
|
+
transport, or receipt-write outcomes leave the workspace and snapshots intact.
|
|
632
|
+
Fencing is revalidated after restart; a saved receipt alone never authorizes
|
|
633
|
+
cleanup of a newer execution. Current recovery notes are linked by the session
|
|
634
|
+
manifest's `workspaceRecovery` field. Recovery notes apply to the next session
|
|
635
|
+
and repeat hydration within it; empty checkpoints produce no note. Checkpoints survive
|
|
636
|
+
repeated replacement until a published reconcile or restack rewrite retires them,
|
|
637
|
+
so an old preserved branch cannot overwrite that rewrite. Before the first
|
|
638
|
+
branch publication, preservation compares against the recorded workspace base.
|
|
639
|
+
A confirmed `snapshot_not_found` response means the sandbox filesystem is gone;
|
|
640
|
+
cleanup records loss and deletes its stale name before replacement.
|
|
641
|
+
|
|
593
642
|
**Store authority.** `packages/core/src/store/build-scope.ts` wraps every adapter with one
|
|
594
643
|
build's authority. Own-build record/event/artifact/lease/subscription calls
|
|
595
644
|
delegate; foreign-build, collection/admin, close, and repository-journal calls
|
|
@@ -802,9 +851,11 @@ permanent-failure classifier), and `session-env.ts` (per-turn environment merge
|
|
|
802
851
|
that fronts `bin/agent/ab` on `PATH`). The pi CLI owns its login and model
|
|
803
852
|
catalog; the shipped bridge limits tools and refreshes each turn's subprocess
|
|
804
853
|
environment without writing session state into the workspace. Adapters own
|
|
805
|
-
native error extraction; processes own durable failure policy —
|
|
806
|
-
is
|
|
807
|
-
signal.
|
|
854
|
+
native error extraction; processes own durable failure policy — transcript
|
|
855
|
+
deposition is attempted, and a turn's typed terminal always beats a late failure
|
|
856
|
+
signal. An oversized transcript deposition after a successful durable terminal
|
|
857
|
+
preserves that terminal without failing or retrying the completed phase; without
|
|
858
|
+
a terminal, the oversized write parks the phase as described below.
|
|
808
859
|
|
|
809
860
|
**Plugin bootstrap and CLI composition.** `packages/core/src/plugins/load.ts` resolves
|
|
810
861
|
repository-path modules from the config-bearing root and bare packages from an
|
|
@@ -937,6 +988,16 @@ queue. The supervised kernel child owns every slow
|
|
|
937
988
|
adapter operation, so slug naming, provisioning, runners, and Harvest cannot
|
|
938
989
|
block input.
|
|
939
990
|
|
|
991
|
+
Startup restores a validated `dispatchFrontend` checkpoint incrementally only
|
|
992
|
+
when its cursor is within the 1,000-event repository tail window. Older caches
|
|
993
|
+
use the repository-state recovery seed instead. Startup catch-up and prelaunch
|
|
994
|
+
boundary reads enforce that window at selection, including concurrent appends;
|
|
995
|
+
cursor expiry permits one additional seed recovery, never historical gap replay.
|
|
996
|
+
Transfer is bounded by the existing state seed plus a fixed number of windowed
|
|
997
|
+
tails, independently of discarded history (the seed itself retains durable facts
|
|
998
|
+
and the latest run tail). High water is sampled before the sparse seed so later
|
|
999
|
+
updates remain consumable. Steady-state reads and save cadence are unchanged.
|
|
1000
|
+
|
|
940
1001
|
The frontend's `dispatchFrontend` checkpoint retains dashboard facts plus only
|
|
941
1002
|
the latest run-started fact and the sampled lease holder's start (deduplicated).
|
|
942
1003
|
Identity history is always partial, including normalized legacy version-4
|
|
@@ -1435,6 +1496,11 @@ Historical merge completions retain their original shape and semantics.
|
|
|
1435
1496
|
|
|
1436
1497
|
The optional grouped Forge rewrite capability owns authoritative head snapshots,
|
|
1437
1498
|
immutable `refs/autobuild/archive/<slug>/<sha>` publication and expected-head CAS.
|
|
1499
|
+
Remote archives also publish commits present only on the remote: GitHub uses create-only
|
|
1500
|
+
Git-reference REST creation when the workspace lacks the commit, retaining guarded Git
|
|
1501
|
+
pushes for local objects. Exact remote readback confirms publication, then a depth-one
|
|
1502
|
+
fetch by the archive ref (without tags or configured refmap expansion) restores missing
|
|
1503
|
+
commits and verifies them locally before returning.
|
|
1438
1504
|
GitHub uses explicit Git transport leases; local-git uses shared-database
|
|
1439
1505
|
`update-ref` CAS without network calls. Exact authoritative readback acknowledges
|
|
1440
1506
|
publication. Remote-backed local refs are caches refreshed without expected-old
|
|
@@ -1462,6 +1528,8 @@ verification when build-owned config is unchanged, even when the old pin commit
|
|
|
1462
1528
|
is no longer an ancestor. Changed config still supersedes while waiting.
|
|
1463
1529
|
Ancestry gates cycles that run further steps; those cycles capture fresh config.
|
|
1464
1530
|
Object packs retain newly introduced replay trees/blobs as well as commit bytes.
|
|
1531
|
+
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.
|
|
1532
|
+
|
|
1465
1533
|
|
|
1466
1534
|
GitHub archive push/fresh-fetch and rewrite contracts are manual opt-in cases in
|
|
1467
1535
|
`ports/forge/github.live.test.ts`, using `AB_RUN_LIVE_PORT_CONTRACTS=1` and an
|
|
@@ -1645,6 +1713,19 @@ a new classified failure parks again. There are zero automatic paid retries
|
|
|
1645
1713
|
after this deferral. If evidence cannot be written, ordinary recovery applies;
|
|
1646
1714
|
agent output and `no-terminal` alone never classify a read failure.
|
|
1647
1715
|
|
|
1716
|
+
A kernel store write rejected with HTTP 413 raises `StoreWriteTooLargeError`
|
|
1717
|
+
and records `phase.failed {willRetry:false}` on its first attempt, including
|
|
1718
|
+
for automatic restack and session preparation. Its diagnostic names an oversized
|
|
1719
|
+
store write, the HTTP method and route, exact UTF-8 request bytes, and the
|
|
1720
|
+
server message (including any reported ceiling). It parks with
|
|
1721
|
+
`non-retryable-phase-failure`; an operator answer authorizes a fresh attempt,
|
|
1722
|
+
which parks immediately again if still rejected. Store failures never select an
|
|
1723
|
+
alternate provider. After a successful durable terminal, an oversized transcript
|
|
1724
|
+
deposition during optional cleanup preserves that terminal without recording a
|
|
1725
|
+
phase failure or retrying the completed phase. Without a terminal, the oversized
|
|
1726
|
+
write follows the parking policy above. Other store statuses retain their
|
|
1727
|
+
existing retry policy.
|
|
1728
|
+
|
|
1648
1729
|
Ordinary silence, provider failures and session timeouts retain the runner's
|
|
1649
1730
|
phase failure limit (`BuildRunnerOpts.maxPhaseAttempts`, default 2). This is
|
|
1650
1731
|
an internal runner option, not an accepted `[policy]` TOML key. Reconcile
|
|
@@ -1652,6 +1733,51 @@ execution and unchanged-base progress budgets retain their existing accounting.
|
|
|
1652
1733
|
|
|
1653
1734
|
## Forge failure recovery
|
|
1654
1735
|
|
|
1736
|
+
Destination heads come only from the authoritative forge branch; dispatcher-host
|
|
1737
|
+
refs are never a fallback. Failed remote reads retain the accepted observation;
|
|
1738
|
+
classified rate limits use repository forge degradation and cooldown. Changed
|
|
1739
|
+
heads require immutable commit ancestry proof against the accepted target and
|
|
1740
|
+
the destination base already used by replay. Missing capability or failed proof
|
|
1741
|
+
defers new replay. A non-descendant without kernel lineage records
|
|
1742
|
+
`target.rewritten` with branch,
|
|
1743
|
+
previous SHA and observed SHA, retains the accepted target, and raises watch/wait
|
|
1744
|
+
attention. Repeated rewrite pairs are deduplicated. Returning to a safe target
|
|
1745
|
+
clears attention (`target.rewrite-cleared` when the accepted tip is unchanged).
|
|
1746
|
+
Upstream force-pushes are never adopted automatically. Accepted node reparenting
|
|
1747
|
+
starts a new branch scope; frozen transactions recover their retained inputs.
|
|
1748
|
+
|
|
1749
|
+
Kernel restacks of a node are admitted through durable guarded publication
|
|
1750
|
+
receipts, not treated as external force-pushes. The dispatcher walks an index
|
|
1751
|
+
keyed by node and previous head, at most 64 receipt lookups from each child
|
|
1752
|
+
baseline; cost is capped independently of journal length or total receipts.
|
|
1753
|
+
Exact links use point lookups. When forward child landings separate restacks,
|
|
1754
|
+
the dispatcher walks backwards from the latest publication with an indexed
|
|
1755
|
+
previous-receipt cursor. Every gap requires immutable ancestry from the earlier
|
|
1756
|
+
published head to the later receipt's previous head, as do the baseline and tip
|
|
1757
|
+
ends of the proof. Missing links never imply rewrite authority.
|
|
1758
|
+
The proven receipts travel in `target.moved.lineage`; build-scoped runners use
|
|
1759
|
+
that recorded proof without reading another build. Clearing attention for an
|
|
1760
|
+
unchanged accepted SHA retains newly proven lineage in `target.rewrite-cleared`.
|
|
1761
|
+
Missing receipts or a gap
|
|
1762
|
+
over 64 still record `target.rewritten` and raise attention. Each hop makes at
|
|
1763
|
+
most two immutable ancestry comparisons. The exact walk and gap recovery share
|
|
1764
|
+
the same 64-read cap, including unsuccessful lookups. Unchanged accepted
|
|
1765
|
+
polls read no receipts or event rows.
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
A historical `publication.lost` does not prove that every copy of its candidate
|
|
1769
|
+
is gone. Recovery checks the exact branch and private archive refs and retained
|
|
1770
|
+
replay objects first. An available candidate continues guarded publication.
|
|
1771
|
+
A genuinely missing reconcile or automatic restack candidate records
|
|
1772
|
+
`publication.candidate-retired`, abandons its obsolete request, and replays the
|
|
1773
|
+
producing operation with a fresh transaction identity. Its frozen target,
|
|
1774
|
+
reconcile occurrence or automatic trigger, cycle, and message survive. The
|
|
1775
|
+
retired candidate is excluded from archive requirements unless independently
|
|
1776
|
+
required by proven history. This reconstruction consumes no infrastructure
|
|
1777
|
+
attempt and no additional conflict occurrence; it needs no operator guidance.
|
|
1778
|
+
A bare retry also clears an existing infrastructure-limit escalation through
|
|
1779
|
+
ordinary retry semantics. Unavailable inspection defers rather than proving loss.
|
|
1780
|
+
|
|
1655
1781
|
`kernel/publication-retry.ts` selects eligibility from the publication ledger
|
|
1656
1782
|
and shares the policy between `processes/build-runner.ts` and trusted
|
|
1657
1783
|
`cli/publication-settlement.ts`. The lease sweep skips ineligible retained intents;
|
|
@@ -1661,7 +1787,7 @@ Leaf restack and reconcile publication retry classified transient forge or trans
|
|
|
1661
1787
|
failures six times after the initial attempt, waiting 30, 60, 120, 240, 300 and
|
|
1662
1788
|
300 seconds. `publication.retry-scheduled` records the operation, frozen rewrite
|
|
1663
1789
|
identity, episode anchor, failure ordinal, last error and absolute retry time;
|
|
1664
|
-
restart resumes that schedule without rerunning
|
|
1790
|
+
restart resumes that schedule without rerunning a resolver whose candidate remains available. These retries do
|
|
1665
1791
|
not consume `maxPhaseAttempts`. A seventh transient failure records
|
|
1666
1792
|
`publication.retry-exhausted` and raises `publication-retry-limit`, naming the last
|
|
1667
1793
|
error and six retries. Answering that escalation opens a fresh publication episode
|
|
@@ -1761,8 +1887,16 @@ Verification stages are planned purely in `kernel/verify-stages.ts`, shared by
|
|
|
1761
1887
|
leaf and integration decisions in `kernel/engine.ts`. The build runner keeps
|
|
1762
1888
|
only live per-member handles and recovery contexts; durable starts, outcomes,
|
|
1763
1889
|
cancellations and failed-stage receipts drive every barrier and restart.
|
|
1764
|
-
|
|
1765
|
-
|
|
1890
|
+
Normal stage transitions drain terminal-reached agent turns before stage-local
|
|
1891
|
+
interruption, retaining session budgets and parent shutdown. This closes session
|
|
1892
|
+
brackets and deposits trailing evidence before summary publication. Fail-fast
|
|
1893
|
+
cancellation records facts before immediate whole-execution teardown and replacement.
|
|
1894
|
+
The dispatcher's lease sweep treats eligible running orphaned open brackets as
|
|
1895
|
+
pending cleanup even on an engine wait. It excludes live leases/executions,
|
|
1896
|
+
blocked or paused builds and idle collecting nodes, then uses ordinary runner
|
|
1897
|
+
attachment/reclamation. Proved-ended pending work bypasses first-claim grace;
|
|
1898
|
+
healthy ended workspaces are reused and lost environments follow fenced recovery.
|
|
1899
|
+
The predicate uses existing canonical reduced facts and adds no event-log reads. `kernel/verify-stage-state.ts` owns occurrence/session associations,
|
|
1766
1900
|
including escalation supersession and complete implement feedback references.
|
|
1767
1901
|
|
|
1768
1902
|
Human access uses `postgres-store/src/organizations.ts` and the shared hosted
|
|
@@ -1865,6 +1999,18 @@ deltas and prior values retained across rotation.
|
|
|
1865
1999
|
|
|
1866
2000
|
### Hosted project deletion
|
|
1867
2001
|
|
|
2002
|
+
The browser requires the exact full repository identity in a transient dialog field;
|
|
2003
|
+
confirm stays disabled for empty or mismatched input and focus starts in the field.
|
|
2004
|
+
The handler independently binds that identity to the selected repository and its
|
|
2005
|
+
fresh validated preview. Only JSON `{deleted:true}` acknowledges completion.
|
|
2006
|
+
After any failed or unrecognized deletion response, the browser shows
|
|
2007
|
+
“Deletion outcome unknown; reload to check” and holds the row in its original slot
|
|
2008
|
+
without actions, even after dismissal. Only a complete successful discovery begun
|
|
2009
|
+
by Reload after the attempt settles it: absence removes the row, presence restores
|
|
2010
|
+
its authorized actions, and pending cleanup restores Finish deletion with a fresh
|
|
2011
|
+
preview and exact typing. An earlier or unsuccessful read cannot settle the outcome.
|
|
2012
|
+
The server's `{repo}` body and generation-bound If-Match contract are unchanged.
|
|
2013
|
+
|
|
1868
2014
|
The Projects web surface allows super users and organization owners to preview
|
|
1869
2015
|
counts and permanently delete their authorized projects with the shared confirmation dialog.
|
|
1870
2016
|
PostgreSQL fences the registration generation before physical blob cleanup and
|
|
@@ -1880,3 +2026,25 @@ revokes credentials only; admin `projects remove` unregisters without purging.
|
|
|
1880
2026
|
See [project deletion protocol](operator-api.md#permanent-project-deletion).
|
|
1881
2027
|
|
|
1882
2028
|
The ticket-source port optionally exposes `listPage(criteria, page)` for paged operator reads. PostgreSQL counts matches and applies SQL LIMIT/OFFSET; other sources retain exhaustive-read slicing. CLI and dispatcher reads stay exhaustive. See [ticket source contract](ticket-sources.md#writing-your-own).
|
|
2029
|
+
|
|
2030
|
+
|
|
2031
|
+
Hosted event reads use the bounded capabilities in `store/event-reads.ts`:
|
|
2032
|
+
repository cursors must be at least `max(0, head - 1000)`, and build pages
|
|
2033
|
+
contain at most 256 events with `cursor` and `hasMore`. PostgreSQL seeks and
|
|
2034
|
+
limits at the database boundary, including held reads; remote complete-array
|
|
2035
|
+
reads reject partial suffixes. Protocol 7 is next-minor preparation for 1.4;
|
|
2036
|
+
supported published protocol-6 clients retain complete bounded arrays and
|
|
2037
|
+
legacy `conflict` refusals. Same-line runtime and published identities are
|
|
2038
|
+
admitted together, and both health surfaces use the shared validated identity
|
|
2039
|
+
projection without store reads. See [wire compatibility](remote-store-protocol.md).
|
|
2040
|
+
Exact historical watch/wait seeds come from
|
|
2041
|
+
rolling server-owned checkpoints in `postgres-store/src/stream-seeds.ts`.
|
|
2042
|
+
The canonical reducer fold publishes its cache and trailing checkpoints
|
|
2043
|
+
atomically under a reader-only lock. Initial adoption is an explicit resumable
|
|
2044
|
+
migration; later new identities rebuild once, then advance durably with deltas.
|
|
2045
|
+
Two live generations and permanent indexed retirement tombstones support
|
|
2046
|
+
adjacent runtimes without letting old processes evict newer ones. Watch/wait
|
|
2047
|
+
propagate expiry and integrity errors, preserving valid cursors across reducer
|
|
2048
|
+
upgrades. Expired cursors require re-arming without `--since` and status
|
|
2049
|
+
reconciliation. Harvest completion uses reduced session terminal receipts;
|
|
2050
|
+
explicit harvest history uses reverse indexed pages.
|
package/docs/build-store.md
CHANGED
|
@@ -83,3 +83,21 @@ To add a backend:
|
|
|
83
83
|
2. Pass the unchanged `describeBuildStoreContract` and `describeBlobStoreContract` suites from `@defrex/autobuild/testing`, on isolated fixtures with real persistence.
|
|
84
84
|
|
|
85
85
|
To serve it to the shipped CLI, implement the normative remote store protocol, not a new route catalog. Meet its conformance section and test the real remote client against your server.
|
|
86
|
+
|
|
87
|
+
## Hosted dispatch and local viewing
|
|
88
|
+
|
|
89
|
+
A plain `ab dispatch` reads dispatch placement once before starting local execution.
|
|
90
|
+
For a hosted project it opens the Store-only viewer automatically, displaying
|
|
91
|
+
`viewer · dispatched by <host>` from the placement origin (including a nondefault
|
|
92
|
+
port). `--once`, `--plain`, and `--interval` retain their viewer meanings.
|
|
93
|
+
`--takeover` explicitly dispatches locally, with a warning that it can displace
|
|
94
|
+
the hosted dispatcher; it cannot be combined with `--viewer`. Startup intake
|
|
95
|
+
flags require `--takeover` when placement selects viewer.
|
|
96
|
+
|
|
97
|
+
An unreadable placement fails closed with a typed error naming the cause:
|
|
98
|
+
use `--viewer` to watch or `--takeover` to dispatch locally. Both explicit modes
|
|
99
|
+
skip placement discovery. Older services without the capability and projects
|
|
100
|
+
with unknown or nonhosted placement retain local dispatch behavior. Local stores
|
|
101
|
+
need no placement request. Origin mode (`--repository` or `AB_REPOSITORY`) and
|
|
102
|
+
hosted cron dispatch bypass this check. Placement is a startup snapshot, not a
|
|
103
|
+
liveness probe or a polling input.
|
package/docs/builds.md
CHANGED
|
@@ -39,6 +39,8 @@ If a leaf spec revision arrives during an unfinished reconcile, the same reconci
|
|
|
39
39
|
|
|
40
40
|
Either reviewer approves, requests revisions with structured findings, or escalates a question.
|
|
41
41
|
|
|
42
|
+
The planner and plan reviewer also check whether the required work fits one implement session. Most plans need no estimate; ordinary large plans and plans comfortably under the ceiling proceed. When the concrete work clearly exceeds that ceiling, the planner escalates before depositing a plan, or the plan reviewer escalates instead of requesting removal of required scope. The escalation carries evidence and a proposed split: seams, what each resulting ticket owns, and the blocker graph. See [sizing and splitting](spec-standard.md#fit-one-implement-session) for the sizing signals and seam guidance.
|
|
43
|
+
|
|
42
44
|
- **Sessions.** Each phase gets its own session; the producer keeps it across a loop's rounds, and each reviewer round starts fresh.
|
|
43
45
|
- **Context** passes between phases as durable artifacts: spec, approved plan, implementation notes, findings, and verification reports.
|
|
44
46
|
|
|
@@ -63,10 +65,12 @@ Once verification passes, the finalize agent writes the PR description; Autobuil
|
|
|
63
65
|
|
|
64
66
|
## When a human is needed
|
|
65
67
|
|
|
66
|
-
After grooming, escalations are the judgment gates. A build parks with a recorded question on an unclear requirement, a persistent review disagreement, or an exhausted policy bound.
|
|
68
|
+
After grooming, escalations are the judgment gates. A build parks with a recorded question on an unclear requirement, required work that clearly exceeds one implement session, a persistent review disagreement, or an exhausted policy bound.
|
|
67
69
|
|
|
68
70
|
Your operator agent answers bounded questions from your instructions and brings unresolved product decisions to you. Restarting dispatch doesn't answer a question, and an answer doesn't force success.
|
|
69
71
|
|
|
72
|
+
For an oversized-work escalation, your operator agent decides the split and files the resulting tickets, bringing unresolved product decisions to you. Autobuild does not split or file them automatically.
|
|
73
|
+
|
|
70
74
|
Merge consent is a separate policy decision your operator agent manages. Repositories can require it even for a green build; verification, forge checks, and merge gates still apply. See [integration and merge policy](integration-overview.md).
|
|
71
75
|
|
|
72
76
|
|
package/docs/cli.md
CHANGED
|
@@ -13,7 +13,7 @@ Run `bun ab <command>`; `bun ab help <command>` lists flags and subcommands. See
|
|
|
13
13
|
|
|
14
14
|
- `accounts` — Authorize a ChatGPT subscription for a local dispatcher or connected project.
|
|
15
15
|
|
|
16
|
-
- `dispatch` — Run the dispatcher and dashboard.
|
|
16
|
+
- `dispatch` — Run the dispatcher and dashboard; missing selected account credentials refuse local startup before the lease. See [account admission](accounts.md#dispatcher-admission).
|
|
17
17
|
- `init` — Install skills and hand setup to a coding agent.
|
|
18
18
|
- `upgrade` — Update Autobuild and merge default skills.
|
|
19
19
|
- `connect` — Connect to a hosted service with browser approval.
|
package/docs/configuration.md
CHANGED
|
@@ -497,6 +497,17 @@ one scan interval plus one tick when capacity permits. Observation while intake
|
|
|
497
497
|
is off shares the cadence; an observation measurement cannot suppress a fresh
|
|
498
498
|
admission scan when intake is enabled.
|
|
499
499
|
|
|
500
|
+
Only changed scan outcomes append `dispatcher.ticket-scan-completed`; comparison
|
|
501
|
+
includes counts, ordered diagnostics, readiness and criteria fingerprints, and
|
|
502
|
+
mode. Its `startedAt` is the measurement time of the last recorded outcome,
|
|
503
|
+
not a last-scanned heartbeat. A single replaceable, repository-keyed cadence
|
|
504
|
+
cache survives fresh dispatcher processes and acknowledges that canonical fact
|
|
505
|
+
by sequence. It contains scheduling metadata only, never counts or lifecycle
|
|
506
|
+
state, and is distinct from reducer checkpoints. Missing or stale metadata
|
|
507
|
+
falls back to the recorded fact and can cause one safe extra scan without
|
|
508
|
+
reconstructing history. Successful unchanged scans advance this cache only.
|
|
509
|
+
|
|
510
|
+
|
|
500
511
|
### Plugin modules
|
|
501
512
|
|
|
502
513
|
<!-- config-fragment:plugins -->
|
|
@@ -1322,23 +1333,29 @@ the execution lease is released. The supervisor uses a narrow credential
|
|
|
1322
1333
|
transform for a fixed non-force push and verifies the remote head before
|
|
1323
1334
|
recording completion; PR API work stays local. If that acknowledgement is lost
|
|
1324
1335
|
after the push succeeds, the next launch observes the exact remote branch head and
|
|
1325
|
-
records the missing completion before allowing a replacement phase to run.
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1336
|
+
records the missing completion before allowing a replacement phase to run.
|
|
1337
|
+
Available candidates continue publication; confirmed missing candidates require
|
|
1338
|
+
reconstruction by the producing phase or, for reconcile/restack, a fresh replay
|
|
1339
|
+
under the retained intent and frozen target. Before every guest runner launch,
|
|
1340
|
+
the provider reasserts the normal receive-pack-free policy, so a failed policy
|
|
1329
1341
|
restore cannot expose publication authority to later setup or plugin code.
|
|
1330
1342
|
Ordinary completion deletes the sandbox.
|
|
1331
1343
|
|
|
1332
1344
|
A Vercel VM is disposable, not durable build state. Every execution records its
|
|
1333
1345
|
Autobuild instance, deterministic sandbox name, and Vercel session id. After a
|
|
1334
|
-
lease expires, recovery first
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1346
|
+
lease expires, recovery first fences the exact old name without deleting it.
|
|
1347
|
+
Before deletion, it verifies archival of reachable unpublished commits to private
|
|
1348
|
+
refs and records a durable preservation receipt, or records a loss receipt for
|
|
1349
|
+
confirmed absence. Unknown inspection or transport outcomes defer cleanup. Only
|
|
1350
|
+
after that boundary does it delete the old environment and provision the next
|
|
1351
|
+
generation. An interrupted create is retried with the same deterministic generation/name, so an unknown response
|
|
1352
|
+
cannot fan out duplicate VMs. Provisioning starts from the published build branch
|
|
1353
|
+
when it exists and otherwise the original recorded branch-cut SHA, then restores
|
|
1354
|
+
the exact preserved private refs with branch ancestry checks before sessions
|
|
1355
|
+
resume. Setup reruns and open sessions are reclaimed by the normal durable
|
|
1340
1356
|
protocol. Uncommitted files and `.ab` scratch may be lost; Store events/artifacts
|
|
1341
|
-
and
|
|
1357
|
+
and verified Git checkpoints remain authoritative. See the
|
|
1358
|
+
[workspace recovery contract](architecture.md#key-boundaries).
|
|
1342
1359
|
|
|
1343
1360
|
Paused and policy-blocked builds release their sandbox after the execution
|
|
1344
1361
|
lease expires. Resume creates a replacement and reruns setup. Graceful shutdown
|
|
@@ -3534,12 +3551,13 @@ progress is not shown. Harvest does not consume build capacity.
|
|
|
3534
3551
|
|
|
3535
3552
|
## Hosted service client compatibility
|
|
3536
3553
|
|
|
3537
|
-
A service
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3554
|
+
A published release line stays supported by a service until both at least two newer minor lines have been published and 90 days have passed since the first release of the line that superseded it. The rule spans majors: a new major keeps supporting earlier lines on the same terms. The policy floor is 1.2: lines before 1.2 are refused regardless of publication dates because their clients rebuild server state from the journal. Lines newer than the service stay unsupported (service first). Supported means the published clients of that line can use the service’s retained protocol handlers and read its reduced answers in the shapes their released clients accept.
|
|
3555
|
+
|
|
3556
|
+
Stable patches never reset a line’s first-publication date. Only actually published
|
|
3557
|
+
lines at or below the service line count; prereleases do not start retirement clocks.
|
|
3558
|
+
Publication facts survive removal of retired identities, contracts, and handlers.
|
|
3559
|
+
Patch releases must retain their line’s protocol identity. Unknown historical
|
|
3560
|
+
protocol identities are refused independently of the numeric window.
|
|
3543
3561
|
Stable and prerelease service and client identities share their numeric major/minor
|
|
3544
3562
|
line. Malformed or missing identities, build metadata (`+…`), prefixes and
|
|
3545
3563
|
whitespace are refused with HTTP 409.
|
|
@@ -3550,8 +3568,9 @@ and supported range.
|
|
|
3550
3568
|
Unauthenticated `GET /health` publishes `ok`, `autobuildVersion`,
|
|
3551
3569
|
`protocolVersion`, and `supportedClientRange: { minVersion, maxVersionExclusive }`.
|
|
3552
3570
|
Range endpoints remain stable versions. The range is inclusive at the minimum
|
|
3553
|
-
and exclusive at the maximum; a
|
|
3554
|
-
service publishes `>=
|
|
3571
|
+
and exclusive at the maximum; a 1.3.x
|
|
3572
|
+
service publishes `>=1.2.0 <1.4.0` until later publication facts permit retirement.
|
|
3573
|
+
The service reads the clock for each decision, so retirement needs no redeploy. Health needs no credentials, version
|
|
3555
3574
|
headers, or available backend.
|
|
3556
3575
|
|
|
3557
3576
|
Remote workspace factories must use `delegateCredential(storeRef, undefined,
|
|
@@ -12,6 +12,35 @@ order: 11
|
|
|
12
12
|
|
|
13
13
|
The dispatcher claims eligible tickets, starts and observes build runners, settles publication and merge, and recovers durable work. Local and origin-mode arrangements run the same kernel. Your operator agent acts through the CLI or MCP; Autobuild never starts it.
|
|
14
14
|
|
|
15
|
+
## Viewing from a local checkout
|
|
16
|
+
|
|
17
|
+
A plain `ab dispatch` reads dispatch placement once before starting local execution.
|
|
18
|
+
For a hosted project it opens the Store-only viewer automatically, displaying
|
|
19
|
+
`viewer · dispatched by <host>` from the placement origin (including a nondefault
|
|
20
|
+
port). `--once`, `--plain`, and `--interval` retain their viewer meanings.
|
|
21
|
+
`--takeover` explicitly dispatches locally, with a warning that it can displace
|
|
22
|
+
the hosted dispatcher; it cannot be combined with `--viewer`. Startup intake
|
|
23
|
+
flags require `--takeover` when placement selects viewer.
|
|
24
|
+
|
|
25
|
+
An unreadable placement fails closed with a typed error naming the cause:
|
|
26
|
+
use `--viewer` to watch or `--takeover` to dispatch locally. Both explicit modes
|
|
27
|
+
skip placement discovery. Older services without the capability and projects
|
|
28
|
+
with unknown or nonhosted placement retain local dispatch behavior. Local stores
|
|
29
|
+
need no placement request. Origin mode (`--repository` or `AB_REPOSITORY`) and
|
|
30
|
+
hosted cron dispatch bypass this check. Placement is a startup snapshot, not a
|
|
31
|
+
liveness probe or a polling input.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
Humans can watch any arrangement through `bun ab dispatch --viewer`, optionally
|
|
35
|
+
adding `--dispatched-by <label>` to name where dispatching runs. An explicitly supplied label is descriptive input. Each frame keeps `viewer` visible; plain
|
|
36
|
+
output states it at startup. This mode only reads shared state until an operator
|
|
37
|
+
uses a shared-store control. It takes no lease and performs no dispatch work.
|
|
38
|
+
Ctrl-C closes the viewer without stopping the dispatcher. `--once` reads one
|
|
39
|
+
snapshot, `--plain` selects line output, and `--interval <s>` sets polling cadence.
|
|
40
|
+
It requires a checkout and rejects `--repository` and startup intake flags.
|
|
41
|
+
See [viewer controls](dispatcher.md#watch-a-dispatcher-running-elsewhere).
|
|
42
|
+
Operator agents must not launch it.
|
|
43
|
+
|
|
15
44
|
## Shipped arrangements
|
|
16
45
|
|
|
17
46
|
### Local process
|
|
@@ -32,6 +61,12 @@ bun ab dispatch
|
|
|
32
61
|
bun ab dispatch --once
|
|
33
62
|
```
|
|
34
63
|
|
|
64
|
+
Local startup checks selected primary and alternate account sources before
|
|
65
|
+
acquiring the repository lease, in both watch and `--once` modes. Missing
|
|
66
|
+
credentials refuse startup with every account's source and remedy. Successor
|
|
67
|
+
preflight also refuses missing sources and keeps the running generation active.
|
|
68
|
+
Unused declared accounts do not block dispatch. See [account admission](accounts.md#dispatcher-admission).
|
|
69
|
+
|
|
35
70
|
The host needs:
|
|
36
71
|
|
|
37
72
|
- the runtime CLI, dependencies, Git and check tools ([Workspaces](workspaces.md))
|
|
@@ -40,6 +75,13 @@ The host needs:
|
|
|
40
75
|
|
|
41
76
|
A service manager may own the process under an identity with the same configuration and credentials. To restart, stop gracefully and let drain and suspension finish; work resumes from durable state. A restart never answers escalations or grants merge consent. See [the dispatcher lifecycle](dispatcher.md).
|
|
42
77
|
|
|
78
|
+
Hosted cron ticks hold new account-dependent work behind one durable repository
|
|
79
|
+
condition per missing project secret. Use `bun ab secrets set VARIABLE`, or
|
|
80
|
+
`bun ab accounts login NAME --project` for refreshing ChatGPT credentials; the
|
|
81
|
+
next tick recovers automatically without spending build infrastructure attempts.
|
|
82
|
+
Project account slots never fall back to service-environment credentials.
|
|
83
|
+
Observation, controls and cleanup continue during the hold.
|
|
84
|
+
|
|
43
85
|
### Origin-mode dispatcher with remote workspaces
|
|
44
86
|
|
|
45
87
|
Commit a remote-compatible configuration to the base branch:
|
package/docs/dispatcher.md
CHANGED
|
@@ -17,6 +17,29 @@ bun ab dispatch
|
|
|
17
17
|
It watches your ticket source, claims eligible tickets, pins their specs, and starts isolated build-runners up to capacity.
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
## Watch a dispatcher running elsewhere
|
|
21
|
+
|
|
22
|
+
A human can open the terminal dashboard from a local checkout without dispatching:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
bun ab dispatch --viewer --dispatched-by app.autobuild.run
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The optional label is descriptive input. Every frame says `viewer · dispatched by
|
|
29
|
+
<label>`, or simply `viewer` when omitted. Plain/non-TTY output states the mode
|
|
30
|
+
at startup and prints state changes. `--once` reads one snapshot; `--interval <s>`
|
|
31
|
+
sets the polling cadence. Without a recorded configuration it waits for the dispatcher.
|
|
32
|
+
|
|
33
|
+
The viewer takes no repository lease and starts no build, harvest, scan, janitor,
|
|
34
|
+
or dispatcher process. Ctrl-C closes only the viewer. Shared-store controls
|
|
35
|
+
remain available: merge consent, hold, pause/resume, blocked feedback/retry,
|
|
36
|
+
intake and harvest gates, harvest resume/acknowledgement, queued discard and
|
|
37
|
+
confirmed abort. Navigation and session inspection work as usual. These record
|
|
38
|
+
operator intent for the dispatcher to execute. No current control needs a local
|
|
39
|
+
dispatcher. Startup intake flags and `--repository` are rejected; use a local
|
|
40
|
+
checkout with its configured Store or `--store`. Operator agents still must not
|
|
41
|
+
run `ab dispatch`, including `--viewer`.
|
|
42
|
+
|
|
20
43
|
## Ready work becomes a build
|
|
21
44
|
|
|
22
45
|
A ticket is claimed when it passes every gate:
|
|
@@ -57,3 +80,21 @@ A restart loses nothing. The dispatcher continues each build from its recorded p
|
|
|
57
80
|
Your operator agent is an external coding agent you direct, like Claude Code or Codex. It files and grooms tickets with you, operates the builds the repository's dispatcher dispatches, answers bounded escalations and manages merge consent, using the `ab` CLI locally or the same tools over MCP. You make the product calls. Autobuild never hosts or starts it, and its chat isn't part of the build's paper trail.
|
|
58
81
|
|
|
59
82
|
Next: [operator surfaces](operator-surfaces.md) for the controls, [one build end to end](builds.md) for the phases.
|
|
83
|
+
|
|
84
|
+
## Hosted dispatch and local viewing
|
|
85
|
+
|
|
86
|
+
A plain `ab dispatch` reads dispatch placement once before starting local execution.
|
|
87
|
+
For a hosted project it opens the Store-only viewer automatically, displaying
|
|
88
|
+
`viewer · dispatched by <host>` from the placement origin (including a nondefault
|
|
89
|
+
port). `--once`, `--plain`, and `--interval` retain their viewer meanings.
|
|
90
|
+
`--takeover` explicitly dispatches locally, with a warning that it can displace
|
|
91
|
+
the hosted dispatcher; it cannot be combined with `--viewer`. Startup intake
|
|
92
|
+
flags require `--takeover` when placement selects viewer.
|
|
93
|
+
|
|
94
|
+
An unreadable placement fails closed with a typed error naming the cause:
|
|
95
|
+
use `--viewer` to watch or `--takeover` to dispatch locally. Both explicit modes
|
|
96
|
+
skip placement discovery. Older services without the capability and projects
|
|
97
|
+
with unknown or nonhosted placement retain local dispatch behavior. Local stores
|
|
98
|
+
need no placement request. Origin mode (`--repository` or `AB_REPOSITORY`) and
|
|
99
|
+
hosted cron dispatch bypass this check. Placement is a startup snapshot, not a
|
|
100
|
+
liveness probe or a polling input.
|
package/docs/forges.md
CHANGED
|
@@ -119,3 +119,8 @@ Classify failures with `ForgeFailure` (API 1.8):
|
|
|
119
119
|
Ordinary policy or permission refusals stay deferrals.
|
|
120
120
|
|
|
121
121
|
Optional `observeRequests` observers count every wire request, including failures and pagination, attributed to a build when known, excluding skipped calls and credential discovery; no observer means "unknown", not zero. Keep tokens out of failures and telemetry.
|
|
122
|
+
|
|
123
|
+
Destination polling requires authoritative `remoteBranchSha`; automatic restack
|
|
124
|
+
admission also requires immutable `isCommitAncestor` proof. Failed reads or
|
|
125
|
+
missing capabilities defer work. Proven upstream rewrites retain the accepted
|
|
126
|
+
target and raise attention; local dispatcher refs never substitute for the forge.
|
package/docs/integration-tree.md
CHANGED
|
@@ -297,3 +297,11 @@ A concurrent state change refuses publication with a retry explanation;
|
|
|
297
297
|
uncited artifacts are inert. Leaves still require an open escalation and
|
|
298
298
|
restart from `plan` after any unfinished reconcile resumes under the revised
|
|
299
299
|
spec and its publication is confirmed.
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
Parent node restacks are kernel rewrites. Child admission uses the dispatcher's
|
|
304
|
+
bounded indexed publication-receipt proof, retained in `target.moved.lineage`,
|
|
305
|
+
including after a child was paused across multiple restacks. External rewrites
|
|
306
|
+
without proof raise attention; node ownership alone never authorizes replay.
|
|
307
|
+
See [restacking](restacking.md).
|