@defrex/autobuild 1.2.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 +416 -36
- package/docs/accounts.md +50 -1
- package/docs/answering-blocked-builds.md +4 -1
- package/docs/architecture.md +298 -17
- package/docs/build-store.md +18 -0
- package/docs/builds.md +7 -1
- package/docs/cli.md +1 -1
- package/docs/configuration-overview.md +6 -0
- package/docs/configuration.md +44 -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 +24 -5
- package/docs/operating.md +11 -3
- package/docs/operator-api.md +81 -10
- package/docs/operator-surfaces.md +29 -0
- package/docs/plugin-authoring.md +51 -2
- package/docs/remote-store-protocol.md +321 -46
- package/docs/remote-ticket-protocol.md +12 -10
- package/docs/restacking.md +105 -3
- package/docs/setup.md +37 -8
- package/docs/skills.md +1 -1
- package/docs/spec-standard.md +41 -5
- package/docs/ticket-dependencies.md +8 -0
- 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 +179 -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 +150 -33
- package/packages/core/src/cli/dispatch.ts +209 -36
- package/packages/core/src/cli/dispatcher-liveness.ts +6 -1
- package/packages/core/src/cli/forge-clear.ts +30 -0
- package/packages/core/src/cli/harvest.ts +2 -1
- package/packages/core/src/cli/help.ts +17 -3
- package/packages/core/src/cli/historical-build-state.ts +6 -0
- package/packages/core/src/cli/main.ts +43 -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 +47 -16
- package/packages/core/src/config/roles.ts +16 -1
- package/packages/core/src/events/catalog.ts +8 -0
- package/packages/core/src/events/forge-degradation-policy.ts +11 -0
- package/packages/core/src/events/payloads.ts +95 -2
- package/packages/core/src/events/policy.ts +19 -0
- package/packages/core/src/events/repository.ts +108 -2
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +464 -0
- package/packages/core/src/kernel/change-presence.ts +74 -8
- package/packages/core/src/kernel/dispatch-placement.ts +30 -0
- package/packages/core/src/kernel/engine.ts +27 -12
- package/packages/core/src/kernel/generators/leaf-restack-log.ts +17 -1
- package/packages/core/src/kernel/generators/node-restack-log.ts +14 -0
- 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-polling.ts +40 -7
- package/packages/core/src/kernel/node-restack-demand.ts +75 -0
- package/packages/core/src/kernel/node-restack-state.ts +20 -1
- package/packages/core/src/kernel/node-restack-transaction.ts +47 -1
- package/packages/core/src/kernel/read-facts.ts +120 -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 +6 -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/kernel/ticket-preparation.ts +66 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/control.ts +20 -0
- package/packages/core/src/operator/index.ts +2 -0
- package/packages/core/src/operator/registry.ts +25 -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/runner/account-env.ts +60 -9
- package/packages/core/src/ports/runner/claude.ts +49 -45
- 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 +732 -201
- package/packages/core/src/processes/execution-no-progress.ts +8 -0
- package/packages/core/src/processes/harvest-runner.ts +6 -7
- package/packages/core/src/processes/harvest.ts +11 -16
- package/packages/core/src/processes/publication-state.ts +2 -1
- package/packages/core/src/processes/repo-view.ts +25 -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/artifact-meta.ts +7 -0
- package/packages/core/src/store/build-scope.ts +28 -0
- package/packages/core/src/store/contract.ts +182 -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 +241 -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 +10546 -8877
- package/packages/core/src/store/reducer-value-validation.ts +109 -6
- package/packages/core/src/store/reducer-values.ts +62 -2
- package/packages/core/src/store/remote/client.ts +208 -23
- package/packages/core/src/store/remote/compatibility.ts +195 -25
- package/packages/core/src/store/remote/errors.ts +16 -0
- package/packages/core/src/store/remote/index.ts +17 -0
- package/packages/core/src/store/remote/protocol.ts +30 -1
- 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.2.0.json +8129 -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 +8 -1
- package/packages/core/src/store/repo-state-events.ts +6 -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/snapshots.ts +16 -3
- package/packages/core/src/store/types.ts +29 -6
- package/packages/core/src/testing/dispatch-read-budget.ts +457 -7
- package/packages/core/src/testing/index.ts +6 -1
- package/packages/core/src/testing/reduced-read-budget.ts +1240 -9
- package/skills/guide/SKILL.md +220 -22
- package/skills/guide/references/accounts.md +50 -1
- package/skills/guide/references/integration-tree.md +24 -5
- package/skills/guide/references/operator-api.md +81 -10
- package/skills/guide/references/plugin-authoring.md +51 -2
- package/skills/guide/references/remote-store-protocol.md +321 -46
- package/skills/guide/references/remote-ticket-protocol.md +12 -10
- package/skills/guide/references/restacking.md +105 -3
- package/skills/guide/references/setup.md +37 -8
- package/skills/guide/references/spec-standard.md +41 -5
- package/skills/guide/references/ticket-dependencies.md +8 -0
- package/skills/implement/SKILL.md +12 -3
- package/skills/operate/SKILL.md +85 -12
- package/skills/plan/SKILL.md +27 -4
- package/skills/plan-review/SKILL.md +22 -2
- package/skills/reconcile/SKILL.md +16 -1
- package/skills/spec/SKILL.md +7 -4
- package/skills/tickets/SKILL.md +7 -3
- package/templates/hosted-service/package.json +2 -2
|
@@ -101,6 +101,12 @@ requires its membership key. Invalid credentials need renewal (`claude setup-tok
|
|
|
101
101
|
for Claude, replacement membership key for Kimi); quota and overload failures
|
|
102
102
|
retain alternate fallback.
|
|
103
103
|
|
|
104
|
+
Selected Claude/Kimi credentials stay out of process arguments: each invocation
|
|
105
|
+
uses a private 0700 directory and a regular 0600 settings file, removed after
|
|
106
|
+
normal exit, launch failure or cancellation. The settings preserve selected-account
|
|
107
|
+
authentication precedence over saved user/project settings. Remote settings and
|
|
108
|
+
environments continue to contain placeholders only.
|
|
109
|
+
|
|
104
110
|
Choose the region of your Kimi membership. The default `overseas` selects
|
|
105
111
|
`https://api.kimi.ai/coding/`; `china` selects `https://api.kimi.com/coding/`.
|
|
106
112
|
The base URL and egress hostname are fixed together and cannot be overridden
|
package/docs/configuration.md
CHANGED
|
@@ -63,6 +63,12 @@ requires its membership key. Invalid Claude/Kimi credentials need renewal
|
|
|
63
63
|
ChatGPT credentials require `ab accounts login NAME` for the owning destination;
|
|
64
64
|
quota and overload failures retain alternate fallback.
|
|
65
65
|
|
|
66
|
+
Selected Claude/Kimi credentials stay out of process arguments: each invocation
|
|
67
|
+
uses a private 0700 directory and a regular 0600 settings file, removed after
|
|
68
|
+
normal exit, launch failure or cancellation. The settings preserve selected-account
|
|
69
|
+
authentication precedence over saved user/project settings. Remote settings and
|
|
70
|
+
environments continue to contain placeholders only.
|
|
71
|
+
|
|
66
72
|
Choose the region of your Kimi membership. The default `overseas` selects
|
|
67
73
|
`https://api.kimi.ai/coding/`; `china` selects `https://api.kimi.com/coding/`.
|
|
68
74
|
The base URL and egress hostname are fixed together and cannot be overridden
|
|
@@ -491,6 +497,17 @@ one scan interval plus one tick when capacity permits. Observation while intake
|
|
|
491
497
|
is off shares the cadence; an observation measurement cannot suppress a fresh
|
|
492
498
|
admission scan when intake is enabled.
|
|
493
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
|
+
|
|
494
511
|
### Plugin modules
|
|
495
512
|
|
|
496
513
|
<!-- config-fragment:plugins -->
|
|
@@ -1316,23 +1333,29 @@ the execution lease is released. The supervisor uses a narrow credential
|
|
|
1316
1333
|
transform for a fixed non-force push and verifies the remote head before
|
|
1317
1334
|
recording completion; PR API work stays local. If that acknowledgement is lost
|
|
1318
1335
|
after the push succeeds, the next launch observes the exact remote branch head and
|
|
1319
|
-
records the missing completion before allowing a replacement phase to run.
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
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
|
|
1323
1341
|
restore cannot expose publication authority to later setup or plugin code.
|
|
1324
1342
|
Ordinary completion deletes the sandbox.
|
|
1325
1343
|
|
|
1326
1344
|
A Vercel VM is disposable, not durable build state. Every execution records its
|
|
1327
1345
|
Autobuild instance, deterministic sandbox name, and Vercel session id. After a
|
|
1328
|
-
lease expires, recovery first
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
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
|
|
1334
1356
|
protocol. Uncommitted files and `.ab` scratch may be lost; Store events/artifacts
|
|
1335
|
-
and
|
|
1357
|
+
and verified Git checkpoints remain authoritative. See the
|
|
1358
|
+
[workspace recovery contract](architecture.md#key-boundaries).
|
|
1336
1359
|
|
|
1337
1360
|
Paused and policy-blocked builds release their sandbox after the execution
|
|
1338
1361
|
lease expires. Resume creates a replacement and reruns setup. Graceful shutdown
|
|
@@ -3528,12 +3551,13 @@ progress is not shown. Harvest does not consume build capacity.
|
|
|
3528
3551
|
|
|
3529
3552
|
## Hosted service client compatibility
|
|
3530
3553
|
|
|
3531
|
-
A service
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
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.
|
|
3537
3561
|
Stable and prerelease service and client identities share their numeric major/minor
|
|
3538
3562
|
line. Malformed or missing identities, build metadata (`+…`), prefixes and
|
|
3539
3563
|
whitespace are refused with HTTP 409.
|
|
@@ -3544,8 +3568,9 @@ and supported range.
|
|
|
3544
3568
|
Unauthenticated `GET /health` publishes `ok`, `autobuildVersion`,
|
|
3545
3569
|
`protocolVersion`, and `supportedClientRange: { minVersion, maxVersionExclusive }`.
|
|
3546
3570
|
Range endpoints remain stable versions. The range is inclusive at the minimum
|
|
3547
|
-
and exclusive at the maximum; a
|
|
3548
|
-
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
|
|
3549
3574
|
headers, or available backend.
|
|
3550
3575
|
|
|
3551
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
|
@@ -249,7 +249,11 @@ metadata never changes completeness or merge eligibility.
|
|
|
249
249
|
Collecting nodes may intentionally trail their parent. They refresh before
|
|
250
250
|
verification and merge, for queued dependency presence, on operator request,
|
|
251
251
|
and after accepted re-parenting. Descendants need independent demand; presence
|
|
252
|
-
requests follow only the minimal proven ancestor path.
|
|
252
|
+
requests follow only the minimal proven ancestor path. Unavailable immediate-parent
|
|
253
|
+
identities remain pending; durable availability facts bound idle preparation across
|
|
254
|
+
restart. Head, request, ancestry, alias and confirmed landing changes trigger a fresh
|
|
255
|
+
assessment. Re-parenting to another branch explicitly disposes of old destination
|
|
256
|
+
requests without claiming coverage. See
|
|
253
257
|
[restacking](restacking.md#timing-and-evidence) for timing, requests and distance.
|
|
254
258
|
|
|
255
259
|
## Polling and status
|
|
@@ -263,9 +267,15 @@ GitHub-only changes are discovered on the next due check, within the idle
|
|
|
263
267
|
interval plus normal tick scheduling while the dispatcher is running; failure,
|
|
264
268
|
cooldown and transport-budget gates still apply. Pending operations retain
|
|
265
269
|
active polling and action-time readiness checks remain fresh. Successful
|
|
266
|
-
`node.poll-checked` facts preserve quiet history across restarts
|
|
267
|
-
|
|
268
|
-
|
|
270
|
+
`node.poll-checked` advisory facts preserve quiet history across restarts.
|
|
271
|
+
Each successfully observed activity or policy epoch records one quiet-period
|
|
272
|
+
anchor; unchanged active checks add no checkpoints. At the quiet threshold a
|
|
273
|
+
check may be immediately due, then each successful due idle check records its
|
|
274
|
+
completion. Growth is bounded by one anchor per observed epoch plus due idle
|
|
275
|
+
checks. Missing or unusable evidence forces a fresh check; interrupted or
|
|
276
|
+
contended writes leave the durable deadline unchanged and retry conservatively. `ab build status` reports active or idle cadence and the
|
|
277
|
+
last durably recorded successful check (or unrecorded evidence); this timestamp
|
|
278
|
+
can trail successful active checks.
|
|
269
279
|
|
|
270
280
|
## Operator node spec revisions
|
|
271
281
|
|
|
@@ -285,4 +295,13 @@ Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
|
285
295
|
pending controls, merge intent and ended PRs refuse the no-escalation path.
|
|
286
296
|
A concurrent state change refuses publication with a retry explanation;
|
|
287
297
|
uncited artifacts are inert. Leaves still require an open escalation and
|
|
288
|
-
restart from `plan
|
|
298
|
+
restart from `plan` after any unfinished reconcile resumes under the revised
|
|
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).
|
package/docs/operating.md
CHANGED
|
@@ -59,16 +59,24 @@ without withdrawal support fall back silently. SIGKILL still relies on TTL expir
|
|
|
59
59
|
|
|
60
60
|
Re-arm with `bun ab watch --operator --json --since <watch-cursor>` using only
|
|
61
61
|
the standing watch's own cursor. This preserves one ID and original start time
|
|
62
|
-
across a re-arm gap of up to five minutes.
|
|
62
|
+
across a presence re-arm gap of up to five minutes. This presence TTL is separate
|
|
63
|
+
from hosted event-window eligibility. After termination withdraws presence,
|
|
63
64
|
the same cursor re-registers the same ID and start time. Reconcile current and
|
|
64
65
|
newly dispatched builds after arming and on timeout. Keep operating after the initial work ends,
|
|
65
66
|
until you end or hand off the role. `wait` does not heartbeat or carry registration
|
|
66
67
|
identity: a separate unflagged diagnostic wait/watch must never replace the
|
|
67
68
|
standing monitor or supply its resume cursor. MCP presence is deferred.
|
|
68
69
|
|
|
70
|
+
Keep `--since` for normal re-arms. Hosted resume accepts cursors at or above
|
|
71
|
+
`max(0, head - 1000)` in each monitored stream: the inclusive window is 1,000
|
|
72
|
+
sequence positions behind its head. If a cursor is too old, re-arm without
|
|
73
|
+
`--since` and reconcile repository and build status. That fresh attachment cannot
|
|
74
|
+
recover the unavailable historical gap; status reconciliation does not restore
|
|
75
|
+
one-off events from that gap.
|
|
76
|
+
|
|
69
77
|
- **Default filter:** actionable attention only, such as escalations and ready merges awaiting consent. Add `--event` globs for routine lifecycle events.
|
|
70
78
|
- **Starts now:** a fresh watch ignores history, so check current status too.
|
|
71
|
-
- **Resumable:** pass the opaque cursor from the JSON output back with `--since` to receive events recorded while away. The final JSON line always carries one.
|
|
79
|
+
- **Resumable:** pass the opaque cursor from the JSON output back with `--since` to receive events recorded while away within the hosted window described above. The final JSON line always carries one.
|
|
72
80
|
- **Duration:** 30 minutes by default; `--timeout 0` keeps it open.
|
|
73
81
|
|
|
74
82
|
```
|
|
@@ -83,7 +91,7 @@ bun ab wait my-build --for attention --json --timeout 5m
|
|
|
83
91
|
| 2 | Every named build ended without matching |
|
|
84
92
|
| 3 | Timed out |
|
|
85
93
|
|
|
86
|
-
Existing attention returns immediately, even with a cursor, so looping `wait` doesn't consume events. Use `watch --since` for that.
|
|
94
|
+
Existing attention returns immediately, even with a cursor, so looping `wait` doesn't consume events. Use `watch --since` for that. Hosted `wait --since` uses the same inclusive 1,000-position resume window and too-old recovery described above: re-arm without `--since`, reconcile repository and build status, and account for the unavailable historical gap.
|
|
87
95
|
|
|
88
96
|
## Answer and pause
|
|
89
97
|
|
package/docs/operator-api.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
A conforming hosted instance implements this normative polling-oriented operator
|
|
4
4
|
contract at
|
|
5
|
-
`/operator/v1/repos/{repo}`. It is versioned with remote store protocol **
|
|
5
|
+
`/operator/v1/repos/{repo}`. It is versioned with remote store protocol **7**.
|
|
6
6
|
Every request must send `X-Autobuild-Version`,
|
|
7
|
-
`X-Autobuild-Protocol-Version:
|
|
7
|
+
`X-Autobuild-Protocol-Version: 7`, and `Authorization: Bearer …`. Identity is
|
|
8
8
|
checked before authentication or resource lookup.
|
|
9
9
|
|
|
10
10
|
Project credentials are opaque `abp_1_<id>_<secret>` bearer values bound to one
|
|
@@ -166,7 +166,8 @@ Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
|
166
166
|
pending controls, merge intent and ended PRs refuse the no-escalation path.
|
|
167
167
|
A concurrent state change refuses publication with a retry explanation;
|
|
168
168
|
uncited artifacts are inert. Leaves still require an open escalation and
|
|
169
|
-
restart from `plan
|
|
169
|
+
restart from `plan` after any unfinished reconcile resumes under the revised
|
|
170
|
+
spec and its publication is confirmed.
|
|
170
171
|
|
|
171
172
|
## The registry's protocol face: `POST …/tools/{tool}`
|
|
172
173
|
|
|
@@ -241,18 +242,23 @@ Dispatcher liveness is also visible through `ab repository status --json`:
|
|
|
241
242
|
of `latestRun`. Each run includes its recorded `runtime` (version, commit, and
|
|
242
243
|
source kind/location), or null for unrecorded historical starts. Heartbeat age measures attributable renewals; tick age measures
|
|
243
244
|
durable progress. Missing historical evidence is null. The liveness query uses
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
persisted repository and exact per-run reduced values, including when newer
|
|
246
|
+
invocations hide an older holder or stop. Missing facts never trigger a full-log
|
|
247
|
+
fallback.
|
|
247
248
|
|
|
248
249
|
Repository-following `ab watch` additionally emits a read-only `dispatcher.lost`
|
|
249
250
|
observation when an observed lease expires without a matching stop or validated
|
|
250
|
-
successor takeover.
|
|
251
|
+
successor takeover. Any recorded stop, normal or abnormal, suppresses loss;
|
|
252
|
+
abnormal stops retain their own default attention event. A completed ownership transfer suppresses predecessor loss
|
|
251
253
|
even while its sessions drain; a handoff without takeover still reports loss on
|
|
252
254
|
expiry. Successor loss and upgrade-failure/rollback attention remain independent. JSON carries
|
|
253
255
|
`observation` instead of `event`, with run, observedAt, leaseExpiresAt and available
|
|
254
256
|
identity, plus the usual repo/build/state/cursor fields. It invents no durable
|
|
255
257
|
sequence or actor. Retain the cursor to avoid repeat reports across invocations.
|
|
258
|
+
A watch retains sampled owners after authoritative lease release. Once-run teardown
|
|
259
|
+
stops heartbeat and releases only its own lease; release is best effort because
|
|
260
|
+
expiry fences ambiguous ownership. A retained sample or failed release cannot
|
|
261
|
+
override a persisted stop.
|
|
256
262
|
No lease alone is not evidence of death. SIGINT, SIGHUP and SIGTERM drain dispatch,
|
|
257
263
|
record the first signal in the stop fact, and release its lease before exit.
|
|
258
264
|
|
|
@@ -265,7 +271,7 @@ The default watch reports actionable conditions only:
|
|
|
265
271
|
- `build.janitor-failing`: a build has reached the configured consecutive-failure threshold; a successful janitor attempt clears it.
|
|
266
272
|
- `dispatcher.forge-persistent`: forge degradation remains after a completed post-reset retry opportunity; successful recovery clears it.
|
|
267
273
|
|
|
268
|
-
- Build `escalation.raised`, `integration.landed`, `node.item-conflicted`, or
|
|
274
|
+
- Build `escalation.raised`, `integration.landed`, `node.item-conflicted`, `target.rewritten`, or
|
|
269
275
|
conflicted `restack.replayed` events. `build.consent-ready` is the single
|
|
270
276
|
signal for a ready consent or held merge, including first repository-wide
|
|
271
277
|
discovery. Its target has the queue entry shape `{kind, branch, ticket?, build?}`.
|
|
@@ -284,7 +290,10 @@ The default watch reports actionable conditions only:
|
|
|
284
290
|
for five minutes in one run. A successful tick, new run, or matching stop
|
|
285
291
|
ends the episode. Source grace and cooldown-driven failures do not start
|
|
286
292
|
this clock; after grace, the first qualifying failure starts a new five-minute
|
|
287
|
-
interval. Each persistence episode is reported once.
|
|
293
|
+
interval. Each persistence episode is reported once. Unavailable failure writes delay durable visibility:
|
|
294
|
+
watch keeps running, warns locally and reports one bounded unreported window
|
|
295
|
+
on recovery. These local warnings do not start the durable attention clock
|
|
296
|
+
retroactively. Explicit stops still stop dispatch.
|
|
288
297
|
|
|
289
298
|
Repository conditions are included with no slugs or with `--repository`.
|
|
290
299
|
Routine outcomes and self-healing failures are silent. Repeatable
|
|
@@ -302,7 +311,7 @@ have `repo` and null build/state. Source observations also report
|
|
|
302
311
|
|
|
303
312
|
Every record carries a cursor, including timer-only records. Resuming suppresses
|
|
304
313
|
delivered merge decisions and persistence episodes even when stream positions
|
|
305
|
-
did not advance. Old v1 cursors remain valid: historical eligible merge
|
|
314
|
+
did not advance. Old v1 cursors remain valid inside the hosted 1,000-position resume window: historical eligible merge
|
|
306
315
|
decisions are treated as consumed; active overdue repository episodes may
|
|
307
316
|
report because old watches had no persistence notification. Fresh attachment
|
|
308
317
|
silently baselines historical direct events and merge decisions, but retains
|
|
@@ -319,11 +328,32 @@ self-healing failures. A merge match uses the watch observation with
|
|
|
319
328
|
`condition: "attention"`. Explicit `--event` globs remain event-only.
|
|
320
329
|
Watch and wait preserve each other's cursor notification metadata.
|
|
321
330
|
|
|
331
|
+
Normal re-arms retain `--since`. Hosted watch/wait resume is gap-proportional
|
|
332
|
+
inside a 1,000-sequence-position window, inclusive at `head - 1000`. Expired
|
|
333
|
+
cursors fail with typed `cursor-too-old` and the oldest servable cursor; re-arm
|
|
334
|
+
without `--since` and reconcile repository/build status, acknowledging the lost
|
|
335
|
+
historical gap. An ordinary reducer upgrade preserves valid cursors. A retired
|
|
336
|
+
seed generation instead requires an upgrade/restart before fresh attachment;
|
|
337
|
+
checkpoint integrity errors are terminal and never trigger replay from zero.
|
|
338
|
+
|
|
339
|
+
The MCP `builds.events` tool returns `{events, cursor, hasMore}`, at most 256
|
|
340
|
+
events per call. Follow `cursor` while `hasMore` is true to traverse a build's
|
|
341
|
+
complete history without omission. Waiting remains bounded and applies only
|
|
342
|
+
when no events are available. Repository event reads have a 1,000-position
|
|
343
|
+
window; build history itself remains available through explicit pages.
|
|
344
|
+
|
|
345
|
+
|
|
322
346
|
Hosted ticket tools resolve independent project ticket policy before legacy uploaded
|
|
323
347
|
configuration. Queue, detail, state discovery and mutations work before any build
|
|
324
348
|
or dispatcher run; detail reports a null matching build. Ticket policy publication
|
|
325
349
|
never creates synthetic build or repository history.
|
|
326
350
|
|
|
351
|
+
Ticket detail and mutation results prefer exact normalized ticket ids when associating
|
|
352
|
+
a build. If no exact match exists, only legacy hosted `ticket-<uuid>` storage
|
|
353
|
+
references require optional alias resolution, once per distinct reference. Readable
|
|
354
|
+
historical ids require no ticket lookup. Failed optional alias resolution does not
|
|
355
|
+
fail ticket detail or a completed mutation; matches already resolved remain eligible.
|
|
356
|
+
|
|
327
357
|
Ticket results include kind (default work) and optional same-source node target.
|
|
328
358
|
Metadata-only patches are accepted. Target validation and demotion guards apply
|
|
329
359
|
to CLI, HTTP and MCP alike; unsupported sources refuse even explicit defaults
|
|
@@ -442,6 +472,18 @@ projects return the same unknown-repository result as absent projects. Machine c
|
|
|
442
472
|
|
|
443
473
|
### Permanent project deletion
|
|
444
474
|
|
|
475
|
+
The browser requires the exact full repository identity in a transient dialog field;
|
|
476
|
+
confirm stays disabled for empty or mismatched input and focus starts in the field.
|
|
477
|
+
The handler independently binds that identity to the selected repository and its
|
|
478
|
+
fresh validated preview. Only JSON `{deleted:true}` acknowledges completion.
|
|
479
|
+
After any failed or unrecognized deletion response, the browser shows
|
|
480
|
+
“Deletion outcome unknown; reload to check” and holds the row in its original slot
|
|
481
|
+
without actions, even after dismissal. Only a complete successful discovery begun
|
|
482
|
+
by Reload after the attempt settles it: absence removes the row, presence restores
|
|
483
|
+
its authorized actions, and pending cleanup restores Finish deletion with a fresh
|
|
484
|
+
preview and exact typing. An earlier or unsuccessful read cannot settle the outcome.
|
|
485
|
+
The server's `{repo}` body and generation-bound If-Match contract are unchanged.
|
|
486
|
+
|
|
445
487
|
Super users and the owner of a project's organization can delete it from the
|
|
446
488
|
Projects page. Owners see only projects in organizations they own; Move and
|
|
447
489
|
Assign remain super-user operations. The shared confirmation dialog names the project,
|
|
@@ -502,3 +544,32 @@ the same store identity, token and prefixed pathname as uploads. Missing objects
|
|
|
502
544
|
are successful cleanup; provider errors never count as completed deletion.
|
|
503
545
|
|
|
504
546
|
Paged ticket listings use the source's optional native `listPage(criteria, page)` capability when present, otherwise read the full listing and reverse/slice it. Native errors propagate. PostgreSQL counts matches without bodies and reads only the requested window. Zero limits and offsets past the end still report the full matching total. Unpaged listings remain exhaustive; the wire payload is the same for both paths.
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
### Forge cooldown admission and explicit recovery
|
|
550
|
+
|
|
551
|
+
Hosted repository event appends and atomic artifact deposits validate
|
|
552
|
+
`dispatcher.forge-degraded` before any durable mutation. The payload must match
|
|
553
|
+
its event schema, with a finite ISO `resetAt` at most 24 hours after server time
|
|
554
|
+
(inclusive). Already-expired deadlines are accepted. Invalid or out-of-horizon
|
|
555
|
+
writes return `400 validation` (the remote adapter exposes `EventValidationError`);
|
|
556
|
+
the server never clamps or invents a provider reset. Historical decoding has no clock-relative restriction.
|
|
557
|
+
|
|
558
|
+
Build-runner and build-phase grants may POST only the kernel-authored
|
|
559
|
+
`dispatcher.forge-degraded` repository fact through the events route. The
|
|
560
|
+
preceding `requireProject` check binds this exception to the exact repository
|
|
561
|
+
in the delegated claim. A hosted project identifies one repository. Delegates
|
|
562
|
+
cannot write recovery, deposits or other repository facts, regardless of the
|
|
563
|
+
actor claimed in an envelope.
|
|
564
|
+
|
|
565
|
+
An authorized operator can explicitly clear erroneous state through
|
|
566
|
+
`repository.forge_clear {repo, forge, reason}` or
|
|
567
|
+
`ab repository forge-clear --forge <name> --reason <text> [--json] [--store <ref>]`.
|
|
568
|
+
The reason is required and nonblank. The result contains the durable recovery
|
|
569
|
+
`event`, attributed to the authenticated human with normal `via` attribution.
|
|
570
|
+
Build and harvest delegates cannot invoke this operator mutation. CLI use
|
|
571
|
+
requires an operator outside build/harvest sessions. This is an override, not
|
|
572
|
+
proof of provider success. A clear appends once without reading history, even
|
|
573
|
+
when already healthy; later degradation wins by ordinary journal order.
|
|
574
|
+
Existing dispatcher/kernel automatic recovery and old payloads remain valid;
|
|
575
|
+
the recovered payload additionally accepts an optional nonblank `reason`.
|
|
@@ -75,3 +75,32 @@ There's no operator-surface plugin map. Build a client of the versioned, authent
|
|
|
75
75
|
- A new surface adds no pipeline phase and no embedded operator agent.
|
|
76
76
|
|
|
77
77
|
[Writing a plugin](plugin-authoring.md) covers infrastructure adapters.
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Forge cooldown admission and explicit recovery
|
|
81
|
+
|
|
82
|
+
Hosted repository event appends and atomic artifact deposits validate
|
|
83
|
+
`dispatcher.forge-degraded` before any durable mutation. The payload must match
|
|
84
|
+
its event schema, with a finite ISO `resetAt` at most 24 hours after server time
|
|
85
|
+
(inclusive). Already-expired deadlines are accepted. Invalid or out-of-horizon
|
|
86
|
+
writes return `400 validation` (the remote adapter exposes `EventValidationError`);
|
|
87
|
+
the server never clamps or invents a provider reset. Historical decoding has no clock-relative restriction.
|
|
88
|
+
|
|
89
|
+
Build-runner and build-phase grants may POST only the kernel-authored
|
|
90
|
+
`dispatcher.forge-degraded` repository fact through the events route. The
|
|
91
|
+
preceding `requireProject` check binds this exception to the exact repository
|
|
92
|
+
in the delegated claim. A hosted project identifies one repository. Delegates
|
|
93
|
+
cannot write recovery, deposits or other repository facts, regardless of the
|
|
94
|
+
actor claimed in an envelope.
|
|
95
|
+
|
|
96
|
+
An authorized operator can explicitly clear erroneous state through
|
|
97
|
+
`repository.forge_clear {repo, forge, reason}` or
|
|
98
|
+
`ab repository forge-clear --forge <name> --reason <text> [--json] [--store <ref>]`.
|
|
99
|
+
The reason is required and nonblank. The result contains the durable recovery
|
|
100
|
+
`event`, attributed to the authenticated human with normal `via` attribution.
|
|
101
|
+
Build and harvest delegates cannot invoke this operator mutation. CLI use
|
|
102
|
+
requires an operator outside build/harvest sessions. This is an override, not
|
|
103
|
+
proof of provider success. A clear appends once without reading history, even
|
|
104
|
+
when already healthy; later degradation wins by ordinary journal order.
|
|
105
|
+
Existing dispatcher/kernel automatic recovery and old payloads remain valid;
|
|
106
|
+
the recovered payload additionally accepts an optional nonblank `reason`.
|
package/docs/plugin-authoring.md
CHANGED
|
@@ -27,7 +27,7 @@ Import public types only from `@defrex/autobuild/plugin-sdk`; internal module pa
|
|
|
27
27
|
|
|
28
28
|
All four manifest maps have production selectors. Omitted forge and workspace selectors default to builtin `github` and `git-worktree`; roles keep normal runtime inheritance.
|
|
29
29
|
|
|
30
|
-
`BuildStore` and `BlobStore` contract types are exported for remote-server authors, but BuildStore is **not** an in-process manifest map: implement the language-neutral remote store protocol and run its conformance path. `TelemetrySource` is a frozen port type with no plugin registration surface in this release.
|
|
30
|
+
`BuildStore` and `BlobStore` contract types are exported for remote-server authors, but BuildStore is **not** an in-process manifest map: implement the language-neutral remote store protocol and run its conformance path. The optional `BuildStore.getLatestArtifactMeta` capability must return only the latest metadata in constant-size reads without loading blob content or listing revisions; omit it when unsupported. `TelemetrySource` is a frozen port type with no plugin registration surface in this release.
|
|
31
31
|
|
|
32
32
|
### `ticket-source`
|
|
33
33
|
|
|
@@ -61,7 +61,12 @@ Declare served model prefixes and a default. Optional tool-free `oneShot` sits b
|
|
|
61
61
|
Reconcile requires the optional grouped `Forge.rewrite` capability:
|
|
62
62
|
|
|
63
63
|
1. Snapshot the actual build branch into a build-private ref.
|
|
64
|
-
2. Publish immutable exact-SHA refs under `refs/autobuild/archive/<slug>/<sha>`.
|
|
64
|
+
2. Publish immutable exact-SHA refs under `refs/autobuild/archive/<slug>/<sha>`. Remote
|
|
65
|
+
archives also publish commits present only on the remote: GitHub uses create-only
|
|
66
|
+
Git-reference REST creation when the workspace lacks the commit, retaining guarded
|
|
67
|
+
Git pushes for local objects. Exact remote readback confirms publication, then a
|
|
68
|
+
depth-one fetch by the archive ref (without tags or configured refmap expansion)
|
|
69
|
+
restores missing commits and verifies them locally before returning.
|
|
65
70
|
3. Replace the explicit branch, leased on an explicit expected remote head.
|
|
66
71
|
|
|
67
72
|
- Return `lease-mismatch` separately from transport, auth and policy failures.
|
|
@@ -71,6 +76,45 @@ Reconcile requires the optional grouped `Forge.rewrite` capability:
|
|
|
71
76
|
- Older forge plugins still load; reconcile refuses them actionably.
|
|
72
77
|
- Remote workspace providers also need trusted `WorkspacePublication.rewrite` after guest teardown; ordinary `publish` can't publish a restack.
|
|
73
78
|
|
|
79
|
+
### Destination observation and ancestry
|
|
80
|
+
|
|
81
|
+
`remoteBranchSha(branch)` must read the authoritative forge branch. Its absence
|
|
82
|
+
or failure defers observation; there is no host-checkout fallback. The optional
|
|
83
|
+
`isCommitAncestor(ancestor, descendant)` compares immutable full OIDs: return
|
|
84
|
+
false only for a proven non-descendant, and throw for missing objects, transport,
|
|
85
|
+
authentication, malformed responses or rate limits. Missing capability withholds
|
|
86
|
+
new replay requiring proof. GitHub uses exact-SHA comparison; local-git requires
|
|
87
|
+
an explicit served `repoRoot`. Unknown ancestry never authorizes replay.
|
|
88
|
+
|
|
89
|
+
Stores may expose `getNodeRewrite(node, previousHead, beforePrevious)` as a bounded point
|
|
90
|
+
lookup of a durable `node.rewritten` receipt. Built-in adapters index these
|
|
91
|
+
validated publication facts atomically with append, including transactional
|
|
92
|
+
deposits. The dispatcher uses at most 64 hops per baseline to prove kernel node
|
|
93
|
+
restacks and records `target.moved.lineage` for scoped runners. There is no
|
|
94
|
+
history-download fallback when the capability or a receipt is absent.
|
|
95
|
+
With `beforePrevious`, return the publication immediately preceding the latest
|
|
96
|
+
receipt keyed by that previous head, using indexed cursor and result lookups.
|
|
97
|
+
This lets lineage proofs cross forward sibling landings between restacks; every
|
|
98
|
+
intervening forward gap still requires immutable ancestry proof.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Workspace preservation
|
|
102
|
+
|
|
103
|
+
Remote providers expose trusted `WorkspacePublication.preserve` and
|
|
104
|
+
`recoverCandidate`; local providers may supply `WorkspaceProvider.preservation`
|
|
105
|
+
without changing the remote-publication discriminator. Missing capabilities fail
|
|
106
|
+
safely at destructive boundaries. `WorkspaceRecovery.fence(handle)` reports
|
|
107
|
+
confirmed, absent, or unknown without deleting an environment or its snapshots.
|
|
108
|
+
Only dispatcher-authorized reap follows the durable fence and preservation/loss
|
|
109
|
+
receipt. `provision` accepts exact `restoration` heads; branch ancestry must be
|
|
110
|
+
verified, and detached producer objects must never overwrite the named branch.
|
|
111
|
+
Provision/start failures signal `WorkspaceCleanupRequired` rather than deleting
|
|
112
|
+
or implicitly recreating an existing checkout. A confirmed `snapshot_not_found`
|
|
113
|
+
lookup establishes filesystem absence, while retaining the stale name for
|
|
114
|
+
dispatcher-authorized deletion. Other provider failures remain unknown and must
|
|
115
|
+
never be converted into loss evidence. Credentials stay in trusted transport policy,
|
|
116
|
+
never guest environment or agent commands.
|
|
117
|
+
|
|
74
118
|
### Publication readback
|
|
75
119
|
|
|
76
120
|
Publication succeeds only when an authoritative branch-head readback equals the frozen intended SHA, including recovery after a failed push. Unconfirmed candidate ancestry never proves publication.
|
|
@@ -445,3 +489,8 @@ listings, CLI ticket lists and dispatcher ready scans remain exhaustive through
|
|
|
445
489
|
`listReady`/`listAll`. The hosted PostgreSQL source counts matches without
|
|
446
490
|
bodies and reads only the SQL-bounded window. File, Linear and the remote
|
|
447
491
|
`HostedTicketSource` retain fallback; the POST list-ready protocol stays exhaustive.
|
|
492
|
+
|
|
493
|
+
Hosted cooldown recording rejects observed reset deadlines beyond the 24-hour
|
|
494
|
+
admission horizon explicitly; adapters must not shorten or invent a provider
|
|
495
|
+
reset to evade this validation. Operator forge-clear is an audited override,
|
|
496
|
+
not a successful provider observation.
|