@defrex/autobuild 1.0.1 → 1.2.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 +10 -18
- package/SPEC.md +499 -238
- package/bin/ab-dispatch-generation.ts +11 -2
- package/docs/accounts.md +119 -0
- package/docs/agent-runtimes.md +4 -4
- package/docs/answering-blocked-builds.md +2 -2
- package/docs/architecture.md +262 -53
- package/docs/assets/headline-wide.png +0 -0
- package/docs/build-store.md +3 -41
- package/docs/builds.md +4 -4
- package/docs/cli.md +18 -4
- package/docs/configuration-overview.md +115 -4
- package/docs/configuration.md +488 -334
- package/docs/dispatcher-hosting.md +19 -34
- package/docs/dispatcher.md +1 -1
- package/docs/forges.md +5 -5
- package/docs/getting-started.md +2 -2
- package/docs/glossary.md +6 -6
- package/docs/intake.md +2 -0
- package/docs/integration-overview.md +15 -15
- package/docs/integration-tree.md +45 -38
- package/docs/integration.md +6 -6
- package/{skills/guide/references/landing-policy.md → docs/merge-policy.md} +40 -24
- package/docs/migration-1.0.md +17 -13
- package/docs/operating.md +41 -19
- package/docs/operator-api.md +180 -51
- package/docs/operator-surfaces.md +5 -18
- package/docs/overview.md +3 -3
- package/docs/plugin-authoring.md +21 -0
- package/docs/remote-store-protocol.md +242 -68
- package/docs/remote-ticket-protocol.md +30 -50
- package/docs/restacking.md +54 -15
- package/docs/seams.md +8 -8
- package/docs/setup.md +59 -119
- package/docs/skills.md +1 -1
- package/docs/spec-standard.md +6 -6
- package/docs/ticket-dependencies.md +7 -7
- package/docs/ticket-sources.md +18 -0
- package/docs/tickets.md +8 -2
- package/docs/troubleshooting.md +8 -12
- package/docs/upgrading.md +9 -4
- package/docs/verification.md +60 -14
- package/docs/workspaces.md +4 -4
- package/package.json +17 -6
- package/packages/core/src/accounts/chatgpt-oauth.ts +216 -0
- package/packages/core/src/accounts/chatgpt-state.ts +41 -0
- package/packages/core/src/accounts/local-credentials.ts +194 -0
- package/packages/core/src/accounts/local-inference.ts +106 -0
- package/packages/core/src/accounts/local-owner.ts +123 -0
- package/packages/core/src/accounts/sensitive.ts +2 -0
- package/packages/core/src/cli/accounts.ts +147 -0
- package/packages/core/src/cli/binary-direct.ts +13 -1
- package/packages/core/src/cli/binary-lifecycle.ts +65 -2
- package/packages/core/src/cli/binary.ts +3 -1
- package/packages/core/src/cli/build-control.ts +83 -28
- package/packages/core/src/cli/connect.ts +3 -3
- package/packages/core/src/cli/context.ts +81 -38
- package/packages/core/src/cli/dashboard/facts.ts +2 -1
- package/packages/core/src/cli/dashboard/integration-detail.ts +8 -8
- package/packages/core/src/cli/dashboard/integration-row.ts +40 -13
- package/packages/core/src/cli/dashboard/landing-display.ts +25 -0
- package/packages/core/src/cli/dashboard/model.ts +56 -33
- package/packages/core/src/cli/dashboard/poll.ts +9 -3
- package/packages/core/src/cli/dashboard/render.ts +59 -37
- package/packages/core/src/cli/dashboard/target-distance.ts +14 -0
- package/packages/core/src/cli/dashboard/tree.ts +3 -2
- package/packages/core/src/cli/dispatch-args.ts +1 -1
- package/packages/core/src/cli/dispatch-frontend.ts +6 -3
- package/packages/core/src/cli/dispatch-handoff.ts +125 -44
- package/packages/core/src/cli/dispatch-launch-contract.ts +187 -0
- package/packages/core/src/cli/dispatch-launcher.ts +54 -21
- package/packages/core/src/cli/dispatch-preflight.ts +6 -1
- package/packages/core/src/cli/dispatch.ts +106 -11
- package/packages/core/src/cli/env.ts +4 -0
- package/packages/core/src/cli/help.ts +46 -23
- package/packages/core/src/cli/init-readiness-remote.ts +22 -1
- package/packages/core/src/cli/init-readiness-shared.ts +5 -1
- package/packages/core/src/cli/init-validation.ts +160 -18
- package/packages/core/src/cli/main.ts +68 -8
- package/packages/core/src/cli/node-verification-provenance.ts +1 -97
- package/packages/core/src/cli/publication-settlement.ts +47 -21
- package/packages/core/src/cli/repository-status.ts +20 -9
- package/packages/core/src/cli/secrets.ts +173 -0
- package/packages/core/src/cli/status.ts +42 -5
- package/packages/core/src/cli/store-opening.ts +17 -2
- package/packages/core/src/cli/terminal.ts +22 -1
- package/packages/core/src/cli/terminals.ts +14 -10
- package/packages/core/src/cli/upgrade-agent.ts +9 -1
- package/packages/core/src/cli/upgrade-landing.ts +70 -30
- package/packages/core/src/cli/upgrade.ts +3 -1
- package/packages/core/src/cli/wait.ts +15 -7
- package/packages/core/src/cli/watch-lifetime.ts +111 -0
- package/packages/core/src/cli/watch.ts +635 -510
- package/packages/core/src/config/accounts.ts +101 -0
- package/packages/core/src/config/effective-artifact.fixture.ts +27 -0
- package/packages/core/src/config/effective-artifact.ts +13 -0
- package/packages/core/src/config/landing.ts +1 -1
- package/packages/core/src/config/live.ts +14 -1
- package/packages/core/src/config/load.ts +21 -1
- package/packages/core/src/config/pipeline-source.ts +28 -0
- package/packages/core/src/config/reference-metadata.ts +2 -0
- package/packages/core/src/config/reference.ts +22 -7
- package/packages/core/src/config/roles.ts +54 -3
- package/packages/core/src/config/schema.ts +146 -162
- package/packages/core/src/context-directory.ts +26 -0
- package/packages/core/src/distribution-packaging.ts +26 -5
- package/packages/core/src/events/catalog.ts +10 -2
- package/packages/core/src/events/compatibility.ts +2 -1
- package/packages/core/src/events/globs.ts +1 -1
- package/packages/core/src/events/payloads.ts +73 -1
- package/packages/core/src/events/policy.ts +7 -0
- package/packages/core/src/events/repository.ts +4 -4
- package/packages/core/src/events/sessions.ts +6 -6
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +574 -0
- package/packages/core/src/kernel/auto-merge.ts +2 -2
- package/packages/core/src/kernel/engine.ts +255 -26
- package/packages/core/src/kernel/generators/leaf-restack-log.ts +10 -0
- package/packages/core/src/kernel/integration-landing.ts +3 -3
- package/packages/core/src/kernel/integration-state.ts +27 -4
- package/packages/core/src/kernel/leaf-restack-state.ts +28 -3
- package/packages/core/src/kernel/log-index.ts +13 -1
- package/packages/core/src/kernel/node-landing.ts +8 -8
- package/packages/core/src/kernel/node-parent.ts +2 -2
- package/packages/core/src/kernel/node-restack-transaction.ts +1 -1
- package/packages/core/src/kernel/node-verification-context.ts +216 -0
- package/packages/core/src/kernel/phases.ts +1 -1
- package/packages/core/src/kernel/plan-verify-selection.ts +16 -0
- package/packages/core/src/kernel/publication-retry.ts +168 -0
- package/packages/core/src/kernel/reconcile-restack.ts +29 -1
- package/packages/core/src/kernel/reducer.ts +85 -5
- package/packages/core/src/kernel/target-distance.ts +45 -0
- package/packages/core/src/kernel/terminal-guard.ts +10 -1
- package/packages/core/src/kernel/verify-stage-state.ts +123 -0
- package/packages/core/src/kernel/verify-stages.ts +39 -0
- package/packages/core/src/ontology.ts +1 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/control.ts +1 -1
- package/packages/core/src/operator/index.ts +3 -7
- package/packages/core/src/operator/landings.ts +5 -1
- package/packages/core/src/operator/presentation.ts +6 -1
- package/packages/core/src/operator/protocol.ts +6 -0
- package/packages/core/src/operator/query.ts +14 -18
- package/packages/core/src/operator/registry.ts +39 -7
- package/packages/core/src/operator/sandbox-host.ts +64 -40
- package/packages/core/src/operator/sandbox.ts +3 -0
- package/packages/core/src/operator/ticket-source-backend.ts +3 -12
- package/packages/core/src/operator/tickets.ts +25 -4
- package/packages/core/src/plugins/manifest.ts +2 -1
- package/packages/core/src/ports/forge/contract.ts +2 -2
- package/packages/core/src/ports/forge/git-rewrite.ts +25 -2
- package/packages/core/src/ports/forge/github-readiness.ts +2 -2
- package/packages/core/src/ports/forge/github.ts +26 -7
- package/packages/core/src/ports/forge/local-git.ts +4 -4
- package/packages/core/src/ports/forge/readiness.ts +1 -1
- package/packages/core/src/ports/forge-failure.ts +24 -0
- package/packages/core/src/ports/runner/account-env.ts +88 -0
- package/packages/core/src/ports/runner/chatgpt-provider.ts +85 -0
- package/packages/core/src/ports/runner/claude.ts +26 -2
- package/packages/core/src/ports/runner/codex.ts +63 -31
- package/packages/core/src/ports/runner/one-shot.ts +2 -0
- package/packages/core/src/ports/runner/provider-error.ts +5 -0
- package/packages/core/src/ports/runner/routing.ts +35 -4
- package/packages/core/src/ports/tickets/contract.ts +58 -0
- package/packages/core/src/ports/tickets/tree.ts +1 -1
- package/packages/core/src/ports/types.ts +28 -7
- package/packages/core/src/ports/workspace/account-policy.ts +72 -0
- package/packages/core/src/ports/workspace/build-execution.ts +9 -2
- package/packages/core/src/ports/workspace/builtin-capabilities.ts +1 -0
- package/packages/core/src/ports/workspace/create.ts +2 -0
- package/packages/core/src/ports/workspace/git-worktree.ts +6 -1
- package/packages/core/src/ports/workspace/phase-scratch.ts +4 -3
- package/packages/core/src/ports/workspace/provider-capabilities.ts +1 -0
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +182 -72
- package/packages/core/src/processes/build-child.ts +6 -8
- package/packages/core/src/processes/build-execution-state.ts +8 -5
- package/packages/core/src/processes/build-runner.ts +554 -99
- package/packages/core/src/processes/dispatcher.ts +209 -101
- package/packages/core/src/processes/execution-no-progress.ts +8 -1
- package/packages/core/src/processes/execution-settlement.ts +21 -3
- package/packages/core/src/processes/harvest-runner.ts +68 -8
- package/packages/core/src/processes/phase-failure-budget.ts +1 -0
- package/packages/core/src/processes/publication-loss.ts +8 -2
- package/packages/core/src/processes/publication-state.ts +42 -4
- package/packages/core/src/processes/repo-view.ts +14 -0
- package/packages/core/src/processes/verify-cycle-config.ts +96 -0
- package/packages/core/src/project-secrets.ts +105 -0
- package/packages/core/src/{integration → scenarios}/harness.ts +330 -317
- package/packages/core/src/secret-name.ts +41 -0
- package/packages/core/src/store/account-redaction.ts +156 -0
- package/packages/core/src/store/adapter.ts +1 -0
- package/packages/core/src/store/build-scope.ts +9 -0
- package/packages/core/src/store/contract.ts +116 -2
- package/packages/core/src/store/local/schema.ts +13 -0
- package/packages/core/src/store/local/store.ts +42 -0
- package/packages/core/src/store/memory.ts +47 -0
- package/packages/core/src/store/operator-presence.ts +21 -0
- package/packages/core/src/store/phase-session.ts +10 -0
- package/packages/core/src/store/reducer-value-shapes.json +5185 -4156
- package/packages/core/src/store/remote/client.ts +89 -48
- package/packages/core/src/store/remote/compatibility.ts +20 -0
- package/packages/core/src/store/remote/protocol.ts +4 -0
- package/packages/core/src/store/remote/version.ts +3 -1
- package/packages/core/src/store/retention.ts +2 -3
- package/packages/core/src/store/session-handle.ts +9 -0
- package/packages/core/src/store/streams/session-writer.ts +1 -1
- package/packages/core/src/store/types.ts +12 -2
- package/packages/core/src/testing/dispatch-read-budget.ts +122 -0
- package/packages/core/src/testing/index.ts +12 -1
- package/packages/core/src/testing/reduced-read-budget.ts +47 -0
- package/packages/core/src/testing/temp-directories.ts +58 -0
- package/skills/code-review/SKILL.md +23 -9
- package/skills/finalize/SKILL.md +15 -7
- package/skills/guide/SKILL.md +373 -148
- package/skills/guide/references/accounts.md +119 -0
- package/skills/guide/references/integration-tree.md +45 -38
- package/{docs/landing-policy.md → skills/guide/references/merge-policy.md} +40 -24
- package/skills/guide/references/migration-1.0.md +17 -13
- package/skills/guide/references/operator-api.md +180 -51
- package/skills/guide/references/plugin-authoring.md +21 -0
- package/skills/guide/references/remote-store-protocol.md +242 -68
- package/skills/guide/references/remote-ticket-protocol.md +30 -50
- package/skills/guide/references/restacking.md +54 -15
- package/skills/guide/references/setup.md +59 -119
- package/skills/guide/references/spec-standard.md +6 -6
- package/skills/guide/references/ticket-dependencies.md +7 -7
- package/skills/harvest/SKILL.md +3 -1
- package/skills/harvest-review/SKILL.md +3 -1
- package/skills/implement/SKILL.md +43 -17
- package/skills/operate/SKILL.md +118 -118
- package/skills/plan/SKILL.md +39 -13
- package/skills/plan-review/SKILL.md +15 -10
- package/skills/reconcile/SKILL.md +22 -3
- package/skills/spec/SKILL.md +20 -20
- package/skills/tickets/SKILL.md +12 -9
- package/templates/autobuild.toml +1 -1
- package/templates/hosted-service/package.json +2 -2
- package/docs/hosted-dispatcher-cutover-validation.md +0 -178
- package/docs/hosted-dispatcher.md +0 -275
- package/docs/hosted-service.md +0 -293
- package/docs/mcp.md +0 -149
- package/packages/core/src/orchestrator/approvals.ts +0 -115
- package/packages/core/src/orchestrator/conversation.ts +0 -167
- package/packages/core/src/orchestrator/model.ts +0 -86
- package/packages/core/src/orchestrator/prompt.ts +0 -63
- package/packages/core/src/orchestrator/tools.ts +0 -117
- package/packages/core/src/orchestrator/turn-runner.ts +0 -457
- package/packages/core/src/processes/orchestrator-tick.ts +0 -360
package/SPEC.md
CHANGED
|
@@ -82,6 +82,8 @@ event log handling, state reducer. No I/O opinions — no ticket tracker, no
|
|
|
82
82
|
telemetry vendor, no terminal.
|
|
83
83
|
|
|
84
84
|
### 3.2 Ports
|
|
85
|
+
Ticket sources may optionally provide native `listPage(criteria, page)` windows with a matching total. Paged operator reads use it when present, otherwise slice the exhaustive listing; unpaged and dispatcher reads remain exhaustive.
|
|
86
|
+
|
|
85
87
|
|
|
86
88
|
Interfaces to the world, each with swappable adapters:
|
|
87
89
|
|
|
@@ -239,6 +241,21 @@ The versioned v1 launch contract consists of argv, a consumed one-shot
|
|
|
239
241
|
`AB_DISPATCH_GENERATION` marker, graceful signals and exit reasons `stopped`,
|
|
240
242
|
`handoff`, `failed`. Public invocations discard inherited markers. No private
|
|
241
243
|
operational channel exists; work outcomes still come only from durable state.
|
|
244
|
+
The runtime-owned `--read-upgrade` reader supports an optional independently
|
|
245
|
+
versioned conditional environment exchange, preserving full v1 answers for old
|
|
246
|
+
peers. The launcher retains only its current successful answer and pre-read
|
|
247
|
+
repository change position per exact reader/runtime, journal, run, lineage and
|
|
248
|
+
recovery query. Each unchanged check makes one change-position request and reads
|
|
249
|
+
zero metadata, reducer values or event rows, regardless of journal length or a
|
|
250
|
+
fresh helper process. Full refresh samples the position before the projection;
|
|
251
|
+
a concurrent append therefore invalidates the next check. Unchanged checks
|
|
252
|
+
revalidate cached target identity and rollback retention locally, without
|
|
253
|
+
manufacturing durable facts. Errors discard conditional state; an unloadable
|
|
254
|
+
target still uses the healthy predecessor reader with the active query. The
|
|
255
|
+
launcher retains its filesystem/process-only boundary and polling cadence of
|
|
256
|
+
1 second idle or 250 ms pending, processing child exits and pending actions on
|
|
257
|
+
cached answers too. Legacy peers remain functional with full reads.
|
|
258
|
+
|
|
242
259
|
The launcher observes presentation stop/continue liveness so Ctrl-Z returns the
|
|
243
260
|
shell prompt and `fg` resumes only the presentation; the kernel keeps running.
|
|
244
261
|
Terminal restoration by the launcher is a fallback for abnormal termination,
|
|
@@ -351,12 +368,21 @@ The journal records `dispatcher.target-prepared`, `dispatcher.yield-requested`,
|
|
|
351
368
|
per-execution `dispatcher.drain-settled`, deadline changes and
|
|
352
369
|
`dispatcher.handoff-completed`, plus rollback and hold-clear facts, correlated by predecessor run, successor run,
|
|
353
370
|
launcher lineage, both runtimes and cached target. Legacy handoffs without a
|
|
354
|
-
mode mean cutover.
|
|
371
|
+
mode mean cutover. Repository-following watch suppresses predecessor lease-loss
|
|
372
|
+
observations only for a matching recorded stop or reducer-validated successor
|
|
373
|
+
takeover, including while the predecessor drains. Handoff intent or release
|
|
374
|
+
without takeover retains loss attention on expiry; successor loss and upgrade
|
|
375
|
+
failure/rollback attention remain independent. The launcher first binds the runtime-owned journal transport to its persisted
|
|
355
376
|
repository record, so rejected configuration edits cannot redirect readers away
|
|
356
377
|
from the held run. It reads runtime-owned durable projections while generations overlap; it owns no store or operational authority and keeps each
|
|
357
378
|
live runtime reserved. Overlap requires explicit launcher and target capabilities; unsupported
|
|
358
379
|
targets fail safely with manual-restart attention. Operator stop wins and joins
|
|
359
380
|
all live children. Only the presentation owner installs terminal cleanup.
|
|
381
|
+
Its active input subscription maintains raw termios across retired generation
|
|
382
|
+
exits, including repeated handoffs, restart and rollback. Repair occurs on the
|
|
383
|
+
next maintenance turn (normally within 100 ms; event-loop stalls can delay it).
|
|
384
|
+
Maintenance stops before input release, job-control suspension or operator stop;
|
|
385
|
+
clean exit restores the shell's prior cooked tty state.
|
|
360
386
|
`[upgrade] automatic = false` disables target preparation; `--once`, origin
|
|
361
387
|
`--repository`, hosted cron and development hot rendering remain direct.
|
|
362
388
|
|
|
@@ -386,7 +412,7 @@ files, including development configs, remain exactly as installed.
|
|
|
386
412
|
`build.created` from the immutable record (only records an older dispatcher
|
|
387
413
|
left with an empty stream: new claims write it atomically with the record), executes only missing workspace,
|
|
388
414
|
spec, and ticket-notification boundaries, and records each failed attempt as
|
|
389
|
-
`dispatch.failed`. New claims do not seed
|
|
415
|
+
`dispatch.failed`. New claims do not seed merge consent or materialize
|
|
390
416
|
historical auto-merge defaults; policy is sampled at readiness. Meanwhile,
|
|
391
417
|
`dispatch.comment-posted` prevents retries from duplicating the ticket notice.
|
|
392
418
|
It also owns observation back-pressure: settling
|
|
@@ -444,14 +470,14 @@ One name, used everywhere. Every noun lives in exactly one layer.
|
|
|
444
470
|
| Term | Meaning |
|
|
445
471
|
|---|---|
|
|
446
472
|
| **Operator** | The role driving Autobuild through `ab` or MCP, normally an agent; a human may also drive the interface directly |
|
|
447
|
-
| **Operator agent** | An agent
|
|
473
|
+
| **Operator agent** | An external agent operating the builds the repository's dispatcher dispatches, guided by `ab-operate`; it adopts new builds while serving the role |
|
|
448
474
|
| **Human (maintainer)** | The person authorizing work and making human decisions; addressed as “you” in reader-facing prose |
|
|
449
475
|
| **Signal** | Raw input from the world — a Sentry issue, an observation |
|
|
450
476
|
| **Proposal** | A synthesized candidate ticket sitting in Triage, awaiting grooming |
|
|
451
477
|
| **Ticket** | A source record of kind `work` (default) or `node`, optionally targeting a same-source node; ordinary groomed work is dispatchable |
|
|
452
478
|
| **Node ticket** | A named integration point represented by a ticket of kind `node`; its integration build owns a branch collecting child work |
|
|
453
479
|
| **Build** | One ticket execution with a slug; either a work pipeline or an integration branch lifecycle; the unit the operator sees |
|
|
454
|
-
| **Integration build** | A node build that opens its branch without a runner or capacity charge, collects child work, verifies its complete head and
|
|
480
|
+
| **Integration build** | A node build that opens its branch without a runner or capacity charge, collects child work, verifies its complete head and merges under ordered policy (node consent by default) |
|
|
455
481
|
| **Harvest run** | One repository-scoped claimed observation snapshot and staged proposal workflow; never a build |
|
|
456
482
|
| **Phase** | A named stage of the build pipeline grammar (§5) |
|
|
457
483
|
| **Round** | One iteration inside a review loop |
|
|
@@ -494,8 +520,8 @@ the bare phase names throughout.
|
|
|
494
520
|
## 5. Pipeline grammar
|
|
495
521
|
|
|
496
522
|
Work builds retain the fixed grammar below. Integration builds instead follow
|
|
497
|
-
`spec → branch opening → collecting → complete → verify:* → authorization →
|
|
498
|
-
Authorization follows ordered
|
|
523
|
+
`spec → branch opening → collecting → complete → verify:* → authorization → merge → close`.
|
|
524
|
+
Authorization follows ordered merge policy: nodes default to explicit consent,
|
|
499
525
|
while an auto rule authorizes a complete, verified candidate without a command.
|
|
500
526
|
They never enter plan, implement, code-review or finalize. A node conflict uses
|
|
501
527
|
source-aware reconcile. Idle collecting nodes own no execution resources;
|
|
@@ -506,10 +532,41 @@ Empty nodes have no PR.
|
|
|
506
532
|
spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → finalize (+ finalize:*)
|
|
507
533
|
```
|
|
508
534
|
|
|
535
|
+
Verification uses ordered stages. A string in `[verify].steps` is a singleton
|
|
536
|
+
stage; a nonempty array groups members that start together. Empty stages and
|
|
537
|
+
repeated names are errors. Plain string lists retain serial event sequences.
|
|
538
|
+
Every member resolves post-reconcile policy, approved selection/`always`, then
|
|
539
|
+
path applicability at stage entry. Only pass or skip satisfies a member. The
|
|
540
|
+
next stage, or finalize after the last, waits for every member to pass or skip.
|
|
541
|
+
|
|
542
|
+
By default a failure lets all siblings finish; the settled stage routes once
|
|
543
|
+
with every failed report, and no later stage runs. `failFast = true` on either
|
|
544
|
+
step kind instead cancels members without outcomes, preserving existing
|
|
545
|
+
outcomes. The kernel records `verify.cancelled {step, attempt, cause: {step}}`.
|
|
546
|
+
Cancellation is neither a pass nor a failure. It ends the entire build execution
|
|
547
|
+
through its existing process-group or environment supervisor; a replacement
|
|
548
|
+
execution resumes before implement can start. This opt-in teardown/relaunch cost
|
|
549
|
+
avoids per-member process groups and ensures cancelled descendants cannot keep
|
|
550
|
+
writing to the shared workspace, including after a crash.
|
|
551
|
+
|
|
552
|
+
An agent escalation holds its own member while siblings continue. The barrier
|
|
553
|
+
waits for the answer and that member's rerun, unless fail-fast cancels it.
|
|
554
|
+
Cancellation supersedes only that exact verifier occurrence's agent escalations,
|
|
555
|
+
including late raises and answers. They stay in history but no longer block,
|
|
556
|
+
route guidance, reset budgets, revise the spec or request abort. Answer commands
|
|
557
|
+
reject a superseded escalation as stale. Unrelated escalations retain authority.
|
|
558
|
+
|
|
559
|
+
All members of a cycle share one monotonic attempt. A failed cycle spends one
|
|
560
|
+
`maxVerifyAttempts` unit regardless of its failure count. Restart preserves
|
|
561
|
+
outcomes and reruns members without outcomes at that same attempt, with
|
|
562
|
+
independent agent contexts under `$AB_CONTEXT_DIR` in the shared workspace.
|
|
563
|
+
Integration nodes use the same barriers with exact head, parent and restack
|
|
564
|
+
identity; their failed-cycle attention is published only after settlement.
|
|
565
|
+
|
|
509
566
|
The grammar is fixed — an opinionated skeleton, not a generic workflow
|
|
510
567
|
engine. Exactly two extension points:
|
|
511
568
|
|
|
512
|
-
- **`verify:*`** —
|
|
569
|
+
- **`verify:*`** — ordered stages of configurable verifiers, declared in
|
|
513
570
|
per-repo config. Two subtypes: *check* (deterministic command; pass/fail is
|
|
514
571
|
its exit code) and *agent-verify* (an agent run with a `pass|fail|skip`
|
|
515
572
|
verdict schema). The durable outcomes are `pass`, `fail(report)`, and
|
|
@@ -546,13 +603,14 @@ Leaf branches are collapsed into one build change and restacked onto the frozen
|
|
|
546
603
|
target branch's current head at verify entry, before any verifier or exclusion.
|
|
547
604
|
This is kernel work within the fixed grammar, not another phase. A verify failure
|
|
548
605
|
returns to implementation; its new commits append to the canonical change, and
|
|
549
|
-
the next approved cycle collapses and restacks again. While waiting to
|
|
606
|
+
the next approved cycle collapses and restacks again. While waiting to merge after
|
|
550
607
|
finalize and its post-steps, an observed target move also schedules a restack.
|
|
551
608
|
For a node-targeted leaf, published finalize-step commits also schedule one
|
|
552
|
-
waiting restack, even when the target SHA is unchanged, so guarded
|
|
609
|
+
waiting restack, even when the target SHA is unchanged, so guarded merge
|
|
553
610
|
preserves one canonical build identity.
|
|
554
|
-
Clean waiting restacks retain existing verification
|
|
555
|
-
|
|
611
|
+
Clean waiting restacks retain existing verification when build-owned config is
|
|
612
|
+
unchanged (§16.1), including when replay replaces the pin commit's ancestry.
|
|
613
|
+
Conflicts use reconcile and its captured post-reconcile policy. A conflict before initial verification cannot
|
|
556
614
|
skip initial checks through that policy.
|
|
557
615
|
|
|
558
616
|
|
|
@@ -619,10 +677,10 @@ Each kernel `spec.revised` records the exact artifact and operator identity
|
|
|
619
677
|
Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
|
|
620
678
|
The node recollects and verifies the new revision, including on the same head
|
|
621
679
|
and parent after a failed cycle. Earlier cycles remain historical evidence
|
|
622
|
-
and cannot block or authorize
|
|
680
|
+
and cannot block or authorize merge under the replacement. Children keep
|
|
623
681
|
their specs, claims and targets; contributions are not restarted.
|
|
624
682
|
Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
625
|
-
pending controls,
|
|
683
|
+
pending controls, merge intent and ended PRs refuse the no-escalation path.
|
|
626
684
|
A concurrent state change refuses publication with a retry explanation;
|
|
627
685
|
uncited artifacts are inert. Leaves still require an open escalation and
|
|
628
686
|
restart from `plan`.
|
|
@@ -739,105 +797,31 @@ stream read's ([docs/remote-store-protocol.md](docs/remote-store-protocol.md),
|
|
|
739
797
|
|
|
740
798
|
#### 7.1.2 The embedded orchestrator (turns)
|
|
741
799
|
|
|
742
|
-
The operator
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
Conversation state is reconstructed from durable state alone — the finalized
|
|
768
|
-
artifacts of earlier turns, the live stream of the open turn, and the session
|
|
769
|
-
events — so a turn resumed in a fresh invocation continues from the last
|
|
770
|
-
checkpointed step with identical model input; no process memory survives
|
|
771
|
-
between invocations. A turn's assembled messages attach at its `turn.started`
|
|
772
|
-
event, so a message posted during a suspension reads as the next user message
|
|
773
|
-
after the checkpoint, never interleaved into it.
|
|
774
|
-
|
|
775
|
-
**Budget suspension.** `[orchestrator].invocationBudgetSeconds` (default 240,
|
|
776
|
-
clamped to the 300-second hosted function limit) bounds one invocation. When
|
|
777
|
-
elapsed time approaches the budget — or a hard abort at the deadline
|
|
778
|
-
interrupts a runaway step — the runner records `turn.suspended` cause
|
|
779
|
-
`budget` and ends the invocation; a new invocation resumes it within 60
|
|
780
|
-
seconds (immediately when the service can self-trigger, otherwise on the
|
|
781
|
-
next dispatcher tick). The dispatcher tick's orchestrator step runs LAST,
|
|
782
|
-
after every build stage, against min(configured, remaining tick budget) with
|
|
783
|
-
a 30-second floor: it can only consume slack, and skipping is always safe
|
|
784
|
-
because suspension state is durable.
|
|
785
|
-
|
|
786
|
-
**Approval suspension.** A call to a tool named in
|
|
787
|
-
`[orchestrator].approvals` records `approval.requested`, emits the protocol's
|
|
788
|
-
tool-approval-request part, and suspends the turn with cause `approval`. An
|
|
789
|
-
`approve` answer resumes the turn and executes the call; a `deny` answer
|
|
790
|
-
resumes it with a denied tool output. Tools not on the list run without
|
|
791
|
-
pause. Entries are `tool` or `tool:qualifier`; an entry naming an absent or
|
|
792
|
-
unknown tool is inert by design.
|
|
793
|
-
|
|
794
|
-
**Wake rule.** The dispatcher tick's orchestrator step wakes each idle
|
|
795
|
-
session with non-empty wake settings: it scans the repository's builds for
|
|
796
|
-
build events after the session's per-build wake cursor and the repository
|
|
797
|
-
journal for events after the session's journal wake cursor — both filtered
|
|
798
|
-
by the same compiled settings, which may name build event types,
|
|
799
|
-
repository-journal event types, or both — and starts one turn per session
|
|
800
|
-
per tick with a `wake` trigger naming the winning event's source: the build,
|
|
801
|
-
seq, and type for a build-log wake, or the journal flag, seq, and type for a
|
|
802
|
-
repository-journal wake. A build wake delivers the event record and the
|
|
803
|
-
build's reduced state — frozen into the `turn.started` fact — as the turn's
|
|
804
|
-
input; a journal wake delivers the event record only (the turn's operator
|
|
805
|
-
registry already exposes bounded repository reads). Each source's cursor
|
|
806
|
-
advances only through a recorded trigger naming that source, so a crash
|
|
807
|
-
between scan and start cannot skip or duplicate a wake, and other builds' —
|
|
808
|
-
and the journal's — matching events re-trigger on later ticks. Sessions with
|
|
809
|
-
empty wake settings are never woken. The legacy hosted wake settings retain their event defaults independently of
|
|
810
|
-
the actionable CLI watch projection.
|
|
811
|
-
|
|
812
|
-
**Crash recovery.** A turn invocation that dies without an outcome leaves the
|
|
813
|
-
session `running` with a silent open stream; the tick's reaper fails such a
|
|
814
|
-
turn (`turn.failed`, kind `internal`) after 15 minutes of stream silence,
|
|
815
|
-
closing the stream `aborted` and leaving the session `idle`. The reaper never
|
|
816
|
-
touches suspended or awaiting-approval sessions — a turn suspended for
|
|
817
|
-
approval is precisely an open stream that goes quiet for however long the
|
|
818
|
-
human takes.
|
|
819
|
-
|
|
820
|
-
**Typed failures.** Model failures are typed on `turn.failed`:
|
|
821
|
-
`provider-unavailable`, `exhausted`, `credentials`, `configuration` (plus
|
|
822
|
-
`internal` for non-model failures) — never retried unboundedly; a failed
|
|
823
|
-
turn leaves the session `idle` with the error class visible in the session's
|
|
824
|
-
reduced state.
|
|
825
|
-
|
|
826
|
-
**Opt-in guarantee.** The whole feature is off unless a repository's
|
|
827
|
-
effective config enables it, and it is doubly gated: the tick step is
|
|
828
|
-
constructed only in origin mode (a local `ab dispatch` never constructs it —
|
|
829
|
-
enabled = true in a local autobuild.toml lists no sessions, builds no
|
|
830
|
-
registry, and calls no model), and in origin mode it returns immediately
|
|
831
|
-
unless the effective config enables the orchestrator. The system prompt is
|
|
832
|
-
the canonical `ab-operate` skill shipped in `skills/operate/` — self-contained
|
|
833
|
-
per the vendored-skill rule, teaching the tool surface, the attention set,
|
|
834
|
-
and when to escalate to the human rather than act — plus the current
|
|
835
|
-
`operator-notes` artifact, the session's wake settings, and the session's
|
|
836
|
-
repository identity. The model never supplies a repository argument: the
|
|
837
|
-
tools' model-facing schemas strip `repo`, and the runner injects the
|
|
838
|
-
session's repository before the registry re-validates. A message posted
|
|
839
|
-
while a turn is open is durable and enters the conversation at the next
|
|
840
|
-
resume or turn — no second turn, no concurrent turns, no subagents.
|
|
800
|
+
The operator is always an external agent: a coding-agent harness at the
|
|
801
|
+
repository root using the `ab` CLI, or an agent connected through MCP and the
|
|
802
|
+
operator tools. The canonical `ab-operate` skill describes that role. Autobuild
|
|
803
|
+
never hosts or starts it. The embedded turn runner was abandoned and removed.
|
|
804
|
+
|
|
805
|
+
The hosted service records sessions, messages, explicit wake settings, approval
|
|
806
|
+
answers and archives as durable facts only. Message, wake and approval writes
|
|
807
|
+
return `{ok:true}` without turn or stream ids. New sessions receive only
|
|
808
|
+
`session.created`; wake settings are written explicitly, never inherited from
|
|
809
|
+
repository config. Neither HTTP writes nor origin-mode dispatcher ticks start,
|
|
810
|
+
resume or reap turns, execute approved calls, or close historical streams.
|
|
811
|
+
External harnesses own their conversation, scheduling, concurrency and approvals.
|
|
812
|
+
|
|
813
|
+
Historical turn events, approvals, wake cursors and session-scoped streams remain
|
|
814
|
+
valid and readable under §7.1.1 and §7.6. Answering a matching pending approval
|
|
815
|
+
clears that approval but does not resume its suspended turn or change its stream.
|
|
816
|
+
The operator API does not expose raw turn-event append. No migration deletes
|
|
817
|
+
historical events or changes their reduction.
|
|
818
|
+
|
|
819
|
+
`[orchestrator].enabled` and `[orchestrator.sandbox]` retain the externally driven
|
|
820
|
+
sandbox tools, credential isolation, archive cleanup and dispatcher idle
|
|
821
|
+
settlement. New config rejects the removed `model`, `invocationBudgetSeconds`,
|
|
822
|
+
`approvals` and repository-default `wake` keys. Immutable historical effective
|
|
823
|
+
config artifacts discard only those obsolete keys during validation; stored
|
|
824
|
+
bytes are unchanged and other unknown or malformed settings still fail.
|
|
841
825
|
|
|
842
826
|
#### 7.1.3 Ticket assets
|
|
843
827
|
|
|
@@ -1012,8 +996,20 @@ Database-authorized owners administer it without redeploying through
|
|
|
1012
996
|
`ab-hosted-store projects list`, `projects add REPOSITORY --user IDENTITY`, and
|
|
1013
997
|
`projects remove REPOSITORY --user IDENTITY`. Attribution is declared by the
|
|
1014
998
|
administrator; ordinary store/project tokens cannot administer registration.
|
|
1015
|
-
|
|
1016
|
-
|
|
999
|
+
Human access is scoped to Better Auth organizations. Super users named by
|
|
1000
|
+
`AB_WEB_SUPER_USER_EMAILS` can operate every registered project. Other users
|
|
1001
|
+
can operate only projects assigned to an organization containing their normalized
|
|
1002
|
+
email. Membership grants work before first sign-in; each organization has zero
|
|
1003
|
+
or one owner. Only super users create organizations, change ownership, or move
|
|
1004
|
+
projects. Members can inspect their own organization’s active projects and roster,
|
|
1005
|
+
including emails and persisted identity names/joined status. Owners can manage
|
|
1006
|
+
their own members but cannot remove themselves.
|
|
1007
|
+
Creation does not make the super user a member. Legacy projects remain unassigned
|
|
1008
|
+
and visible only to super users until management assignment or an authorized
|
|
1009
|
+
reconnect approval assigns them. Admission and repository authority
|
|
1010
|
+
are checked from current state on every browser request and MCP tool callback.
|
|
1011
|
+
Removed members lose access immediately without re-login. Machine project,
|
|
1012
|
+
delegated, internal and admin credentials retain their existing boundaries.
|
|
1017
1013
|
|
|
1018
1014
|
Dashboard discovery, MCP `repositories.list` and every repository tool call,
|
|
1019
1015
|
and all operator API routes for every operator credential consult current
|
|
@@ -1062,7 +1058,7 @@ The base-selection invariants make this safe with Git:
|
|
|
1062
1058
|
back to the local base and records the diagnostic.
|
|
1063
1059
|
- **Re-provisioning resumes; eligible restacks rewrite.** Provisioning alone
|
|
1064
1060
|
resumes the published branch. The kernel collapses and restacks at verify
|
|
1065
|
-
entry and after target moves while awaiting
|
|
1061
|
+
entry and after target moves while awaiting merge. The first
|
|
1066
1062
|
`workspace.provisioned` base stays immutable branch-cut provenance; later
|
|
1067
1063
|
`existing` facts are resume evidence, not new cuts. A remote workspace lost
|
|
1068
1064
|
before publication may be freshly cut again; the latest `remote` or `local`
|
|
@@ -1091,6 +1087,12 @@ The base-selection invariants make this safe with Git:
|
|
|
1091
1087
|
result, including skips, cites the cycle's base and head. Those citations stay
|
|
1092
1088
|
frozen throughout the cycle and survive clean waiting restacks; historical
|
|
1093
1089
|
facts without citations remain readable. Upstream-only paths are excluded.
|
|
1090
|
+
- **Work distance is advisory durable telemetry.** Each admitted work target poll
|
|
1091
|
+
samples destination-only commits (`BUILD..TARGET`), even when only the build
|
|
1092
|
+
head changed. `target.distance` pins branch, target SHA, nullable build head
|
|
1093
|
+
and nullable nonnegative count. Missing history/capability is unknown. Equal
|
|
1094
|
+
samples are deduplicated; destination changes and rewrites invalidate samples.
|
|
1095
|
+
Sampling never provisions a workspace, renders Git reads, or gates restacking.
|
|
1094
1096
|
- **Observation never mutates a running workspace.** `target.moved` records an
|
|
1095
1097
|
exact observed head, even during a session. Transactions freeze their target;
|
|
1096
1098
|
later observations coalesce into one follow-on transaction for the newest
|
|
@@ -1169,7 +1171,7 @@ owning scope in the same atomic operation that marks the stream closed. A
|
|
|
1169
1171
|
stream that dies mid-turn stays open and readable, so its output survives.
|
|
1170
1172
|
|
|
1171
1173
|
Close serializes against append, per stream: an append issued while a stream
|
|
1172
|
-
is being closed — or after it has closed — either
|
|
1174
|
+
is being closed — or after it has closed — either merges in the finalized
|
|
1173
1175
|
artifact or is rejected with `StreamClosedError`; an accepted append is never
|
|
1174
1176
|
silently omitted from the artifact the close deposits. Appends to other
|
|
1175
1177
|
streams are unaffected.
|
|
@@ -1261,6 +1263,7 @@ The runner launches every session with environment set:
|
|
|
1261
1263
|
AB_STORE # store URL or local path
|
|
1262
1264
|
AB_BUILD # build slug
|
|
1263
1265
|
AB_PHASE # current phase (+ round)
|
|
1266
|
+
AB_CONTEXT_DIR # workspace-relative session scratch directory
|
|
1264
1267
|
AB_SESSION # session id
|
|
1265
1268
|
AB_TOKEN # signed credential for this exact phase session (remote store)
|
|
1266
1269
|
```
|
|
@@ -1312,8 +1315,12 @@ tokens are rejected with migration guidance. An explicit versioned owner-only
|
|
|
1312
1315
|
break-glass admin is the sole machine cross-project exception. Internal signed
|
|
1313
1316
|
owner delegation is short-lived, repository-bound and operator-only. The hosted
|
|
1314
1317
|
dispatcher issues stored credentials with immutable dispatcher purpose (raw
|
|
1315
|
-
store and tickets only) per invocation
|
|
1316
|
-
|
|
1318
|
+
store and tickets only) per repository invocation. It deletes each credential on
|
|
1319
|
+
completion, including failures. Crash-safety expiry is the earlier of the configured
|
|
1320
|
+
TTL upper bound and the invocation deadline plus 60 seconds. Each served tick
|
|
1321
|
+
prunes at most 100 expired or revoked dispatcher rows using indexed probes;
|
|
1322
|
+
unexpired legacy rows retain their recorded expiry before eventual pruning.
|
|
1323
|
+
Already issued delegated grants do not depend on the parent row or its expiry.
|
|
1317
1324
|
Owner-issued project credentials attribute operator writes to their recorded
|
|
1318
1325
|
creator. Agents never receive the dispatcher's project credential. Delegated
|
|
1319
1326
|
reads retain access to same-project repository state; build mutations target only
|
|
@@ -1362,7 +1369,7 @@ sessions need no separate global installation.
|
|
|
1362
1369
|
|
|
1363
1370
|
| Command | Purpose | Terminal? |
|
|
1364
1371
|
|---|---|---|
|
|
1365
|
-
| `ab context` | hydrate
|
|
1372
|
+
| `ab context` | hydrate `$AB_CONTEXT_DIR/` with the phase's inputs; print the manifest | no |
|
|
1366
1373
|
| `ab artifact put <kind> <file> [--attach]` | deposit a versioned artifact → returns rev; optionally designate that exact revision for the PR | no |
|
|
1367
1374
|
| `ab artifact get <kind>[@rev]` | fetch an artifact within own build | no |
|
|
1368
1375
|
| `ab artifact download …` | read-only exact-byte retrieval; operator-wide without identity, own-build only with ambient phase identity; works after build termination | no |
|
|
@@ -1391,7 +1398,7 @@ Exact flags and validation live with the CLI implementation and its tests.
|
|
|
1391
1398
|
A phase-scoped hydration into the gitignored scratch dir:
|
|
1392
1399
|
|
|
1393
1400
|
```
|
|
1394
|
-
.ab
|
|
1401
|
+
.ab/<dir>/
|
|
1395
1402
|
context.json # manifest: build, phase, round, artifact revs,
|
|
1396
1403
|
# required deposits, allowed terminal commands
|
|
1397
1404
|
spec.md
|
|
@@ -1405,10 +1412,24 @@ A phase-scoped hydration into the gitignored scratch dir:
|
|
|
1405
1412
|
# assets/<kind>/<name>/…, folders keep their trees
|
|
1406
1413
|
```
|
|
1407
1414
|
|
|
1415
|
+
Every build agent receives workspace-relative `AB_CONTEXT_DIR`. Core phases use
|
|
1416
|
+
`.ab/plan`, `.ab/plan-review`, `.ab/implement`, `.ab/code-review`, `.ab/reconcile`
|
|
1417
|
+
and `.ab/finalize`; agent verify and finalize post-steps use `.ab/verify-<step>`
|
|
1418
|
+
and `.ab/finalize-<step>`. Step names contain ASCII letters, digits, `.`, `_`,
|
|
1419
|
+
and `-`, excluding exactly `.` and `..`.
|
|
1420
|
+
|
|
1421
|
+
`ab context` prints this directory and records `contextDir` in its manifest.
|
|
1422
|
+
Hydration replaces only that directory's disposable files, retaining tracked
|
|
1423
|
+
content and sibling directories. Sessions may read each other's directories;
|
|
1424
|
+
these directories provide scratch separation, not filesystem isolation.
|
|
1425
|
+
`materialized` keys are directory-relative; manifest, notes, asset, provenance
|
|
1426
|
+
index and contribution spec paths remain workspace-relative. Implement receives
|
|
1427
|
+
routed verify reports under its own `$AB_CONTEXT_DIR/verify/`.
|
|
1428
|
+
|
|
1408
1429
|
The manifest tells the agent its contract — `required` deposits and
|
|
1409
1430
|
`allowedTerminals` — so skills are self-checking against the same data the
|
|
1410
1431
|
CLI validates with. When the build pinned ticket assets, every phase also gets
|
|
1411
|
-
them under
|
|
1432
|
+
them under `$AB_CONTEXT_DIR/assets/<kind>/<name>/` and the manifest lists each as
|
|
1412
1433
|
`assets: [{kind, name, revision, layout, size, path}]`; a `file` asset is the
|
|
1413
1434
|
single file inside its directory. A build with no assets gets no `assets` key
|
|
1414
1435
|
and no directory. `ab build asset get <slug> <kind> <name> <dest>` downloads a
|
|
@@ -1427,19 +1448,30 @@ terminals:
|
|
|
1427
1448
|
|
|
1428
1449
|
In node `verify:*` context, `nodeVerification` in the manifest identifies the frozen
|
|
1429
1450
|
`range`, `indexPath`, `contributions`, `handPushedCommits` and `unattributedCommits`. Each contribution
|
|
1430
|
-
has `build`, its
|
|
1451
|
+
has `build`, its preparation-time stored `ticket` identity, `spec: {kind: 'spec', rev}`,
|
|
1431
1452
|
`specPath` and `commits`. The JSON index repeats this metadata and adds the
|
|
1432
1453
|
exhaustive ordered `commits: [{sha, build?}]` mapping. Paths are workspace-relative
|
|
1433
1454
|
and reflect scratch allocation, including legacy tracked-file collisions.
|
|
1434
|
-
Contribution specs normally live at
|
|
1435
|
-
normally lives at
|
|
1455
|
+
Contribution specs normally live at `$AB_CONTEXT_DIR/contributions/<build>/spec.md`; the index
|
|
1456
|
+
normally lives at `$AB_CONTEXT_DIR/node-verification.json`. These files are marked `derived`
|
|
1436
1457
|
in `materialized`, with their source build and revision recorded in the metadata.
|
|
1437
1458
|
|
|
1438
1459
|
Membership comes from build identity trailers on every commit reachable in the
|
|
1439
1460
|
frozen parent-to-head range, including earlier cycles and merge side history.
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1461
|
+
The dispatcher gathers contributor material with repository authority while
|
|
1462
|
+
preparing the exact cycle head, before launching verification. Specs use the
|
|
1463
|
+
event-authorized revision at preparation, never an unsanctioned latest deposit
|
|
1464
|
+
or mutable ticket body. Unknown identities, ambiguous or invalid trailers, and
|
|
1465
|
+
missing source data prevent preparation. A versioned node-owned
|
|
1466
|
+
`node-verification-context` artifact is deposited atomically with
|
|
1467
|
+
`integration.prepared`, which cites its exact revision. Context hydration reads
|
|
1468
|
+
only that citation, validates its cycle and range, and allocates public paths;
|
|
1469
|
+
it needs no contributor reads or Git provenance discovery. Concurrent members
|
|
1470
|
+
and resumed sessions retain the same frozen specs; a new cycle collects fresh
|
|
1471
|
+
inputs. Missing, corrupt or mismatched inputs fail without publishing a manifest.
|
|
1472
|
+
Historical agent cycles without a citation require a new prepared cycle;
|
|
1473
|
+
check-only cycles do not require contributor inputs. Session and build scope
|
|
1474
|
+
permissions remain unchanged. Commits without a build trailer are
|
|
1443
1475
|
listed as unattributed, a mechanical absence of a trailer rather than an authorization verdict.
|
|
1444
1476
|
`handPushedCommits: [{sha, originalSha, message}]` identifies node-owned hand-pushed
|
|
1445
1477
|
commits in the frozen range. Ownership uses the durable first-parent contribution
|
|
@@ -1449,11 +1481,11 @@ These messages express maintainer-authorized intent: judge quality and consisten
|
|
|
1449
1481
|
never fail these commits solely for lacking a covering spec.
|
|
1450
1482
|
Other node changes are authorized when the node spec or the spec of the contribution
|
|
1451
1483
|
that introduced it covers it; use the commit mapping to find that spec.
|
|
1452
|
-
Leaf verification
|
|
1484
|
+
Leaf verification omits node provenance.
|
|
1453
1485
|
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1486
|
+
The current manifest deliberately selects phase-appropriate inputs: the planner
|
|
1487
|
+
is not given code-review rounds, while a reviewer receives prior findings.
|
|
1488
|
+
Sibling directories remain readable; this selection is not an isolation boundary.
|
|
1457
1489
|
|
|
1458
1490
|
### 8.4 Terminal discipline [D5]
|
|
1459
1491
|
|
|
@@ -1549,7 +1581,7 @@ credentials **never enter the sandbox** (load-bearing once builds run on
|
|
|
1549
1581
|
remote sandboxes), ordinary implementation history is extended and reconcile
|
|
1550
1582
|
uses exact expected-head guarded rewrites with archived evidence, and the
|
|
1551
1583
|
push-at-boundary rule from [D3] is enforced by construction rather than
|
|
1552
|
-
convention. The same rule bounds
|
|
1584
|
+
convention. The same rule bounds an external operator's small fixes: an operator
|
|
1553
1585
|
sandbox publishes work only through the `sandbox.publish` tool, whose push and
|
|
1554
1586
|
PR creation are kernel-side plumbing executed by the sandbox service through
|
|
1555
1587
|
the workspace provider's publication capability — the only publication path
|
|
@@ -1562,7 +1594,7 @@ request, never to the base branch.
|
|
|
1562
1594
|
|
|
1563
1595
|
```
|
|
1564
1596
|
implementer: ab context → (work, commit) → ab observe --kind refactor "…"
|
|
1565
|
-
→ ab done --notes
|
|
1597
|
+
→ ab done --notes "$AB_CONTEXT_DIR/implement-notes.md"
|
|
1566
1598
|
⇒ validates clean worktree and focused review boundary,
|
|
1567
1599
|
pushes branch, emits implement.completed {commits, artifact}
|
|
1568
1600
|
reviewer: ab context (gets spec, plan, {base,head}, prior findings)
|
|
@@ -1657,6 +1689,34 @@ dispatch-settings reducer as dispatcher decisions and the dashboard. An absent
|
|
|
1657
1689
|
repository stream reduces as an empty journal and reports intake on, repository
|
|
1658
1690
|
pause off; the query does not create that stream,
|
|
1659
1691
|
append an event, claim a ticket, attach a runner, or start dispatcher work.
|
|
1692
|
+
The CLI additionally loads mutable advisory `operator.registrations`, with each
|
|
1693
|
+
live registration's ID, host, PID, original startedAt, heartbeatAt and heartbeatAgeMs.
|
|
1694
|
+
Human output includes one `operator: absent` or `operator: present (N registrations)` line.
|
|
1695
|
+
|
|
1696
|
+
`ab watch --operator` opts into repository-wide advisory presence. Named slugs
|
|
1697
|
+
and ambient build/scoped sessions are usage errors. Unflagged watches remain
|
|
1698
|
+
read-only, including resumes of flagged cursors. Flagged watches register before
|
|
1699
|
+
watch initialization, renew independently every 30 seconds and attempt one final
|
|
1700
|
+
renewal at orderly exit. Presence expires 300,000ms after the last successful
|
|
1701
|
+
heartbeat and never appends a build/repository event or claims a lease. Multiple
|
|
1702
|
+
registrations coexist. The opaque watch cursor preserves registration ID and start
|
|
1703
|
+
across re-arms, including revival after withdrawal or expiry. SIGINT, SIGTERM,
|
|
1704
|
+
SIGHUP and stdout EPIPE attempt one store withdrawal, with a shared approximately
|
|
1705
|
+
2-second shutdown budget that cancels and drains pending heartbeats before removal.
|
|
1706
|
+
Withdrawal failure is reported on stderr and falls back to TTL expiry; a remote
|
|
1707
|
+
service without the route falls back silently. Timeout/count completion retains
|
|
1708
|
+
presence and its final renewal for re-arming. SIGKILL cannot be caught and still
|
|
1709
|
+
relies on TTL expiry. `ab wait` does not
|
|
1710
|
+
renew or preserve this identity. MCP presence and dashboard display are deferred.
|
|
1711
|
+
|
|
1712
|
+
Filing agents check CLI repository status before ready filing. With a live
|
|
1713
|
+
operator they put intent, rejected alternatives and out-of-scope reasons into
|
|
1714
|
+
ticket bodies, file, tell the human the existing operator will pick it up, and
|
|
1715
|
+
stop without a watch. Otherwise they load `ab-operate`. Before registering, an
|
|
1716
|
+
operator checks for another live operator and reports it rather than registering
|
|
1717
|
+
unless directed. Explicit human instructions override these defaults. The role
|
|
1718
|
+
covers the builds the repository's dispatcher dispatches, including new builds;
|
|
1719
|
+
finishing an initially queued set does not end it.
|
|
1660
1720
|
|
|
1661
1721
|
Agents never receive TicketSource credentials. Only the deterministic file
|
|
1662
1722
|
step creates/adopts approved proposals and commits ledger facts.
|
|
@@ -1691,6 +1751,16 @@ nonblank `AB_STORE`, `[store] url`, then local state. `AB_TOKEN` overrides saved
|
|
|
1691
1751
|
credentials. Configured services without credentials fail closed. Connection
|
|
1692
1752
|
commands require a network origin and are unavailable in phase sessions.
|
|
1693
1753
|
|
|
1754
|
+
A valid browser code link opens approval directly, returning there after sign-in
|
|
1755
|
+
when needed; missing or malformed codes retain entry. Approval always shows the
|
|
1756
|
+
organization. Assigned projects show a read-only name and cannot move during
|
|
1757
|
+
approval. Every unassigned approval requires an explicit eligible organization
|
|
1758
|
+
ID, including fresh, legacy and removed projects, even for super users. A sole
|
|
1759
|
+
choice is visibly selected; multiple choices require selection; no choices block
|
|
1760
|
+
approval. Assignment, registration, credential and approval commit atomically
|
|
1761
|
+
after current access checks. Retained unassigned history remains super-user-only
|
|
1762
|
+
until assignment. Denial requires no organization and changes no assignment.
|
|
1763
|
+
|
|
1694
1764
|
|
|
1695
1765
|
## 9. AgentRunner
|
|
1696
1766
|
|
|
@@ -1993,7 +2063,7 @@ like everything else. An answer carries either bare `retry` or free-text
|
|
|
1993
2063
|
not a forced success — an unresolved condition may escalate again. For an
|
|
1994
2064
|
agent verifier's own `ab escalate`, that next run is the same `verify:<step>`:
|
|
1995
2065
|
`verify.started.feedback` cites the answer and `ab context` materializes it as
|
|
1996
|
-
|
|
2066
|
+
`$AB_CONTEXT_DIR/guidance.json`. The citation remains the durable carrier across any crash
|
|
1997
2067
|
before launch; only a later `session.started` with the same phase and attempt
|
|
1998
2068
|
consumes it. Producer guidance uses the same phase-and-round launch boundary. A
|
|
1999
2069
|
bare retry reruns the step without guidance. The intentionally different policy
|
|
@@ -2102,7 +2172,11 @@ The fixed workflow is:
|
|
|
2102
2172
|
nonbinding ordering do not become blockers. A fresh reviewer checks
|
|
2103
2173
|
coverage, semantic dedup, spec quality, evidence, and both directions of
|
|
2104
2174
|
that prerequisite rule. Only approval advances.
|
|
2105
|
-
3. **file (deterministic)** — refresh
|
|
2175
|
+
3. **file (deterministic)** — refresh ledger existence and resolution before
|
|
2176
|
+
deciding join eligibility; scan-time lifecycle facts are context only. Each
|
|
2177
|
+
same-source ledger ticket uses one fresh provider lookup, with hosted alias
|
|
2178
|
+
resolution sharing that response. Missing, resolved, and foreign-source
|
|
2179
|
+
ledger tickets cannot be joined. Refresh the selected TicketSource lifecycle for
|
|
2106
2180
|
every declared blocker and same-source ticket that originated a create's
|
|
2107
2181
|
clustered observations. Unknown agent-declared ids fail filing; missing,
|
|
2108
2182
|
resolved, foreign-source, and absent origins contribute nothing. The created
|
|
@@ -2155,7 +2229,7 @@ event-level mechanics live in the repository catalog and reducer tests):
|
|
|
2155
2229
|
the source reports completion or the relationship is deliberately removed.
|
|
2156
2230
|
The waiver is a field of
|
|
2157
2231
|
its own rather than a reuse of `triageState`, because bounces, aborts, and
|
|
2158
|
-
closed-unmerged PRs must still
|
|
2232
|
+
closed-unmerged PRs must still merge where the next tick will not reclaim
|
|
2159
2233
|
them — a bounce filed into Ready is claimed and bounced again forever.
|
|
2160
2234
|
|
|
2161
2235
|
## 13. Ticket source policy
|
|
@@ -2232,18 +2306,18 @@ status is for builds awaiting a human.
|
|
|
2232
2306
|
In repositories with integration nodes, a blocker that has a build resolves only
|
|
2233
2307
|
when its change identity is present in the dependent's sampled target head
|
|
2234
2308
|
(the configured root branch when no target is set). Source completion or an
|
|
2235
|
-
aggregate source blocker flag cannot substitute for presence. Confirmed
|
|
2309
|
+
aggregate source blocker flag cannot substitute for presence. Confirmed merge
|
|
2236
2310
|
SHAs prove identity through Git reachability even without a build trailer;
|
|
2237
|
-
confirmed node
|
|
2311
|
+
confirmed node merges transport their frozen whole contribution, including
|
|
2238
2312
|
node-owned foreign changes and nested contributions. Inherited parent history
|
|
2239
2313
|
is excluded. An empty completed node contributes nothing; missing or ambiguous
|
|
2240
2314
|
completion evidence does not mean empty. The newest build generation is used,
|
|
2241
2315
|
with ties diagnosed rather than falling back to older successful work.
|
|
2242
2316
|
|
|
2243
2317
|
Demand-driven restacking supplies ancestor changes to descendants. Sibling changes
|
|
2244
|
-
wait for their node to
|
|
2245
|
-
descendant changes wait for their node to
|
|
2246
|
-
|
|
2318
|
+
wait for their node to merge in the common ancestor and presence demand into the target;
|
|
2319
|
+
descendant changes wait for their node to merge into the target ancestor. Same-node
|
|
2320
|
+
merges satisfy presence directly. Unknown evidence leaves source work queued,
|
|
2247
2321
|
with diagnostics naming the blocker and destination. Blockers with no build,
|
|
2248
2322
|
and repositories without nodes, retain source done-state resolution. Presence
|
|
2249
2323
|
is checked only at claim, with the sampled destination revalidated before claim;
|
|
@@ -2284,13 +2358,13 @@ Once it holds commits its current parent lacks, the dispatcher opens or adopts
|
|
|
2284
2358
|
its PR. No placeholder commit is created; parent-only advancement is still empty.
|
|
2285
2359
|
|
|
2286
2360
|
Claims targeting an open node freeze its build identity and branch as their base.
|
|
2287
|
-
Their PR,
|
|
2288
|
-
metadata changes. Missing, unopened,
|
|
2361
|
+
Their PR, merge and reconcile all use that frozen base, even after source
|
|
2362
|
+
metadata changes. Missing, unopened, merged, closed or aborted targets remain
|
|
2289
2363
|
queued with a diagnostic. The newest generation wins; a closed generation never
|
|
2290
2364
|
falls back to an older open one. Blockers remain a separate graph.
|
|
2291
2365
|
|
|
2292
2366
|
A node is complete when exhaustive native ticket enumeration finds no unresolved
|
|
2293
|
-
ticket targeting it, no unsettled frozen child claim remains, and a
|
|
2367
|
+
ticket targeting it, no unsettled frozen child claim remains, and a merged
|
|
2294
2368
|
contribution is durably known. Triage, backlog and ready children keep it open;
|
|
2295
2369
|
done and cancelled children do not. Listing diagnostics fail closed. Completeness
|
|
2296
2370
|
is sampled again before verification and publication. Source edits cannot be
|
|
@@ -2299,17 +2373,17 @@ transactional with a forge write.
|
|
|
2299
2373
|
The kernel verifies the exact node head and sampled parent with all configured
|
|
2300
2374
|
verify steps and normal path applicability. A moved head or parent invalidates
|
|
2301
2375
|
eligibility, including a clean restack. Failure blocks the node; file a repair
|
|
2302
|
-
child targeting it. Repair children remain admissible, and their
|
|
2376
|
+
child targeting it. Repair children remain admissible, and their merged head
|
|
2303
2377
|
supersedes the failed cycle. Reports retain their actual head/base citations.
|
|
2304
2378
|
|
|
2305
|
-
|
|
2306
|
-
Auto mode authorizes complete, verified nodes; consent mode waits for `ab
|
|
2307
|
-
|
|
2379
|
+
Merge follows ordered `[[merge]]` rules (§15.7), defaulting to node consent.
|
|
2380
|
+
Auto mode authorizes complete, verified nodes; consent mode waits for `ab merge`.
|
|
2381
|
+
Merge refuses incomplete nodes and names open children; `ab hold` remains available.
|
|
2308
2382
|
Node parents and local-git roots receive guarded fast-forwards, preserving one
|
|
2309
2383
|
commit and identity trailer per contributing build. GitHub shared roots use the
|
|
2310
2384
|
PR rebase endpoint guarded on verified head, after a final parent freshness read.
|
|
2311
|
-
Authoritative enforced up-to-date protection records fenced
|
|
2312
|
-
records unfenced
|
|
2385
|
+
Authoritative enforced up-to-date protection records fenced merge; uncertainty
|
|
2386
|
+
records unfenced merge and triggers immutable merged-tree comparison. A mismatch
|
|
2313
2387
|
raises operator attention and never rewrites the shared parent.
|
|
2314
2388
|
The repository build digest carries an additive optional pending-audit signal from
|
|
2315
2389
|
`integration.landed` with an operation until `integration.audited` settles it.
|
|
@@ -2341,20 +2415,20 @@ generation and observed ticket revision. Only acceptance changes the effective
|
|
|
2341
2415
|
node ancestry; `build.created` and `node.opening` remain historical provenance.
|
|
2342
2416
|
Replay completion, `node.parent-pr-retargeted`, and `node.parent-completed`
|
|
2343
2417
|
acknowledge independent effects. Pending requests and accepted moves fence
|
|
2344
|
-
verification and
|
|
2418
|
+
verification and merge, and keep both old and new parents incomplete. Leases
|
|
2345
2419
|
alone do not represent outstanding work. Recovery rereads ambiguous writes,
|
|
2346
2420
|
cancels unconfirmed requests, resumes frozen replay, and retries PR retargeting
|
|
2347
2421
|
without replaying unrelated ticket edits. Later edits wait for the reserved
|
|
2348
2422
|
operation to settle. Native auto-merge is cancelled before changing the base.
|
|
2349
|
-
Accepted node re-parenting revokes prior
|
|
2350
|
-
`node.parent-accepted` fact. Holds survive. Readiness evaluates
|
|
2351
|
-
against the new effective parent before another
|
|
2423
|
+
Accepted node re-parenting revokes prior merge consent through the recorded
|
|
2424
|
+
`node.parent-accepted` fact. Holds survive. Readiness evaluates merge policy
|
|
2425
|
+
against the new effective parent before another merge can proceed.
|
|
2352
2426
|
|
|
2353
2427
|
Parent identity changes invalidate eligibility even at identical SHAs; historical
|
|
2354
2428
|
verification evidence remains immutable.
|
|
2355
2429
|
|
|
2356
2430
|
Self/ancestor cycles (including pending effective ancestry), unopened or terminal
|
|
2357
|
-
destination generations,
|
|
2431
|
+
destination generations, merging/closing sources and unsupported forge retargeting
|
|
2358
2432
|
are refused with a reason. Busy writer reservations defer external changes and
|
|
2359
2433
|
refuse synchronous mutations. Direct provider edits receive durable, revision-
|
|
2360
2434
|
deduplicated `node.parent-rejected` diagnostics when invalid, preserving effective
|
|
@@ -2369,12 +2443,12 @@ refused before any combined patch is written: abort and re-dispatch is the
|
|
|
2369
2443
|
supported path. Unclaimed tickets retain ordinary target editing.
|
|
2370
2444
|
|
|
2371
2445
|
**Demand-driven restacking and node writers.** Nodes observe parent movement durably but restack only on demand: before a
|
|
2372
|
-
complete nonempty node verifies; before
|
|
2446
|
+
complete nonempty node verifies; before merge if its parent moved; when queued
|
|
2373
2447
|
dependency presence requires an ancestor change; on `ab restack <node>`; or on
|
|
2374
2448
|
accepted re-parenting. There is no eager mode or cadence option. Nested nodes
|
|
2375
2449
|
need their own demand. Existing frozen transactions, including ones reserved
|
|
2376
2450
|
before upgrade, finish first; later demand coalesces onto the latest parent.
|
|
2377
|
-
Leaves keep verify-entry and awaiting-
|
|
2451
|
+
Leaves keep verify-entry and awaiting-merge restacks for every target.
|
|
2378
2452
|
|
|
2379
2453
|
Presence demand uses change identities, never ticket resolution alone. It follows
|
|
2380
2454
|
only the path from the nearest proven ancestor source down to the dependent's
|
|
@@ -2388,15 +2462,18 @@ and unopened nodes. Paused or blocked nodes wait for their normal safety gates.
|
|
|
2388
2462
|
A request arriving during replay survives until its parent and required identities
|
|
2389
2463
|
are covered. Re-parenting invalidates requests for the old destination.
|
|
2390
2464
|
|
|
2391
|
-
Both dashboards
|
|
2392
|
-
|
|
2465
|
+
Both dashboards use `+N` beside the destination for commits it has that the
|
|
2466
|
+
build lacks, no suffix when current, and `+?` when unknown. Merged and closed
|
|
2467
|
+
builds omit the suffix. Terminal list rows put `→ destination +N` on the slug
|
|
2468
|
+
line; work steps follow immediately and integration progress keeps only the
|
|
2469
|
+
bar and child counts. Detail target/Parent fields use the same suffix. Distance counts commits reachable from the observed
|
|
2393
2470
|
parent but not the last confirmed contribution base; it is not elapsed time or
|
|
2394
2471
|
poll count. Samples are invalidated by replay or re-parenting. A stale node
|
|
2395
|
-
cannot verify or
|
|
2472
|
+
cannot verify or merge; inventory and child merges continue while it collects.
|
|
2396
2473
|
|
|
2397
2474
|
Node branches have one writer at a time. A distinct mutable node writer lease
|
|
2398
2475
|
(serialized independently of runner execution leases) guards both restacks and
|
|
2399
|
-
controlled child
|
|
2476
|
+
controlled child merges. A revision-checked `node.writer-reserved` fact freezes
|
|
2400
2477
|
the operation, original expected head, parent snapshot, previous contribution
|
|
2401
2478
|
boundary, immutable archives, ordered changes, and merge proofs. Expiry permits
|
|
2402
2479
|
recovery of that reservation, never an incompatible operation. Each change has
|
|
@@ -2421,7 +2498,7 @@ Missing source artifacts or invalid identities escalate. Foreign conflicts suppl
|
|
|
2421
2498
|
commit metadata and a diff, with escalation when intent is unclear. Completion
|
|
2422
2499
|
validates exactly one commit on that item's replay base, retaining its original
|
|
2423
2500
|
identity or foreign status. The agent never publishes the stack; the dispatcher
|
|
2424
|
-
resumes only after session and execution settlement. Automatic
|
|
2501
|
+
resumes only after session and execution settlement. Automatic merge policy
|
|
2425
2502
|
remains outside this grammar.
|
|
2426
2503
|
|
|
2427
2504
|
**Foreign merge safety for node replay.** A node contribution is enumerated
|
|
@@ -2441,7 +2518,7 @@ delta, including merge-resolution content and an empty result when necessary;
|
|
|
2441
2518
|
its side identities remain inherited from the parent.
|
|
2442
2519
|
|
|
2443
2520
|
A merge carrying its own identity is anomalous: the kernel never creates merges,
|
|
2444
|
-
and legacy reconcile merges were squashed at
|
|
2521
|
+
and legacy reconcile merges were squashed at merge. It is refused regardless
|
|
2445
2522
|
of side-history safety. Never strip, move or reinterpret its identity trailer.
|
|
2446
2523
|
An absent upstream side identity, ambiguous or malformed identity, or an
|
|
2447
2524
|
identity-bearing merge refuses the entire restack before replay or publication.
|
|
@@ -2566,8 +2643,8 @@ backfill, and migration reruns preserve counters. Hosted reads use one GET
|
|
|
2566
2643
|
repository before reading and support repositories with builds but no journal.
|
|
2567
2644
|
|
|
2568
2645
|
Durable operator settings (intake, repository pause, harvest gate) survive
|
|
2569
|
-
restarts through the repository journal. Per-
|
|
2570
|
-
live in the build log.
|
|
2646
|
+
restarts through the repository journal. Per-merge hold and merge commands
|
|
2647
|
+
live in the build log. Merge policy is declarative dispatcher configuration
|
|
2571
2648
|
(§15.7); there is no writable repository auto-merge default.
|
|
2572
2649
|
|
|
2573
2650
|
The **operator sandbox** is the third execution kind beside build and harvest
|
|
@@ -2701,7 +2778,7 @@ rejection is `EventValidationError`.
|
|
|
2701
2778
|
This is what makes cross-sandbox resume work (§15.6-C) and keeps the
|
|
2702
2779
|
store lean. SHAs are momentary evidence, not change identity: a forge
|
|
2703
2780
|
or future history rewrite can mint a new object id for the same change.
|
|
2704
|
-
The immutable build slug in the
|
|
2781
|
+
The immutable build slug in the merged commit's terminal Git trailer
|
|
2705
2782
|
`Autobuild-Build: <slug>` identifies the build's change across such rewrites
|
|
2706
2783
|
(RFC 0001 §5). Branch presence is determined by exact parsed trailer values
|
|
2707
2784
|
in reachable history, not recorded SHA ancestry. Kernel-owned single-change
|
|
@@ -2736,15 +2813,15 @@ with illustrative members:
|
|
|
2736
2813
|
|---|---|
|
|
2737
2814
|
| 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` |
|
|
2738
2815
|
| 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) |
|
|
2739
|
-
|
|
|
2816
|
+
| Merge policy | `landing.decided` (candidate, matched rule/default, labels, target, mode); `landing.native-enable-started`; `landing.native-applied` |
|
|
2740
2817
|
| 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) |
|
|
2741
2818
|
| Sessions | `session.started` (including optional write-ahead continuation intent and budget ceiling); `session.suspended` with partial transcript and active duration; `session.resumed` acceptance (stale reports are inert); reasoned `session.resume-fallback`; kernel-only `session.native-handle-recorded` with bracket and native execution identity; `session.ended` with transcript ref and usage (ordinary completion — the analysis corpus), or `session.ended {outcome: reclaimed, reclaimedBy: {instance, resumedFromSeq}}` (explicit transcriptless takeover) |
|
|
2742
2819
|
| Plan/code loops | `plan.started` … `plan-review.verdict`; `implement.started` … `code-review.verdict` |
|
|
2743
|
-
| Verify/finalize | `verify.started {step, attempt, feedback?, baseSha?, headSha?, restackId?}`, `verify.completed {step, outcome, skipCause?, baseSha?, headSha?, restackId?}`, `verify.reconcile-policy-captured {reconcileSeq, steps}`, `finalize.completed {pr}`, `finalize.step-started {step}`, `finalize.step-completed {step, ok, headSha?}` |
|
|
2820
|
+
| Verify/finalize | `verify.started {step, attempt, feedback?, baseSha?, headSha?, restackId?}`, `verify.completed {step, outcome, skipCause?, baseSha?, headSha?, restackId?}`, `verify.cancelled {step, attempt, cause: {step}, baseSha?, headSha?, restackId?}`, `verify.stage-failed {attempt, cycle, stage, failed, cancelled, baseSha?, headSha?, restackId?}`, `verify.reconcile-policy-captured {reconcileSeq, steps}`, `finalize.completed {pr}`, `finalize.step-started {step}`, `finalize.step-completed {step, ok, headSha?}` |
|
|
2744
2821
|
| Integration attention | Kernel/dispatcher `integration.verification-failed {id, head, parent, steps, guidance}`: one durable failed-cycle notification, recovered from exact verification receipts |
|
|
2745
2822
|
| 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) |
|
|
2746
2823
|
| PR attachments | `pr-attachment.designated`, `pr-attachment.hosted`, `pr-attachment.reclaimed`, `pr-attachment.reclaim-failed` |
|
|
2747
|
-
| Leaf restacking | `target.moved {branch, sha}`, `restack.prepared`, `restack.replayed`, `restack.publish-intended`, `restack.rewritten`, `restack.contended`, `restack.completed` |
|
|
2824
|
+
| 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` |
|
|
2748
2825
|
| 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` |
|
|
2749
2826
|
| Cross-cutting | `observation.recorded`, `escalation.raised`, `phase.failed`, `session.build-read-failed`, `phase.deferred`, `phase.deferral-escalated` |
|
|
2750
2827
|
| Repository journal | dispatcher setting facts; run lifecycle, effective config, tick/queue diagnostics, reload and runner outcomes; the `harvest.*` workflow, recovery, and ledger facts |
|
|
@@ -2789,6 +2866,20 @@ chain survives `policy.stallRounds` rounds.
|
|
|
2789
2866
|
|
|
2790
2867
|
### 15.5 Derived state (the reducer)
|
|
2791
2868
|
|
|
2869
|
+
The reducer retains every outstanding verifier keyed by step and attempt,
|
|
2870
|
+
independent of the compatibility `currentPhase`/`currentStep` projection. Each
|
|
2871
|
+
completion or cancellation clears only its member. Occurrence ownership comes
|
|
2872
|
+
from the raising agent's session and its durable phase start, never a phase name
|
|
2873
|
+
alone. Cancellation tombstones supersede delayed escalation raises and answers;
|
|
2874
|
+
only effective escalations contribute to blocked status or engine routing.
|
|
2875
|
+
Grouped stage failures use the decisive `verify.stage-failed` receipt. Existing
|
|
2876
|
+
`Feedback.verify` stays a single `{step, report}` object on every known event.
|
|
2877
|
+
The additive `implement.started.verifyStageFailure` sequence references the
|
|
2878
|
+
complete receipt, retained across crashed implement reruns and guidance rounds.
|
|
2879
|
+
Both new event types are decisive under version-tolerant reads, fencing older
|
|
2880
|
+
engines while their known event payloads remain valid after projection.
|
|
2881
|
+
|
|
2882
|
+
|
|
2792
2883
|
**Mixed-version reads.** Within the supported client window, readers that
|
|
2793
2884
|
implement this contract preserve raw unknown facts and skip them in functional
|
|
2794
2885
|
reducers. Known payloads project away added fields recursively while retaining
|
|
@@ -2804,7 +2895,7 @@ be advisory; new semantics requiring old kernels to stop use a new decisive type
|
|
|
2804
2895
|
Build reductions retain reader-relative unknown and decisive counts, unsupported
|
|
2805
2896
|
types and producer versions. Unknown facts advance raw cursors, including when
|
|
2806
2897
|
they trail the last known fact. Unknown decisive facts defer claims, phase
|
|
2807
|
-
routing, integration and
|
|
2898
|
+
routing, integration and merge/publication decisions for that build only;
|
|
2808
2899
|
read-only status/context/dashboard reads retain the lifecycle status. The
|
|
2809
2900
|
kernel or dispatcher records advisory `build.compatibility-deferred` with the
|
|
2810
2901
|
decisive boundary, types, versions and diagnostic, deduplicated per boundary.
|
|
@@ -2825,12 +2916,15 @@ read-decoder revision. Named and generic checkpoints use catalog-specific keys;
|
|
|
2825
2916
|
legacy/foreign-catalog snapshots are misses and are preserved. Unrecognized
|
|
2826
2917
|
reducer versions replay without repairing their cache. No lower-version write
|
|
2827
2918
|
replaces a higher-version row, even at a later cursor. Corrupt caches of the
|
|
2828
|
-
reader's own version may be conditionally repaired. Hosted named answers
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
`
|
|
2919
|
+
reader's own version may be conditionally repaired. Hosted named answers are canonical: the client accepts a representable finished
|
|
2920
|
+
value at its reducer version regardless of catalog identity. Version mismatches,
|
|
2921
|
+
invalid envelopes and invalid finished values fail with a typed incompatibility
|
|
2922
|
+
error naming the reducer and client/server versions. Remote clients never
|
|
2923
|
+
reconstruct named answers from event logs. Catalog identity travels in response
|
|
2924
|
+
header `x-autobuild-catalog-identity`; strict JSON bodies remain exactly
|
|
2925
|
+
`{version, cursor, value}`. Missing/malformed headers do not reject an answer.
|
|
2926
|
+
Repository digest batches are also canonical, with no client discovery or
|
|
2927
|
+
per-build fallback.
|
|
2834
2928
|
A service omits identity for a backend without one. This guarantee excludes
|
|
2835
2929
|
readers predating this contract and does not widen the supported client window.
|
|
2836
2930
|
|
|
@@ -2855,19 +2949,21 @@ restacking). Durable `node.restack-requested` facts retain operator/presence dem
|
|
|
2855
2949
|
including destination, sampled parent, dependent ticket and required identities.
|
|
2856
2950
|
Reservations freeze covered request ids; confirmed settlement acknowledges only
|
|
2857
2951
|
that coverage, and `node.restack-satisfied` records coverage or destination change.
|
|
2952
|
+
`target.distance` records advisory leaf distance with immutable destination and
|
|
2953
|
+
build tips; null count means unknown (a known count requires a head).
|
|
2858
2954
|
`node.parent-distance` records immutable base/parent/branch and count (null when unknown).
|
|
2859
2955
|
It retains the previous contribution boundary, latest parent
|
|
2860
2956
|
observation, complete replay prefix, active source item and merge proofs.
|
|
2861
2957
|
`integration.observed` optionally carries display-only `children` entries
|
|
2862
2958
|
(source/id, optional title and contribution build identity). Open-child and
|
|
2863
2959
|
contribution arrays remain the membership authorities; resolved tickets without
|
|
2864
|
-
contributions do not become
|
|
2865
|
-
with current live phase or `queued`, then contributions as `
|
|
2960
|
+
contributions do not become merged children. Dashboards list open children first
|
|
2961
|
+
with current live phase or `queued`, then contributions as `merged`. They show
|
|
2866
2962
|
expected verification steps with exact current-cycle/head/parent outcomes and
|
|
2867
|
-
|
|
2963
|
+
merge mode/rule/consent instructions. Optional `files` on `node.item-conflicted`
|
|
2868
2964
|
and conflicted `restack.replayed` records unmerged paths at replay. Legacy events
|
|
2869
2965
|
remain readable with explicit unavailable-title/file fallbacks; display metadata
|
|
2870
|
-
never authorizes collection or
|
|
2966
|
+
never authorizes collection or merge.
|
|
2871
2967
|
A rewrite receipt alone never promotes the boundary; only completed settlement
|
|
2872
2968
|
does. CLI status exposes pending/active work, reachable build identities and
|
|
2873
2969
|
node-owned foreign changes. A node stays `collecting` while its narrow reconcile
|
|
@@ -2929,8 +3025,8 @@ finalize.started → pr-attachment.hosted{designationSeq,asset} → finalize.com
|
|
|
2929
3025
|
**Interrupted dispatch:** if the log stops after `build.created`, a later
|
|
2930
3026
|
ordinary dispatcher tick provisions the workspace, atomically imports the spec,
|
|
2931
3027
|
posts the ticket notice once, and launches the runner. New claims do not
|
|
2932
|
-
materialize auto-merge-default attribution as a human request.
|
|
2933
|
-
is recorded at readiness; consent is an explicit
|
|
3028
|
+
materialize auto-merge-default attribution as a human request. Merge policy
|
|
3029
|
+
is recorded at readiness; consent is an explicit merge command. A failed boundary appends `dispatch.failed
|
|
2934
3030
|
{stage,attempt,error}` and stays queued for another tick until its budget is
|
|
2935
3031
|
exhausted. Dispatch failures share a `[policy].maxDispatchAttempts` budget
|
|
2936
3032
|
(default 3) across
|
|
@@ -2948,6 +3044,14 @@ any unexpired execution lease, then releases a partial workspace and stale
|
|
|
2948
3044
|
lease, returns the ticket to Ready, and appends `build.completed {outcome:
|
|
2949
3045
|
discarded}` last. No runner is required.
|
|
2950
3046
|
|
|
3047
|
+
**A — grouped verification:** a failing member waits at its stage barrier for
|
|
3048
|
+
all siblings unless a fail-fast member fails. After cancellation and confirmed
|
|
3049
|
+
whole-execution teardown, a replacement execution records/reuses one complete
|
|
3050
|
+
`verify.stage-failed` receipt and routes to implement. The receipt orders failed
|
|
3051
|
+
reports by configuration and lists cancelled members as not run. An answered
|
|
3052
|
+
verifier escalation reruns only its owner while other members continue; a
|
|
3053
|
+
cancelled owner's escalation has no remaining blocked or routing effect.
|
|
3054
|
+
|
|
2951
3055
|
**A — verify failure:** `verify.completed {step: acceptance, outcome: fail,
|
|
2952
3056
|
report}` → kernel routes back into the code loop: `implement.started
|
|
2953
3057
|
{round: 2, feedback: {verify: {step, report}}}` → fix → `code-review` round
|
|
@@ -2962,7 +3066,7 @@ exhausted → `escalation.raised {source: "policy"}`. Guidance answering that
|
|
|
2962
3066
|
policy escalation routes to `implement` and outranks the pending report. By
|
|
2963
3067
|
contrast, when the agent verifier itself uses `ab escalate`, guidance answering
|
|
2964
3068
|
it reruns that same step with `verify.started {feedback: {guidance}}`; `ab context`
|
|
2965
|
-
writes
|
|
3069
|
+
writes `$AB_CONTEXT_DIR/guidance.json`. The start citation remains pending through repeated
|
|
2966
3070
|
pre-launch recovery. A later `session.started` for that same verifier and
|
|
2967
3071
|
attempt consumes the answer once, so a later failure routes its report to
|
|
2968
3072
|
`implement` without stale guidance. Producer starts use the same exact-phase,
|
|
@@ -3064,7 +3168,7 @@ durable remote branch: a match repairs the missing completion fact before the
|
|
|
3064
3168
|
replacement starts, covering a lost post-push acknowledgement; otherwise the
|
|
3065
3169
|
commit existed only in the deleted sandbox, the request is abandoned, and the
|
|
3066
3170
|
phase rerun must issue a new request. A crash while closing several sessions
|
|
3067
|
-
|
|
3171
|
+
merges no attachment;
|
|
3068
3172
|
the next recovery closes only those still open, so repeated takeover converges.
|
|
3069
3173
|
Historical orphan-only logs remain valid and require no repair.
|
|
3070
3174
|
|
|
@@ -3101,6 +3205,10 @@ but remains only a liveness signal, never a pipeline outcome. Build progress,
|
|
|
3101
3205
|
config, diagnostics, and outcomes cross the process boundary only through
|
|
3102
3206
|
build-owned Store state. The kernel claims each execution's durable lease before
|
|
3103
3207
|
launch and releases that exact holder only after completion; the child renews it.
|
|
3208
|
+
Recovered remote execution settlement requires confirmed whole-environment
|
|
3209
|
+
teardown too: a guest command exit alone is insufficient. A failed or ambiguous
|
|
3210
|
+
sandbox stop records no `execution.ended`, releases no lease, and permits no
|
|
3211
|
+
publication or replacement execution; observation retries on a later tick.
|
|
3104
3212
|
The lease remains the cross-process recovery and workspace-teardown gate (the
|
|
3105
3213
|
in-memory guard is deliberately not durable: a dead process's memory disappears
|
|
3106
3214
|
with it). Ordinary dispatcher shutdown gracefully signals each local runner leader and
|
|
@@ -3119,6 +3227,11 @@ every actionable build on its first tick rather than waiting for the sweep;
|
|
|
3119
3227
|
lease claiming stays the exclusivity gate, so a genuinely live old runner
|
|
3120
3228
|
wins harmlessly.
|
|
3121
3229
|
|
|
3230
|
+
Verification's current result boundary also advances on `verify.config-captured`
|
|
3231
|
+
and `verify.config-superseded` (§16.1). These facts do not change reconcile
|
|
3232
|
+
identity or its policy snapshot; replay gates still refer to the code/reconcile
|
|
3233
|
+
boundary. Superseded receipts remain historical evidence.
|
|
3234
|
+
|
|
3122
3235
|
### 15.7 Post-PR lifecycle [D1 — confirmed]
|
|
3123
3236
|
|
|
3124
3237
|
Walking the happy path exposed a gap in the grammar: `finalize` creates the
|
|
@@ -3137,7 +3250,7 @@ ticket*, never a reopened build.
|
|
|
3137
3250
|
**Merge standard: one change per build, replay at reconcile.**
|
|
3138
3251
|
|
|
3139
3252
|
- **Root-target leaf PR → configured root: squash merge.** One commit per
|
|
3140
|
-
leaf build keeps the root linear. Node-target children and nodes
|
|
3253
|
+
leaf build keeps the root linear. Node-target children and nodes merge into
|
|
3141
3254
|
local-git roots use guarded fast-forwards; GitHub root nodes use guarded PR
|
|
3142
3255
|
rebase merge with fencing/audit provenance (§13.1), preserving contributions.
|
|
3143
3256
|
- **Conflicted build → refreshed base: restack.** The kernel collapses the
|
|
@@ -3153,9 +3266,9 @@ Rewrites used to sever event-recorded SHAs; immutable archives and durable
|
|
|
3153
3266
|
rewrite facts retain them. Ordinary per-WIP-commit rebase remains inappropriate.
|
|
3154
3267
|
Existing historical merge reconciliations retain their original replay/display
|
|
3155
3268
|
semantics and supply the promoted contribution base for a later restack. Resumed
|
|
3156
|
-
builds use current engine routing at newly reached replay and
|
|
3269
|
+
builds use current engine routing at newly reached replay and merge boundaries;
|
|
3157
3270
|
there is no claim-version guarantee that in-flight builds finish under the old
|
|
3158
|
-
merge standard. Execution configuration remains pinned, while
|
|
3271
|
+
merge standard. Execution configuration remains pinned, while merge policy
|
|
3159
3272
|
is live dispatcher configuration. Operators requiring old execution behavior
|
|
3160
3273
|
should drain work before upgrading rather than run mixed-version writers.
|
|
3161
3274
|
|
|
@@ -3167,6 +3280,13 @@ Publication requests and loss records alone are not retained Git history: their
|
|
|
3167
3280
|
unpublished objects may have died with a released sandbox. A separately published
|
|
3168
3281
|
or reviewed tip remains an archive requirement even when an earlier request named
|
|
3169
3282
|
that same SHA.
|
|
3283
|
+
Restack and reconcile publication reject tracked modifications with the existing
|
|
3284
|
+
clean-worktree error. Nonignored untracked files do not block publication and
|
|
3285
|
+
remain unpublished and untouched; each publication that encounters them records
|
|
3286
|
+
a path-bearing `observation.recorded` followup, deduplicated by operation,
|
|
3287
|
+
transaction, candidate SHA and exact path list on recovery. The phase-terminal
|
|
3288
|
+
D5 clean-worktree rule for `ab done` remains unchanged.
|
|
3289
|
+
|
|
3170
3290
|
The branch replacement uses an explicit expected-old-head guard. A lost lease
|
|
3171
3291
|
fetches the observed contribution and prepares another correlated transaction on
|
|
3172
3292
|
the same occurrence's frozen base, preserving external work; deleted, divergent,
|
|
@@ -3211,36 +3331,38 @@ an unconfirmed write. New completion is
|
|
|
3211
3331
|
valid. Remote requests carry identical transaction inputs and use the provider's
|
|
3212
3332
|
trusted rewrite/archive capability only after execution teardown. Contention is
|
|
3213
3333
|
recorded durably and uses the existing runner-failure bound, without spending
|
|
3214
|
-
unchanged-base no-progress budget before completion.
|
|
3334
|
+
unchanged-base no-progress budget before completion. Classified transient publication
|
|
3335
|
+
failures instead use the independent durable publication retry budget described
|
|
3336
|
+
in Forge failure recovery; publication intent and frozen target remain unchanged.
|
|
3215
3337
|
|
|
3216
|
-
**Stable
|
|
3338
|
+
**Stable merged identity.** A root-target leaf kernel merge remains one squash commit and
|
|
3217
3339
|
preserves the forge's existing message except for normalizing terminal build
|
|
3218
3340
|
identity trailers to exactly one final `Autobuild-Build: <immutable slug>`.
|
|
3219
3341
|
Implementation commits and deposited PR descriptions are unchanged. The janitor
|
|
3220
|
-
records `pr.merged { sha, buildTrailerPresent? }` from the actual
|
|
3221
|
-
including human
|
|
3342
|
+
records `pr.merged { sha, buildTrailerPresent? }` from the actual merged message,
|
|
3343
|
+
including human merges. True and false are successful observations; historical
|
|
3222
3344
|
logs, unsupported inspection, and transient read failures leave evidence absent.
|
|
3223
3345
|
A failed inspection records an actionable observation and never blocks merge
|
|
3224
3346
|
completion. This evidence does not change reduction or display semantics.
|
|
3225
3347
|
|
|
3226
|
-
A node-target child
|
|
3348
|
+
A node-target child merge instead fast-forwards its already canonical
|
|
3227
3349
|
single-change commit, preserving exactly one terminal source-build identity.
|
|
3228
3350
|
The guarded destination write is authoritative: its pushed SHA and identity
|
|
3229
|
-
produce the durable
|
|
3351
|
+
produce the durable merge receipt independently of forge PR state. PR
|
|
3230
3352
|
acknowledgement is best-effort: observe a provider-reported merge, or comment
|
|
3231
|
-
with the
|
|
3232
|
-
retries or fails the
|
|
3353
|
+
with the merged SHA and close a still-open review. Acknowledgement failure never
|
|
3354
|
+
retries or fails the merge.
|
|
3233
3355
|
|
|
3234
3356
|
GitHub uses its authoritative viewer squash headline and body with an expected
|
|
3235
3357
|
head guard. Native auto-merge messages are checked against fresh server defaults
|
|
3236
3358
|
on eligible polls even after consent acknowledgement, and repaired through
|
|
3237
3359
|
consent-guarded disable/enable. Repeated polling covers later head or metadata
|
|
3238
3360
|
changes; it cannot make a future push atomic with an already armed native merge.
|
|
3239
|
-
Merge queues ignore message overrides, so identity-aware kernel
|
|
3361
|
+
Merge queues ignore message overrides, so identity-aware kernel merge defers
|
|
3240
3362
|
with `unproven-gate-state` rather than bypassing the queue. Human merges remain
|
|
3241
3363
|
observable regardless of trailer evidence.
|
|
3242
3364
|
|
|
3243
|
-
Ordered `[[
|
|
3365
|
+
Ordered `[[merge]]` rules in `autobuild.toml` decide authorization. Each rule
|
|
3244
3366
|
requires `mode = "auto" | "consent"` and may match `into = "root" | "node" |
|
|
3245
3367
|
<node-ticket-id>`, `from = "leaf" | "node"`, and an exact, case-sensitive
|
|
3246
3368
|
`label`. Predicates are ANDed; the first matching rule wins. Omitted predicates
|
|
@@ -3256,23 +3378,23 @@ rule and index (or explicit default). Editing configuration cannot change this
|
|
|
3256
3378
|
recorded decision. A replacement candidate gets a new decision once ready.
|
|
3257
3379
|
Policy is live dispatcher configuration, outside the pinned execution pipeline.
|
|
3258
3380
|
|
|
3259
|
-
`ab hold <slug>` durably suppresses
|
|
3260
|
-
before readiness. `ab
|
|
3261
|
-
to this build/node
|
|
3381
|
+
`ab hold <slug>` durably suppresses merge and revokes previous consent, even
|
|
3382
|
+
before readiness. `ab merge <slug>` requires readiness, clears hold, and consents
|
|
3383
|
+
to this build/node merge into its frozen destination. Consent survives head
|
|
3262
3384
|
replacement, restacking, verification and re-finalization until another hold or
|
|
3263
|
-
completion. It is consent to the
|
|
3385
|
+
completion. It is consent to the merge, not approval of an immutable diff.
|
|
3264
3386
|
Commands and acknowledgements are sequence-correlated; hold acknowledgement
|
|
3265
|
-
requires confirmed native cancellation, while
|
|
3387
|
+
requires confirmed native cancellation, while merge acknowledgement accepts
|
|
3266
3388
|
consent without claiming that merge gates passed. The same actions are available
|
|
3267
|
-
through the MCP/operator build-control tools. The terminal uses `l` for
|
|
3268
|
-
`o` for hold on the selected
|
|
3389
|
+
through the MCP/operator build-control tools. The terminal uses `l` for merge and
|
|
3390
|
+
`o` for hold on the selected merge. The web offers **Merge** and **Hold** on a merge awaiting consent.
|
|
3269
3391
|
|
|
3270
3392
|
The repository auto-merge default and its fan-out are retired. Historical events
|
|
3271
3393
|
still replay; explicit old per-build commands map to consent/hold until a new
|
|
3272
|
-
|
|
3394
|
+
merge command supersedes them, while old default seeds confer no consent.
|
|
3273
3395
|
`ab upgrade` samples the target repository's configured journal and writes leaf
|
|
3274
3396
|
auto for old ON, leaf consent for old OFF (including no fact), and node consent
|
|
3275
|
-
in either case. Explicit
|
|
3397
|
+
in either case. Explicit merge arrays remain byte-for-byte unchanged; explicit deprecated landing arrays are renamed to merge without changing policy values or order. Both spellings together are rejected. Missing
|
|
3276
3398
|
configuration or unavailable journals fail with recovery guidance. Fresh init
|
|
3277
3399
|
uses the no-rules fallback.
|
|
3278
3400
|
|
|
@@ -3283,13 +3405,13 @@ During forge cooldown it stays pending; cancellation makes no further provider
|
|
|
3283
3405
|
request until recovery. A confirmed cancellation's disabled receipt can retain
|
|
3284
3406
|
retry timing. Retries back off from 30 seconds exponentially to a five-minute
|
|
3285
3407
|
maximum interval, surviving dispatcher restarts, and honor any later repository
|
|
3286
|
-
reset. A new candidate or
|
|
3408
|
+
reset. A new candidate or merge command resets the application delay; hold wakes
|
|
3287
3409
|
janitor backoff but provider cancellation still honors repository cooldown.
|
|
3288
3410
|
Quiet polls append no attempt facts. Native application receipts and janitor
|
|
3289
3411
|
bookkeeping are not pipeline execution progress.
|
|
3290
3412
|
|
|
3291
3413
|
Native auto-merge is reconciled on every janitor poll against durable desired
|
|
3292
|
-
|
|
3414
|
+
merge state using the native state in the existing PR read, without additional
|
|
3293
3415
|
forge reads. A native write is issued only when observed and desired state disagree. It is disabled while held, unauthorized, unready, or replacement
|
|
3294
3416
|
publication is pending or just completed; enabling binds to the current head
|
|
3295
3417
|
through the forge's expected-head guard. Every replacement publication confirms
|
|
@@ -3300,19 +3422,19 @@ poll reconciliation. This is an explicitly bounded failure model: native merge
|
|
|
3300
3422
|
is used only behind a merge-blocking gate, and checks on a replacement head must
|
|
3301
3423
|
take far longer than one poll interval, allowing cancellation before they pass.
|
|
3302
3424
|
There is no durable native-effect reservation protocol. An undesired forge
|
|
3303
|
-
|
|
3425
|
+
merge is classified from the kernel's last durable native application state, without changing provider contracts. A confirmed disabled
|
|
3304
3426
|
state with no enable in flight or indeterminate means a deliberate human forge
|
|
3305
|
-
|
|
3306
|
-
human
|
|
3427
|
+
merge, which supplies consent. Record whether it overrode a hold: an unheld
|
|
3428
|
+
human merge needs no operator attention; overriding a hold is informational.
|
|
3307
3429
|
If native auto-merge was armed, or an enable was in flight or indeterminate,
|
|
3308
|
-
record a possible stale-enable
|
|
3430
|
+
record a possible stale-enable merge as contrary to policy and raise operator
|
|
3309
3431
|
attention. Autobuild never rewrites the target to undo either outcome. Merge
|
|
3310
3432
|
gates and the serialized node-writer publication rules remain authoritative.
|
|
3311
3433
|
|
|
3312
|
-
**Merge gates are never bypassed.**
|
|
3434
|
+
**Merge gates are never bypassed.** Merge authorization comes from recorded
|
|
3313
3435
|
policy or explicit consent. For root-target leaves, whenever the base branch has
|
|
3314
3436
|
any real merge-blocking gate, authorization is applied as GitHub-native auto-merge, so the
|
|
3315
|
-
forge's own checks decide when the PR
|
|
3437
|
+
forge's own checks decide when the PR merges. Only when the forge
|
|
3316
3438
|
authoritatively reports no gate may the janitor perform a normal,
|
|
3317
3439
|
head-guarded squash itself — never admin, force, or rebase — and only after
|
|
3318
3440
|
all verification and finalize work is complete. GitHub's exact documented
|
|
@@ -3326,7 +3448,7 @@ when the classic protection response is incomplete, while an incomplete classic
|
|
|
3326
3448
|
response with no proven ruleset gate still fails closed with a reason naming
|
|
3327
3449
|
the missing subsection.
|
|
3328
3450
|
|
|
3329
|
-
Serialized node-target
|
|
3451
|
+
Serialized node-target merge has a stricter path: native auto-merge is
|
|
3330
3452
|
cancelled and cancellation confirmed, never enabled. Under the destination
|
|
3331
3453
|
writer reservation, refresh the PR's actual base and head and inspect gates on
|
|
3332
3454
|
that exact frozen destination immediately before mutation. Only proved-ungated
|
|
@@ -3334,7 +3456,7 @@ branches permit the guarded fast-forward, regardless of token bypass privileges.
|
|
|
3334
3456
|
Gated branches defer with `gated-node-destination`; unknown or unreadable policy
|
|
3335
3457
|
defers with `unproven-gate-state`. Both leave the PR open with actionable human
|
|
3336
3458
|
guidance, and every later attempt obtains fresh proof. No native fallback can
|
|
3337
|
-
participate in node serialization. Human node
|
|
3459
|
+
participate in node serialization. Human node merge remains observable.
|
|
3338
3460
|
|
|
3339
3461
|
Inability to prove or apply auto-merge is nonfatal pipeline plumbing, not a PR
|
|
3340
3462
|
creation failure: finalize still records the open PR and completes, and consent
|
|
@@ -3360,15 +3482,15 @@ the adapter resolves both identities through Git. If either is unavailable,
|
|
|
3360
3482
|
consent remains pending and one reason-bearing follow-up names the missing
|
|
3361
3483
|
`user.name` / `user.email` configuration; later polls retry after the operator
|
|
3362
3484
|
configures it. When the base branch is checked out, Git's two-tree
|
|
3363
|
-
`read-tree -m -u` transition preflights and
|
|
3485
|
+
`read-tree -m -u` transition preflights and merges the old-to-squash tree:
|
|
3364
3486
|
tracked/index changes on untouched paths and
|
|
3365
3487
|
untracked non-colliding files survive, while a tracked or untracked overwrite
|
|
3366
3488
|
leaves consent pending and records one path-bearing follow-up instead of failing
|
|
3367
|
-
the dispatcher. Its durable pending-
|
|
3368
|
-
base ref. A poll after a crash retries that same old-to-
|
|
3489
|
+
the dispatcher. Its durable pending-merge record is written before moving the
|
|
3490
|
+
base ref. A poll after a crash retries that same old-to-merged transition without
|
|
3369
3491
|
rolling back the ref or overwriting operator work; the PR remains open and
|
|
3370
3492
|
retryable until checkout repair succeeds. No merge is ever assumed: a build
|
|
3371
|
-
reaches `merged` only when a later poll observes the
|
|
3493
|
+
reaches `merged` only when a later poll observes the merge and any required
|
|
3372
3494
|
checkout synchronization. Without authorization, the local branch and PR record
|
|
3373
3495
|
remain open for inspection with ordinary Git.
|
|
3374
3496
|
|
|
@@ -3430,6 +3552,12 @@ Decisions here continue the series: **[D9]** declarative repo config and
|
|
|
3430
3552
|
|
|
3431
3553
|
### 16.1 `autobuild.toml` [D9]
|
|
3432
3554
|
|
|
3555
|
+
`[verify].steps` accepts strings and nonempty arrays of strings. Names are unique
|
|
3556
|
+
within and across stages and retain the configured flat order for selection and
|
|
3557
|
+
role validation. Each verify table accepts optional boolean `failFast` (absent
|
|
3558
|
+
means false); finalize remains a serial string list without that option.
|
|
3559
|
+
|
|
3560
|
+
|
|
3433
3561
|
One declarative file at the repo root. A running dispatcher owns an accepted
|
|
3434
3562
|
snapshot read from the **main checkout** and refreshes it before each dispatch
|
|
3435
3563
|
tick. Before launch and after each accepted revision, the dispatcher deposits
|
|
@@ -3453,7 +3581,7 @@ The dispatcher emits an actionable operator notice without repeating it for the
|
|
|
3453
3581
|
same failure. Restoring a valid `autobuild.toml` clears the rejection and
|
|
3454
3582
|
ordinary boundary reload resumes.
|
|
3455
3583
|
|
|
3456
|
-
|
|
3584
|
+
Merge policy is an ordered `[[merge]]` array. Each rule requires
|
|
3457
3585
|
`mode = "auto" | "consent"` and may match `into = "root" | "node" | <node-ticket-id>`,
|
|
3458
3586
|
`from = "leaf" | "node"`, and an exact, case-sensitive `label`. Predicates
|
|
3459
3587
|
within a rule are ANDed; omitted predicates are wildcards; first match wins.
|
|
@@ -3579,9 +3707,9 @@ decide where a build's effective configuration is composed from:
|
|
|
3579
3707
|
|
|
3580
3708
|
| Class | Sections | Source at deposit |
|
|
3581
3709
|
|---|---|---|
|
|
3582
|
-
| Build-owned (pinned) | `[verify]` and `[verify.<step>]`, `[finalize]` and `[finalize.<step>]`, `[commands]`, `[workspace]` (provider and config, including `provisioning` and `runtimeProvisioning`) | The
|
|
3710
|
+
| Build-owned (pinned) | `[verify]` and `[verify.<step>]`, `[finalize]` and `[finalize.<step>]`, `[commands]`, `[workspace]` (provider and config, including `provisioning` and `runtimeProvisioning`) | The execution checkout at each verification cycle; launch deposits use the branch head or recorded workspace base until a cycle capture exists. The exact commit is recorded once per deposit in the effective-config artifact metadata — except in checkout mode when the worktree read cannot be attributed to the branch-head commit: because the worktree file has uncommitted edits, because the clean/dirty comparison could not be performed (non-git workspace or a transient git error), or because the branch head never carried the file. The deposit then records the source `worktree-dirty` and no commit, because no commit claims the worktree bytes (the build still runs them). |
|
|
3583
3711
|
| Deployment-owned (live) | `[roles]` (runtime, model, args, alternates, per-role `sessionBudgetSeconds`) and `[policy]` (budgets, retry bounds, stall and harvest knobs) | The dispatcher's live snapshot; an accepted reload delivers these to active builds. |
|
|
3584
|
-
| Dispatcher-owned | `baseBranch`, `capacity`, `ticketScanIntervalSeconds`, `forge`, `plugins`, `pr`, `tickets`, `orchestrator`, `
|
|
3712
|
+
| Dispatcher-owned | `baseBranch`, `capacity`, `ticketScanIntervalSeconds`, `forge`, `plugins`, `pr`, `tickets`, `orchestrator`, `merge`, `upgrade` | The dispatcher's live snapshot; the build runner never interprets them. |
|
|
3585
3713
|
|
|
3586
3714
|
A build's pipeline definition is therefore composed from the build's own
|
|
3587
3715
|
branch: in origin mode the dispatcher reads `autobuild.toml` at the build's
|
|
@@ -3597,12 +3725,34 @@ because attributing worktree bytes to a commit that has not been shown to carry
|
|
|
3597
3725
|
them would be false provenance. A base-branch change to `[verify]`, `[finalize]`, `[commands]`, or
|
|
3598
3726
|
the workspace provisioning after a build's base was cut does not change that
|
|
3599
3727
|
build's verify universe, finalize steps, commands, or provisioning; a build
|
|
3600
|
-
that
|
|
3728
|
+
that receives such a change in its execution checkout picks it up at the next settled verify boundary.
|
|
3601
3729
|
A live reload delivers only deployment-owned sections to active builds, so the
|
|
3602
3730
|
artifact deposited on reload changes only those sections. In-flight
|
|
3603
3731
|
environments are never re-provisioned; a fresh build from the new base is the
|
|
3604
3732
|
path for a changed provisioning definition.
|
|
3605
3733
|
|
|
3734
|
+
At every verify-cycle entry, after restack or reconcile settles, the runner
|
|
3735
|
+
reads `autobuild.toml` from the execution checkout at resolved `HEAD` (including
|
|
3736
|
+
detached integration heads). `verify.config-captured` cites an immutable
|
|
3737
|
+
`verify-cycle-config` artifact revision, checkout head, build-owned content
|
|
3738
|
+
identity and truthful source metadata. Dirty worktree bytes carry
|
|
3739
|
+
`worktree-dirty` without a commit. A settled stage boundary rechecks the
|
|
3740
|
+
build-owned sections and the known source commit's ancestry. A change or
|
|
3741
|
+
non-ancestor source records `verify.config-superseded` and starts a fresh cycle
|
|
3742
|
+
before constructing any further member. Already launched siblings settle first.
|
|
3743
|
+
A waiting leaf with completed verification retains its receipts after a clean
|
|
3744
|
+
rewrite when build-owned config is unchanged, even when the rewrite replaces
|
|
3745
|
+
the pin commit's ancestry. Changed config still supersedes while waiting; a
|
|
3746
|
+
future verification cycle always captures fresh config before running steps.
|
|
3747
|
+
Old pass/skip receipts cannot satisfy that cycle, and supersession creates no
|
|
3748
|
+
failure or failure-budget charge. Unchanged config on a descendant head retains
|
|
3749
|
+
its pin; every new cycle still rereads the checkout. Read, parse and Git evidence
|
|
3750
|
+
failures block verification as infrastructure failures. Recovery and readiness
|
|
3751
|
+
read the capture's exact revision, so a concurrent deployment reload cannot
|
|
3752
|
+
replace its build-owned sections. Historical streams capture before further
|
|
3753
|
+
verification. Deployment-owned reloads remain live; environments are not
|
|
3754
|
+
re-provisioned.
|
|
3755
|
+
|
|
3606
3756
|
Three configurable narrowing mechanisms govern which verify steps run, all
|
|
3607
3757
|
resolving to the ordinary `skipped` outcome so exclusions stay queryable:
|
|
3608
3758
|
|
|
@@ -3614,7 +3764,12 @@ resolving to the ordinary `skipped` outcome so exclusions stay queryable:
|
|
|
3614
3764
|
validated at deposit. The selection paired with the approving review
|
|
3615
3765
|
verdict is authoritative; `always = true` steps can never be deselected.
|
|
3616
3766
|
Missing metadata means all configured steps, so historical builds keep
|
|
3617
|
-
their behavior.
|
|
3767
|
+
their behavior. If the approved selection later names any step absent from
|
|
3768
|
+
the cycle's pinned configured universe, the entire selection falls back to
|
|
3769
|
+
all configured optional steps. The kernel records one observation per cycle
|
|
3770
|
+
and plan revision naming the unknown steps. Mandatory steps, paths and
|
|
3771
|
+
post-reconcile policy still apply. A valid selection continues to skip
|
|
3772
|
+
genuinely omitted optional steps. Strict new-plan validation is unchanged.
|
|
3618
3773
|
- **Path applicability.** A step may declare positive changed-path selectors,
|
|
3619
3774
|
evaluated by the kernel immediately before the step on every verify cycle,
|
|
3620
3775
|
diffing `HEAD` against the build's durable base (promoted by a completed
|
|
@@ -3634,8 +3789,9 @@ For example, set `afterReconcile = false` in `[verify]` and
|
|
|
3634
3789
|
|
|
3635
3790
|
The kernel freezes the resolved ordered policy in
|
|
3636
3791
|
`verify.reconcile-policy-captured` at the next engine action after reconcile
|
|
3637
|
-
completion.
|
|
3638
|
-
|
|
3792
|
+
completion. A cycle already started keeps its policy through recovery.
|
|
3793
|
+
Configuration supersession starts a fresh cycle and captures a new policy for
|
|
3794
|
+
its configured universe, retaining the original reconcile identity. Historical cycles already started
|
|
3639
3795
|
without a captured policy retain the rerun-all behavior. Initial verification
|
|
3640
3796
|
and verification after subsequent code review always use ordinary applicability.
|
|
3641
3797
|
Policy exclusion precedes plan selection and paths, including `always = true`.
|
|
@@ -3644,7 +3800,7 @@ Enabled steps still follow plan selection and path rules. Excluded steps record
|
|
|
3644
3800
|
and a reason naming the setting. Dashboards and PR summaries call this
|
|
3645
3801
|
"skipped by post-reconcile policy"; it is never a pass. Forge-side required
|
|
3646
3802
|
checks and branch protections still gate merge. For excluded steps, merged code
|
|
3647
|
-
is not re-verified, so breakage that only exists in the combination can
|
|
3803
|
+
is not re-verified, so breakage that only exists in the combination can merge.
|
|
3648
3804
|
|
|
3649
3805
|
### 16.3 Skill installation: vendored, namespaced, editable [D11]
|
|
3650
3806
|
|
|
@@ -3929,13 +4085,13 @@ and destination validation. See [the migration procedure](docs/ticket-migration.
|
|
|
3929
4085
|
### Tree and consent operator reads
|
|
3930
4086
|
|
|
3931
4087
|
The shared dashboard projection supplies root, node, target, integration build,
|
|
3932
|
-
|
|
3933
|
-
one consent queue, retaining build-slug selection for
|
|
4088
|
+
merge, restack and consent vocabulary. The terminal groups ready decisions in
|
|
4089
|
+
one consent queue, retaining build-slug selection for merge/hold controls. Nodes
|
|
3934
4090
|
show stored open children/completeness diagnostics, restack state, current-cycle
|
|
3935
|
-
verification and
|
|
4091
|
+
verification and merge readiness. Ordinary repositories omit empty tree sections.
|
|
3936
4092
|
The web dashboard consumes shared terminology without introducing a tree surface.
|
|
3937
4093
|
|
|
3938
|
-
`ab
|
|
4094
|
+
`ab merges [--json] [--store <ref>]` and registry `merges.list` expose the
|
|
3939
4095
|
same deterministic, repository-scoped ready consent/held candidates. A recorded
|
|
3940
4096
|
current decision is required; auto-authorized and consented candidates are absent.
|
|
3941
4097
|
Source `ab ticket tree` / `tickets.tree` enumerate all ticket states with listing
|
|
@@ -3946,9 +4102,9 @@ and conflicted `restack.replayed`. Derived `build.consent-ready` observations
|
|
|
3946
4102
|
carry target, branch, candidate and the durable readiness entry position in the
|
|
3947
4103
|
existing cursor envelope. Cursor identities retain readiness episodes across
|
|
3948
4104
|
restart; a new candidate or exit/re-entry can wake again. Explicit event globs
|
|
3949
|
-
remain event-only. Wait adds `consent`, `node-
|
|
4105
|
+
remain event-only. Wait adds `consent`, `node-merged`, `restack-conflicted`, and
|
|
3950
4106
|
includes these in attention; current-state waits return immediately, backlog
|
|
3951
|
-
replay retains event ordering, including
|
|
4107
|
+
replay retains event ordering, including merge before terminal completion.
|
|
3952
4108
|
|
|
3953
4109
|
Consent/hold readiness is signalled exclusively by `build.consent-ready`,
|
|
3954
4110
|
including first discovery in a repository-wide watch. `build.merge-decision`
|
|
@@ -3959,6 +4115,20 @@ by the shared projection vocabulary and reused by terminal and CLI text.
|
|
|
3959
4115
|
|
|
3960
4116
|
## Forge failure recovery
|
|
3961
4117
|
|
|
4118
|
+
Leaf restack and reconcile publication retry classified transient forge or transport
|
|
4119
|
+
failures six times after the initial attempt, waiting 30, 60, 120, 240, 300 and
|
|
4120
|
+
300 seconds. `publication.retry-scheduled` records the operation, frozen rewrite
|
|
4121
|
+
identity, episode anchor, failure ordinal, last error and absolute retry time;
|
|
4122
|
+
restart resumes that schedule without rerunning the resolver. These retries do
|
|
4123
|
+
not consume `maxPhaseAttempts`. A seventh transient failure records
|
|
4124
|
+
`publication.retry-exhausted` and raises `publication-retry-limit`, naming the last
|
|
4125
|
+
error and six retries. Answering that escalation opens a fresh publication episode
|
|
4126
|
+
for the same retained intent without resetting agent phase failures. Pending
|
|
4127
|
+
publication keeps its workspace through backoff and unresolved exhaustion.
|
|
4128
|
+
Classified rate limits retain repository cooldown and consume no publication
|
|
4129
|
+
retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
|
|
4130
|
+
errors retain their existing behavior.
|
|
4131
|
+
|
|
3962
4132
|
Janitor failures are durable per-build episodes. Eligible failures retry after
|
|
3963
4133
|
30, 60, 120, 240 seconds, then at the configured cap (300 seconds by default).
|
|
3964
4134
|
Skipped polls preserve the episode across restart. After
|
|
@@ -3969,7 +4139,7 @@ clears it. `policy.janitorBackoffMaxSeconds` sets the positive integer cap.
|
|
|
3969
4139
|
A classified forge rate limit records repository degradation with `resetAt`.
|
|
3970
4140
|
Forge work waits during cooldown; passing the deadline permits a recovery
|
|
3971
4141
|
request, and only success clears degradation. A further limit extends cooldown.
|
|
3972
|
-
Native
|
|
4142
|
+
Native merge application failures keep candidate-specific retry eligibility,
|
|
3973
4143
|
including automatic decisions without a human command. Retries recheck consent,
|
|
3974
4144
|
holds, verification and the exact candidate. Uncertain enables remain pending
|
|
3975
4145
|
until cancellation can be confirmed after cooldown. Publication retries reuse
|
|
@@ -3993,12 +4163,12 @@ using exact-resource ETags; authenticated 304s spare the REST primary quota.
|
|
|
3993
4163
|
Adapter caches are bounded and restart/eviction falls back to fresh reads.
|
|
3994
4164
|
Writes, including Git publication and rewrites, invalidate observations before
|
|
3995
4165
|
attempting the mutation so acknowledgement reads remain fresh. Leaf PR polling
|
|
3996
|
-
keeps its existing cadence. Readiness and
|
|
4166
|
+
keeps its existing cadence. Readiness and merge inspections remain fresh.
|
|
3997
4167
|
|
|
3998
4168
|
Opened integration nodes poll every tick until their durable activity has been
|
|
3999
4169
|
quiet for `policy.nodeIdleAfterSeconds` (default 600 seconds), then poll every
|
|
4000
4170
|
`policy.nodeIdlePollSeconds` (default 120 seconds). Holds and waiting for consent
|
|
4001
|
-
qualify normally. Child claims, PR and
|
|
4171
|
+
qualify normally. Child claims, PR and merge activity, operator commands
|
|
4002
4172
|
(including repeated holds), restack requests and answers wake the next tick.
|
|
4003
4173
|
GitHub-only changes are discovered on the next due check, within the idle
|
|
4004
4174
|
interval plus normal tick scheduling while the dispatcher is running; failure,
|
|
@@ -4019,4 +4189,95 @@ Shared requests are attributed to their first requester; cache hits count zero.
|
|
|
4019
4189
|
|
|
4020
4190
|
A failed node verification cycle records `integration.verification-failed` with its prepared cycle id, failed steps, exact head and parent, and guidance to file a repair child targeting the node. The kernel reports durable failed receipts; dispatcher housekeeping recovers missing reports for the current cycle using a per-cycle CAS guard. Superseded cycles are never backfilled with repair instructions: recovery requires the latest prepared cycle to match the node’s observed head and parent. This fact is decisive evidence and bookkeeping, and does not change verification or leaf routing.
|
|
4021
4191
|
|
|
4022
|
-
Default watch
|
|
4192
|
+
Default `ab watch` includes this event. Watch cursors deliver each failed cycle once and baseline failures when first armed; reconcile build status after arming. `ab wait --for attention` also detects a current failed node cycle before the report is written. Historical facts remain queryable after repair without retaining current attention. Explicit event globs and existing stored wake choices are preserved.
|
|
4193
|
+
|
|
4194
|
+
|
|
4195
|
+
### Project secrets
|
|
4196
|
+
|
|
4197
|
+
Project secrets are product-managed write-only project environment values,
|
|
4198
|
+
separate from machine credentials and BuildStore artifacts. A connected member's
|
|
4199
|
+
saved owner credential can list metadata, set/replace and remove; every operation
|
|
4200
|
+
revalidates project membership. Build, dispatcher, delegated, internal and admin
|
|
4201
|
+
credentials cannot manage them. The current setter is the owner; values serve all
|
|
4202
|
+
builds of the project. Values and refresh/access state are authenticated-encrypted
|
|
4203
|
+
under a deployment-held key; audit records contain only actor, time and operation.
|
|
4204
|
+
No public surface returns material. Authority and process-control names are reserved.
|
|
4205
|
+
|
|
4206
|
+
Every hosted tick resolves a coherent complete set, overlays project values onto
|
|
4207
|
+
its own deployment environment, and records revision-fenced supply timestamps at
|
|
4208
|
+
kernel handoff. Encryption keys are excluded from child environments. A failed
|
|
4209
|
+
resolution prevents intake and launches for that project. If ready credentials can
|
|
4210
|
+
be read and revision-fenced, an observation-only recovery pass supplies them solely
|
|
4211
|
+
to repair running execution policies, withholding unavailable names. Unrelated
|
|
4212
|
+
account transforms remain active; no janitor, resume, lease-sweep, or harvest work
|
|
4213
|
+
is launched. If the ready subset cannot be read, the project is skipped. Projects without secrets
|
|
4214
|
+
resolve and hand off an empty set without encryption configuration; all secret
|
|
4215
|
+
mutations still require a valid key. Adding a secret invalidates an earlier empty
|
|
4216
|
+
snapshot before handoff. Local dispatch behavior
|
|
4217
|
+
is unchanged. Refresh kinds serialize external rotation with a committed CAS
|
|
4218
|
+
attempt, persist replacement state before delivery, and fail expired attempts
|
|
4219
|
+
without takeover. A failed credential requires explicit replacement. Valid
|
|
4220
|
+
credentials before their earliest refresh time remain usable, even inside a
|
|
4221
|
+
requested future validity horizon. The first eligible five-minute hosted tick
|
|
4222
|
+
refreshes and persists rotation before supply, including expired access state
|
|
4223
|
+
after downtime when the refresh credential remains ready. Providers without an
|
|
4224
|
+
earliest refresh time use a ten-minute pre-expiry margin. Failed or uncertain
|
|
4225
|
+
refresh attempts prevent supply. A refresh window shorter than five minutes plus a one-minute
|
|
4226
|
+
margin emits typed advisory metadata, never invalidates a valid credential and
|
|
4227
|
+
never causes revocation. The public
|
|
4228
|
+
CLI writes static values or typed ChatGPT registrations. The fifth web tab,
|
|
4229
|
+
Settings, lets any project organization member or super user inspect metadata
|
|
4230
|
+
and account credential slots, set static values, and remove secrets. Browser
|
|
4231
|
+
writes use the unexpired cookie session and fresh project membership, attribute
|
|
4232
|
+
the normalized signed-in email, and require same-origin JSON. Browser replacement
|
|
4233
|
+
atomically refuses non-static credentials; renewing those stays in
|
|
4234
|
+
`ab accounts login <account> --project`. Password fields are transient and clear
|
|
4235
|
+
on acknowledgment; reads never refill them. Removal requires the shared
|
|
4236
|
+
confirmation dialog. Secret management remains available without recorded
|
|
4237
|
+
dispatcher configuration. See the project-secrets section of the remote-store protocol.
|
|
4238
|
+
|
|
4239
|
+
### Named billing accounts
|
|
4240
|
+
|
|
4241
|
+
Deployment-owned `[accounts.<name>]` descriptors contain `kind` and
|
|
4242
|
+
`credentialEnv`, plus the closed Kimi `region` (`overseas` by default or `china`).
|
|
4243
|
+
Role and alternate `account` axes inherit independently. Claude routes default
|
|
4244
|
+
to the sole Claude subscription account; ambiguity, unknown references and
|
|
4245
|
+
incompatible runtimes fail configuration. No accounts preserves legacy behavior.
|
|
4246
|
+
Claude and Kimi accounts require the unmodified Claude Code runtime; ChatGPT
|
|
4247
|
+
subscription accounts require explicit Codex selection. Use the user's own plan
|
|
4248
|
+
for ordinary individual usage. Claude and Kimi credentials are provisioned
|
|
4249
|
+
manually. ChatGPT credentials are authorized with `ab accounts login NAME
|
|
4250
|
+
[--local|--project]`. The local dispatcher or hosted refreshing project secret
|
|
4251
|
+
is the sole refresh owner; no sandbox refreshes. Local Codex uses a protected
|
|
4252
|
+
loopback inference transport and isolated CODEX_HOME, preserving the shell HOME
|
|
4253
|
+
and leaving ambient login untouched.
|
|
4254
|
+
Hosted validation uses write-only metadata and states that the first hosted
|
|
4255
|
+
build is the live check; local validation makes a minimal runtime request.
|
|
4256
|
+
|
|
4257
|
+
Local sessions resolve host credentials after ambient merging. Remote sessions
|
|
4258
|
+
receive account placeholders; exact provider hostname and placeholder header
|
|
4259
|
+
matches broker real credentials on the host. Both Kimi endpoint and host derive
|
|
4260
|
+
from one closed regional mapping, without cross-region retry. Observation ticks
|
|
4261
|
+
refresh the live egress policy from dispatcher environment values. Selected
|
|
4262
|
+
account descriptors persist with sessions for continuation; configuration and
|
|
4263
|
+
launch artifacts contain no secret values. Credential rejections require renewal
|
|
4264
|
+
and bypass alternates; quota and availability retain existing fallback behavior.
|
|
4265
|
+
Account secrets are redacted at persistence boundaries, including split streamed
|
|
4266
|
+
deltas and prior values retained across rotation.
|
|
4267
|
+
|
|
4268
|
+
|
|
4269
|
+
### Hosted project deletion
|
|
4270
|
+
|
|
4271
|
+
The Projects web surface allows super users and organization owners to preview
|
|
4272
|
+
counts and permanently delete their authorized projects with the shared confirmation dialog.
|
|
4273
|
+
PostgreSQL fences the registration generation before physical blob cleanup and
|
|
4274
|
+
retains durable pending inventory for restart/retry. Upload ownership is reserved
|
|
4275
|
+
in a separate committed transaction before provider I/O; transaction-scoped shared
|
|
4276
|
+
blob locks cover upload/publication, and exclusive locks cover reference checks
|
|
4277
|
+
and physical deletion. Other projects' references and reservations preserve shared
|
|
4278
|
+
bytes. Completion removes all project rows except repository, actor, deletion time
|
|
4279
|
+
and an opaque generation id in the deletion audit. Old credentials receive 401;
|
|
4280
|
+
repository-established requests receive 403 project not registered. Approval of a
|
|
4281
|
+
fresh connection starts empty and resets hosted ticket numbering. `ab disconnect`
|
|
4282
|
+
revokes credentials only; admin `projects remove` unregisters without purging.
|
|
4283
|
+
See [project deletion protocol](docs/operator-api.md#permanent-project-deletion).
|