@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/README.md
CHANGED
|
@@ -26,7 +26,7 @@ From the repository you want built, install Autobuild as a development dependenc
|
|
|
26
26
|
<!-- release-install:start -->
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
bun add -d --exact @defrex/autobuild@1.
|
|
29
|
+
bun add -d --exact @defrex/autobuild@1.4.0
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- release-install:end -->
|
package/SPEC.md
CHANGED
|
@@ -219,6 +219,42 @@ surface remains the remote HTTP protocol rather than in-process registration.
|
|
|
219
219
|
|
|
220
220
|
Small, independently runnable, crash-safe:
|
|
221
221
|
|
|
222
|
+
Explicit human `ab dispatch --viewer` is a Store-only dashboard lifecycle,
|
|
223
|
+
available from a local checkout in TTY and plain/non-TTY modes. It bypasses the
|
|
224
|
+
resident launcher, execution configuration/plugins, account admission and kernel
|
|
225
|
+
wiring. It never takes or renews a repository lease, starts a child, writes
|
|
226
|
+
dispatch lifecycle facts, or runs intake scans, janitor, sweep, harvest or builds.
|
|
227
|
+
Canonical repository facts supply the observed dispatcher's status and effective
|
|
228
|
+
configuration, independent of the viewer's operator correlation identity. With no
|
|
229
|
+
configuration the display waits, polling bounded canonical state. Fresh viewers
|
|
230
|
+
reuse saved server reductions; missing presentation caches never trigger event
|
|
231
|
+
history reconstruction. Idle polls read zero event rows.
|
|
232
|
+
|
|
233
|
+
Every frame reserves a row for `viewer`, optionally `viewer · dispatched by
|
|
234
|
+
<label>` from explicit `--dispatched-by` input. Plain output states the mode at
|
|
235
|
+
startup. `--once` reads one snapshot, `--interval` sets polling cadence, and Ctrl-C
|
|
236
|
+
closes only presentation. All existing Store-level controls remain available:
|
|
237
|
+
merge/hold, build and global pause/resume, blocked feedback/retry, intake/harvest
|
|
238
|
+
gates, harvest resume/acknowledgement, discard and confirmed abort, plus navigation
|
|
239
|
+
and session inspection. No current control requires a local dispatcher. Viewer
|
|
240
|
+
rejects startup intake flags and explicit `--repository`.
|
|
241
|
+
|
|
242
|
+
A plain `ab dispatch` reads dispatch placement once before starting local execution.
|
|
243
|
+
For a hosted project it opens the Store-only viewer automatically, displaying
|
|
244
|
+
`viewer · dispatched by <host>` from the placement origin (including a nondefault
|
|
245
|
+
port). `--once`, `--plain`, and `--interval` retain their viewer meanings.
|
|
246
|
+
`--takeover` explicitly dispatches locally, with a warning that it can displace
|
|
247
|
+
the hosted dispatcher; it cannot be combined with `--viewer`. Startup intake
|
|
248
|
+
flags require `--takeover` when placement selects viewer.
|
|
249
|
+
|
|
250
|
+
An unreadable placement fails closed with a typed error naming the cause:
|
|
251
|
+
use `--viewer` to watch or `--takeover` to dispatch locally. Both explicit modes
|
|
252
|
+
skip placement discovery. Older services without the capability and projects
|
|
253
|
+
with unknown or nonhosted placement retain local dispatch behavior. Local stores
|
|
254
|
+
need no placement request. Origin mode (`--repository` or `AB_REPOSITORY`) and
|
|
255
|
+
hosted cron dispatch bypass this check. Placement is a startup snapshot, not a
|
|
256
|
+
liveness probe or a polling input. Operator agents' prohibition on running dispatch includes viewer.
|
|
257
|
+
|
|
222
258
|
Resident checkout-backed `ab dispatch` starts a launcher and one dispatcher
|
|
223
259
|
**generation**. The launcher eagerly loads its own filesystem/process code,
|
|
224
260
|
opens no Store, holds no repository/execution lease and makes no kernel
|
|
@@ -458,6 +494,17 @@ one scan interval plus one tick when capacity permits. Observation while intake
|
|
|
458
494
|
is off shares the cadence; an observation measurement cannot suppress a fresh
|
|
459
495
|
admission scan when intake is enabled.
|
|
460
496
|
|
|
497
|
+
Only changed scan outcomes append `dispatcher.ticket-scan-completed`; comparison
|
|
498
|
+
includes counts, ordered diagnostics, readiness and criteria fingerprints, and
|
|
499
|
+
mode. Its `startedAt` is the measurement time of the last recorded outcome,
|
|
500
|
+
not a last-scanned heartbeat. A single replaceable, repository-keyed cadence
|
|
501
|
+
cache survives fresh dispatcher processes and acknowledges that canonical fact
|
|
502
|
+
by sequence. It contains scheduling metadata only, never counts or lifecycle
|
|
503
|
+
state, and is distinct from reducer checkpoints. Missing or stale metadata
|
|
504
|
+
falls back to the recorded fact and can cause one safe extra scan without
|
|
505
|
+
reconstructing history. Successful unchanged scans advance this cache only.
|
|
506
|
+
|
|
507
|
+
|
|
461
508
|
### 3.4 The event log spine
|
|
462
509
|
|
|
463
510
|
Build processes append typed events to per-build logs; repository-scoped outer
|
|
@@ -560,6 +607,10 @@ repeated names are errors. Plain string lists retain serial event sequences.
|
|
|
560
607
|
Every member resolves post-reconcile policy, approved selection/`always`, then
|
|
561
608
|
path applicability at stage entry. Only pass or skip satisfies a member. The
|
|
562
609
|
next stage, or finalize after the last, waits for every member to pass or skip.
|
|
610
|
+
On a normal stage transition the runner drains agent turns before stage-local
|
|
611
|
+
shutdown: a terminal may precede trailing artifacts, transcript deposit and
|
|
612
|
+
`session.ended`. Parent shutdown and session budgets still interrupt this drain;
|
|
613
|
+
fail-fast retains immediate whole-execution cancellation.
|
|
563
614
|
|
|
564
615
|
By default a failure lets all siblings finish; the settled stage routes once
|
|
565
616
|
with every failed report, and no later stage runs. `failFast = true` on either
|
|
@@ -644,8 +695,9 @@ Two things wear the name:
|
|
|
644
695
|
|
|
645
696
|
A reference document defining "buildable": what/why not how, acceptance
|
|
646
697
|
criteria, explicit out-of-scope, evidence links — plus sizing guidance:
|
|
647
|
-
fewer, larger tickets,
|
|
648
|
-
|
|
698
|
+
fewer, larger tickets, each small enough for one implement session to finish,
|
|
699
|
+
split only at clean seams into a wide blocker graph so independent tickets
|
|
700
|
+
build in parallel. It is a shared resource
|
|
649
701
|
cited by **every ticket-producing surface** — `/spec`, `harvest`, every
|
|
650
702
|
`ingest:*`, and `dispatch`. An ingester's proposal is a spec written to the
|
|
651
703
|
same standard with weaker evidence.
|
|
@@ -963,13 +1015,13 @@ conformance suite):
|
|
|
963
1015
|
client, is the conformance bar. Autobuild does not load in-process BuildStore
|
|
964
1016
|
plugins. Git worktrees and default file tickets necessarily remain local.
|
|
965
1017
|
|
|
966
|
-
A service
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
protocol identities
|
|
1018
|
+
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.
|
|
1019
|
+
|
|
1020
|
+
Stable patches never reset a line’s first-publication date. Only actually published
|
|
1021
|
+
lines at or below the service line count; prereleases do not start retirement clocks.
|
|
1022
|
+
Publication facts survive removal of retired identities, contracts, and handlers.
|
|
1023
|
+
Patch releases must retain their line’s protocol identity. Unknown historical
|
|
1024
|
+
protocol identities are refused independently of the numeric window.
|
|
973
1025
|
Stable and prerelease service and client identities share their numeric major/minor
|
|
974
1026
|
line. Malformed or missing identities, build metadata (`+…`), prefixes and
|
|
975
1027
|
whitespace are refused with HTTP 409.
|
|
@@ -980,8 +1032,9 @@ and supported range.
|
|
|
980
1032
|
Unauthenticated `GET /health` publishes `ok`, `autobuildVersion`,
|
|
981
1033
|
`protocolVersion`, and `supportedClientRange: { minVersion, maxVersionExclusive }`.
|
|
982
1034
|
Range endpoints remain stable versions. The range is inclusive at the minimum
|
|
983
|
-
and exclusive at the maximum; a
|
|
984
|
-
service publishes `>=
|
|
1035
|
+
and exclusive at the maximum; a 1.3.x
|
|
1036
|
+
service publishes `>=1.2.0 <1.4.0` until later publication facts permit retirement.
|
|
1037
|
+
The service reads the clock for each decision, so retirement needs no redeploy. Health needs no credentials, version
|
|
985
1038
|
headers, or available backend.
|
|
986
1039
|
|
|
987
1040
|
`subscribe` is specced in the interface; the current implementation is polling
|
|
@@ -1060,6 +1113,46 @@ processes. Absence does not consume the marker. Restarts or later variable
|
|
|
1060
1113
|
edits cannot resurrect removals. Deployments migrate the pinned schema before
|
|
1061
1114
|
starting services; runtime initialization never runs DDL.
|
|
1062
1115
|
|
|
1116
|
+
### Hosted dispatch placement
|
|
1117
|
+
|
|
1118
|
+
The hosted service publishes a durable advisory repository fact,
|
|
1119
|
+
`dispatcher.placement-set`, and serves its canonical `dispatchPlacement` reduction.
|
|
1120
|
+
The fact says whether this service dispatches a registered project; a hosted value
|
|
1121
|
+
includes its public `AB_DISPATCHER_ORIGIN`, never credentials. It is configured
|
|
1122
|
+
responsibility, not liveness. Unrecorded placement is unknown. Bounded repository
|
|
1123
|
+
journal reads retain only the latest placement publication across run anchors.
|
|
1124
|
+
|
|
1125
|
+
Hosted responsibility requires the cron endpoint to be enabled: unset or blank
|
|
1126
|
+
`CRON_SECRET` publishes `{ hosted: false }` for every admitted project, without
|
|
1127
|
+
requiring `AB_DISPATCHER_ORIGIN`. Cron authorization and read-time publication
|
|
1128
|
+
share this enablement check. When enabled, selection and origin configuration
|
|
1129
|
+
are validated before publication.
|
|
1130
|
+
|
|
1131
|
+
Cron and read-time publication share the `AB_DISPATCHER_REPOSITORIES` parser:
|
|
1132
|
+
unset selects every registered project, and an explicit normalized, deduplicated
|
|
1133
|
+
CSV selects only registered members. No web-selection fallback applies. Cron
|
|
1134
|
+
synchronizes included and excluded projects using its existing registry listing;
|
|
1135
|
+
a project read synchronizes only that admitted key, including before first cron.
|
|
1136
|
+
Configuration changes are published on next synchronization. Invalid configuration
|
|
1137
|
+
fails without overwriting placement. Account secrets are unnecessary for publication.
|
|
1138
|
+
|
|
1139
|
+
Compare, append-if-changed and canonical reduction persistence are one transaction
|
|
1140
|
+
under a per-project serialization lock, with registration-generation admission.
|
|
1141
|
+
Initialization may reduce that scope/identity once and saves it durably; idle reads
|
|
1142
|
+
fetch zero event rows and a constant number of keyed records, independent of log
|
|
1143
|
+
length and project count. Changed reads consume only the incremental tail.
|
|
1144
|
+
|
|
1145
|
+
Authorized project members and dispatcher credentials read
|
|
1146
|
+
`GET /repos/{encodedRepo}/placement`; delegated build/harvest grants are refused.
|
|
1147
|
+
The optional health capability `dispatch-placement-v1` is advertised only with a
|
|
1148
|
+
provider. The core client negotiates once per instance and returns typed unknown
|
|
1149
|
+
(`unsupported-capability`) for older services, without probing the route or
|
|
1150
|
+
reconstructing state from events. Other failures remain failures. External event
|
|
1151
|
+
publication cannot forge service placement. Existing protocol identity and
|
|
1152
|
+
supported released reducer shapes remain unchanged. Checkout-backed dispatch uses this fact to select viewer mode before launching
|
|
1153
|
+
any local dispatcher; explicit takeover authorizes local execution. See [the remote protocol](docs/remote-store-protocol.md#hosted-dispatch-placement)
|
|
1154
|
+
for response shapes and authority semantics.
|
|
1155
|
+
|
|
1063
1156
|
### 7.3 Persistence granularity
|
|
1064
1157
|
|
|
1065
1158
|
Required phase outputs persist at **phase/round boundaries**; a killed phase
|
|
@@ -1122,7 +1215,9 @@ The base-selection invariants make this safe with Git:
|
|
|
1122
1215
|
samples are deduplicated; destination changes and rewrites invalidate samples.
|
|
1123
1216
|
Sampling never provisions a workspace, renders Git reads, or gates restacking.
|
|
1124
1217
|
- **Observation never mutates a running workspace.** `target.moved` records an
|
|
1125
|
-
|
|
1218
|
+
accepted remote head, even during a session. Non-descendant observations without
|
|
1219
|
+
indexed kernel publication lineage record `target.rewritten` and attention
|
|
1220
|
+
without changing the accepted target. Transactions freeze their target;
|
|
1126
1221
|
later observations coalesce into one follow-on transaction for the newest
|
|
1127
1222
|
snapshot at the next eligible point. Session and execution settlement fence
|
|
1128
1223
|
rewrites, and trusted publication waits for remote guest teardown.
|
|
@@ -1262,6 +1357,41 @@ decision reads stream content; outcomes travel only the typed CLI. Writers
|
|
|
1262
1357
|
(agent runners emitting parts) and readers (operator UIs) are separate
|
|
1263
1358
|
tickets; this section defines only the primitive.
|
|
1264
1359
|
|
|
1360
|
+
### Hosted event-read limits
|
|
1361
|
+
|
|
1362
|
+
Hosted repository journals serve only cursors at or above
|
|
1363
|
+
`max(0, head - 1000)`, inclusive; an expired cursor returns typed
|
|
1364
|
+
`cursor-too-old` with the oldest servable cursor before any event rows are read.
|
|
1365
|
+
Build history uses pages of at most 256 events with continuation cursor and
|
|
1366
|
+
`hasMore`. The remote complete-suffix array method throws
|
|
1367
|
+
`IncompleteEventReadError` if another page exists. Local SQLite and memory
|
|
1368
|
+
full-history methods remain available.
|
|
1369
|
+
|
|
1370
|
+
Protocol 7's page envelope is prepared for the next minor line, 1.4, without
|
|
1371
|
+
changing package versions. Supported published 1.2 and 1.3 clients retain
|
|
1372
|
+
protocol 6: complete build suffixes fitting one page return plain arrays;
|
|
1373
|
+
larger suffixes and expired repository cursors return legacy-decodable
|
|
1374
|
+
`conflict` errors. Bounds apply before protocol projection. Same-line admission
|
|
1375
|
+
accepts runtime and published ledger protocols. Public health advertises a
|
|
1376
|
+
validated same-line request's protocol, otherwise the service line's published
|
|
1377
|
+
protocol (or runtime protocol for an unpublished line), with truthful package
|
|
1378
|
+
version and support range and no store reads.
|
|
1379
|
+
|
|
1380
|
+
Watch/wait resume uses exact server-owned historical seed checkpoints within
|
|
1381
|
+
the same 1,000-position window for build and repository streams, then reads
|
|
1382
|
+
only the gap. Ordinary reducer/catalog upgrades preserve in-window cursors:
|
|
1383
|
+
one serialized canonical rebuild per identity also captures the trailing
|
|
1384
|
+
checkpoints and saves both atomically, with no second event replay. Later
|
|
1385
|
+
requests and fresh processes reuse that durable result. Two identities per
|
|
1386
|
+
scope retain checkpoints; retired identities have permanent indexed tombstones
|
|
1387
|
+
and cannot re-admit themselves. Missing/corrupt checkpoint coverage fails with
|
|
1388
|
+
a typed integrity error. Appends never depend on checkpoint availability.
|
|
1389
|
+
Expired resume cursors terminate watch/wait with fresh-attachment instructions:
|
|
1390
|
+
re-arm without `--since`, reconcile status, and acknowledge the unavailable gap.
|
|
1391
|
+
Explicit harvest history uses reverse indexed filtered pages rather than a
|
|
1392
|
+
journal replay. See `docs/remote-store-protocol.md` for the wire contract,
|
|
1393
|
+
initial migration bootstrap and generation-retirement recovery.
|
|
1394
|
+
|
|
1265
1395
|
## 8. The `ab` CLI
|
|
1266
1396
|
|
|
1267
1397
|
The **only** channel between agents and the store — and the enforcement
|
|
@@ -1531,6 +1661,15 @@ a new classified failure parks again. There are zero automatic paid retries
|
|
|
1531
1661
|
after this deferral. If evidence cannot be written, ordinary recovery applies;
|
|
1532
1662
|
agent output and `no-terminal` alone never classify a read failure.
|
|
1533
1663
|
|
|
1664
|
+
A kernel store write rejected with HTTP 413 raises `StoreWriteTooLargeError`
|
|
1665
|
+
and records `phase.failed {willRetry:false}` on its first attempt, including
|
|
1666
|
+
for automatic restack and session preparation. Its diagnostic names an oversized
|
|
1667
|
+
store write, the HTTP method and route, exact UTF-8 request bytes, and the
|
|
1668
|
+
server message (including any reported ceiling). It parks with
|
|
1669
|
+
`non-retryable-phase-failure`; an operator answer authorizes a fresh attempt,
|
|
1670
|
+
which parks immediately again if still rejected. Store failures never select an
|
|
1671
|
+
alternate provider. Other store statuses retain their existing retry policy.
|
|
1672
|
+
|
|
1534
1673
|
Ordinary silence, provider failures and session timeouts retain the runner's
|
|
1535
1674
|
phase failure limit (`BuildRunnerOpts.maxPhaseAttempts`, default 2). This is
|
|
1536
1675
|
an internal runner option, not an accepted `[policy]` TOML key. Reconcile
|
|
@@ -2871,7 +3010,7 @@ with illustrative members:
|
|
|
2871
3010
|
|
|
2872
3011
|
| Family | Examples |
|
|
2873
3012
|
|---|---|
|
|
2874
|
-
| Build lifecycle | `build.created` (carrying `assets`, the claim-time pin, §6.3), `workspace.provisioned`, `workspace.released`, `execution.started`, `execution.ended`, `infrastructure.failed`, `infrastructure.cleanup-attempted`, `dispatch.comment-posted`, `dispatch.failed`, `runner.attached`, `runner.runtime-recorded`, `runner.setup-failed`, `abort.remote-branch-deleted`, `abort.local-branch-deleted`, `abort.ticket-returned`, `build.completed` |
|
|
3013
|
+
| Build lifecycle | `build.created` (carrying `assets`, the claim-time pin, §6.3), `workspace.provisioned`, `workspace.cleanup-required`, `workspace.fenced`, `workspace.commits-preserved`, `workspace.commits-lost`, `workspace.released`, `execution.started`, `execution.ended`, `infrastructure.failed`, `infrastructure.cleanup-attempted`, `dispatch.comment-posted`, `dispatch.failed`, `runner.attached`, `runner.runtime-recorded`, `runner.setup-failed`, `abort.remote-branch-deleted`, `abort.local-branch-deleted`, `abort.ticket-returned`, `build.completed` |
|
|
2875
3014
|
| Operator commands [D2] | `build.pause-requested` → `build.paused`; `build.discard-requested`; `build.hold-requested`; `build.land-requested` → `landing.command-acknowledged`; `escalation.answered` (optionally carrying a validated `reviewRoundCeiling`, or the `assets` sampled with a revise-from-ticket authorization) |
|
|
2876
3015
|
| Merge policy | `landing.decided` (candidate, matched rule/default, labels, target, mode); `landing.native-enable-started`; `landing.native-applied` |
|
|
2877
3016
|
| Spec | `spec.imported`, `spec.authored`, `spec.revised` (either positive `escalation` sequence or exclusive `operator: {user, via?}` provenance for an idle node; optionally carrying `assets`, a re-pin of the ticket's assets, §6.3) |
|
|
@@ -2881,7 +3020,7 @@ with illustrative members:
|
|
|
2881
3020
|
| Integration attention | Kernel/dispatcher `integration.verification-failed {id, head, parent, steps, guidance}`: one durable failed-cycle notification, recovered from exact verification receipts |
|
|
2882
3021
|
| PR summary | Kernel-authored `pr-summary.requested {occurrence, boundary}`, `pr-summary.attempted {occurrence, boundary, pr}`, `pr-summary.result {attempt, outcome, eligibleAfter?}`, `pr-summary.settled {request, disposition}`; sequence identities correlate durable starts, completed boundaries, attempts, and handoffs (§7.5) |
|
|
2883
3022
|
| PR attachments | `pr-attachment.designated`, `pr-attachment.hosted`, `pr-attachment.reclaimed`, `pr-attachment.reclaim-failed` |
|
|
2884
|
-
| Leaf restacking | `target.moved {branch, sha}`, advisory `target.distance {branch, sha, head, count}`, `restack.prepared`, `restack.replayed`, `restack.publish-intended`, `restack.rewritten`, `restack.contended`, `restack.completed` |
|
|
3023
|
+
| Leaf restacking | `target.moved {branch, sha, lineage?}`, `target.rewritten {branch, previousSha, sha}`, `target.rewrite-cleared {branch, sha, lineage?}`, advisory `target.distance {branch, sha, head, count}`, `restack.prepared`, `restack.replayed`, `restack.publish-intended`, `restack.rewritten`, `restack.contended`, `restack.completed` |
|
|
2885
3024
|
| Post-PR [D1] | `pr.merged`, `pr.conflicted`, `reconcile.progress-checked`, `reconcile.started`, `reconcile.prepared`, `reconcile.replayed`, `reconcile.publish-intended`, `reconcile.rewritten`, `reconcile.contended`, `reconcile.completed` |
|
|
2886
3025
|
| Cross-cutting | `observation.recorded`, `escalation.raised`, `phase.failed`, `session.build-read-failed`, `phase.deferred`, `phase.deferral-escalated` |
|
|
2887
3026
|
| Repository journal | dispatcher setting facts; run lifecycle, effective config, tick/queue diagnostics, reload and runner outcomes; the `harvest.*` workflow, recovery, and ledger facts |
|
|
@@ -2983,10 +3122,18 @@ drops object properties its shape does not know, so additive server changes
|
|
|
2983
3122
|
reach older readers. Invalid envelopes and values the client cannot represent
|
|
2984
3123
|
(a missing field, an unknown variant) fail with a typed incompatibility error
|
|
2985
3124
|
naming the reducer and client/server versions. Clients send
|
|
2986
|
-
`x-autobuild-reducer-value-projection: 1`.
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
3125
|
+
`x-autobuild-reducer-value-projection: 1`. The service retains frozen contracts for
|
|
3126
|
+
every supported published client, including clients with projection capability.
|
|
3127
|
+
It adapts canonical answers to the released finished shape and reducer version.
|
|
3128
|
+
Unknown event variants in optional `lastEvent` are omitted, also in nested build
|
|
3129
|
+
state, while cursor, progress, and compatibility facts remain canonical. The
|
|
3130
|
+
required `seenTypes` set retains the event types known to that released reader.
|
|
3131
|
+
Unrepresentable required values remain typed incompatibilities. A request may
|
|
3132
|
+
identify its generated finished-value catalog in `x-autobuild-catalog-identity`;
|
|
3133
|
+
a recorded published identity selects its frozen contract. An unrecognized catalog
|
|
3134
|
+
identity with projection capability retains the canonical answer, including source
|
|
3135
|
+
catalogs whose package version still names an older release. Release preparation
|
|
3136
|
+
records the header identity sent by each published client. Remote clients never
|
|
2990
3137
|
reconstruct named answers from event logs. Catalog identity travels in response
|
|
2991
3138
|
header `x-autobuild-catalog-identity`; strict JSON bodies remain exactly
|
|
2992
3139
|
`{version, cursor, value}`. Missing/malformed headers do not reject an answer.
|
|
@@ -3217,12 +3364,33 @@ The setup target belongs only to escalation metadata and is not a pipeline `Phas
|
|
|
3217
3364
|
native continuation described in §9. The following remote-sandbox recovery
|
|
3218
3365
|
retains its fresh-session fallback.
|
|
3219
3366
|
|
|
3367
|
+
Before releasing or replacing a build workspace, the dispatcher confirms a
|
|
3368
|
+
non-destructive execution fence for the exact workspace and execution generation.
|
|
3369
|
+
It preserves unpublished branch commits and distinct detached producer candidates
|
|
3370
|
+
under immutable `refs/autobuild/archive/<build>/<sha>` refs, verifies their exact
|
|
3371
|
+
readback, and records `workspace.commits-preserved` before cleanup. Replacement
|
|
3372
|
+
provisioning restores those exact refs before starting an agent. Preservation
|
|
3373
|
+
never advances the public build branch. A confirmed absent environment records
|
|
3374
|
+
`workspace.commits-lost`, naming known candidates and explicitly noting that any
|
|
3375
|
+
additional unpublished SHAs could not be inspected. Unknown fencing, inspection,
|
|
3376
|
+
transport, or receipt-write outcomes leave the workspace and snapshots intact.
|
|
3377
|
+
Fencing is revalidated after restart; a saved receipt alone never authorizes
|
|
3378
|
+
cleanup of a newer execution. Current recovery notes are linked by the session
|
|
3379
|
+
manifest's `workspaceRecovery` field. Recovery notes apply to the next session
|
|
3380
|
+
and repeat hydration within it; empty checkpoints produce no note. Checkpoints survive
|
|
3381
|
+
repeated replacement until a published reconcile or restack rewrite retires them,
|
|
3382
|
+
so an old preserved branch cannot overwrite that rewrite. Before the first
|
|
3383
|
+
branch publication, preservation compares against the recorded workspace base.
|
|
3384
|
+
A confirmed `snapshot_not_found` response means the sandbox filesystem is gone;
|
|
3385
|
+
cleanup records loss and deletes its stale name before replacement.
|
|
3386
|
+
|
|
3220
3387
|
**Remote sandbox death:** log ends at `session.started {session: old}` after
|
|
3221
3388
|
`implement.started {round: 2}`; heartbeat goes stale → dispatcher expires the
|
|
3222
|
-
lease, records the old execution identity,
|
|
3223
|
-
sandbox name, and confirms absence
|
|
3389
|
+
lease, records the old execution identity, fences and preserves its committed
|
|
3390
|
+
work before deleting the exact deterministic sandbox name, and confirms absence
|
|
3391
|
+
before recording `workspace.released` → it
|
|
3224
3392
|
provisions the next generation from the published build head (or the original
|
|
3225
|
-
recorded branch-cut SHA
|
|
3393
|
+
recorded branch-cut SHA), then restores preserved branch and producer refs → `workspace.provisioned
|
|
3226
3394
|
{base: {source: existing, sha}}` → the workspace execution capability starts a
|
|
3227
3395
|
fresh process and records the replacement sandbox/session identity. The
|
|
3228
3396
|
supervising kernel first claims the lease for that execution
|
|
@@ -3235,9 +3403,10 @@ started-not-completed, so the process re-runs the phase from its start and opens
|
|
|
3235
3403
|
one fresh session. For a `publication.requested` fact issued before the old
|
|
3236
3404
|
`workspace.released`, the supervisor first compares its exact SHA with the
|
|
3237
3405
|
durable remote branch: a match repairs the missing completion fact before the
|
|
3238
|
-
replacement starts, covering a lost post-push acknowledgement
|
|
3239
|
-
|
|
3240
|
-
|
|
3406
|
+
replacement starts, covering a lost post-push acknowledgement. Otherwise exact
|
|
3407
|
+
private refs and replay objects distinguish preserved continuation from genuine
|
|
3408
|
+
loss. Missing rewrite candidates restart their producing replay under retained
|
|
3409
|
+
intent; an implementation rerun issues a new publication request. A crash while closing several sessions
|
|
3241
3410
|
merges no attachment;
|
|
3242
3411
|
the next recovery closes only those still open, so repeated takeover converges.
|
|
3243
3412
|
Historical orphan-only logs remain valid and require no repair.
|
|
@@ -3297,6 +3466,18 @@ every actionable build on its first tick rather than waiting for the sweep;
|
|
|
3297
3466
|
lease claiming stays the exclusivity gate, so a genuinely live old runner
|
|
3298
3467
|
wins harmlessly.
|
|
3299
3468
|
|
|
3469
|
+
A running, unblocked, unpaused build with an orphaned open session has pending
|
|
3470
|
+
kernel cleanup even when the phase engine waits on its PR. With no live lease
|
|
3471
|
+
or execution, the next admitted sweep attaches a runner through ordinary session
|
|
3472
|
+
reclamation before summary and landing readiness can proceed. A provider-proved
|
|
3473
|
+
end reuses the healthy workspace; a proved loss uses fenced replacement. An
|
|
3474
|
+
unobserved open execution is not proof of death. Intentionally suspended sessions
|
|
3475
|
+
and idle collecting nodes do not trigger this cleanup. A proved-ended execution
|
|
3476
|
+
with actionable work or eligible cleanup bypasses absent-lease first-claim grace;
|
|
3477
|
+
never-attached builds retain grace. Detection uses canonical reduced facts, with
|
|
3478
|
+
no history replay or new poll. Existing infrastructure failure attention and
|
|
3479
|
+
retry budgets govern failed recovery.
|
|
3480
|
+
|
|
3300
3481
|
Verification's current result boundary also advances on `verify.config-captured`
|
|
3301
3482
|
and `verify.config-superseded` (§16.1). These facts do not change reconcile
|
|
3302
3483
|
identity or its policy snapshot; replay gates still refer to the code/reconcile
|
|
@@ -3345,7 +3526,12 @@ should drain work before upgrading rather than run mixed-version writers.
|
|
|
3345
3526
|
Before branch replacement the kernel publishes Git tips named by retained
|
|
3346
3527
|
history and rewrite facts, plus both heads and the temporary change, under immutable non-branch refs
|
|
3347
3528
|
`refs/autobuild/archive/<slug>/<sha>`. Archives must be fetchable by exact ref;
|
|
3348
|
-
namespace or permission failures stop publication without a branch/tag fallback.
|
|
3529
|
+
namespace or permission failures stop publication without a branch/tag fallback. Remote
|
|
3530
|
+
archives also publish commits present only on the remote: GitHub uses create-only
|
|
3531
|
+
Git-reference REST creation when the workspace lacks the commit, retaining guarded Git
|
|
3532
|
+
pushes for local objects. Exact remote readback confirms publication, then a depth-one
|
|
3533
|
+
fetch by the archive ref (without tags or configured refmap expansion) restores missing
|
|
3534
|
+
commits and verifies them locally before returning.
|
|
3349
3535
|
Publication requests and loss records alone are not retained Git history: their
|
|
3350
3536
|
unpublished objects may have died with a released sandbox. A separately published
|
|
3351
3537
|
or reviewed tip remains an archive requirement even when an earlier request named
|
|
@@ -3377,6 +3563,8 @@ no agent and do not fabricate `reconcile.completed`. A conflicted replay is adop
|
|
|
3377
3563
|
by `reconcile.started {restackId}` without another collapse or target selection.
|
|
3378
3564
|
Resolver completion links back to the automatic transaction. Retained commit bytes
|
|
3379
3565
|
and replay object packs recover disposable-workspace objects before publication.
|
|
3566
|
+
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.
|
|
3567
|
+
|
|
3380
3568
|
|
|
3381
3569
|
`reconcile.prepared` records transaction identity, attempt, branch, old head,
|
|
3382
3570
|
effective old base, target base and temporary single-change SHA before checkout.
|
|
@@ -4198,11 +4386,55 @@ by the shared projection vocabulary and reused by terminal and CLI text.
|
|
|
4198
4386
|
|
|
4199
4387
|
## Forge failure recovery
|
|
4200
4388
|
|
|
4389
|
+
Destination heads come only from the authoritative forge branch; dispatcher-host
|
|
4390
|
+
refs are never a fallback. Failed remote reads retain the accepted observation;
|
|
4391
|
+
classified rate limits use repository forge degradation and cooldown. Changed
|
|
4392
|
+
heads require immutable commit ancestry proof against the accepted target and
|
|
4393
|
+
the destination base already used by replay. Missing capability or failed proof
|
|
4394
|
+
defers new replay. A non-descendant without kernel lineage records
|
|
4395
|
+
`target.rewritten` with branch,
|
|
4396
|
+
previous SHA and observed SHA, retains the accepted target, and raises watch/wait
|
|
4397
|
+
attention. Repeated rewrite pairs are deduplicated. Returning to a safe target
|
|
4398
|
+
clears attention (`target.rewrite-cleared` when the accepted tip is unchanged).
|
|
4399
|
+
Upstream force-pushes are never adopted automatically. Accepted node reparenting
|
|
4400
|
+
starts a new branch scope; frozen transactions recover their retained inputs.
|
|
4401
|
+
|
|
4402
|
+
Kernel restacks of a node are admitted through durable guarded publication
|
|
4403
|
+
receipts, not treated as external force-pushes. The dispatcher walks an index
|
|
4404
|
+
keyed by node and previous head, at most 64 receipt lookups from each child
|
|
4405
|
+
baseline; cost is capped independently of journal length or total receipts.
|
|
4406
|
+
Exact links use point lookups. When forward child landings separate restacks,
|
|
4407
|
+
the dispatcher walks backwards from the latest publication with an indexed
|
|
4408
|
+
previous-receipt cursor. Every gap requires immutable ancestry from the earlier
|
|
4409
|
+
published head to the later receipt's previous head, as do the baseline and tip
|
|
4410
|
+
ends of the proof. Missing links never imply rewrite authority.
|
|
4411
|
+
The proven receipts travel in `target.moved.lineage`; build-scoped runners use
|
|
4412
|
+
that recorded proof without reading another build. Clearing attention for an
|
|
4413
|
+
unchanged accepted SHA retains newly proven lineage in `target.rewrite-cleared`.
|
|
4414
|
+
Missing receipts or a gap
|
|
4415
|
+
over 64 still record `target.rewritten` and raise attention. Each hop makes at
|
|
4416
|
+
most two immutable ancestry comparisons. The exact walk and gap recovery share
|
|
4417
|
+
the same 64-read cap, including unsuccessful lookups. Unchanged accepted
|
|
4418
|
+
polls read no receipts or event rows.
|
|
4419
|
+
|
|
4420
|
+
A historical `publication.lost` does not prove that every copy of its candidate
|
|
4421
|
+
is gone. Recovery checks the exact branch and private archive refs and retained
|
|
4422
|
+
replay objects first. An available candidate continues guarded publication.
|
|
4423
|
+
A genuinely missing reconcile or automatic restack candidate records
|
|
4424
|
+
`publication.candidate-retired`, abandons its obsolete request, and replays the
|
|
4425
|
+
producing operation with a fresh transaction identity. Its frozen target,
|
|
4426
|
+
reconcile occurrence or automatic trigger, cycle, and message survive. The
|
|
4427
|
+
retired candidate is excluded from archive requirements unless independently
|
|
4428
|
+
required by proven history. This reconstruction consumes no infrastructure
|
|
4429
|
+
attempt and no additional conflict occurrence; it needs no operator guidance.
|
|
4430
|
+
A bare retry also clears an existing infrastructure-limit escalation through
|
|
4431
|
+
ordinary retry semantics. Unavailable inspection defers rather than proving loss.
|
|
4432
|
+
|
|
4201
4433
|
Leaf restack and reconcile publication retry classified transient forge or transport
|
|
4202
4434
|
failures six times after the initial attempt, waiting 30, 60, 120, 240, 300 and
|
|
4203
4435
|
300 seconds. `publication.retry-scheduled` records the operation, frozen rewrite
|
|
4204
4436
|
identity, episode anchor, failure ordinal, last error and absolute retry time;
|
|
4205
|
-
restart resumes that schedule without rerunning
|
|
4437
|
+
restart resumes that schedule without rerunning a resolver whose candidate remains available. These retries do
|
|
4206
4438
|
not consume `maxPhaseAttempts`. A seventh transient failure records
|
|
4207
4439
|
`publication.retry-exhausted` and raises `publication-retry-limit`, naming the last
|
|
4208
4440
|
error and six retries. Answering that escalation opens a fresh publication episode
|
|
@@ -4352,6 +4584,38 @@ and leaving ambient login untouched.
|
|
|
4352
4584
|
Hosted validation uses write-only metadata and states that the first hosted
|
|
4353
4585
|
build is the live check; local validation makes a minimal runtime request.
|
|
4354
4586
|
|
|
4587
|
+
Dispatch credential admission uses only effective primary and alternate routes,
|
|
4588
|
+
including internal roles and agent verify/finalize runners; unused descriptors
|
|
4589
|
+
remain readiness targets only. Local dispatch refuses missing selected sources
|
|
4590
|
+
before acquiring the repository lease. A nonempty environment slot counts when
|
|
4591
|
+
no local login record exists; a matching safely owned refreshing local record
|
|
4592
|
+
may supply it, while failed, mismatched or unsafe records fail closed. Startup
|
|
4593
|
+
inspects ready peer-owned records without claiming them, allowing a losing
|
|
4594
|
+
invocation to yield to the repository lease holder. Execution ownership is
|
|
4595
|
+
claimed only after acquiring that lease; foreign ownership then fails closed.
|
|
4596
|
+
Local worktree Claude routes can use the host login without a named token;
|
|
4597
|
+
sandbox and hosted routes require the configured slot. Presence checks make no
|
|
4598
|
+
inference request. Successor preflight inspects
|
|
4599
|
+
transferable predecessor ownership without claiming or rotating it; missing
|
|
4600
|
+
sources refuse yield and retain the running generation with upgrade attention.
|
|
4601
|
+
Actual successor admission checks again.
|
|
4602
|
+
|
|
4603
|
+
Hosted dispatch uses the project-secret snapshot exclusively for selected account
|
|
4604
|
+
slots, including an empty snapshot; service environment and local logins cannot
|
|
4605
|
+
supply a fallback. Missing selected accounts hold new account-dependent work,
|
|
4606
|
+
including resumed work and harvest, while observation, policy repair, controls
|
|
4607
|
+
and cleanup continue. One durable unavailable condition per account carries its
|
|
4608
|
+
nonsecret descriptor, source and remedy; unchanged ticks append nothing, recovery
|
|
4609
|
+
or removal from routes clears it. A new dispatcher run never clears it. The next
|
|
4610
|
+
tick after setting `ab secrets set VARIABLE` (or `ab accounts login NAME --project`
|
|
4611
|
+
for ChatGPT renewal) admits work automatically. Local remedies retain
|
|
4612
|
+
`claude setup-token` plus setting the dispatcher variable, replacement of a Kimi
|
|
4613
|
+
membership key, or `ab accounts login NAME --local`. Missing credentials at a
|
|
4614
|
+
provisioning race are typed repository conditions, never infrastructure failures,
|
|
4615
|
+
setup failures or build escalations; genuine missing environments keep their
|
|
4616
|
+
infrastructure budget. Present rejected credentials keep account-specific rejection
|
|
4617
|
+
attention. Repository status, watch and both dashboards expose the same condition.
|
|
4618
|
+
|
|
4355
4619
|
Selected Claude/Kimi credentials stay out of process arguments: each invocation
|
|
4356
4620
|
uses a private 0700 directory and a regular 0600 settings file, removed after
|
|
4357
4621
|
normal exit, launch failure or cancellation. The settings preserve selected-account
|
|
@@ -4372,6 +4636,18 @@ deltas and prior values retained across rotation.
|
|
|
4372
4636
|
|
|
4373
4637
|
### Hosted project deletion
|
|
4374
4638
|
|
|
4639
|
+
The browser requires the exact full repository identity in a transient dialog field;
|
|
4640
|
+
confirm stays disabled for empty or mismatched input and focus starts in the field.
|
|
4641
|
+
The handler independently binds that identity to the selected repository and its
|
|
4642
|
+
fresh validated preview. Only JSON `{deleted:true}` acknowledges completion.
|
|
4643
|
+
After any failed or unrecognized deletion response, the browser shows
|
|
4644
|
+
“Deletion outcome unknown; reload to check” and holds the row in its original slot
|
|
4645
|
+
without actions, even after dismissal. Only a complete successful discovery begun
|
|
4646
|
+
by Reload after the attempt settles it: absence removes the row, presence restores
|
|
4647
|
+
its authorized actions, and pending cleanup restores Finish deletion with a fresh
|
|
4648
|
+
preview and exact typing. An earlier or unsuccessful read cannot settle the outcome.
|
|
4649
|
+
The server's `{repo}` body and generation-bound If-Match contract are unchanged.
|
|
4650
|
+
|
|
4375
4651
|
The Projects web surface allows super users and organization owners to preview
|
|
4376
4652
|
counts and permanently delete their authorized projects with the shared confirmation dialog.
|
|
4377
4653
|
PostgreSQL fences the registration generation before physical blob cleanup and
|
package/docs/accounts.md
CHANGED
|
@@ -5,6 +5,44 @@ subscription within ordinary individual usage. Claude and Kimi credentials are
|
|
|
5
5
|
provisioned manually; Autobuild never runs `claude setup-token`. ChatGPT
|
|
6
6
|
accounts use OpenAI's browser authorization through the CLI.
|
|
7
7
|
|
|
8
|
+
## Dispatcher admission
|
|
9
|
+
|
|
10
|
+
Before taking the repository lease, a local dispatcher checks every account
|
|
11
|
+
selected by an effective primary or alternate route, including internal roles
|
|
12
|
+
and agent verify/finalize steps. Unused declared accounts do not block dispatch;
|
|
13
|
+
`ab init --validate` still checks them for readiness. Availability means a
|
|
14
|
+
nonempty configured environment variable or a matching, safely owned local
|
|
15
|
+
refreshing login (`bun ab accounts login NAME --local`). A failed, unsafe,
|
|
16
|
+
mismatched local record fails closed. Startup inspects a ready login owned by a
|
|
17
|
+
live peer without claiming it, so a second dispatcher can yield to the repository
|
|
18
|
+
lease holder; execution claims the login only after acquiring the lease. An external access
|
|
19
|
+
token remains usable when no local login record exists. Startup checks presence,
|
|
20
|
+
without inference or provider validation. Local worktree Claude execution can
|
|
21
|
+
also use the host login without a configured token; sandbox and hosted execution
|
|
22
|
+
require the configured credential slot. Missing sources produce one error with
|
|
23
|
+
all account names, variable names and remedies, before any work is claimed.
|
|
24
|
+
|
|
25
|
+
Successor preflight checks the same sources without claiming or refreshing the
|
|
26
|
+
predecessor's login. A missing source refuses handoff and raises upgrade
|
|
27
|
+
attention while the predecessor stays active. Accepted config changes that
|
|
28
|
+
require unavailable accounts hold new account-dependent work.
|
|
29
|
+
|
|
30
|
+
Hosted ticks resolve selected accounts only from project secrets, never from
|
|
31
|
+
deployment credentials or local logins. An absent secret raises one durable
|
|
32
|
+
repository condition per account; repeated ticks do not repeat the condition or
|
|
33
|
+
spend build infrastructure attempts. Set it with `bun ab secrets set VARIABLE`,
|
|
34
|
+
or renew ChatGPT with `bun ab accounts login NAME --project`. The next tick
|
|
35
|
+
recovers automatically, without a per-build retry. Running executions continue
|
|
36
|
+
to be observed and their policies repaired; controls and cleanup continue.
|
|
37
|
+
A provisioning race uses the same repository condition and remains retryable.
|
|
38
|
+
Presence and rejection are separate: present but rejected credentials retain
|
|
39
|
+
account-specific rejection attention.
|
|
40
|
+
|
|
41
|
+
For local Claude subscriptions, renew with `claude setup-token` and set the
|
|
42
|
+
dispatcher credential variable. For Kimi, replace the membership key in that
|
|
43
|
+
variable. For local ChatGPT, sign in again with `bun ab accounts login NAME
|
|
44
|
+
--local`. Diagnostics contain source names and remedies, never secret values.
|
|
45
|
+
|
|
8
46
|
```toml
|
|
9
47
|
[accounts.personal]
|
|
10
48
|
kind = "claude-subscription"
|