@defrex/autobuild 1.0.1 → 1.1.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 +6 -6
- package/SPEC.md +360 -229
- package/docs/answering-blocked-builds.md +2 -2
- package/docs/architecture.md +155 -45
- package/docs/assets/headline-wide.png +0 -0
- package/docs/builds.md +4 -4
- package/docs/cli.md +4 -4
- package/docs/configuration-overview.md +4 -4
- package/docs/configuration.md +245 -210
- package/docs/dispatcher-hosting.md +2 -2
- 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/hosted-dispatcher.md +6 -3
- package/docs/hosted-service.md +16 -5
- package/docs/integration-overview.md +15 -15
- package/docs/integration-tree.md +45 -38
- package/docs/integration.md +6 -6
- package/docs/mcp.md +16 -15
- package/docs/{landing-policy.md → merge-policy.md} +42 -24
- package/docs/migration-1.0.md +17 -13
- package/docs/operating.md +41 -18
- package/docs/operator-api.md +91 -15
- package/docs/operator-surfaces.md +8 -4
- package/docs/overview.md +3 -3
- package/docs/remote-store-protocol.md +76 -11
- package/docs/remote-ticket-protocol.md +1 -1
- package/docs/restacking.md +54 -15
- package/docs/setup.md +41 -6
- package/docs/skills.md +1 -1
- package/docs/spec-standard.md +6 -6
- package/docs/ticket-dependencies.md +7 -7
- package/docs/tickets.md +8 -2
- package/docs/troubleshooting.md +2 -2
- package/docs/upgrading.md +8 -3
- package/docs/verification.md +60 -14
- package/package.json +7 -5
- 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/build-control.ts +83 -28
- 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.ts +35 -9
- package/packages/core/src/cli/env.ts +4 -0
- package/packages/core/src/cli/help.ts +30 -23
- package/packages/core/src/cli/main.ts +24 -8
- package/packages/core/src/cli/node-verification-provenance.ts +1 -97
- package/packages/core/src/cli/publication-settlement.ts +43 -20
- package/packages/core/src/cli/repository-status.ts +20 -9
- package/packages/core/src/cli/status.ts +42 -5
- package/packages/core/src/cli/store-opening.ts +6 -1
- package/packages/core/src/cli/terminal.ts +22 -1
- package/packages/core/src/cli/terminals.ts +14 -10
- 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 +634 -511
- 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/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/schema.ts +86 -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/globs.ts +1 -1
- package/packages/core/src/events/payloads.ts +70 -1
- package/packages/core/src/events/policy.ts +7 -0
- package/packages/core/src/events/repository.ts +2 -4
- package/packages/core/src/events/sessions.ts +6 -6
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +571 -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 +82 -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 +1 -7
- package/packages/core/src/operator/landings.ts +5 -1
- package/packages/core/src/operator/presentation.ts +6 -1
- package/packages/core/src/operator/query.ts +14 -18
- package/packages/core/src/operator/registry.ts +17 -6
- 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/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/workspace/build-execution.ts +3 -1
- package/packages/core/src/ports/workspace/phase-scratch.ts +4 -3
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +59 -39
- 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 +522 -98
- package/packages/core/src/processes/dispatcher.ts +186 -101
- package/packages/core/src/processes/execution-no-progress.ts +8 -1
- 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/{integration → scenarios}/harness.ts +330 -317
- 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 +113 -1
- 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 +5081 -4160
- package/packages/core/src/store/remote/client.ts +47 -1
- package/packages/core/src/store/remote/compatibility.ts +2 -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/index.ts +11 -1
- 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 +253 -118
- package/skills/guide/references/integration-tree.md +45 -38
- package/skills/guide/references/{landing-policy.md → merge-policy.md} +42 -24
- package/skills/guide/references/migration-1.0.md +17 -13
- package/skills/guide/references/operator-api.md +91 -15
- package/skills/guide/references/remote-store-protocol.md +76 -11
- package/skills/guide/references/remote-ticket-protocol.md +1 -1
- package/skills/guide/references/restacking.md +54 -15
- package/skills/guide/references/setup.md +41 -6
- package/skills/guide/references/spec-standard.md +6 -6
- package/skills/guide/references/ticket-dependencies.md +7 -7
- package/skills/implement/SKILL.md +43 -17
- package/skills/operate/SKILL.md +117 -116
- 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 +19 -19
- package/skills/tickets/SKILL.md +9 -7
- package/templates/autobuild.toml +1 -1
- package/templates/hosted-service/package.json +2 -2
- 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
|
@@ -10,7 +10,7 @@ order: 11
|
|
|
10
10
|
|
|
11
11
|
## Responsibility
|
|
12
12
|
|
|
13
|
-
The dispatcher claims eligible tickets, starts and observes build runners, settles publication and
|
|
13
|
+
The dispatcher claims eligible tickets, starts and observes build runners, settles publication and merge, and recovers durable work. Local and hosted arrangements run the same kernel. Your operator agent acts through the CLI or MCP; Autobuild never starts it.
|
|
14
14
|
|
|
15
15
|
## Shipped arrangements
|
|
16
16
|
|
|
@@ -38,7 +38,7 @@ The host needs:
|
|
|
38
38
|
- runtime authentication and forge credentials ([Forges](forges.md) covers precedence)
|
|
39
39
|
- credentials for a remote Store or workspace provisioning, if used
|
|
40
40
|
|
|
41
|
-
A service manager may own the process under an identity with the same configuration and credentials. To restart, stop gracefully and let drain and suspension finish; work resumes from durable state. A restart never answers escalations or grants
|
|
41
|
+
A service manager may own the process under an identity with the same configuration and credentials. To restart, stop gracefully and let drain and suspension finish; work resumes from durable state. A restart never answers escalations or grants merge consent. See [the dispatcher lifecycle](dispatcher.md).
|
|
42
42
|
|
|
43
43
|
### Hosted scheduled dispatcher
|
|
44
44
|
|
package/docs/dispatcher.md
CHANGED
|
@@ -54,6 +54,6 @@ A restart loses nothing. The dispatcher continues each build from its recorded p
|
|
|
54
54
|
|
|
55
55
|
## The operator agent stays outside
|
|
56
56
|
|
|
57
|
-
Your operator agent is an external coding agent you direct, like Claude Code or Codex. It files and grooms tickets with you,
|
|
57
|
+
Your operator agent is an external coding agent you direct, like Claude Code or Codex. It files and grooms tickets with you, operates the builds the repository's dispatcher dispatches, answers bounded escalations and manages merge consent, using the `ab` CLI locally or the same tools over MCP. You make the product calls. Autobuild never hosts or starts it, and its chat isn't part of the build's paper trail.
|
|
58
58
|
|
|
59
59
|
Next: [operator surfaces](operator-surfaces.md) for the controls, [one build end to end](builds.md) for the phases.
|
package/docs/forges.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Forges"
|
|
3
3
|
group: "reference"
|
|
4
|
-
description: "Choose GitHub or local git and implement safe code publication and
|
|
4
|
+
description: "Choose GitHub or local git and implement safe code publication and merge."
|
|
5
5
|
label: "Forges"
|
|
6
6
|
order: 9
|
|
7
7
|
---
|
|
@@ -12,7 +12,7 @@ order: 9
|
|
|
12
12
|
|
|
13
13
|
The forge publishes code and represents pull requests.
|
|
14
14
|
|
|
15
|
-
- **The kernel owns the forge.** Pushes, PRs, comments,
|
|
15
|
+
- **The kernel owns the forge.** Pushes, PRs, comments, merge and merge happen in deterministic code.
|
|
16
16
|
- **Agents only commit locally.** They never push or see forge credentials.
|
|
17
17
|
- **Publication is exact.** The branch head read back from the forge must equal the intended SHA.
|
|
18
18
|
|
|
@@ -53,7 +53,7 @@ Origin mode and Vercel Sandbox need an exported token. Never forward kernel cred
|
|
|
53
53
|
| Pull requests: write | opening and updating PRs |
|
|
54
54
|
| Metadata, Administration: read | readiness checks |
|
|
55
55
|
|
|
56
|
-
A classic token on a private repository needs the `repo` scope instead. Validation doesn't guarantee a merge: branch protection, required checks, merge settings and permissions can still defer
|
|
56
|
+
A classic token on a private repository needs the `repo` scope instead. Validation doesn't guarantee a merge: branch protection, required checks, merge settings and permissions can still defer merge.
|
|
57
57
|
|
|
58
58
|
### Local git
|
|
59
59
|
|
|
@@ -71,7 +71,7 @@ Needs only Git and a writable repository.
|
|
|
71
71
|
|
|
72
72
|
- **Pull requests** are JSON records under private `refs/autobuild/` refs, linking to local branch refs.
|
|
73
73
|
- **Publication** confirms the local branch; nothing is uploaded.
|
|
74
|
-
- **
|
|
74
|
+
- **Merge** makes a head-guarded squash commit with compare-and-swap ref updates, waiting while the checked-out destination has unsafe local changes.
|
|
75
75
|
|
|
76
76
|
It can't serve remote sandboxes; use GitHub there.
|
|
77
77
|
|
|
@@ -104,7 +104,7 @@ An adapter must provide:
|
|
|
104
104
|
|
|
105
105
|
- idempotent PR creation
|
|
106
106
|
- exact-SHA publication confirmation, never inferred from ancestry or a push response
|
|
107
|
-
- guarded
|
|
107
|
+
- guarded merge and comments
|
|
108
108
|
- every capability it advertises
|
|
109
109
|
|
|
110
110
|
Reconciliation needs the optional `Forge.rewrite` group: immutable exact-SHA archives, branch snapshots and head-guarded replacement. Report lease mismatches separately and preserve unknown work. Without it, reconciliation fails with an actionable refusal, never an ordinary push.
|
package/docs/getting-started.md
CHANGED
|
@@ -48,13 +48,13 @@ Run this yourself and leave it running. The dispatcher shows a live dashboard an
|
|
|
48
48
|
|
|
49
49
|
Open your coding agent at the repository root, then ask in plain language:
|
|
50
50
|
|
|
51
|
-
> Help me specify a small retry-budget change. Ask me about the behavior and limits, file and groom the ticket when we agree, and watch it through
|
|
51
|
+
> Help me specify a small retry-budget change. Ask me about the behavior and limits, file and groom the ticket when we agree, and watch it through merge. Ask me before granting merge consent.
|
|
52
52
|
|
|
53
53
|
The agent works out acceptance criteria, scope, and evidence with you.
|
|
54
54
|
|
|
55
55
|
- Keep the first change small, with checks that demonstrate success. The [spec standard](tickets.md#groom-a-buildable-spec) defines a buildable ticket.
|
|
56
56
|
- With dispatch running, a ticket moved to ready is eligible for claim immediately.
|
|
57
57
|
- Your agent watches progress and answers build questions within your instructions, bringing unresolved decisions back to you.
|
|
58
|
-
-
|
|
58
|
+
- Merge follows the configured policy and gates; a green build doesn't guarantee immediate merge.
|
|
59
59
|
|
|
60
60
|
Continue with [Working with your operator agent](operating.md) and the [configuration reference](configuration-overview.md).
|
package/docs/glossary.md
CHANGED
|
@@ -9,7 +9,7 @@ description: "Definitions for tickets, integration, execution boundaries, and ag
|
|
|
9
9
|
|
|
10
10
|
## Build
|
|
11
11
|
|
|
12
|
-
One execution of a claimed ticket: an immutable slug and a durable event stream. Work builds run the [fixed pipeline](builds.md); node builds collect, verify and
|
|
12
|
+
One execution of a claimed ticket: an immutable slug and a durable event stream. Work builds run the [fixed pipeline](builds.md); node builds collect, verify and merge contributions.
|
|
13
13
|
|
|
14
14
|
## Ticket
|
|
15
15
|
|
|
@@ -21,11 +21,11 @@ The build's contract: intent, rationale, acceptance criteria, scope limits and e
|
|
|
21
21
|
|
|
22
22
|
## Node
|
|
23
23
|
|
|
24
|
-
A finite integration build that collects child contributions, verifies its exact head against its parent and
|
|
24
|
+
A finite integration build that collects child contributions, verifies its exact head against its parent and merges into it. Nodes nest and close when complete. See [integration trees](integration-overview.md).
|
|
25
25
|
|
|
26
26
|
## Target
|
|
27
27
|
|
|
28
|
-
Where a ticket's work
|
|
28
|
+
Where a ticket's work merges: a node ticket, or the configured root when omitted. Blockers, not targets, decide when work starts.
|
|
29
29
|
|
|
30
30
|
## Seam
|
|
31
31
|
|
|
@@ -43,9 +43,9 @@ A deterministic check or evidence-judging agent that tests a build against its c
|
|
|
43
43
|
|
|
44
44
|
A durable question or failure that parks work until answered with guidance or a retry through the [answer interface](operating.md#answer-and-pause).
|
|
45
45
|
|
|
46
|
-
##
|
|
46
|
+
## Merge
|
|
47
47
|
|
|
48
|
-
Guarded integration of a ready contribution into its destination, authorized by [
|
|
48
|
+
Guarded integration of a ready contribution into its destination, authorized by [merge policy](integration-overview.md#policy-authorizes-merge) and still subject to verification and forge gates.
|
|
49
49
|
|
|
50
50
|
## Restack
|
|
51
51
|
|
|
@@ -57,4 +57,4 @@ The agent phase that resolves conflicts in a kernel-prepared replay against a fr
|
|
|
57
57
|
|
|
58
58
|
## Operator agent
|
|
59
59
|
|
|
60
|
-
Your external agent, working outside the pipeline through the CLI or connected tools. It writes specs, files and grooms tickets,
|
|
60
|
+
Your external agent, working outside the pipeline through the CLI or connected tools. It writes specs, files and grooms tickets, operates the builds the repository's dispatcher dispatches, answers escalations and manages authorized merge; you supply intent and authority.
|
|
@@ -74,7 +74,7 @@ distribution root (`--root DIR` overrides) — this deployment passes
|
|
|
74
74
|
root while the trace step below and the Next config's
|
|
75
75
|
`outputFileTracingIncludes: { '/api/dispatch': ['./.autobuild-dist/**'] }`
|
|
76
76
|
resolve against the deployment build's working directory, where the archive
|
|
77
|
-
must
|
|
77
|
+
must merge beside the built output. The Next.js config's
|
|
78
78
|
`outputFileTracingIncludes` records the intent to include that directory in the cron route's bundle, but
|
|
79
79
|
Next 16's default Turbopack builds never apply `outputFileTracingIncludes`
|
|
80
80
|
(only webpack builds do), so a deployment cannot rely on the config alone. The
|
|
@@ -169,8 +169,11 @@ lookup reports no exit code for a command that finished while no client was
|
|
|
169
169
|
waiting on it, and keeps reporting none until some client issues a wait on the
|
|
170
170
|
command. The dispatcher's execution observation therefore issues one bounded
|
|
171
171
|
(~5 s) wait on the recorded command whenever the lookup shows no exit: a wait
|
|
172
|
-
that resolves proves the guest's end (with its exit code)
|
|
173
|
-
|
|
172
|
+
that resolves proves the guest command's end (with its exit code). Before
|
|
173
|
+
settlement the provider must also confirm that the whole sandbox has stopped,
|
|
174
|
+
including descendants. A failed or ambiguous stop leaves the execution and lease
|
|
175
|
+
open, with publication and relaunch deferred until a later tick confirms teardown.
|
|
176
|
+
A timed-out command wait leaves the guest running — one
|
|
174
177
|
observation never approaches the tick's operation timeout, and the next tick
|
|
175
178
|
retries. Settlement of a guest that exited after the launching invocation
|
|
176
179
|
detached is expected within one tick of its exit.
|
package/docs/hosted-service.md
CHANGED
|
@@ -17,8 +17,8 @@ package's `deployment/` directory and in `templates/hosted-service/`).
|
|
|
17
17
|
"build": "ab-hosted-service-build"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@defrex/autobuild-hosted-store-service": "1.0
|
|
21
|
-
"@defrex/autobuild": "1.0
|
|
20
|
+
"@defrex/autobuild-hosted-store-service": "1.1.0",
|
|
21
|
+
"@defrex/autobuild": "1.1.0",
|
|
22
22
|
"next": "16.1.6",
|
|
23
23
|
"react": "19.2.4",
|
|
24
24
|
"react-dom": "19.2.4"
|
|
@@ -107,7 +107,7 @@ Set these server-side variables in every Vercel environment you deploy:
|
|
|
107
107
|
- `BETTER_AUTH_URL`: the exact production HTTPS origin, with no path.
|
|
108
108
|
- `GITHUB_CLIENT_ID`, `GITHUB_CLIENT_SECRET`: GitHub OAuth application credentials.
|
|
109
109
|
- `AB_WEB_AUTH_PROVIDERS=github`.
|
|
110
|
-
- `
|
|
110
|
+
- `AB_WEB_SUPER_USER_EMAILS`: comma-separated super-user emails. Other operators require organization membership.
|
|
111
111
|
- `AB_WEB_REPOSITORIES`: comma-separated repository origins visible to operators.
|
|
112
112
|
|
|
113
113
|
Register `https://YOUR_ORIGIN/api/auth/callback/github` as the GitHub callback
|
|
@@ -255,7 +255,7 @@ This capability is independent of revision and comment capabilities and of the
|
|
|
255
255
|
client version. Without it, both fields are projected away, preserving historical
|
|
256
256
|
strict decoders. Current hosted clients send all three capability headers and
|
|
257
257
|
default absent kind to `work`. Unfiltered listing includes all ticket states and
|
|
258
|
-
empty nodes for `ab ticket tree`; dispatch and
|
|
258
|
+
empty nodes for `ab ticket tree`; dispatch and merge behavior are unchanged.
|
|
259
259
|
|
|
260
260
|
## Reading across upgrades
|
|
261
261
|
|
|
@@ -276,7 +276,7 @@ service never invents an identity for a backend that supplies none. This keeps
|
|
|
276
276
|
released strict JSON decoders working without a new request capability.
|
|
277
277
|
|
|
278
278
|
Unknown advisory facts are counted and skipped. Unknown decisive facts defer
|
|
279
|
-
claiming, routing,
|
|
279
|
+
claiming, routing, merge and publication only for their build; status,
|
|
280
280
|
context and dashboards remain readable. One `build.compatibility-deferred`
|
|
281
281
|
attention fact per decisive boundary appears in the default `ab watch` stream.
|
|
282
282
|
Its diagnostic names unsupported types and producer releases: restart with a
|
|
@@ -291,3 +291,14 @@ unrecognized reducer version never overwrites its bytes; lower-version snapshot
|
|
|
291
291
|
writes cannot replace higher-version rows even at a later cursor. This
|
|
292
292
|
protects both upgrade directions. Readers predating this support still fail
|
|
293
293
|
closed; this guarantee does not widen the advertised client window.
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
The retired `AB_WEB_ALLOWED_EMAILS` variable is refused at startup, even if empty.
|
|
297
|
+
Replace it with `AB_WEB_SUPER_USER_EMAILS`; review the list because these identities
|
|
298
|
+
are deployment maintainers. Bootstrap the first organization through the
|
|
299
|
+
[browser management contract](operator-api.md#organization-management-browser),
|
|
300
|
+
then add members by email and assign legacy unassigned projects. Super users alone
|
|
301
|
+
create orgs, set or clear the single owner, and assign or move projects. Owners
|
|
302
|
+
manage their org's members. Removing the last membership or super-user designation
|
|
303
|
+
revokes human access on the next request without re-login; existing project
|
|
304
|
+
credentials remain valid until revoked.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Integrating related work"
|
|
3
3
|
group: "concepts"
|
|
4
|
-
description: "Collect work in an integration tree, preserve change identity through restacks, and
|
|
4
|
+
description: "Collect work in an integration tree, preserve change identity through restacks, and merge under explicit policy."
|
|
5
5
|
slug: "integration"
|
|
6
6
|
label: "Integration"
|
|
7
7
|
order: 4
|
|
@@ -9,10 +9,10 @@ order: 4
|
|
|
9
9
|
|
|
10
10
|
# Integrating related work
|
|
11
11
|
|
|
12
|
-
Break a big feature into tickets, collect their changes on one branch, and
|
|
12
|
+
Break a big feature into tickets, collect their changes on one branch, and merge the verified feature on main once. Work forms a tree rooted at `baseBranch`:
|
|
13
13
|
|
|
14
14
|
- **Work tickets** are leaves.
|
|
15
|
-
- **Node tickets** are finite integration points that collect children, then
|
|
15
|
+
- **Node tickets** are finite integration points that collect children, then merge into their parent.
|
|
16
16
|
- Repositories without nodes send every work ticket to the root.
|
|
17
17
|
|
|
18
18
|
|
|
@@ -27,20 +27,20 @@ bun ab ticket create "Cart summary" --body cart.md --target <node-id>
|
|
|
27
27
|
|
|
28
28
|
Claim freezes the destination build generation and branch; editing a claimed ticket can't redirect its change.
|
|
29
29
|
|
|
30
|
-
Leaves run the [normal build pipeline](builds.md). A node collects, verifies,
|
|
30
|
+
Leaves run the [normal build pipeline](builds.md). A node collects, verifies, merges, and closes. It finishes collecting when its targeting tickets are done or cancelled, frozen child claims have settled, and at least one contribution has merged.
|
|
31
31
|
|
|
32
32
|
- **Idle** nodes need no runner; empty nodes have no PR.
|
|
33
33
|
- **Repair** a failed node check with a child ticket targeting the node.
|
|
34
|
-
- **
|
|
34
|
+
- **Merge** closes admission; a node isn't a perpetual staging branch.
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
## One identity per leaf change
|
|
38
38
|
|
|
39
39
|
A leaf contributes one canonical net change, however many commits it took.
|
|
40
40
|
|
|
41
|
-
- **Identity.** The `Autobuild-Build: <slug>` trailer carries it across SHA rewrites. Root squash
|
|
41
|
+
- **Identity.** The `Autobuild-Build: <slug>` trailer carries it across SHA rewrites. Root squash merges keep it; node integration keeps each contributing identity, in order, rather than one node commit.
|
|
42
42
|
- **Restacks.** When a destination moves, Autobuild restacks onto it and cascades through descendants. Clean replay is automatic; a conflict attaches a reconcile runner with the source change's context, then verification as required.
|
|
43
|
-
- **Reverification.** Node verification covers the exact node head and parent; a change to either voids
|
|
43
|
+
- **Reverification.** Node verification covers the exact node head and parent; a change to either voids merge eligibility until reverified, even after a clean restack. A cleanly restacked waiting leaf can keep its prior verification; reports cite their actual head and base.
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
## Blockers are a separate graph
|
|
@@ -51,30 +51,30 @@ A target says where work integrates; a blocker says what must be available befor
|
|
|
51
51
|
bun ab ticket block <id> <blocker-id>
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
- **With nodes**, a blocker that has a build resolves when its change is present in the dependent's sampled destination. Sibling work may need to
|
|
54
|
+
- **With nodes**, a blocker that has a build resolves when its change is present in the dependent's sampled destination. Sibling work may need to merge into a common ancestor and cascade first.
|
|
55
55
|
- **Presence** is checked at claim, without interrupting existing builds; missing or ambiguous evidence keeps the dependent queued.
|
|
56
56
|
- **Without nodes**, and for blockers without builds, the source ticket's done state resolves it.
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
## Policy authorizes
|
|
59
|
+
## Policy authorizes merge
|
|
60
60
|
|
|
61
|
-
Ordered `[[
|
|
61
|
+
Ordered `[[merge]]` rules in `autobuild.toml` select `auto` or `consent`; the first match wins. Rules match source kind (`from`), destination (`into`), and ticket `label`. Without a match, leaves default to `auto` and nodes to `consent`.
|
|
62
62
|
|
|
63
63
|
```toml
|
|
64
|
-
# Leaves
|
|
65
|
-
[[
|
|
64
|
+
# Leaves merge on the root automatically; everything else needs consent.
|
|
65
|
+
[[merge]]
|
|
66
66
|
from = "leaf"
|
|
67
67
|
into = "root"
|
|
68
68
|
mode = "auto"
|
|
69
69
|
|
|
70
|
-
[[
|
|
70
|
+
[[merge]]
|
|
71
71
|
mode = "consent"
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
Your operator agent manages consent:
|
|
75
75
|
|
|
76
|
-
- `ab
|
|
77
|
-
- `ab hold <slug>` suppresses
|
|
76
|
+
- `ab merge <slug>` records consent to a ready merge and clears a hold.
|
|
77
|
+
- `ab hold <slug>` suppresses merge, even before readiness, and withdraws consent.
|
|
78
78
|
|
|
79
79
|
Neither control, nor automatic authorization, bypasses readiness, verification, forge checks, protection, or merge gates.
|
|
80
80
|
|
package/docs/integration-tree.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Autobuild organizes work as a tree rooted at the configured `baseBranch`.
|
|
4
4
|
Work tickets are leaves; node tickets are finite integration points that collect
|
|
5
|
-
children before
|
|
5
|
+
children before merge into their parent. Nodes can nest. An omitted target
|
|
6
6
|
means the root, so repositories can continue sending every leaf directly there.
|
|
7
7
|
Blockers form a separate graph. In repositories with nodes, a blocker with a
|
|
8
8
|
build resolves only when its change identity is present in the dependent's
|
|
@@ -12,10 +12,10 @@ See [restacking](restacking.md) for change identity and replay.
|
|
|
12
12
|
|
|
13
13
|
Presence is checked only at claim, never to interrupt existing work. The newest
|
|
14
14
|
build generation supplies evidence; ambiguous or unavailable evidence leaves the
|
|
15
|
-
dependent queued. Confirmed
|
|
16
|
-
a trailer, and a
|
|
17
|
-
completed nodes contribute nothing. Sibling work waits for
|
|
18
|
-
ancestor and demand the minimal restack path; same-node
|
|
15
|
+
dependent queued. Confirmed merge SHA reachability can prove presence without
|
|
16
|
+
a trailer, and a merged node transports its whole owned contribution. Empty
|
|
17
|
+
completed nodes contribute nothing. Sibling work waits for merge into the common
|
|
18
|
+
ancestor and demand the minimal restack path; same-node merges satisfy presence directly.
|
|
19
19
|
|
|
20
20
|
## Choosing a destination
|
|
21
21
|
|
|
@@ -24,29 +24,29 @@ First decide whether the feature should be more than one ticket at all; the
|
|
|
24
24
|
tickets cut at seams. Whenever grooming produces more than one ticket for a
|
|
25
25
|
feature, explicitly choose root or a node before filing. Use a node when the set should reach the base branch
|
|
26
26
|
as one integrated change, or intermediate states should not ship independently.
|
|
27
|
-
Use root when every ticket is independently valuable and safe to
|
|
27
|
+
Use root when every ticket is independently valuable and safe to merge alone.
|
|
28
28
|
Nested nodes can collect a subfeature before contributing it to a larger feature.
|
|
29
29
|
A node provides one integrated delivery to its parent under the configured forge
|
|
30
30
|
method; it does not promise one physical Git commit.
|
|
31
31
|
|
|
32
32
|
Blockers and targets are independent: blockers order work; targets decide where
|
|
33
|
-
it
|
|
33
|
+
it merges. A blocker inside the same node resolves when its change merges into that
|
|
34
34
|
node, so a dependency chain can advance without waiting for root consent, subject
|
|
35
35
|
to the normal claim gates and presence rules. Dependencies across destinations
|
|
36
36
|
still need the presence evidence described above and in
|
|
37
37
|
[blocker resolution](ticket-dependencies.md#when-a-blocker-resolves).
|
|
38
38
|
|
|
39
39
|
Read the consuming repository's `autobuild.toml` and evaluate its effective
|
|
40
|
-
[
|
|
41
|
-
labels. Ordered `[[
|
|
40
|
+
[merge policy](merge-policy.md) for the actual ticket kinds, destinations and
|
|
41
|
+
labels. Ordered `[[merge]]` rules use the first match; `from`, `into` and `label`
|
|
42
42
|
predicates are ANDed, with omitted predicates acting as wildcards. Without a
|
|
43
|
-
match, leaves default to auto and nodes to consent. Explain the resulting
|
|
43
|
+
match, leaves default to auto and nodes to consent. Explain the resulting merge
|
|
44
44
|
and consent flow to the human in plain terms. Ask when grooming does not make the
|
|
45
45
|
destination choice clear. This decision is separate from workflow-state placement
|
|
46
46
|
and never authorizes promoting tickets to ready.
|
|
47
47
|
|
|
48
48
|
For example, **if** the matched rules require consent into root and allow automatic
|
|
49
|
-
|
|
49
|
+
merge into nodes (the staged-release example in the policy reference), a
|
|
50
50
|
root-targeted chain waits for consent separately for each ticket and ships each
|
|
51
51
|
intermediate change to the base branch. Under those same rules, children collect
|
|
52
52
|
automatically in a node and the verified, complete node waits for consent once
|
|
@@ -96,15 +96,15 @@ capacity, effective display capacity and the nodes using descendant-held slots.
|
|
|
96
96
|
Idle collecting nodes remain free.
|
|
97
97
|
|
|
98
98
|
Claims freeze the destination build generation and branch. Missing, unopened,
|
|
99
|
-
|
|
99
|
+
merged, closed or aborted targets leave work queued with diagnostics. The newest
|
|
100
100
|
generation wins; a closed generation never falls back to an older open one.
|
|
101
101
|
Source metadata and effective ancestry are different: `ab ticket tree` shows
|
|
102
102
|
source targets, while build status shows the effective destination.
|
|
103
103
|
|
|
104
|
-
## Collect, verify and
|
|
104
|
+
## Collect, verify and merge
|
|
105
105
|
|
|
106
106
|
Node `verify:*` context additionally exposes `nodeVerification`: the frozen
|
|
107
|
-
range, a JSON index path, contribution build slugs,
|
|
107
|
+
range, a JSON index path, contribution build slugs, preparation-time stored ticket
|
|
108
108
|
identities, event-authorized spec revisions and spec paths, and their commits.
|
|
109
109
|
The index maps every commit in the range using build identity trailers,
|
|
110
110
|
including earlier-cycle contributions and merge side history. Commits without
|
|
@@ -115,7 +115,14 @@ Their full messages express maintainer-authorized intent: judge quality and
|
|
|
115
115
|
consistency, and never fail them solely for lacking a covering spec. Other node
|
|
116
116
|
changes are authorized when covered by the current event-authorized node spec or the spec
|
|
117
117
|
of the contribution introducing it; use the commit mapping to find that spec.
|
|
118
|
-
|
|
118
|
+
The dispatcher collects these inputs with repository authority before launching
|
|
119
|
+
verification and atomically deposits a node-owned `node-verification-context`
|
|
120
|
+
artifact cited by exact revision in `integration.prepared`. Contributor specs
|
|
121
|
+
freeze at preparation; resumed and concurrent verifiers read the same cycle input.
|
|
122
|
+
Hydration reads only that node-owned artifact and grants no general contributor
|
|
123
|
+
read authority. Missing or ambiguous provenance prevents preparation; missing,
|
|
124
|
+
corrupt or mismatched prepared inputs fail hydration. Historical agent cycles
|
|
125
|
+
without a citation require a new integration cycle. Leaf context is unchanged.
|
|
119
126
|
See [iterating inside a node](#iterating-inside-a-node) for authoring and evolving
|
|
120
127
|
these sources of intent.
|
|
121
128
|
|
|
@@ -136,25 +143,25 @@ Each leaf runs the normal spec, plan/review, implement/review, verify and finali
|
|
|
136
143
|
pipeline against its frozen destination.
|
|
137
144
|
|
|
138
145
|
A node collects until every ticket targeting it is natively done or cancelled,
|
|
139
|
-
all frozen child claims have settled, and at least one contribution has
|
|
146
|
+
all frozen child claims have settled, and at least one contribution has merged.
|
|
140
147
|
Triage, backlog and ready children keep it incomplete. Exhaustive enumeration
|
|
141
148
|
failures fail closed. Completeness is sampled again before verification and
|
|
142
149
|
publication; tracker edits cannot be transactional with a forge write.
|
|
143
150
|
|
|
144
151
|
The kernel runs all configured verify steps with normal path applicability on
|
|
145
152
|
the exact node head and parent. Either moving invalidates eligibility, even a
|
|
146
|
-
clean restack. Failed verification blocks the node and emits `integration.verification-failed` once per prepared cycle. Default watch
|
|
147
|
-
it; the repaired
|
|
153
|
+
clean restack. Failed verification blocks the node and emits `integration.verification-failed` once per prepared cycle. Default `ab watch` includes it; `ab wait --for attention` also detects the current failure before notification. The fact names failed steps, head, parent and repair guidance. Watch baselines prior failures; reconcile status after arming. A new cycle can notify again, while historical facts do not keep a repaired node blocked. Recovery reports only the latest prepared cycle while its head and parent remain current; superseded failures are not backfilled. Recheck current status before filing a repair, since the node may have advanced after notification. To recover, file a repair child targeting
|
|
154
|
+
it; the repaired merged head permits a new cycle. If the contract changed, an
|
|
148
155
|
operator can explicitly revise the spec instead and verify again on the same head
|
|
149
156
|
(see operator node spec revisions below). Historical reports keep their
|
|
150
|
-
actual head/base citations. Integration grammar is collect → verify →
|
|
157
|
+
actual head/base citations. Integration grammar is collect → verify → merge →
|
|
151
158
|
close, with restacking and repair cycles along the way.
|
|
152
159
|
|
|
153
|
-
[
|
|
154
|
-
verified, `ab
|
|
160
|
+
[Merge policy](merge-policy.md) defaults nodes to consent. Once complete and
|
|
161
|
+
verified, `ab merge <slug>` authorizes merge; it refuses incomplete nodes and
|
|
155
162
|
names open children. `ab hold <slug>` works before readiness and withdraws
|
|
156
163
|
consent. Automatic authorization still requires every readiness and merge gate.
|
|
157
|
-
A
|
|
164
|
+
A merged node completes its ticket and closes admission; it is not a perpetual
|
|
158
165
|
staging branch. Releases remain separate maintainer operations.
|
|
159
166
|
|
|
160
167
|
Human forge merges are an explicit escape hatch, including while incomplete,
|
|
@@ -166,7 +173,7 @@ children retain their frozen destination.
|
|
|
166
173
|
## Iterating inside a node
|
|
167
174
|
|
|
168
175
|
Write the node spec as a finite integration charter: its goal, observable
|
|
169
|
-
completion conditions for the whole, and destination and
|
|
176
|
+
completion conditions for the whole, and destination and merge expectations
|
|
170
177
|
under the effective policy. Put feature specifics in spec-standard children.
|
|
171
178
|
An open node supports three ways to iterate:
|
|
172
179
|
|
|
@@ -191,9 +198,9 @@ An open node supports three ways to iterate:
|
|
|
191
198
|
restrictions.
|
|
192
199
|
|
|
193
200
|
Open children keep the node incomplete, including triage, backlog and ready
|
|
194
|
-
children. Completion remains finite:
|
|
201
|
+
children. Completion remains finite: merged or otherwise ended nodes close
|
|
195
202
|
admission. Iteration does not relax verification of the exact head and parent,
|
|
196
|
-
or the configured readiness, consent and
|
|
203
|
+
or the configured readiness, consent and merge gates described above.
|
|
197
204
|
|
|
198
205
|
## Changing a parent
|
|
199
206
|
|
|
@@ -205,11 +212,11 @@ new commit or PR. Descendants restack only on their own demand.
|
|
|
205
212
|
|
|
206
213
|
The request is durable before the provider write. Source readback accepts the
|
|
207
214
|
new effective ancestry; branch publication, PR retargeting and completion have
|
|
208
|
-
separate receipts. Pending moves fence verification and
|
|
209
|
-
parents incomplete. Reparenting revokes
|
|
215
|
+
separate receipts. Pending moves fence verification and merge and keep both
|
|
216
|
+
parents incomplete. Reparenting revokes merge consent; holds survive. Policy is
|
|
210
217
|
sampled again for the new parent, including when both parents have the same SHA.
|
|
211
218
|
|
|
212
|
-
Cycles, unopened/terminal parents,
|
|
219
|
+
Cycles, unopened/terminal parents, merge or closing nodes, unsupported PR
|
|
213
220
|
retargeting and busy writer operations refuse or defer the move with a reason.
|
|
214
221
|
Invalid direct provider edits leave effective ancestry unchanged and produce
|
|
215
222
|
durable diagnostics; restoring it clears the current refusal. Missing source
|
|
@@ -218,29 +225,29 @@ Git/PR effects without the tracker. Ambiguous writes are reread on recovery.
|
|
|
218
225
|
Changing a claimed work ticket's target is refused before any combined patch is
|
|
219
226
|
written: abort and re-dispatch instead.
|
|
220
227
|
|
|
221
|
-
See [forge requirements](
|
|
228
|
+
See [forge requirements](merge-policy.md#forge-requirements),
|
|
222
229
|
[restacking](restacking.md), and [migration from 0.x](migration-1.0.md).
|
|
223
230
|
|
|
224
231
|
## Integration detail
|
|
225
232
|
|
|
226
233
|
Both dashboards show destination (with the configured-base annotation for root
|
|
227
|
-
targets), row progress and steps, branch/restack state, and all open and
|
|
234
|
+
targets), row progress and steps, branch/restack state, and all open and merged
|
|
228
235
|
children with titles and states. Open children come first; live children show
|
|
229
|
-
their current phase, unbuilt children read `queued`, contributions read `
|
|
236
|
+
their current phase, unbuilt children read `queued`, contributions read `merged`.
|
|
230
237
|
Cancelled tickets without contributions are excluded. Verification names the
|
|
231
238
|
expected steps and only outcomes bound to the current node head and destination;
|
|
232
|
-
failures name the repair-child instruction.
|
|
233
|
-
ready consent names `l` and `ab
|
|
239
|
+
failures name the repair-child instruction. Merge explains the rule and mode;
|
|
240
|
+
ready consent names `l` and `ab merge <slug>`. Conflicts name recorded files.
|
|
234
241
|
These are Store-only projections: additive `integration.observed.children`
|
|
235
242
|
metadata carries source/id, optional title and contribution build identity;
|
|
236
243
|
`node.item-conflicted.files` and conflicted `restack.replayed.files` retain paths.
|
|
237
244
|
Older events remain readable, with explicit unavailable titles/files. Display
|
|
238
|
-
metadata never changes completeness or
|
|
245
|
+
metadata never changes completeness or merge eligibility.
|
|
239
246
|
|
|
240
247
|
## Demand-driven parent freshness
|
|
241
248
|
|
|
242
249
|
Collecting nodes may intentionally trail their parent. They refresh before
|
|
243
|
-
verification and
|
|
250
|
+
verification and merge, for queued dependency presence, on operator request,
|
|
244
251
|
and after accepted re-parenting. Descendants need independent demand; presence
|
|
245
252
|
requests follow only the minimal proven ancestor path. See
|
|
246
253
|
[restacking](restacking.md#timing-and-evidence) for timing, requests and distance.
|
|
@@ -250,7 +257,7 @@ requests follow only the minimal proven ancestor path. See
|
|
|
250
257
|
Opened integration nodes poll every tick until their durable activity has been
|
|
251
258
|
quiet for `policy.nodeIdleAfterSeconds` (default 600 seconds), then poll every
|
|
252
259
|
`policy.nodeIdlePollSeconds` (default 120 seconds). Holds and waiting for consent
|
|
253
|
-
qualify normally. Child claims, PR and
|
|
260
|
+
qualify normally. Child claims, PR and merge activity, operator commands
|
|
254
261
|
(including repeated holds), restack requests and answers wake the next tick.
|
|
255
262
|
GitHub-only changes are discovered on the next due check, within the idle
|
|
256
263
|
interval plus normal tick scheduling while the dispatcher is running; failure,
|
|
@@ -272,10 +279,10 @@ Each kernel `spec.revised` records the exact artifact and operator identity
|
|
|
272
279
|
Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
|
|
273
280
|
The node recollects and verifies the new revision, including on the same head
|
|
274
281
|
and parent after a failed cycle. Earlier cycles remain historical evidence
|
|
275
|
-
and cannot block or authorize
|
|
282
|
+
and cannot block or authorize merge under the replacement. Children keep
|
|
276
283
|
their specs, claims and targets; contributions are not restarted.
|
|
277
284
|
Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
278
|
-
pending controls,
|
|
285
|
+
pending controls, merge intent and ended PRs refuse the no-escalation path.
|
|
279
286
|
A concurrent state change refuses publication with a retry explanation;
|
|
280
287
|
uncited artifacts are inert. Leaves still require an open escalation and
|
|
281
288
|
restart from `plan`.
|
package/docs/integration.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A node collects related work into one finite delivery to its parent. Write its
|
|
4
4
|
ticket as a charter: why the integration matters, what observable conditions
|
|
5
|
-
make the whole done, and where and how it
|
|
6
|
-
|
|
5
|
+
make the whole done, and where and how it merges under the repository's effective
|
|
6
|
+
merge policy. Keep the usual spec sections: what and why, checkable acceptance
|
|
7
7
|
criteria, out of scope, and evidence. Put evolving feature specifics in children.
|
|
8
8
|
|
|
9
9
|
For example, a charter can aim for a coherent account-management flow, complete
|
|
@@ -44,11 +44,11 @@ failed cycle. Children retain their specs, claims and targets.
|
|
|
44
44
|
|
|
45
45
|
Open children, including triage, backlog and ready tickets, keep the node
|
|
46
46
|
incomplete. Once complete, the node must pass verification on its exact head and
|
|
47
|
-
parent and satisfy its configured
|
|
47
|
+
parent and satisfy its configured merge gates. Merge completes the node and
|
|
48
48
|
closes admission; use a new node for a later delivery. Consent requirements depend
|
|
49
49
|
on the effective policy.
|
|
50
50
|
|
|
51
|
-
See [integration trees](integration-tree.md#collect-verify-and-
|
|
51
|
+
See [integration trees](integration-tree.md#collect-verify-and-merge) for provenance
|
|
52
52
|
and completion details, [revision restrictions](integration-tree.md#operator-node-spec-revisions)
|
|
53
|
-
for when a replacement is accepted, and [
|
|
54
|
-
|
|
53
|
+
for when a replacement is accepted, and [merge policy](merge-policy.md) for
|
|
54
|
+
merge and consent rules.
|
package/docs/mcp.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The hosted service exposes the agent tool registry over [Streamable HTTP](https://modelcontextprotocol.io) at
|
|
4
4
|
`/mcp`, on the same origin as the operator dashboard. External agents — Claude
|
|
5
5
|
web, Claude Desktop, Claude Code, Codex, or any harness with an MCP client —
|
|
6
|
-
get the same operator surface
|
|
6
|
+
get the same operator surface across supported external bindings, at parity by
|
|
7
7
|
construction: tool names, descriptions, JSON schemas, and annotations are read
|
|
8
8
|
from the registry's closed table, and every execution goes through the
|
|
9
9
|
operator API's token-verified protocol.
|
|
@@ -37,10 +37,10 @@ Auth instance is the **authorization server**. An unauthenticated request to
|
|
|
37
37
|
registered `client_name` becomes the `via` marker recorded on writes.
|
|
38
38
|
4. Runs the authorization-code flow with PKCE through `GET /api/auth/mcp/authorize`.
|
|
39
39
|
A signed-out person is redirected to the deployment's sign-in page (the
|
|
40
|
-
existing GitHub sign-in and
|
|
41
|
-
sign-in.
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
existing GitHub sign-in and organization membership policy); the flow resumes after
|
|
41
|
+
sign-in. Only super users and organization members are admitted. The resource
|
|
42
|
+
rechecks admission and project access on every tool callback, so removed
|
|
43
|
+
members lose authority with existing tokens (`403`).
|
|
44
44
|
5. Exchanges the code at `/api/auth/mcp/token`; access tokens are short-lived
|
|
45
45
|
and refresh tokens rotate. Consent renders only when the client sends
|
|
46
46
|
`prompt=consent` (the plugin's designed behavior); clients that omit it
|
|
@@ -108,13 +108,14 @@ the standard surface the endpoint serves.
|
|
|
108
108
|
function. Must be an absolute http(s) URL (https in production).
|
|
109
109
|
- `BETTER_AUTH_URL`: the public origin — the authorization-server issuer and
|
|
110
110
|
the default MCP resource's base.
|
|
111
|
-
- `
|
|
112
|
-
|
|
111
|
+
- `AB_WEB_SUPER_USER_EMAILS`: the super-user email list. Other operators need organization membership;
|
|
112
|
+
admission and repository access are rechecked on every tool callback.
|
|
113
113
|
- `AB_WEB_REPOSITORIES` (deprecated): optional once-per-database registry
|
|
114
114
|
bootstrap, never an ongoing allowlist. `repositories.list` queries current
|
|
115
115
|
active registrations on every call, and every tool checks current membership.
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
Super users see every registered project; other users see only active projects
|
|
118
|
+
assigned to their organizations. Database-authorized
|
|
118
119
|
owners use the [project commands](setup.md#connected-projects) to add or remove
|
|
119
120
|
projects without redeploying. Removal hides retained data until re-registration;
|
|
120
121
|
registry failures never authorize a call.
|
|
@@ -126,24 +127,24 @@ designed behavior).
|
|
|
126
127
|
|
|
127
128
|
### Tree and consent reads
|
|
128
129
|
|
|
129
|
-
`
|
|
130
|
-
|
|
130
|
+
`merges.list` takes `{repo}` and returns slug-sorted ready consent or held
|
|
131
|
+
merges, with effective target, source branch, candidate, verification receipts
|
|
131
132
|
and node completeness/children. It reads reduced durable state; `builds.control`
|
|
132
|
-
with `
|
|
133
|
+
with `merge` rechecks readiness and live completeness. `hold` remains available
|
|
133
134
|
before readiness. `tickets.tree` takes `{repo}` and returns `{root, children,
|
|
134
135
|
diagnostics}` from exhaustive configured-source enumeration. Source ancestry is
|
|
135
136
|
separate from frozen build ancestry. Both tools are read-only and repository scoped.
|
|
136
137
|
|
|
137
|
-
The CLI equivalents are `ab
|
|
138
|
-
`ab ticket tree [--json]`. Default `ab watch` attention includes node
|
|
138
|
+
The CLI equivalents are `ab merges [--json] [--store <ref>]` and
|
|
139
|
+
`ab ticket tree [--json]`. Default `ab watch` attention includes node merges,
|
|
139
140
|
restack conflicts and derived `build.consent-ready` observations with durable
|
|
140
|
-
cursor positions. `ab wait` supports `consent`, `node-
|
|
141
|
+
cursor positions. `ab wait` supports `consent`, `node-merged` and
|
|
141
142
|
`restack-conflicted`; current-state conditions return immediately. Explicit
|
|
142
143
|
watch event globs emit durable events only. A readiness episode changes on a
|
|
143
144
|
new candidate or exit/re-entry, and cursor resume suppresses its duplicate.
|
|
144
145
|
|
|
145
146
|
Consent and hold readiness produce only `build.consent-ready`; merge attention is
|
|
146
147
|
reserved for current gate deferrals and unsafe forge outcomes. Named and
|
|
147
|
-
repository-wide watches report an already-ready
|
|
148
|
+
repository-wide watches report an already-ready merge on first discovery.
|
|
148
149
|
Readiness observations use the same `{kind, branch, ticket?, build?}` effective
|
|
149
150
|
target shape as queue entries.
|