@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/docs/restacking.md
CHANGED
|
@@ -19,19 +19,24 @@ Destination observations are durable `target.moved` facts, including while an
|
|
|
19
19
|
agent runs. Verify-entry restack freezes a current base before verification;
|
|
20
20
|
path selection excludes upstream-only paths. After finalize and post-steps,
|
|
21
21
|
waiting leaves restack when the target moves. Node-target finalize contributions
|
|
22
|
-
are canonicalized before guarded
|
|
23
|
-
Clean replay starts no agent. A clean waiting leaf rewrite preserves
|
|
24
|
-
verification
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
are canonicalized before guarded merge even when the target SHA is unchanged.
|
|
23
|
+
Clean replay starts no agent. A clean waiting leaf rewrite preserves completed
|
|
24
|
+
verification when build-owned config is unchanged, even when replay replaces
|
|
25
|
+
the pin commit's ancestry. Reports retain their actual cycle base/head.
|
|
26
|
+
Changed config still starts a fresh verification cycle while waiting. Before
|
|
27
|
+
running further verification steps, cycles also require known pin ancestry;
|
|
28
|
+
a future cycle captures fresh config from its checkout. Configuration
|
|
29
|
+
supersession is separate from replay and reconcile. Conflicted replay runs
|
|
30
|
+
reconcile and verification, and initial verification cannot be skipped through
|
|
31
|
+
post-reconcile policy.
|
|
27
32
|
|
|
28
33
|
Nodes observe parent movement durably but restack only on demand: before a
|
|
29
|
-
complete nonempty node verifies; before
|
|
34
|
+
complete nonempty node verifies; before merge if its parent moved; when queued
|
|
30
35
|
dependency presence requires an ancestor change; on `ab restack <node>`; or on
|
|
31
36
|
accepted re-parenting. There is no eager mode or cadence option. Nested nodes
|
|
32
37
|
need their own demand. Existing frozen transactions, including ones reserved
|
|
33
38
|
before upgrade, finish first; later demand coalesces onto the latest parent.
|
|
34
|
-
Leaves keep verify-entry and awaiting-
|
|
39
|
+
Leaves keep verify-entry and awaiting-merge restacks for every target.
|
|
35
40
|
|
|
36
41
|
For observation cadence, durable wakes and last-check evidence, see
|
|
37
42
|
[node polling and status](integration-tree.md#polling-and-status).
|
|
@@ -48,11 +53,29 @@ and unopened nodes. Paused or blocked nodes wait for their normal safety gates.
|
|
|
48
53
|
A request arriving during replay survives until its parent and required identities
|
|
49
54
|
are covered. Re-parenting invalidates requests for the old destination.
|
|
50
55
|
|
|
51
|
-
Both dashboards
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
Both dashboards use `+N` beside the destination for commits it has that the
|
|
57
|
+
build lacks, no suffix when current, and `+?` when unknown. Merged and closed
|
|
58
|
+
builds omit the suffix. Terminal list rows put `→ destination +N` on the slug
|
|
59
|
+
line; work steps follow immediately and integration progress keeps only the
|
|
60
|
+
bar and child counts. Detail target/Parent fields use the same suffix.
|
|
61
|
+
|
|
62
|
+
Work distance counts destination commits absent from the sampled current build
|
|
63
|
+
head (`BUILD..TARGET`). It is advisory durable telemetry refreshed during normal
|
|
64
|
+
target polls, including when the build head changes. Unavailable or stale samples
|
|
65
|
+
are unknown; this observation does not change merge or restack decisions.
|
|
66
|
+
|
|
67
|
+
Integration parent distance counts commits reachable from the observed parent
|
|
68
|
+
but not the last confirmed contribution base; it is not elapsed time or poll
|
|
69
|
+
count. Samples are invalidated by replay or re-parenting. This freshness gate
|
|
70
|
+
applies to nodes: a stale node cannot verify or merge; inventory and child merges
|
|
71
|
+
continue while it collects.
|
|
72
|
+
|
|
73
|
+
Restack and reconcile publication reject tracked modifications with the existing
|
|
74
|
+
clean-worktree error. Nonignored untracked files do not block publication and
|
|
75
|
+
remain unpublished and untouched; each publication that encounters them records
|
|
76
|
+
a path-bearing `observation.recorded` followup, deduplicated by operation,
|
|
77
|
+
transaction, candidate SHA and exact path list on recovery. The phase-terminal
|
|
78
|
+
D5 clean-worktree rule for `ab done` remains unchanged.
|
|
56
79
|
|
|
57
80
|
Before replacement the kernel publishes retained tips, displaced heads and the
|
|
58
81
|
temporary change under immutable exact archive refs. `restack.*` facts record
|
|
@@ -80,7 +103,7 @@ Ordered source identities survive, and identities already reachable upstream
|
|
|
80
103
|
are dropped. Untagged commits, including empty ones, are foreign.
|
|
81
104
|
|
|
82
105
|
A separate node writer lease and durable reservation serialize restacks and
|
|
83
|
-
child
|
|
106
|
+
child merges. Reservations freeze expected head, parent, contribution boundary,
|
|
84
107
|
archives, changes and merge proofs. Lease expiry recovers the same operation,
|
|
85
108
|
not a competing one. Prepared/conflicted/replayed item receipts, publication
|
|
86
109
|
intent, proven replacement and settlement distinguish each recovery boundary.
|
|
@@ -108,10 +131,26 @@ identity refuses the whole restack. The branch and contribution boundary remain
|
|
|
108
131
|
untouched and the integration build escalates with offending evidence. The kernel
|
|
109
132
|
never preserves merge topology or decomposes an unsafe merge automatically.
|
|
110
133
|
|
|
111
|
-
See [integration trees](integration-tree.md), [
|
|
134
|
+
See [integration trees](integration-tree.md), [merge](merge-policy.md), and
|
|
112
135
|
[migration](migration-1.0.md).
|
|
113
136
|
|
|
114
137
|
Native cancellation receipts are candidate- and operation-specific. Publication
|
|
115
138
|
retries confirm forge state before reusing a receipt; external re-enables require
|
|
116
|
-
another confirmed cancellation. Classified transient
|
|
139
|
+
another confirmed cancellation. Classified transient merge failures retain
|
|
117
140
|
retry eligibility and recheck authorization after repository forge cooldown.
|
|
141
|
+
|
|
142
|
+
## Leaf publication retry recovery
|
|
143
|
+
|
|
144
|
+
Leaf restack and reconcile publication retry classified transient forge or transport
|
|
145
|
+
failures six times after the initial attempt, waiting 30, 60, 120, 240, 300 and
|
|
146
|
+
300 seconds. `publication.retry-scheduled` records the operation, frozen rewrite
|
|
147
|
+
identity, episode anchor, failure ordinal, last error and absolute retry time;
|
|
148
|
+
restart resumes that schedule without rerunning the resolver. These retries do
|
|
149
|
+
not consume `maxPhaseAttempts`. A seventh transient failure records
|
|
150
|
+
`publication.retry-exhausted` and raises `publication-retry-limit`, naming the last
|
|
151
|
+
error and six retries. Answering that escalation opens a fresh publication episode
|
|
152
|
+
for the same retained intent without resetting agent phase failures. Pending
|
|
153
|
+
publication keeps its workspace through backoff and unresolved exhaustion.
|
|
154
|
+
Classified rate limits retain repository cooldown and consume no publication
|
|
155
|
+
retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
|
|
156
|
+
errors retain their existing behavior.
|
package/docs/seams.md
CHANGED
|
@@ -13,7 +13,7 @@ Adapters supply storage, agent execution, code publication, workspaces and ticke
|
|
|
13
13
|
|
|
14
14
|
## Storage and tickets
|
|
15
15
|
|
|
16
|
-
- **BuildStore.** Local SQLite with filesystem artifacts by default; a
|
|
16
|
+
- **BuildStore.** Local SQLite with filesystem artifacts by default; a remote store implementing the remote BuildStore protocol.
|
|
17
17
|
- **Tickets.** Local files, Linear, or hosted tickets. A hosted Store doesn't require hosted tickets.
|
|
18
18
|
|
|
19
19
|
See [Build store](build-store.md) and [Tickets](ticket-sources.md).
|
|
@@ -32,16 +32,16 @@ Every environment needs the runtime, tools, dependencies and credentials; remote
|
|
|
32
32
|
|
|
33
33
|
| Piece | All local | All remote |
|
|
34
34
|
|---|---|---|
|
|
35
|
-
| Dispatcher | your machine |
|
|
35
|
+
| Dispatcher | your machine | origin-mode CLI on an operator host |
|
|
36
36
|
| Build runners, agents, checks | your machine, in git worktrees | Vercel Sandbox |
|
|
37
|
-
| Store | local SQLite |
|
|
37
|
+
| Store | local SQLite | remote BuildStore protocol |
|
|
38
38
|
| Tickets | file or any other source | a remote ticket source |
|
|
39
39
|
| Forge | local git or GitHub | GitHub |
|
|
40
|
-
| Operator access | terminal dashboard and local CLI |
|
|
40
|
+
| Operator access | terminal dashboard and local CLI | Operator API client |
|
|
41
41
|
|
|
42
42
|
- File tickets and local git make all-local independent of GitHub.
|
|
43
43
|
- The operator agent is external in both.
|
|
44
|
-
- Choosing
|
|
44
|
+
- Choosing a remote Store alone does not move dispatch or build execution off this machine.
|
|
45
45
|
- Mixed deployments work within adapter constraints, e.g. a local dispatcher with a hosted Store and remote sandboxes.
|
|
46
46
|
|
|
47
47
|
See [Dispatcher hosting](dispatcher-hosting.md).
|
|
@@ -60,7 +60,7 @@ See [Dispatcher hosting](dispatcher-hosting.md).
|
|
|
60
60
|
- [Agent runtimes](agent-runtimes.md): Claude Code, Codex, Pi, models.
|
|
61
61
|
- [Workspaces](workspaces.md): git worktree, Vercel Sandbox, provisioning.
|
|
62
62
|
- [Forges](forges.md): GitHub, local git, publication adapters.
|
|
63
|
-
- [Build store](build-store.md): SQLite,
|
|
64
|
-
- [Dispatcher hosting](dispatcher-hosting.md): local
|
|
65
|
-
- [Operator surfaces](operator-surfaces.md): terminal,
|
|
63
|
+
- [Build store](build-store.md): SQLite, remote HTTP, contracts.
|
|
64
|
+
- [Dispatcher hosting](dispatcher-hosting.md): local and origin-mode CLI processes.
|
|
65
|
+
- [Operator surfaces](operator-surfaces.md): terminal, CLI, stdio MCP, Operator API.
|
|
66
66
|
- [Writing a plugin](plugin-authoring.md): modules, contracts, packaging, publishing.
|
package/docs/setup.md
CHANGED
|
@@ -32,7 +32,7 @@ maintainer before selecting it:
|
|
|
32
32
|
- a dispatcher-side push-capable `GITHUB_TOKEN` or `GH_TOKEN`;
|
|
33
33
|
- for a private repository, a separate read-only clone identity named by
|
|
34
34
|
`gitUsernameEnv` and `gitPasswordEnv`;
|
|
35
|
-
-
|
|
35
|
+
- a remote store that speaks the remote BuildStore protocol and is reachable from Vercel, configured through `ab connect <url>`;
|
|
36
36
|
- each selected role and alternate's runtime/model, its pinned
|
|
37
37
|
`[workspace.config.runtimeProvisioning.<runtime>]` commands, and the API
|
|
38
38
|
credential names it needs in `[workspace.config].environmentVariables`.
|
|
@@ -67,8 +67,7 @@ preflight = "test \"$(pi --version)\" = \"0.84.4\" && pi update --models"
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Use a `vercel-ai-gateway/...` Pi model with `AI_GATEWAY_API_KEY` in the
|
|
70
|
-
dispatcher environment.
|
|
71
|
-
runtime auth state, and do not attempt interactive login in a sandbox. Runtime
|
|
70
|
+
dispatcher environment. For Claude Code, configure [accounts](accounts.md) with a manually provisioned `claude setup-token` credential or a Kimi Code membership key; use the unmodified runtime, your own subscription, and ordinary individual usage. ChatGPT subscription accounts use `bun ab accounts login NAME` on your machine with one dispatcher or hosted refresh owner. Pi and ambient Codex login state are not copied, and interactive sandbox login is unsupported. Runtime
|
|
72
71
|
names are open: a plugin runtime uses the same strict map, for example
|
|
73
72
|
`[workspace.config.runtimeProvisioning.opencode]`, with its own immutable
|
|
74
73
|
install and exact-version preflight commands.
|
|
@@ -96,7 +95,10 @@ checkout dependencies in every fresh/replacement sandbox and before the
|
|
|
96
95
|
readiness probe, writes the marker only after success, and reruns every
|
|
97
96
|
preflight before each build runner. A failure names the runtime, selecting
|
|
98
97
|
role/alternate, and field and starts no agent. Runtime provisioning receives
|
|
99
|
-
|
|
98
|
+
allowlisted legacy API credentials named by
|
|
99
|
+
`[workspace.config].environmentVariables` and automatically supplied placeholders
|
|
100
|
+
for every declared account credential variable. Account variables need no
|
|
101
|
+
allowlist entry; their real credentials remain on the dispatcher host.
|
|
100
102
|
|
|
101
103
|
Keep package-level and checkout-level bootstrap in an idempotent
|
|
102
104
|
`[commands].setup`. It runs after system provisioning and must remain safe to
|
|
@@ -126,7 +128,8 @@ exits nonzero on failure. Then:
|
|
|
126
128
|
6. Run `ab init --validate`. Fix every named failure, review warnings and unknowns, and rerun
|
|
127
129
|
validation. Setup ends at successful validation. Ask the human to start
|
|
128
130
|
`bun ab dispatch`, then open their coding agent at the repository root with
|
|
129
|
-
`ab-operate` loaded to specify, create
|
|
131
|
+
`ab-operate` loaded to specify, create and groom the first ticket. Check operator
|
|
132
|
+
presence before taking the role; an existing operator picks up ready work.
|
|
130
133
|
The setup agent must not start dispatch itself.
|
|
131
134
|
|
|
132
135
|
Validation is explicit and noninteractive. It does not dispatch, claim a
|
|
@@ -155,7 +158,7 @@ to `workspace.config.provisioning` (or a package dependency to setup) while
|
|
|
155
158
|
retaining the universal image; add a runtime credential name to
|
|
156
159
|
`environmentVariables` and its value to the dispatcher environment; correct the
|
|
157
160
|
Vercel team/project credential set; provide separate private-clone credentials;
|
|
158
|
-
use an HTTPS GitHub origin and
|
|
161
|
+
use an HTTPS GitHub origin and remote Store; authorize the Store token; or commit
|
|
159
162
|
and push the selected base branch.
|
|
160
163
|
|
|
161
164
|
## Keep per-build records in separate fragments
|
|
@@ -182,7 +185,7 @@ shared edit surface; the repository owns the release-time assembly tooling.
|
|
|
182
185
|
## Repository identity is the origin, not a checkout path
|
|
183
186
|
|
|
184
187
|
Repository identity in the Store, dispatcher, `ab builds`, `ab build status`,
|
|
185
|
-
`ab repository status
|
|
188
|
+
`ab repository status` is the repository's **normalized origin
|
|
186
189
|
URL** (`https://github.com/owner/repository`), not a checkout's absolute path.
|
|
187
190
|
Two checkouts of the same repository — on different hosts, or a dispatcher and
|
|
188
191
|
its sandboxes — agree on one identity.
|
|
@@ -244,15 +247,14 @@ sources agree with the running system by construction:
|
|
|
244
247
|
runs the dispatcher's own code.
|
|
245
248
|
- **Origin mode** (checkout-less dispatcher): the guest archive is the release
|
|
246
249
|
asset `autobuild-<version>.tgz` fetched from the canonical repository at the
|
|
247
|
-
**running dispatcher's version** (read from the
|
|
250
|
+
**running dispatcher's version** (read from the installed distribution's
|
|
248
251
|
`package.json`), so the guest runs the dispatcher's own release.
|
|
249
252
|
|
|
250
253
|
A service accepts stable and prerelease clients from its own `major.minor`
|
|
251
254
|
release line and the two preceding minor lines in the same major. A major starts a new family:
|
|
252
255
|
X.0 accepts only X.0, X.1 accepts X.0/X.1, and X.2 onward accepts three lines.
|
|
253
256
|
Patch versions are interchangeable in both directions and must never change
|
|
254
|
-
the protocol.
|
|
255
|
-
its window. Supported release lines retain their wire handlers and known
|
|
257
|
+
the protocol. Keep project clients within the instance’s published window. Supported release lines retain their wire handlers and known
|
|
256
258
|
protocol identities; an unknown protocol is refused independently of version.
|
|
257
259
|
Stable and prerelease service and client identities share their numeric major/minor
|
|
258
260
|
line. Malformed or missing identities, build metadata (`+…`), prefixes and
|
|
@@ -273,11 +275,12 @@ It warns and continues when the target is outside the range, naming the
|
|
|
273
275
|
required service upgrade for a newer target or a compatible project range for
|
|
274
276
|
an older one. An unavailable or malformed probe warns that connectivity may
|
|
275
277
|
fail after upgrade. Legacy health without a range means exact-version matching;
|
|
276
|
-
|
|
278
|
+
the hosted instance must publish a compatibility window before clients can
|
|
279
|
+
use release-line compatibility.
|
|
277
280
|
|
|
278
281
|
A distribution fix reaches origin-mode guests after a release is cut and the
|
|
279
282
|
dispatcher is upgraded. Guests continue to run the dispatcher's own version;
|
|
280
|
-
the
|
|
283
|
+
the instance must support that release line.
|
|
281
284
|
|
|
282
285
|
Provisioning records the installed distribution's identity — package version
|
|
283
286
|
and remote-store protocol version — in the guest's
|
|
@@ -304,29 +307,20 @@ perspective:
|
|
|
304
307
|
Local `git-worktree` dispatch keeps working from a checkout exactly as before;
|
|
305
308
|
apart from the identity change, `ab dispatch` behaves as it did.
|
|
306
309
|
|
|
307
|
-
## Hosted deployment variables
|
|
308
|
-
|
|
309
|
-
A hosted-store deployment configures its web/auth variables once — see the
|
|
310
|
-
hosted service README and the complete environment reference in the pinned
|
|
311
|
-
distribution checkout: `BETTER_AUTH_URL`, `AB_WEB_ALLOWED_EMAILS`,
|
|
312
|
-
and the optional `AB_WEB_MCP_RESOURCE` — the protected
|
|
313
|
-
resource the hosted MCP server (docs/mcp.md) binds its OAuth tokens to,
|
|
314
|
-
defaulting to `<BETTER_AUTH_URL>/mcp`. Set it only when a proxy or custom
|
|
315
|
-
domain fronts the deployment under a different public URL than
|
|
316
|
-
`BETTER_AUTH_URL`; the value must be an absolute http(s) URL (https in
|
|
317
|
-
production) or every MCP client's discovery binds tokens to the wrong
|
|
318
|
-
resource.
|
|
319
|
-
|
|
320
|
-
|
|
321
310
|
## Connect a project
|
|
322
311
|
|
|
323
312
|
From a checkout with an origin remote, run `ab connect https://YOUR_ORIGIN`.
|
|
324
313
|
The CLI prints a verification URL and short code and attempts to open a browser.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
314
|
+
The code link opens approval directly; if sign-in is needed, it returns there.
|
|
315
|
+
Check the full repository identity and code, and approve or deny. For an
|
|
316
|
+
unassigned project, choose an eligible organization; a sole option is visibly
|
|
317
|
+
selected. Approval requires that destination even for previously registered
|
|
318
|
+
unassigned projects. Assigned projects show their organization as read-only;
|
|
319
|
+
moving them uses project management. With no eligible organization, approval is
|
|
320
|
+
unavailable until a super user creates one. Another device can open the printed
|
|
321
|
+
URL, or visit `/connect` and enter the code. Approval uses the instance’s browser
|
|
322
|
+
consent endpoint. Requests expire after ten minutes. Denial requires no
|
|
323
|
+
organization choice; denial and timeout leave local configuration unchanged.
|
|
330
324
|
|
|
331
325
|
On approval the service registers the project and issues a project credential.
|
|
332
326
|
The CLI keeps it in `$XDG_CONFIG_HOME/autobuild/credentials` (or
|
|
@@ -358,62 +352,34 @@ saved credential for CI and other non-interactive hosts. A service override
|
|
|
358
352
|
never borrows another service's credential. Build and harvest sessions keep
|
|
359
353
|
their explicit scoped authority.
|
|
360
354
|
|
|
361
|
-
## Connected projects
|
|
362
|
-
|
|
363
|
-
Migrate PostgreSQL from the pinned release before deploying (`bun run
|
|
364
|
-
postgres:migrate`). The service keeps an independent, durable project registry;
|
|
365
|
-
existing build or ticket data does not register a project. An administrator
|
|
366
|
-
with deployment database credentials manages it without redeploying:
|
|
367
|
-
|
|
368
|
-
```sh
|
|
369
|
-
ab-hosted-store projects list
|
|
370
|
-
ab-hosted-store projects add https://github.com/owner/project --user owner@example.com
|
|
371
|
-
ab-hosted-store projects remove https://github.com/owner/project --user owner@example.com
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
From a source checkout, substitute `bun packages/hosted-store-service/src/bin.ts`
|
|
375
|
-
for `ab-hosted-store`. Configure `AB_POSTGRES_URL` or `DATABASE_URL` in that
|
|
376
|
-
process. Database possession grants administration; `--user` is declared audit
|
|
377
|
-
attribution, not a verified login. Ordinary project/store tokens cannot manage
|
|
378
|
-
registrations. Each entry records the normalized origin URL, addition time,
|
|
379
|
-
and adding identity. SSH git spellings normalize to HTTPS; local paths and
|
|
380
|
-
credential-bearing HTTPS URLs are rejected. Duplicate adds preserve metadata;
|
|
381
|
-
remove is idempotent, and re-adding records a fresh addition.
|
|
382
|
-
|
|
383
|
-
Every allowlisted signed-in user owns every registered project. The dashboard,
|
|
384
|
-
MCP discovery and calls, and every operator API route consult current
|
|
385
|
-
registration. Removal hides a project from all these surfaces and subsequent
|
|
386
|
-
hosted dispatcher invocations; builds, events, artifacts and tickets remain,
|
|
387
|
-
and re-registration restores access. Already-started work is not cancelled.
|
|
388
|
-
Project credentials issued by connect authorize only their registered project. Administrative credential issuance remains available for non-interactive hosts.
|
|
389
|
-
|
|
390
|
-
Link directly to `/?repo=<URL-encoded normalized origin>`. The page selects the
|
|
391
|
-
first registered origin when the requested one is missing or removed, and an
|
|
392
|
-
empty registry shows no project data or controls. Registry errors fail closed;
|
|
393
|
-
there is no environment fallback on database failure.
|
|
394
|
-
|
|
395
|
-
`AB_WEB_REPOSITORIES` is deprecated. A nonempty CSV is imported exactly once per
|
|
396
|
-
database, on the first registry initialization with that variable configured,
|
|
397
|
-
with actor `system:AB_WEB_REPOSITORIES`. The import and durable marker commit
|
|
398
|
-
atomically across concurrent starts. An absent variable does not consume the
|
|
399
|
-
marker. Later restarts or edits to the variable never re-add removed projects;
|
|
400
|
-
use the owner commands for subsequent administration.
|
|
401
|
-
|
|
402
|
-
The hosted dispatcher queries current registrations on every authorized
|
|
403
|
-
invocation. With `AB_DISPATCHER_REPOSITORIES` unset, it serves all registered
|
|
404
|
-
projects; an explicit list preserves its order and is intersected with current
|
|
405
|
-
registration. An empty registry is a successful zero-project invocation.
|
|
406
|
-
|
|
407
355
|
## Authoring an agent verifier
|
|
408
356
|
|
|
409
357
|
A repository-owned agent-verify skill is a verifier, not a reviewer: it drives
|
|
410
358
|
the running application and observes whether the spec's acceptance criteria
|
|
411
359
|
hold. It does not inspect the diff for style or edit product code.
|
|
412
360
|
|
|
361
|
+
Repository-authored finalize skills also run `ab context` and read hydrated inputs
|
|
362
|
+
from `$AB_CONTEXT_DIR`, using the manifest for collision-adjusted paths.
|
|
363
|
+
|
|
413
364
|
Its session instructions must preserve this contract:
|
|
414
365
|
|
|
415
|
-
|
|
416
|
-
|
|
366
|
+
Scratch output, downloaded references, probes, and temporary scripts belong under `.ab/`
|
|
367
|
+
(prefer the current `$AB_CONTEXT_DIR` when appropriate), never at the worktree
|
|
368
|
+
root, and must not be committed. Manifest-directed artifact paths remain authoritative.
|
|
369
|
+
|
|
370
|
+
Large scratch belongs under the session's `.ab/` directory (prefer `$AB_CONTEXT_DIR`),
|
|
371
|
+
not `/tmp`: this includes ad-hoc PostgreSQL data/cluster directories, Cargo target
|
|
372
|
+
directories, browser profiles, and database copies. Configure `PGDATA`,
|
|
373
|
+
`CARGO_TARGET_DIR`, and explicit browser profile paths for those resources.
|
|
374
|
+
Keep `TMPDIR` outside the worktree for test suites and commands that discover
|
|
375
|
+
repositories or configuration through parent directories, including focused tests
|
|
376
|
+
and Git probes. Do not relocate required installed tooling or retained evidence;
|
|
377
|
+
manifest-directed artifact paths remain authoritative. Never commit scratch.
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
1. Run `ab context` and read `"$AB_CONTEXT_DIR/context.json"`. The verifier receives
|
|
381
|
+
`$AB_CONTEXT_DIR/spec.md`, the configured step,
|
|
382
|
+
the commit range, and, after escalation is answered, `$AB_CONTEXT_DIR/guidance.json`.
|
|
417
383
|
Node verify sessions also receive `nodeVerification` in the context manifest:
|
|
418
384
|
contribution specs and a provenance index mapping commits to the builds that
|
|
419
385
|
introduced them. Read those specs through the manifest's allocated paths.
|
|
@@ -458,45 +424,8 @@ cannot select another project. See [local builds with hosted tickets](#local-bui
|
|
|
458
424
|
|
|
459
425
|
The service never contacts Linear. Projects with external sources (including
|
|
460
426
|
file and Linear) keep using those sources directly through their dispatcher;
|
|
461
|
-
service ticket HTTP
|
|
462
|
-
feedback rather than returning an empty queue.
|
|
463
|
-
`LINEAR_API_KEY` values are ignored with one startup removal message, including
|
|
464
|
-
blank/unknown values. Removed `AB_TICKET_TRIAGE_STATE`, `AB_TICKET_READY_STATE`,
|
|
465
|
-
`AB_TICKET_DOING_STATE` and `AB_TICKET_DONE_STATE` values are ignored even when
|
|
466
|
-
malformed. None of these retired settings prevents startup.
|
|
467
|
-
|
|
468
|
-
The environment-aware migration imports `AB_WEB_REPOSITORIES` once before
|
|
469
|
-
ownership preflight, including released main-v9 deployments without registry
|
|
470
|
-
tables. A failed migration rolls back the import, main-schema promotion and
|
|
471
|
-
ticket changes together. Owner `projects add` and `tickets assign-team` commands
|
|
472
|
-
bootstrap only the registry/recovery journals and work while the main marker
|
|
473
|
-
is still v9. Without the retired environment, first register the intended
|
|
474
|
-
project with `ab-hosted-store projects add REPOSITORY --user IDENTITY`, then
|
|
475
|
-
assign the team and rerun migration. A successful one-time import is never
|
|
476
|
-
reapplied from later environment edits.
|
|
477
|
-
|
|
478
|
-
Ticket schema v1 migration assigns each whole legacy team to its sole claimant
|
|
479
|
-
among registered projects' latest effective configs, reading their actual blob
|
|
480
|
-
bytes. Projects with no dispatcher run or no effective-config reference make
|
|
481
|
-
no team claim and do not block other projects. Unclaimed teams still fail closed.
|
|
482
|
-
When inferring ownership, a selected configuration whose revision/blob is missing,
|
|
483
|
-
unreadable or invalid stops unchanged with recovery guidance. Restore the selected
|
|
484
|
-
configuration or assign every remaining legacy team explicitly; complete owner
|
|
485
|
-
assignments to registered projects bypass unrelated configuration reads. Conflicts
|
|
486
|
-
and asset ownership mismatches also stop unchanged. Resolve ownership, then rerun:
|
|
487
|
-
|
|
488
|
-
```sh
|
|
489
|
-
ab-hosted-store tickets assign-team TEAM https://github.com/acme/app --user owner@example.com
|
|
490
|
-
ab-postgres-store migrate
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
The assignment journal works before v2 assertion, retains the actor, and grants
|
|
494
|
-
no future cross-project access. Migration preserves ids, states, comments,
|
|
495
|
-
blockers, timestamps and assets. Populated-v1 migration and deployment builds
|
|
496
|
-
require the running service's blob backend, access mode, credentials and prefix
|
|
497
|
-
(`AB_BLOB_PREFIX`), not just PostgreSQL access. `deploy:build` inherits this
|
|
498
|
-
environment and migration failure stops Next build. Fresh databases, empty v1
|
|
499
|
-
queues and v2 reruns stay SQL-only and do not initialize blob storage.
|
|
427
|
+
service ticket HTTP and operator surfaces refuse with project/source
|
|
428
|
+
feedback rather than returning an empty queue.
|
|
500
429
|
|
|
501
430
|
## Local builds with hosted tickets
|
|
502
431
|
|
|
@@ -543,7 +472,7 @@ performs test pushes.
|
|
|
543
472
|
Require **linear history** on protected root and node target branches to prevent
|
|
544
473
|
merge commits from GitHub's update-branch action. On the configured root, enable
|
|
545
474
|
**Require branches to be up to date before merging**, with nonempty required
|
|
546
|
-
checks enforced for all merge actors. This makes root node
|
|
475
|
+
checks enforced for all merge actors. This makes root node merges fenced;
|
|
547
476
|
without it they are best-effort. Both are recommendations, so missing settings
|
|
548
477
|
produce warnings rather than hard failures.
|
|
549
478
|
|
|
@@ -567,3 +496,14 @@ access, revalidate and restart dispatch to refresh its startup diagnostics.
|
|
|
567
496
|
Changing the connected ticket source does not itself migrate in-flight builds.
|
|
568
497
|
Follow [ticket migration](ticket-migration.md), keeping the existing BuildStore
|
|
569
498
|
and recording continuity before resuming build-related ticket writes.
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
Permanent hosted data removal is available on the web app's Projects page to
|
|
502
|
+
super users and owners of the project's organization. `ab disconnect` only
|
|
503
|
+
revokes a credential; admin `projects remove` only unregisters access and retains
|
|
504
|
+
data. Project deletion removes hosted builds, tickets, blobs, secrets and accounts,
|
|
505
|
+
revokes every credential and retains only a minimal deletion audit. It does not
|
|
506
|
+
change local files or configuration. Failed cleanup is retryable with access
|
|
507
|
+
already refused. Reconnecting requires fresh browser approval and starts empty,
|
|
508
|
+
with hosted ticket numbering reset to 1. See
|
|
509
|
+
[permanent project deletion](operator-api.md#permanent-project-deletion).
|
package/docs/skills.md
CHANGED
|
@@ -29,7 +29,7 @@ Skills guide the agents that plan, implement, review and operate Autobuild, one
|
|
|
29
29
|
| `ab-code-review` | Review the implementation against the contract independently |
|
|
30
30
|
| `ab-finalize` | Write the pull request description after verification |
|
|
31
31
|
| `ab-reconcile` | Resolve conflicts in a kernel-prepared replay onto a refreshed base |
|
|
32
|
-
| `ab-operate` | External operator agent:
|
|
32
|
+
| `ab-operate` | External operator agent: operate the builds the repository's dispatcher dispatches, adopt new work, answer escalations and control merge |
|
|
33
33
|
| `ab-tickets` | Read, create, groom and update tickets through the tracker interface |
|
|
34
34
|
| `ab-harvest` | Turn claimed observations into ticket proposals |
|
|
35
35
|
| `ab-harvest-review` | Review those proposals independently |
|
package/docs/spec-standard.md
CHANGED
|
@@ -58,7 +58,7 @@ evidence is not.
|
|
|
58
58
|
|
|
59
59
|
Every build pays a fixed cost no matter how small its diff: spec, plan and
|
|
60
60
|
plan review, code review, the repository's full verify suite, finalize,
|
|
61
|
-
|
|
61
|
+
merge, and a restack for everything queued behind it. Ten small tickets pay
|
|
62
62
|
that cost ten times, and a blocker chain pays it in series. Prefer fewer,
|
|
63
63
|
larger tickets: one ticket per coherent change, as large as one plan and one
|
|
64
64
|
review pass can hold without the quality bar slipping.
|
|
@@ -68,7 +68,7 @@ or fix a reviewer can judge in a single pass, one plan can cover it without
|
|
|
68
68
|
deferring a design decision to a later build, and its out-of-scope list is
|
|
69
69
|
short and obvious. It is too big when its criteria fall into groups that share
|
|
70
70
|
no behavior, when part of it waits on a decision nobody has made, or when its
|
|
71
|
-
parts need different
|
|
71
|
+
parts need different merge — one can ship now while another needs consent
|
|
72
72
|
or must wait.
|
|
73
73
|
|
|
74
74
|
Do not split:
|
|
@@ -103,7 +103,7 @@ A cut at a seam pays twice:
|
|
|
103
103
|
|
|
104
104
|
If no seam exists where the work divides, keep it as one ticket, or make the
|
|
105
105
|
first ticket establish the contract with tests at the boundary and block the
|
|
106
|
-
tickets on either side of it until it
|
|
106
|
+
tickets on either side of it until it merges. After that, they can build
|
|
107
107
|
concurrently.
|
|
108
108
|
|
|
109
109
|
State the seam in each ticket as behavior, not structure: what the contract
|
|
@@ -117,7 +117,7 @@ a planner reading one ticket knows what its siblings own.
|
|
|
117
117
|
A split feature takes as long as its longest blocker chain, not as long as
|
|
118
118
|
its ticket count. A wave of independent tickets finishes in about one build's
|
|
119
119
|
time; the same tickets in a chain take one build per link. Prefer cuts that
|
|
120
|
-
let tickets start together. When one ticket must
|
|
120
|
+
let tickets start together. When one ticket must merge first — usually the one
|
|
121
121
|
that establishes a shared contract — keep it to that contract and its tests,
|
|
122
122
|
so the wave behind it starts sooner, and fold nothing unrelated into it.
|
|
123
123
|
Add a blocker only for a real prerequisite, never to express a preferred
|
|
@@ -143,10 +143,10 @@ Each kernel `spec.revised` records the exact artifact and operator identity
|
|
|
143
143
|
Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
|
|
144
144
|
The node recollects and verifies the new revision, including on the same head
|
|
145
145
|
and parent after a failed cycle. Earlier cycles remain historical evidence
|
|
146
|
-
and cannot block or authorize
|
|
146
|
+
and cannot block or authorize merge under the replacement. Children keep
|
|
147
147
|
their specs, claims and targets; contributions are not restarted.
|
|
148
148
|
Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
149
|
-
pending controls,
|
|
149
|
+
pending controls, merge intent and ended PRs refuse the no-escalation path.
|
|
150
150
|
A concurrent state change refuses publication with a retry explanation;
|
|
151
151
|
uncited artifacts are inert. Leaves still require an open escalation and
|
|
152
152
|
restart from `plan`.
|
|
@@ -62,25 +62,25 @@ and claims the ticket only after they resolve and other readiness gates pass.
|
|
|
62
62
|
|
|
63
63
|
Read [nodes and targets](integration-tree.md) for lifecycle, validation and
|
|
64
64
|
source storage, and [choosing a destination](integration-tree.md#choosing-a-destination)
|
|
65
|
-
when filing a feature set. Blockers order work independently of
|
|
66
|
-
|
|
65
|
+
when filing a feature set. Blockers order work independently of merge targets;
|
|
66
|
+
merge authorization follows the repository's matched policy.
|
|
67
67
|
|
|
68
68
|
## When a blocker resolves
|
|
69
69
|
|
|
70
70
|
In a repository with nodes, a blocker that has a build resolves when its change
|
|
71
71
|
is present in the dependent's target head (or the configured root branch).
|
|
72
72
|
Source done state and aggregate blocker flags do not bypass this gate. A
|
|
73
|
-
confirmed
|
|
73
|
+
confirmed merge SHA reachable from the sampled target proves presence even
|
|
74
74
|
without a build trailer. A node blocker requires its entire completed owned
|
|
75
75
|
contribution, including nested changes and foreign commits, excluding inherited
|
|
76
76
|
parent history. An empty completed contribution is satisfied; missing evidence,
|
|
77
77
|
an open or aborted node, or ambiguous newest build generations remain queued.
|
|
78
78
|
Older successful generations are never substituted for the newest build.
|
|
79
79
|
|
|
80
|
-
- Same node: the blocking change
|
|
81
|
-
- Ancestor: the change
|
|
82
|
-
- Sibling: the blocking node
|
|
83
|
-
- Descendant: the blocking node
|
|
80
|
+
- Same node: the blocking change merges directly into the target.
|
|
81
|
+
- Ancestor: the change merges into an ancestor, then presence demand restacks only the required path to the target.
|
|
82
|
+
- Sibling: the blocking node merges into their common ancestor, then presence demand reaches the target through the minimal ancestor path.
|
|
83
|
+
- Descendant: the blocking node merges into the dependent's target ancestor.
|
|
84
84
|
|
|
85
85
|
Blockers that never had a build, and repositories without nodes, retain the
|
|
86
86
|
source's done-state rule. Waiting tickets stay source work; diagnostics identify
|
package/docs/ticket-sources.md
CHANGED
|
@@ -130,3 +130,21 @@ bun ab plugin test ticket-source acme
|
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
Declare tree support only if you keep the [optional tree contract](plugin-authoring.md#optional-ticket-tree-capability) on the same port and harness: exhaustive pagination, canonical targets, revision coverage and atomic rejection.
|
|
133
|
+
|
|
134
|
+
Native paging is an optional API 1.9 ticket-source capability:
|
|
135
|
+
`listPage?(criteria: TicketCriteria, page: TicketPage): Promise<TicketPageListing>`.
|
|
136
|
+
The SDK exports these types; the result is `TicketListing & { total: number }`.
|
|
137
|
+
Criteria retain state, labels (AND), and assignee semantics. The page has a
|
|
138
|
+
nonnegative integer `limit`, optional nonnegative integer `offset` (default 0),
|
|
139
|
+
and optional `order: 'oldest' | 'newest'` (default oldest). Newest reverses the
|
|
140
|
+
entire source order before offset and limit. Total counts all matches, even
|
|
141
|
+
with limit zero or an offset past the end. Records, diagnostics and errors
|
|
142
|
+
match the exhaustive listing. The shared `describeTicketSourceContract` suite
|
|
143
|
+
automatically compares declared native paging with full-read windows.
|
|
144
|
+
|
|
145
|
+
Only paged operator listings select this capability. Sources without it retain
|
|
146
|
+
the full-read/reverse/slice fallback; native errors propagate. Unpaged operator
|
|
147
|
+
listings, CLI ticket lists and dispatcher ready scans remain exhaustive through
|
|
148
|
+
`listReady`/`listAll`. The hosted PostgreSQL source counts matches without
|
|
149
|
+
bodies and reads only the SQL-bounded window. File, Linear and the remote
|
|
150
|
+
`HostedTicketSource` retain fallback; the POST list-ready protocol stays exhaustive.
|
package/docs/tickets.md
CHANGED
|
@@ -48,6 +48,12 @@ The dispatcher claims only tickets in the ready state with the required labels a
|
|
|
48
48
|
- **Blockers.** Unresolved prerequisite tickets keep it queued; they don't create a blocked build. With nodes, prerequisites with builds must be present at the sampled destination; see [integration and blocker presence](integration-overview.md).
|
|
49
49
|
- **Destination and capacity.** Its target must accept new work, and a capacity slot must be free.
|
|
50
50
|
|
|
51
|
+
Before ready filing, the agent checks `ab repository status --json`. With live
|
|
52
|
+
`operator.registrations`, it records intent, rejected alternatives and out-of-scope
|
|
53
|
+
reasons in the ticket body, files, tells you the existing operator will pick it up,
|
|
54
|
+
and stops without a watch. Otherwise it takes the operator role for the builds the repository's dispatcher dispatches.
|
|
55
|
+
Your explicit instruction overrides either default; non-ready work needs no watch.
|
|
56
|
+
|
|
51
57
|
At dispatch, Autobuild pins the spec, so later tracker edits don't change what reviewers approved. A deliberate revision goes through your operator agent answering an escalation, and restarts planning:
|
|
52
58
|
|
|
53
59
|
```sh
|
|
@@ -60,9 +66,9 @@ bun ab answer <slug> --revise-spec-from-ticket
|
|
|
60
66
|
| Kind | Describes | Runs |
|
|
61
67
|
|---|---|---|
|
|
62
68
|
| Work | an individual change | the build pipeline |
|
|
63
|
-
| Node | a finite integration point | collects related work, verifies it together,
|
|
69
|
+
| Node | a finite integration point | collects related work, verifies it together, merges into its parent |
|
|
64
70
|
|
|
65
|
-
Both kinds need conforming specs; a node's intent alone isn't a buildable contract. Set the kind with `ab ticket create` or `ab ticket update --kind work|node`. See [integrating related work](integration-overview.md) for targets, node admission and
|
|
71
|
+
Both kinds need conforming specs; a node's intent alone isn't a buildable contract. Set the kind with `ab ticket create` or `ab ticket update --kind work|node`. See [integrating related work](integration-overview.md) for targets, node admission and merge.
|
|
66
72
|
|
|
67
73
|
Outside signals and agent discoveries enter through [Intake and harvest](intake.md) as proposals, groomed before they become ready work.
|
|
68
74
|
|
package/docs/troubleshooting.md
CHANGED
|
@@ -71,7 +71,7 @@ bun ab harvest status
|
|
|
71
71
|
|
|
72
72
|
**Symptom.** A build stops advancing, often after an interruption.
|
|
73
73
|
|
|
74
|
-
**Cause.** Escalated, paused, waiting on
|
|
74
|
+
**Cause.** Escalated, paused, waiting on merge gates, starting a runner, or recovering an expired lease. A quiet log isn't a crash.
|
|
75
75
|
|
|
76
76
|
**Fix.** Inspect the build, reading status, progress and lease health separately:
|
|
77
77
|
|
|
@@ -96,16 +96,12 @@ bun ab builds --queued
|
|
|
96
96
|
|
|
97
97
|
See [answering blocked builds](operating.md#answer-and-pause). Preserve event logs; let the kernel manage leases and recovery.
|
|
98
98
|
|
|
99
|
-
##
|
|
99
|
+
## Remote project access
|
|
100
100
|
|
|
101
|
-
**Symptom.**
|
|
101
|
+
**Symptom.** Remote requests refuse a project despite a configured URL.
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- **Dispatcher selection.** `AB_DISPATCHER_REPOSITORIES` in the hosted dispatch environment selects projects: unset selects every active registration; an explicit ordered list is intersected with current registrations.
|
|
109
|
-
- **Dashboard fallback.** With no selection, the dashboard shows the first registered origin.
|
|
110
|
-
|
|
111
|
-
Registry errors fail closed.
|
|
103
|
+
Run `bun ab connect` to check the instance, normalized origin and credential.
|
|
104
|
+
Reconnect on this host/user if credentials are missing or rejected. A project
|
|
105
|
+
must be actively registered with the instance; data alone grants no access.
|
|
106
|
+
If access remains refused, give the instance operator the project identity and
|
|
107
|
+
sanitized error. See the [authentication contract](remote-store-protocol.md#7-authentication-and-project-authority).
|