@defrex/autobuild 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/SPEC.md +107 -10
- package/docs/agent-runtimes.md +1 -1
- package/docs/architecture.md +62 -22
- package/docs/configuration-overview.md +10 -0
- package/docs/configuration.md +285 -5
- package/docs/forges.md +1 -0
- package/docs/operator-api.md +19 -8
- package/docs/operator-surfaces.md +6 -3
- package/docs/plugin-authoring.md +44 -6
- package/docs/remote-store-protocol.md +19 -6
- package/docs/restacking.md +12 -7
- package/docs/ticket-sources.md +34 -6
- package/docs/tickets.md +6 -0
- package/docs/workspaces.md +1 -1
- package/package.json +3 -3
- package/packages/core/src/cli/attention.ts +1 -0
- package/packages/core/src/cli/binary-direct.ts +1 -0
- package/packages/core/src/cli/dispatch-frontend.ts +10 -14
- package/packages/core/src/cli/dispatch-preflight.ts +1 -0
- package/packages/core/src/cli/dispatch-repository-feed.ts +145 -109
- package/packages/core/src/cli/dispatch.ts +9 -3
- package/packages/core/src/cli/help.ts +11 -4
- package/packages/core/src/cli/init-validation.ts +14 -1
- package/packages/core/src/cli/repository-status.ts +37 -2
- package/packages/core/src/cli/status.ts +8 -0
- package/packages/core/src/cli/ticket.ts +22 -4
- package/packages/core/src/cli/watch.ts +2 -0
- package/packages/core/src/config/live.ts +4 -0
- package/packages/core/src/config/profiles.ts +96 -0
- package/packages/core/src/config/ready-assignee.ts +43 -11
- package/packages/core/src/config/roles.ts +33 -10
- package/packages/core/src/config/schema.ts +166 -24
- package/packages/core/src/events/compatibility.ts +3 -1
- package/packages/core/src/events/forge-degradation-policy.ts +16 -2
- package/packages/core/src/events/payloads.ts +8 -0
- package/packages/core/src/events/policy.ts +1 -0
- package/packages/core/src/events/repository.ts +17 -0
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +73 -124
- package/packages/core/src/kernel/build-creation.ts +29 -0
- package/packages/core/src/kernel/forge-health.ts +47 -0
- package/packages/core/src/kernel/guarded-forge.ts +76 -18
- package/packages/core/src/kernel/node-parent.ts +2 -0
- package/packages/core/src/kernel/read-facts.ts +9 -1
- package/packages/core/src/kernel/reducer.ts +18 -1
- package/packages/core/src/kernel/ticket-preparation.ts +4 -1
- package/packages/core/src/operator/protocol.ts +10 -0
- package/packages/core/src/operator/query.ts +1 -1
- package/packages/core/src/operator/registry.ts +25 -5
- package/packages/core/src/operator/sandbox-host.ts +3 -0
- package/packages/core/src/operator/tickets.ts +15 -3
- package/packages/core/src/plugin-sdk/index.ts +4 -0
- package/packages/core/src/ports/forge/create.ts +6 -0
- package/packages/core/src/ports/forge/github-transport.ts +40 -3
- package/packages/core/src/ports/forge/github.ts +12 -1
- package/packages/core/src/ports/forge/workspace-ancestry.ts +60 -0
- package/packages/core/src/ports/forge-failure.ts +31 -2
- package/packages/core/src/ports/runner/routing.ts +66 -5
- package/packages/core/src/ports/tickets/assignees.ts +54 -0
- package/packages/core/src/ports/tickets/contract.ts +164 -4
- package/packages/core/src/ports/tickets/create.ts +17 -3
- package/packages/core/src/ports/tickets/github-fake.ts +18 -2
- package/packages/core/src/ports/tickets/github.ts +247 -29
- package/packages/core/src/ports/tickets/hosted-index.ts +1 -0
- package/packages/core/src/ports/tickets/operations.ts +6 -1
- package/packages/core/src/ports/tickets/tree.ts +12 -2
- package/packages/core/src/ports/tickets/update.ts +6 -2
- package/packages/core/src/ports/types.ts +33 -3
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +9 -0
- package/packages/core/src/processes/build-child.ts +28 -7
- package/packages/core/src/processes/build-execution-state.ts +4 -1
- package/packages/core/src/processes/build-runner.ts +15 -1
- package/packages/core/src/processes/dispatcher.ts +98 -18
- package/packages/core/src/processes/harvest-child.ts +4 -0
- package/packages/core/src/processes/harvest-runner.ts +5 -0
- package/packages/core/src/processes/repo-view.ts +2 -0
- package/packages/core/src/scenarios/harness.ts +15 -1
- package/packages/core/src/store/reducer-value-shapes.json +3119 -2926
- package/packages/core/src/store/remote/client.ts +21 -8
- package/packages/core/src/store/remote/index.ts +4 -0
- package/packages/core/src/store/remote/protocol.ts +7 -0
- package/packages/core/src/store/remote/released-clients.json +11 -0
- package/packages/core/src/store/remote/released-reducer-values/1.7.0.json +27366 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +2 -0
- package/packages/core/src/store/repo-state-events.ts +1 -0
- package/packages/core/src/store/types.ts +11 -0
- package/packages/core/src/testing/dispatch-read-budget.ts +84 -58
- package/packages/core/src/testing/index.ts +2 -0
- package/packages/core/src/testing/reduced-read-budget.ts +72 -9
- package/skills/guide/SKILL.md +116 -21
- package/skills/guide/references/operator-api.md +19 -8
- package/skills/guide/references/plugin-authoring.md +44 -6
- package/skills/guide/references/remote-store-protocol.md +19 -6
- package/skills/guide/references/restacking.md +12 -7
- package/skills/operate/SKILL.md +29 -3
- package/skills/tickets/SKILL.md +18 -2
- package/templates/hosted-service/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ From the repository you want built, install Autobuild as a development dependenc
|
|
|
26
26
|
<!-- release-install:start -->
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
bun add -d --exact @defrex/autobuild@1.
|
|
29
|
+
bun add -d --exact @defrex/autobuild@1.7.0
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- release-install:end -->
|
package/SPEC.md
CHANGED
|
@@ -463,11 +463,14 @@ files, including development configs, remain exactly as installed.
|
|
|
463
463
|
outstanding recoverable harvest runs takes priority over starting new scans
|
|
464
464
|
(§12). Cron-friendly.
|
|
465
465
|
Before claiming, the dispatcher journals a repository-scoped preparation intent;
|
|
466
|
-
a won claim
|
|
466
|
+
a won claim, the selected creation slug and, when the build store attests keyed
|
|
467
|
+
creation, the attempt's creation key are durable boundaries. Caught
|
|
467
468
|
asset-copy, spec-authoring, naming, and build-creation failures return the ticket
|
|
468
469
|
to configured Ready; a nonconforming spec goes to configured Triage. Recovery
|
|
469
|
-
|
|
470
|
-
|
|
470
|
+
point-reads the selected slug and, for a keyed attempt, the canonical slug derived
|
|
471
|
+
from the repository, selected slug and key: one matching record and atomic
|
|
472
|
+
`build.created` retain ownership even if creation threw after committing or its
|
|
473
|
+
response was lost.
|
|
471
474
|
Unavailable or conflicting readback never authorizes release or a replacement
|
|
472
475
|
build. Pending attempts retain the original failure, latest recovery error and
|
|
473
476
|
retry deadline in the canonical repository reduced value; resolved attempts
|
|
@@ -475,8 +478,10 @@ files, including development configs, remain exactly as installed.
|
|
|
475
478
|
due recovery attempts, before intake and independently of capacity or intake
|
|
476
479
|
settings, with a 30-second durable retry delay after recovery failure. Unresolved
|
|
477
480
|
ticket identities remain withheld. An uncertain claim outcome or unrelated
|
|
478
|
-
external ticket state, missing ticket/state,
|
|
479
|
-
|
|
481
|
+
external ticket state, missing ticket/state, conflicting slug ownership, builds at
|
|
482
|
+
both identities, or an unknown creation outcome (an unkeyed attempt on a store
|
|
483
|
+
that allocates slugs, where absence is not evidence) terminates automatic
|
|
484
|
+
recovery with an `abandoned` resolution and diagnostic reason. The
|
|
480
485
|
ticket is left unchanged; an operator can leave it finished or cancelled, or
|
|
481
486
|
inspect ownership and explicitly return it to Ready for another attempt. These
|
|
482
487
|
cases stop provider polling and further durable diagnostic appends. The tick
|
|
@@ -1513,6 +1518,12 @@ checks actual build/session/stream ownership and filters collections server-side
|
|
|
1513
1518
|
Explicit project mismatch is 403; missing and foreign indirect IDs share 404.
|
|
1514
1519
|
Remote project build creation allocates a fresh slug and a branch in the build
|
|
1515
1520
|
kind's namespace (`ab/` or `ab-node/`); the returned record is authoritative. Local adapters retain exact-slug behavior.
|
|
1521
|
+
A request carrying a creation key instead lands at most once at the slug derived
|
|
1522
|
+
from the repository, requested slug and key, so a client that lost the response
|
|
1523
|
+
can point-read it; a repeated key is a conflict. The service advertises this with
|
|
1524
|
+
the `build-creation-key-v1` health capability. A client treats a service without
|
|
1525
|
+
it as allocating: an unkeyed attempt whose creation outcome is unknown there ends
|
|
1526
|
+
recovery rather than handing the ticket back.
|
|
1516
1527
|
|
|
1517
1528
|
Owners issue/list/revoke credentials with deployment-local `ab-hosted-store
|
|
1518
1529
|
credentials` commands. Retired deployment-wide and repository-less operator
|
|
@@ -2184,6 +2195,45 @@ deterministic fail-safe.
|
|
|
2184
2195
|
tuple is recorded on `session.started`; fallback starts cite the preceding target and
|
|
2185
2196
|
verbatim error, while exhausted `phase.failed`/`harvest.failed` facts carry
|
|
2186
2197
|
the complete ordered attempt list.
|
|
2198
|
+
- **Role profiles (§16.1):** `[roles]` is the repository's default for every
|
|
2199
|
+
build. A repository may also declare named `[profiles.<name>]` tables, each
|
|
2200
|
+
with exactly one ticket `label` and any number of
|
|
2201
|
+
`[profiles.<name>.roles.<role>]` entries for any role name, including
|
|
2202
|
+
verify and finalize step names and roles `[roles]` does not declare. An
|
|
2203
|
+
entry accepts the `[roles.<role>]` fields. For a build with that profile,
|
|
2204
|
+
an entry's declared fields overlay `[roles.<role>]`, and every omitted field
|
|
2205
|
+
takes the value the repository roles would give it: `[roles.<role>]`, then
|
|
2206
|
+
`[roles.default]`. A declared `alternates` list, including `[]`, replaces the
|
|
2207
|
+
inherited list; an omitted one inherits it, and each alternate overlays the
|
|
2208
|
+
profile-adjusted primary. Key selection walks the step or phase name, then
|
|
2209
|
+
any deprecated alias, against profile entries and `[roles]` together, so a
|
|
2210
|
+
profile entry on a key wins where a `[roles]` entry on that key would. A
|
|
2211
|
+
profile entry named `default` is refused; so are duplicate labels (trimmed,
|
|
2212
|
+
case-insensitive), a missing or blank label, and an entry whose effective
|
|
2213
|
+
runtime, model, args or account would be refused for a `[roles]` entry. The
|
|
2214
|
+
eager resolver validates every profile with the roles, so dispatch startup,
|
|
2215
|
+
`ab init --validate` and a live reload refuse the same problems.
|
|
2216
|
+
|
|
2217
|
+
The profile is **fixed when the dispatcher claims the ticket**: the label
|
|
2218
|
+
match runs over the labels the ready listing already returned, and the
|
|
2219
|
+
selected name is recorded on `build.created.profile`. Later relabelling
|
|
2220
|
+
never changes it. A node and each child select from their own ticket's
|
|
2221
|
+
labels. A ready ticket carrying two profiles' labels is not claimed; the
|
|
2222
|
+
scan reports it in the persisted ticket diagnostics until at most one
|
|
2223
|
+
profile label remains. A ticket never supplies a model, runtime or argument
|
|
2224
|
+
itself.
|
|
2225
|
+
|
|
2226
|
+
The profile's **contents** are read from the current configuration at each
|
|
2227
|
+
session boundary, like `[roles]`, so an edit reaches the in-flight builds that
|
|
2228
|
+
selected the profile at their next session and no other build. Every agent
|
|
2229
|
+
session of the build resolves through it — plan, plan review, implement,
|
|
2230
|
+
code review, agent verify and finalize steps, and reconcile — and
|
|
2231
|
+
`session.started.profile` records `{ name, configured }`. When a reload
|
|
2232
|
+
removes the profile, later sessions use the repository roles with
|
|
2233
|
+
`configured: false`, and `ab build status` says the recorded profile is no
|
|
2234
|
+
longer configured. A resumed session keeps its recorded target as before.
|
|
2235
|
+
Sessions outside a build (`slug`, `upgrade`, `harvest`, `harvest-review`)
|
|
2236
|
+
never use a profile.
|
|
2187
2237
|
- **Transcripts come back through the interface**, not scraped from disk, so
|
|
2188
2238
|
every adapter must produce one whenever its owning runner reaches the session
|
|
2189
2239
|
end boundary, including turns rejected by a provider after a handle exists.
|
|
@@ -2650,6 +2700,27 @@ create` and `update` take `--priority urgent|normal`; operator and MCP ticket
|
|
|
2650
2700
|
requests take `priority`; JSON ticket output always names it. Harvest files
|
|
2651
2701
|
every proposal normal; grooming marks one urgent.
|
|
2652
2702
|
|
|
2703
|
+
**Ticket assignees.** A ticket may carry the usernames it is assigned to.
|
|
2704
|
+
Sources declare support with the `assignees` capability; only the GitHub source
|
|
2705
|
+
does, reading each issue's assignees (set on GitHub or through Autobuild alike)
|
|
2706
|
+
as an `assignees` array that is empty when unassigned and outside the ticket's
|
|
2707
|
+
revision. A write names assignees as usernames or `me`, the owner of the
|
|
2708
|
+
source's credential; create sets them and update replaces the whole set, an
|
|
2709
|
+
empty set clearing it. The source checks every user can be assigned before
|
|
2710
|
+
anything is written, and a write the provider accepts without the requested
|
|
2711
|
+
assignees fails rather than reporting success; a retried keyed create that
|
|
2712
|
+
adopts the existing ticket assigns it. `[tickets].createAssignee` names a
|
|
2713
|
+
default for every ticket Autobuild creates (`ab ticket create`, operator
|
|
2714
|
+
`tickets.create` and harvest proposals) that names no assignees of its own; the
|
|
2715
|
+
caller applies it, so a harvest proposal filed under `"me"` belongs to the
|
|
2716
|
+
owner of the filing dispatcher's credential, resolved at dispatcher startup and
|
|
2717
|
+
never during a tick. File, hosted, Linear and plugin sources without the
|
|
2718
|
+
capability refuse any write naming assignees, including an empty set, and a
|
|
2719
|
+
configured `createAssignee`, with an error naming the source, before anything
|
|
2720
|
+
is written; their tickets carry no `assignees` field. `ab ticket create` and
|
|
2721
|
+
`update` take `--assignees a,b`; operator and MCP ticket requests take
|
|
2722
|
+
`assignees`.
|
|
2723
|
+
|
|
2653
2724
|
A build freezes its ticket's links into `build.created` when it claims the
|
|
2654
2725
|
ticket, from the same sample as the body. Later ticket edits and spec revisions
|
|
2655
2726
|
never change them. An agent in the build may downgrade one linked `closes`
|
|
@@ -4274,6 +4345,11 @@ runtime = "pi"
|
|
|
4274
4345
|
model = "moonshotai/kimi-k3"
|
|
4275
4346
|
sessionBudgetSeconds = 7200 # optional role override
|
|
4276
4347
|
|
|
4348
|
+
[profiles.deep] # selected by a ticket labelled "deep" (§9)
|
|
4349
|
+
label = "deep"
|
|
4350
|
+
[profiles.deep.roles.implement] # overrides only the fields it names
|
|
4351
|
+
args = ["--effort", "high"]
|
|
4352
|
+
|
|
4277
4353
|
[policy]
|
|
4278
4354
|
upgradeDrainSeconds = 900 # local generation drain deadline, hot-reloaded
|
|
4279
4355
|
dispatchLeaseTimeoutSeconds = 60 # repository dispatch lease lifetime without renewal
|
|
@@ -4331,7 +4407,7 @@ decide where a build's effective configuration is composed from:
|
|
|
4331
4407
|
| Class | Sections | Source at deposit |
|
|
4332
4408
|
|---|---|---|
|
|
4333
4409
|
| 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). |
|
|
4334
|
-
| 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. |
|
|
4410
|
+
| Deployment-owned (live) | `[roles]` (runtime, model, args, alternates, per-role `sessionBudgetSeconds`), `[profiles]` (label-selected role overlays) and `[policy]` (budgets, retry bounds, stall and harvest knobs) | The dispatcher's live snapshot; an accepted reload delivers these to active builds. |
|
|
4335
4411
|
| Dispatcher-owned | `baseBranch`, `capacity`, `ticketScanIntervalSeconds`, `forge`, `plugins`, `pr`, `tickets`, `orchestrator`, `merge`, `upgrade` | The dispatcher's live snapshot; the build runner never interprets them. |
|
|
4336
4412
|
|
|
4337
4413
|
Dispatcher lease sweeps may reuse parsed effective-config pins in a disposable
|
|
@@ -4651,7 +4727,8 @@ reapply the intended changes before retrying; conflicts are never merged.
|
|
|
4651
4727
|
File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets,
|
|
4652
4728
|
state and urgent priority; file revisions also cover nonempty issue links. GitHub revisions
|
|
4653
4729
|
fingerprint kind, target, title, body, canonical label/blocker sets, state and issue links,
|
|
4654
|
-
including the ticket's own issue; GitHub tickets carry no comments
|
|
4730
|
+
including the ticket's own issue; GitHub tickets carry no comments, and assignees
|
|
4731
|
+
are not part of a GitHub revision. Reverting
|
|
4655
4732
|
identical content restores its fingerprint. File checks
|
|
4656
4733
|
re-read immediately before writing, with the existing no-lock race window.
|
|
4657
4734
|
Direct file edits and state-directory moves change revisions. File revisions also
|
|
@@ -4779,7 +4856,7 @@ by the shared projection vocabulary and reused by terminal and CLI text.
|
|
|
4779
4856
|
|
|
4780
4857
|
Destination heads come only from the authoritative forge branch; dispatcher-host
|
|
4781
4858
|
refs are never a fallback. Failed remote reads retain the accepted observation;
|
|
4782
|
-
classified rate limits use repository forge degradation and cooldown. Changed
|
|
4859
|
+
dispatcher-classified rate limits use repository forge degradation and cooldown. Changed
|
|
4783
4860
|
heads require immutable commit ancestry proof against the accepted target and
|
|
4784
4861
|
the destination base already used by replay. Missing capability or failed proof
|
|
4785
4862
|
defers new replay. A non-descendant without kernel lineage records
|
|
@@ -4831,7 +4908,7 @@ not consume `maxPhaseAttempts`. A seventh transient failure records
|
|
|
4831
4908
|
error and six retries. Answering that escalation opens a fresh publication episode
|
|
4832
4909
|
for the same retained intent without resetting agent phase failures. Pending
|
|
4833
4910
|
publication keeps its workspace through backoff and unresolved exhaustion.
|
|
4834
|
-
|
|
4911
|
+
Dispatcher-classified rate limits retain repository cooldown and consume no publication
|
|
4835
4912
|
retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
|
|
4836
4913
|
errors retain their existing behavior.
|
|
4837
4914
|
|
|
@@ -4871,7 +4948,8 @@ one durable `dispatcher.kernel-git-unavailable` repository condition, node work
|
|
|
4871
4948
|
waits, and `dispatcher.kernel-git-recovered` closes the condition once a clone
|
|
4872
4949
|
succeeds.
|
|
4873
4950
|
|
|
4874
|
-
A
|
|
4951
|
+
A rate limit the dispatcher classifies on its own authenticated request
|
|
4952
|
+
records repository degradation with `resetAt`.
|
|
4875
4953
|
Forge work waits during cooldown; passing the deadline permits a recovery
|
|
4876
4954
|
request; a successful probe records automatic recovery. An authorized operator
|
|
4877
4955
|
may explicitly override erroneous recorded state with
|
|
@@ -4882,6 +4960,25 @@ success. A subsequent actual limit records a fresh cooldown. Hosted admission
|
|
|
4882
4960
|
requires a schema-valid finite ISO `resetAt` no later than server time plus
|
|
4883
4961
|
24 hours, inclusive; past deadlines remain valid. Rejection never clamps or
|
|
4884
4962
|
invents a provider reset, and historical events remain readable.
|
|
4963
|
+
|
|
4964
|
+
Only the dispatcher's own forge pauses the repository. A limit on a request
|
|
4965
|
+
that carried no credential, or one seen by a build runner or phase session,
|
|
4966
|
+
says nothing about the dispatcher's credential: that process waits out its own
|
|
4967
|
+
reset locally (a dispatcher defers that work instead), and records one advisory
|
|
4968
|
+
`forge.credential-limited` fact per episode naming the process, whether the
|
|
4969
|
+
request was `unauthenticated` (with why) or used the process's own credential,
|
|
4970
|
+
and the reset. It is `ab watch` attention and appears as
|
|
4971
|
+
`forgeCredentialLimits` in `ab repository status` until its reset;
|
|
4972
|
+
`forge-clear` does not apply. Remote guests receive no forge credential: their
|
|
4973
|
+
GitHub API requests fail with a typed error naming `GITHUB_TOKEN or GH_TOKEN`
|
|
4974
|
+
instead of going out anonymously, and they prove ancestry through their
|
|
4975
|
+
workspace's Git. An unauthenticated limit therefore points at a process missing
|
|
4976
|
+
`GITHUB_TOKEN`/`GH_TOKEN` or a `gh` login, or at guest-side forge use that must
|
|
4977
|
+
run kernel-side. Runners and sessions still wait out a dispatcher-recorded
|
|
4978
|
+
cooldown, but a limit they hit on a shared token no longer pauses the
|
|
4979
|
+
dispatcher in advance; the dispatcher records it on its own next limited
|
|
4980
|
+
request.
|
|
4981
|
+
|
|
4885
4982
|
Native merge application failures keep candidate-specific retry eligibility,
|
|
4886
4983
|
including automatic decisions without a human command. Retries recheck consent,
|
|
4887
4984
|
holds, verification and the exact candidate. Uncertain enables remain pending
|
package/docs/agent-runtimes.md
CHANGED
|
@@ -128,7 +128,7 @@ alternates = [{ runtime = "codex", model = "gpt-6.1-sol" }]
|
|
|
128
128
|
<!-- seam-config:end -->
|
|
129
129
|
|
|
130
130
|
- **Verifier roles** use the step name (`roles.acceptance`), not the skill name; author the `verify-acceptance` skill first. Check steps run commands and need no model.
|
|
131
|
-
- **Inheritance.** Each role inherits omitted fields from `roles.default` field by field; an explicit `args` list replaces the inherited one.
|
|
131
|
+
- **Inheritance.** Each role inherits omitted fields from `roles.default` field by field; an explicit `args` list replaces the inherited one. A ticket label can select a [role profile](configuration-overview.md#roles-models-and-limits) that overrides named fields for that build only.
|
|
132
132
|
- **Alternates** are ordered availability routes, not extra reviewers. Availability or exhaustion failures, or a missing executable, select the next route; credential and configuration failures need repair. A fallback may cost provider independence, so check which runtime ran.
|
|
133
133
|
|
|
134
134
|
## Writing your own
|
package/docs/architecture.md
CHANGED
|
@@ -1092,7 +1092,10 @@ adapter operation, so slug naming, provisioning, runners, and Harvest cannot
|
|
|
1092
1092
|
block input.
|
|
1093
1093
|
|
|
1094
1094
|
Startup restores a validated `dispatchFrontend` checkpoint incrementally only
|
|
1095
|
-
when its cursor is within the 1,000-event repository tail window.
|
|
1095
|
+
when its cursor is within the 1,000-event repository tail window. When no
|
|
1096
|
+
current (reducer version 5) checkpoint exists, startup reads a legacy version-4
|
|
1097
|
+
row once: it discards that row's dashboard-event cache, keeps its identities and
|
|
1098
|
+
holder, and the next save replaces the row with version 5 at the same cursor. A missing,
|
|
1096
1099
|
invalid, unreadable or stale checkpoint, and cursor expiry, instead reseed from
|
|
1097
1100
|
the canonical `repositoryReadFacts` value: its latest run start and the sampled
|
|
1098
1101
|
holder's start become the retained identities, and its cursor starts one
|
|
@@ -1106,13 +1109,17 @@ selection, including concurrent appends; cursor expiry permits one additional
|
|
|
1106
1109
|
canonical reseed, never historical gap replay. Steady-state reads and save
|
|
1107
1110
|
cadence are unchanged.
|
|
1108
1111
|
|
|
1109
|
-
The frontend's `dispatchFrontend` checkpoint
|
|
1110
|
-
the latest run-started fact and the sampled lease holder's
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1112
|
+
The frontend's `dispatchFrontend` checkpoint (reducer version 5) retains
|
|
1113
|
+
identities only: the latest run-started fact and the sampled lease holder's
|
|
1114
|
+
start (deduplicated), plus the holder name. It holds no dashboard-event cache,
|
|
1115
|
+
so its size is fixed by those identities however much Harvest, settings,
|
|
1116
|
+
handoff or migration history accumulates. Settings, Harvest, handoffs and
|
|
1117
|
+
upgrades, ticket migrations and missing accounts all render from canonical
|
|
1118
|
+
repository facts. Identity history is always partial, including normalized
|
|
1119
|
+
legacy version-4 caches; a missing holder is resolved through the bounded
|
|
1120
|
+
per-run reduced read. An older client ignores a version-5 row and reseeds
|
|
1121
|
+
canonically, and the store refuses its version-4 writes over that row, which
|
|
1122
|
+
settles them.
|
|
1116
1123
|
Successful lease samples select or clear the retained holder; failed metadata
|
|
1117
1124
|
reads preserve the last selection. Snapshot saves track cursor and effective
|
|
1118
1125
|
retained-state changes locally: written, refused and unsupported attempts settle
|
|
@@ -1123,7 +1130,8 @@ only its captured projection is acknowledged. Teardown forces a dirty save past
|
|
|
1123
1130
|
the time gate, while settled state stays quiet. Equal-cursor refusal does not
|
|
1124
1131
|
make correlation durable: restart reconstructs it through bounded holder lookup,
|
|
1125
1132
|
and the next advancing-cursor checkpoint carries it without relaxing snapshot
|
|
1126
|
-
ordering. A validated
|
|
1133
|
+
ordering. A validated version-5 checkpoint whose identities are already
|
|
1134
|
+
normalized starts clean; a normalized legacy version-4 row starts dirty.
|
|
1127
1135
|
|
|
1128
1136
|
`packages/core/src/cli/dashboard/refresh.ts` owns the shared presentation read
|
|
1129
1137
|
scheduler for both terminal paths: focused by default, independent of focus for
|
|
@@ -1293,13 +1301,21 @@ and `ab context` writes them under `$AB_CONTEXT_DIR/assets/`.
|
|
|
1293
1301
|
through `repositoryReadFacts`; `processes/dispatcher.ts` retries them under the
|
|
1294
1302
|
existing repository ownership before intake. This pre-record recovery differs
|
|
1295
1303
|
from `dispatch.failed`, which completes an already established build.
|
|
1304
|
+
`kernel/build-creation.ts` derives the keyed canonical slug that the dispatcher and
|
|
1305
|
+
the hosted server share. The optional `BuildStore.buildCreationIdentity` port says
|
|
1306
|
+
whether a store creates at the exact slug (method absent), at that derived slug for
|
|
1307
|
+
a keyed request (`keyed`), or at an allocated slug a client may never learn
|
|
1308
|
+
(`allocated`).
|
|
1296
1309
|
|
|
1297
1310
|
Before claiming, the dispatcher journals a repository-scoped preparation intent;
|
|
1298
|
-
a won claim
|
|
1311
|
+
a won claim, the selected creation slug and, when the build store attests keyed
|
|
1312
|
+
creation, the attempt's creation key are durable boundaries. Caught
|
|
1299
1313
|
asset-copy, spec-authoring, naming, and build-creation failures return the ticket
|
|
1300
1314
|
to configured Ready; a nonconforming spec goes to configured Triage. Recovery
|
|
1301
|
-
|
|
1302
|
-
|
|
1315
|
+
point-reads the selected slug and, for a keyed attempt, the canonical slug derived
|
|
1316
|
+
from the repository, selected slug and key: one matching record and atomic
|
|
1317
|
+
`build.created` retain ownership even if creation threw after committing or its
|
|
1318
|
+
response was lost.
|
|
1303
1319
|
Unavailable or conflicting readback never authorizes release or a replacement
|
|
1304
1320
|
build. Pending attempts retain the original failure, latest recovery error and
|
|
1305
1321
|
retry deadline in the canonical repository reduced value; resolved attempts
|
|
@@ -1307,8 +1323,10 @@ leave that value. Under repository ownership, each tick admits at most eight
|
|
|
1307
1323
|
due recovery attempts, before intake and independently of capacity or intake
|
|
1308
1324
|
settings, with a 30-second durable retry delay after recovery failure. Unresolved
|
|
1309
1325
|
ticket identities remain withheld. An uncertain claim outcome or unrelated
|
|
1310
|
-
external ticket state, missing ticket/state,
|
|
1311
|
-
|
|
1326
|
+
external ticket state, missing ticket/state, conflicting slug ownership, builds at
|
|
1327
|
+
both identities, or an unknown creation outcome (an unkeyed attempt on a store
|
|
1328
|
+
that allocates slugs, where absence is not evidence) terminates automatic
|
|
1329
|
+
recovery with an `abandoned` resolution and diagnostic reason. The
|
|
1312
1330
|
ticket is left unchanged; an operator can leave it finished or cancelled, or
|
|
1313
1331
|
inspect ownership and explicitly return it to Ready for another attempt. These
|
|
1314
1332
|
cases stop provider polling and further durable diagnostic appends. The tick
|
|
@@ -1482,11 +1500,13 @@ validates issuance, durable lifecycle bindings and the 60-second terminal grace;
|
|
|
1482
1500
|
principals. `remote-store-server.ts` enforces resource mutations before deposits,
|
|
1483
1501
|
including body-selected and addressed-stream resources. Operator routes reject
|
|
1484
1502
|
these principals. Build-runner and build-phase grants may append only the
|
|
1485
|
-
kernel's `dispatcher.forge-degraded` repository
|
|
1486
|
-
(the exact repository in the delegated claim,
|
|
1487
|
-
`requireProject` check),
|
|
1488
|
-
|
|
1489
|
-
|
|
1503
|
+
kernel's `forge.credential-limited` and `dispatcher.forge-degraded` repository
|
|
1504
|
+
facts, in their own project (the exact repository in the delegated claim,
|
|
1505
|
+
enforced by the preceding `requireProject` check), so runner/CLI guards can
|
|
1506
|
+
report a newly observed rate limit as attention. Current guards are
|
|
1507
|
+
process-scoped (`kernel/guarded-forge.ts`) and record only
|
|
1508
|
+
`forge.credential-limited`; the `dispatcher.forge-degraded` admission remains
|
|
1509
|
+
for runners pinned to older releases. This exception grants no repository administration,
|
|
1490
1510
|
recovery, lease, or other journal writes. The agent-visible build-scoped Store
|
|
1491
1511
|
still denies repository writes. Ticket routes deny build grants and allow harvest grants only the reads and
|
|
1492
1512
|
runner filing operations they require. Ticket sources and assets are partitioned
|
|
@@ -1897,7 +1917,7 @@ execution and unchanged-base progress budgets retain their existing accounting.
|
|
|
1897
1917
|
|
|
1898
1918
|
Destination heads come only from the authoritative forge branch; dispatcher-host
|
|
1899
1919
|
refs are never a fallback. Failed remote reads retain the accepted observation;
|
|
1900
|
-
classified rate limits use repository forge degradation and cooldown. Changed
|
|
1920
|
+
dispatcher-classified rate limits use repository forge degradation and cooldown. Changed
|
|
1901
1921
|
heads require immutable commit ancestry proof against the accepted target and
|
|
1902
1922
|
the destination base already used by replay. Missing capability or failed proof
|
|
1903
1923
|
defers new replay. A non-descendant without kernel lineage records
|
|
@@ -1955,7 +1975,7 @@ not consume `maxPhaseAttempts`. A seventh transient failure records
|
|
|
1955
1975
|
error and six retries. Answering that escalation opens a fresh publication episode
|
|
1956
1976
|
for the same retained intent without resetting agent phase failures. Pending
|
|
1957
1977
|
publication keeps its workspace through backoff and unresolved exhaustion.
|
|
1958
|
-
|
|
1978
|
+
Dispatcher-classified rate limits retain repository cooldown and consume no publication
|
|
1959
1979
|
retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
|
|
1960
1980
|
errors retain their existing behavior.
|
|
1961
1981
|
|
|
@@ -1997,7 +2017,8 @@ one durable `dispatcher.kernel-git-unavailable` repository condition, node work
|
|
|
1997
2017
|
waits, and `dispatcher.kernel-git-recovered` closes the condition once a clone
|
|
1998
2018
|
succeeds.
|
|
1999
2019
|
|
|
2000
|
-
A
|
|
2020
|
+
A rate limit the dispatcher classifies on its own authenticated request
|
|
2021
|
+
records repository degradation with `resetAt`.
|
|
2001
2022
|
Forge work waits during cooldown; passing the deadline permits a recovery
|
|
2002
2023
|
request; a successful probe records automatic recovery. An authorized operator
|
|
2003
2024
|
may explicitly override erroneous recorded state with
|
|
@@ -2008,6 +2029,25 @@ success. A subsequent actual limit records a fresh cooldown. Hosted admission
|
|
|
2008
2029
|
requires a schema-valid finite ISO `resetAt` no later than server time plus
|
|
2009
2030
|
24 hours, inclusive; past deadlines remain valid. Rejection never clamps or
|
|
2010
2031
|
invents a provider reset, and historical events remain readable.
|
|
2032
|
+
|
|
2033
|
+
Only the dispatcher's own forge pauses the repository. A limit on a request
|
|
2034
|
+
that carried no credential, or one seen by a build runner or phase session,
|
|
2035
|
+
says nothing about the dispatcher's credential: that process waits out its own
|
|
2036
|
+
reset locally (a dispatcher defers that work instead), and records one advisory
|
|
2037
|
+
`forge.credential-limited` fact per episode naming the process, whether the
|
|
2038
|
+
request was `unauthenticated` (with why) or used the process's own credential,
|
|
2039
|
+
and the reset. It is `ab watch` attention and appears as
|
|
2040
|
+
`forgeCredentialLimits` in `ab repository status` until its reset;
|
|
2041
|
+
`forge-clear` does not apply. Remote guests receive no forge credential: their
|
|
2042
|
+
GitHub API requests fail with a typed error naming `GITHUB_TOKEN or GH_TOKEN`
|
|
2043
|
+
instead of going out anonymously, and they prove ancestry through their
|
|
2044
|
+
workspace's Git. An unauthenticated limit therefore points at a process missing
|
|
2045
|
+
`GITHUB_TOKEN`/`GH_TOKEN` or a `gh` login, or at guest-side forge use that must
|
|
2046
|
+
run kernel-side. Runners and sessions still wait out a dispatcher-recorded
|
|
2047
|
+
cooldown, but a limit they hit on a shared token no longer pauses the
|
|
2048
|
+
dispatcher in advance; the dispatcher records it on its own next limited
|
|
2049
|
+
request.
|
|
2050
|
+
|
|
2011
2051
|
Native merge application failures keep candidate-specific retry eligibility,
|
|
2012
2052
|
including automatic decisions without a human command. Retries recheck consent,
|
|
2013
2053
|
holds, verification and the exact candidate. Uncertain enables remain pending
|
|
@@ -63,6 +63,16 @@ sessionBudgetSeconds = 3600
|
|
|
63
63
|
- **Capacity** bounds concurrent work.
|
|
64
64
|
- **Policy limits** bound review rounds, retries and session budgets, and decide when automation stops for attention.
|
|
65
65
|
|
|
66
|
+
Roles apply to every build. A label-selected **profile** gives the builds of tickets carrying its label their own overrides, and everything it leaves out still comes from `[roles]`:
|
|
67
|
+
|
|
68
|
+
```toml
|
|
69
|
+
[profiles.deep]
|
|
70
|
+
label = "deep"
|
|
71
|
+
|
|
72
|
+
[profiles.deep.roles.implement]
|
|
73
|
+
model = "claude-opus-5-5"
|
|
74
|
+
```
|
|
75
|
+
|
|
66
76
|
|
|
67
77
|
## Accounts
|
|
68
78
|
|