@defrex/autobuild 1.0.0-beta.1 → 1.0.0-beta.3
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/SPEC.md +310 -56
- package/bin/ab-build-runner.ts +10 -8
- package/docs/architecture.md +177 -23
- package/docs/configuration.md +35 -4
- package/docs/hosted-service.md +35 -0
- package/docs/integration-tree.md +83 -4
- package/docs/landing-policy.md +11 -0
- package/docs/migration-1.0.md +9 -0
- package/docs/operator-api.md +18 -0
- package/docs/remote-store-protocol.md +16 -0
- package/docs/remote-ticket-protocol.md +5 -0
- package/docs/restacking.md +42 -7
- package/docs/setup.md +25 -0
- package/docs/spec-standard.md +71 -0
- package/docs/ticket-dependencies.md +6 -45
- package/docs/ticket-migration.md +50 -4
- package/package.json +3 -3
- package/packages/core/src/cli/attention.ts +4 -1
- package/packages/core/src/cli/binary.ts +17 -1
- package/packages/core/src/cli/build-control.ts +3 -3
- package/packages/core/src/cli/context.ts +53 -1
- package/packages/core/src/cli/dashboard/actions.ts +4 -0
- package/packages/core/src/cli/dashboard/detail.ts +45 -1
- package/packages/core/src/cli/dashboard/facts.ts +7 -2
- package/packages/core/src/cli/dashboard/integration-detail.ts +144 -0
- package/packages/core/src/cli/dashboard/integration-row.ts +255 -0
- package/packages/core/src/cli/dashboard/landing-display.ts +64 -0
- package/packages/core/src/cli/dashboard/model.ts +147 -16
- package/packages/core/src/cli/dashboard/poll.ts +40 -4
- package/packages/core/src/cli/dashboard/render.ts +106 -5
- package/packages/core/src/cli/dashboard/transcript.ts +2 -1
- package/packages/core/src/cli/dispatch-frontend.ts +11 -0
- package/packages/core/src/cli/dispatch-repository-feed.ts +2 -1
- package/packages/core/src/cli/dispatch.ts +49 -14
- package/packages/core/src/cli/help.ts +17 -1
- package/packages/core/src/cli/main.ts +48 -8
- package/packages/core/src/cli/publication-settlement.ts +49 -5
- package/packages/core/src/cli/repository-status.ts +103 -2
- package/packages/core/src/cli/status.ts +24 -1
- package/packages/core/src/cli/terminals.ts +94 -93
- package/packages/core/src/cli/ticket.ts +35 -11
- package/packages/core/src/cli/wait.ts +11 -2
- package/packages/core/src/cli/watch.ts +12 -0
- package/packages/core/src/config/schema.ts +3 -0
- package/packages/core/src/events/catalog.ts +38 -0
- package/packages/core/src/events/compatibility.ts +183 -0
- package/packages/core/src/events/native-session.ts +13 -0
- package/packages/core/src/events/payloads.ts +150 -2
- package/packages/core/src/events/policy.ts +210 -0
- package/packages/core/src/events/repository.ts +69 -0
- package/packages/core/src/integration/harness.ts +4 -4
- package/packages/core/src/kernel/__snapshots__/{reducer-registry.test.ts.snap → reducer-accumulator-shapes.json} +4286 -4006
- package/packages/core/src/kernel/change-presence.ts +11 -3
- package/packages/core/src/kernel/dispatch-capacity.ts +127 -0
- package/packages/core/src/kernel/dispatcher-liveness.ts +5 -1
- package/packages/core/src/kernel/engine.ts +25 -5
- package/packages/core/src/kernel/forge-health.ts +19 -0
- package/packages/core/src/kernel/generators/build-log.ts +18 -0
- package/packages/core/src/kernel/generators/node-restack-log.ts +1 -1
- package/packages/core/src/kernel/generators/repository-journals.ts +10 -0
- package/packages/core/src/kernel/guarded-forge.ts +159 -0
- package/packages/core/src/kernel/incremental.ts +4 -2
- package/packages/core/src/kernel/integration-completeness.ts +108 -9
- package/packages/core/src/kernel/integration-landing.ts +5 -4
- package/packages/core/src/kernel/janitor-failure.ts +36 -0
- package/packages/core/src/kernel/landing-publication.ts +35 -15
- package/packages/core/src/kernel/landing-state.ts +7 -0
- package/packages/core/src/kernel/leaf-restack-state.ts +1 -1
- package/packages/core/src/kernel/log-index.ts +12 -1
- package/packages/core/src/kernel/mixed-version.ts +52 -0
- package/packages/core/src/kernel/node-landing.ts +14 -11
- package/packages/core/src/kernel/node-parent.ts +35 -10
- package/packages/core/src/kernel/node-restack-demand.ts +29 -0
- package/packages/core/src/kernel/node-restack-state.ts +46 -16
- package/packages/core/src/kernel/node-restack-transaction.ts +151 -8
- package/packages/core/src/kernel/node-restack.ts +34 -10
- package/packages/core/src/kernel/publication.ts +22 -0
- package/packages/core/src/kernel/read-deferrals.ts +111 -0
- package/packages/core/src/kernel/read-facts.ts +34 -6
- package/packages/core/src/kernel/reconcile-restack.ts +23 -2
- package/packages/core/src/kernel/reducer-registry.ts +18 -2
- package/packages/core/src/kernel/reducer.ts +196 -10
- package/packages/core/src/kernel/repository-attention.ts +38 -1
- package/packages/core/src/kernel/terminal-guard.ts +11 -4
- package/packages/core/src/kernel/ticket-migrations.ts +139 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/index.ts +2 -0
- package/packages/core/src/operator/presentation.ts +5 -0
- package/packages/core/src/operator/query.ts +51 -11
- package/packages/core/src/operator/registry.ts +17 -1
- package/packages/core/src/operator/restack.ts +51 -0
- package/packages/core/src/operator/tickets.ts +30 -26
- package/packages/core/src/plugin-sdk/index.ts +10 -0
- package/packages/core/src/plugins/manifest.ts +1 -1
- package/packages/core/src/ports/forge/contract.ts +23 -0
- package/packages/core/src/ports/forge/fake.ts +6 -2
- package/packages/core/src/ports/forge/git-rewrite.ts +92 -64
- package/packages/core/src/ports/forge/github-transport.ts +45 -2
- package/packages/core/src/ports/forge/github.ts +56 -17
- package/packages/core/src/ports/forge/local-git.ts +7 -2
- package/packages/core/src/ports/forge-failure.ts +40 -0
- package/packages/core/src/ports/forge-request-context.ts +35 -0
- package/packages/core/src/ports/forge-telemetry.ts +16 -0
- package/packages/core/src/ports/runner/claude.ts +136 -9
- package/packages/core/src/ports/runner/codex.ts +112 -7
- package/packages/core/src/ports/runner/contract.ts +78 -0
- package/packages/core/src/ports/runner/fake.ts +59 -1
- package/packages/core/src/ports/runner/native-cli-fixture.ts +86 -0
- package/packages/core/src/ports/runner/native-process-fixture.ts +38 -0
- package/packages/core/src/ports/runner/native-session.ts +110 -0
- package/packages/core/src/ports/runner/pi-rpc.ts +7 -1
- package/packages/core/src/ports/runner/pi.ts +162 -2
- package/packages/core/src/ports/tickets/linear.ts +180 -12
- package/packages/core/src/ports/tickets/migration.ts +92 -9
- package/packages/core/src/ports/types.ts +60 -5
- package/packages/core/src/ports/workspace/git-worktree.ts +45 -51
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +28 -12
- package/packages/core/src/processes/build-child-exit.ts +50 -2
- package/packages/core/src/processes/build-child.ts +15 -7
- package/packages/core/src/processes/build-runner.ts +909 -213
- package/packages/core/src/processes/dispatcher.ts +815 -369
- package/packages/core/src/processes/execution-no-progress.ts +15 -0
- package/packages/core/src/processes/pause-execution-fixture.ts +37 -0
- package/packages/core/src/processes/phase-failure-budget.ts +2 -1
- package/packages/core/src/processes/publication-loss.ts +7 -3
- package/packages/core/src/processes/repo-view.ts +53 -6
- package/packages/core/src/processes/tick-publication.ts +6 -2
- package/packages/core/src/runtime-identity.ts +37 -0
- package/packages/core/src/store/adapter.ts +4 -2
- package/packages/core/src/store/build-scope.ts +9 -0
- package/packages/core/src/store/contract.ts +233 -16
- package/packages/core/src/store/digest.ts +20 -2
- package/packages/core/src/store/local/schema.ts +6 -0
- package/packages/core/src/store/local/store.ts +57 -4
- package/packages/core/src/store/memory.ts +83 -2
- package/packages/core/src/store/new-build.ts +2 -2
- package/packages/core/src/store/phase-session.ts +13 -0
- package/packages/core/src/store/reduced-reads.ts +43 -4
- package/packages/core/src/store/reducer-value-shapes.json +8911 -6344
- package/packages/core/src/store/reducer-value-validation.ts +103 -3
- package/packages/core/src/store/reducer-values.ts +21 -6
- package/packages/core/src/store/remote/client.ts +145 -20
- package/packages/core/src/store/remote/index.ts +2 -0
- package/packages/core/src/store/remote/protocol.ts +19 -0
- package/packages/core/src/store/remote/version.ts +2 -0
- package/packages/core/src/store/repo-state-events.ts +5 -2
- package/packages/core/src/store/repo-tick.ts +6 -1
- package/packages/core/src/store/session-handle.ts +8 -0
- package/packages/core/src/store/snapshots.ts +21 -5
- package/packages/core/src/store/types.ts +17 -1
- package/packages/core/src/testing/dispatch-read-budget.ts +18 -2
- package/packages/core/src/testing/index.ts +7 -0
- package/packages/core/src/testing/newer-writer.ts +37 -0
- package/packages/core/src/testing/reduced-read-budget.ts +3 -0
- package/skills/guide/SKILL.md +140 -25
- package/skills/guide/references/integration-tree.md +83 -4
- package/skills/guide/references/landing-policy.md +11 -0
- package/skills/guide/references/migration-1.0.md +9 -0
- package/skills/guide/references/operator-api.md +18 -0
- package/skills/guide/references/plugin-authoring.md +47 -4
- package/skills/guide/references/remote-store-protocol.md +16 -0
- package/skills/guide/references/remote-ticket-protocol.md +5 -0
- package/skills/guide/references/restacking.md +42 -7
- package/skills/guide/references/setup.md +25 -0
- package/skills/guide/references/spec-standard.md +71 -0
- package/skills/guide/references/ticket-dependencies.md +6 -45
- package/skills/guide/references/ticket-migration.md +50 -4
- package/skills/implement/SKILL.md +4 -2
- package/skills/operate/SKILL.md +63 -6
- package/skills/reconcile/SKILL.md +3 -1
- package/skills/spec/SKILL.md +62 -40
- package/skills/tickets/SKILL.md +15 -43
|
@@ -113,6 +113,7 @@ JSON bodies are strict: unknown fields are rejected.
|
|
|
113
113
|
| Method and path | Body |
|
|
114
114
|
|---|---|
|
|
115
115
|
| `POST …/builds/{slug}/control` | `{"action":"pause"\|"cancel-pause"\|"resume"\|"abort"\|"discard"\|"land"\|"hold"}` |
|
|
116
|
+
| `POST …/builds/{slug}/restack` | Empty body; durable node restack demand. |
|
|
116
117
|
| `POST …/builds/{slug}/answer` | One answer variant described below. |
|
|
117
118
|
| `PUT …/settings/intake` | `{"enabled":boolean}` |
|
|
118
119
|
| `POST …/settings/intake/toggle` | Empty body. |
|
|
@@ -237,6 +238,9 @@ record the first signal in the stop fact, and release its lease before exit.
|
|
|
237
238
|
|
|
238
239
|
The default watch reports actionable conditions only:
|
|
239
240
|
|
|
241
|
+
- `build.janitor-failing`: a build has reached the configured consecutive-failure threshold; a successful janitor attempt clears it.
|
|
242
|
+
- `dispatcher.forge-persistent`: forge degradation remains after a completed post-reset retry opportunity; successful recovery clears it.
|
|
243
|
+
|
|
240
244
|
- Build `escalation.raised`, or `build.merge-decision`: a finalized open PR
|
|
241
245
|
with auto-merge off or a current actionable merge-gate deferral. Armed consent
|
|
242
246
|
awaiting application is silent. One merge decision is reported per build/PR.
|
|
@@ -298,3 +302,17 @@ or clears before changing other fields. Dispatch routing is unchanged.
|
|
|
298
302
|
Landing controls use `land` and `hold` with acknowledged durable state. Land
|
|
299
303
|
requires readiness and survives restacks; hold persists until land. Repository
|
|
300
304
|
auto-merge settings are retired; configure ordered `[[landing]]` rules.
|
|
305
|
+
|
|
306
|
+
Default attention includes `build.janitor-failing` and
|
|
307
|
+
`dispatcher.forge-persistent`. Raw `dispatcher.forge-degraded` and
|
|
308
|
+
`dispatcher.forge-recovered` facts are available through explicit event filters.
|
|
309
|
+
Active janitor attention clears on a successful attempt. Repository status
|
|
310
|
+
includes forge degradation/reset and available request counts; `dispatcher.forge-persistent` requires a completed retry opportunity past
|
|
311
|
+
the original reset, which later rate limits cannot postpone indefinitely.
|
|
312
|
+
|
|
313
|
+
### Node restack request
|
|
314
|
+
|
|
315
|
+
`builds.restack` accepts `{repo, slug}`. `POST /operator/v1/repos/:repo/builds/:slug/restack`
|
|
316
|
+
uses the same service as `ab restack <node>`. The receipt contains `slug`,
|
|
317
|
+
`request`, `coalesced` and `waiting`; execution is asynchronous. It refuses
|
|
318
|
+
non-node, unopened and terminal builds and enforces repository ownership.
|
|
@@ -19,8 +19,8 @@ paths are not API.
|
|
|
19
19
|
|---|---|---|---|
|
|
20
20
|
| `ticket-source` | `ticketSources` | `TicketSource` | Initiates a build by listing/getting/claiming tickets and receives comments/transitions/creates/updates. It owns lifecycle names, dependency completion, idempotent creation, stable external creation-key projection, and partial-list diagnostics. It is never consulted mid-build and is not artifact storage. |
|
|
21
21
|
| `agent-runtime` | `agentRuntimes` | `RuntimeRegistration` | Wrap an `AgentRunner` that supports start/continue/end, complete transcripts and usage, per-turn environment refresh and cancellation, typed failures with verbatim messages, the retry-compatible `permanent` bit, and optional `cause: availability | exhaustion | credentials | configuration` routing evidence, plus the distribution-managed `ab` launcher. A cancelled turn must retain an endable handle for transcript deposition. Declare served model prefixes/default; optional tool-free `oneShot` is a capability beside the runner interface. |
|
|
22
|
-
| `workspace-provider` | `workspaceProviders` | `WorkspaceProvider` | Provision an absolute, writable working copy for the requested branch, return durable base evidence, resume an intact branch non-destructively, rematerialize a lost copy, and make release idempotent. Never silently re-cut resumed work from a newer base. |
|
|
23
|
-
| `forge` | `forges` | `Forge` | Implement kernel-owned regular pushes, idempotent PR opening, PR-state projection, gated/ungated auto-merge behavior, head-guarded squash merge, and comments. API 1.2 adds optional idempotent `closePr` and `deleteBranch` abort-cleanup capabilities; `closePr` must preserve a racing merge. Without them abort cleanup remains visibly pending. Agents never receive forge credentials or push. `prAttachments` is an optional image-hosting capability; absence must preserve the supported text-only path. |
|
|
22
|
+
| `workspace-provider` | `workspaceProviders` | `WorkspaceProvider` | Provision an absolute, writable working copy for the requested branch, return durable base evidence, resume an intact branch non-destructively, rematerialize a lost copy, and make release idempotent. Never silently re-cut resumed work from a newer base. Optional `provision.publication` supplies a durable confirmed SHA and known cache tips for authoritative readback and cache repair; preserve unknown unpublished work. |
|
|
23
|
+
| `forge` | `forges` | `Forge` | Implement kernel-owned regular pushes, idempotent PR opening, PR-state projection, gated/ungated auto-merge behavior, head-guarded squash merge, and comments. API 1.2 adds optional idempotent `closePr` and `deleteBranch` abort-cleanup capabilities; `closePr` must preserve a racing merge. Without them abort cleanup remains visibly pending. Agents never receive forge credentials or push. `prAttachments` is an optional image-hosting capability; absence must preserve the supported text-only path. Optional API 1.8 failure classification and request observers are described below. |
|
|
24
24
|
|
|
25
25
|
Reconcile requires the optional grouped `Forge.rewrite` capability: snapshot the
|
|
26
26
|
actual build branch into a build-private ref, publish immutable exact-SHA refs
|
|
@@ -36,8 +36,20 @@ fall back to merging, ordinary pushes, archive branches or tags. Older forge
|
|
|
36
36
|
plugins remain loadable and receive an actionable refusal at reconcile time.
|
|
37
37
|
Remote workspace providers additionally need trusted `WorkspacePublication.rewrite`
|
|
38
38
|
after guest execution teardown; ordinary `publish` cannot publish a restack.
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
Every publication succeeds only after authoritative branch-head readback equals
|
|
40
|
+
its frozen intended SHA, including recovery after a failed push. Remote-backed
|
|
41
|
+
local refs are caches: set them unconditionally after confirmation, fetching the
|
|
42
|
+
advertised ref if objects are missing, without resetting checkout files.
|
|
43
|
+
`localExpected` is historical input only. Local-git's shared ref database remains
|
|
44
|
+
authoritative and keeps CAS. Ordinary `pushBranch(workspacePath, branch, sha?)`
|
|
45
|
+
receives the frozen SHA from kernel callers and remains fast-forward only;
|
|
46
|
+
legacy callers may omit SHA to select HEAD. Implement `confirmPublication`
|
|
47
|
+
to inspect the authoritative head and refresh caches only on an exact SHA match;
|
|
48
|
+
kernel callers refuse adapters without it before attempting a push. Hosted `WorkspacePublication` must
|
|
49
|
+
provide authoritative `isPublished` and confirm after writing, as well as before
|
|
50
|
+
retrying. Remote inspection must not resume a stopped guest or run commands in
|
|
51
|
+
it: refresh the guest cache inside trusted publication before stopping it. Missing inspection fails actionably. Unconfirmed candidate ancestry
|
|
52
|
+
never proves publication.
|
|
41
53
|
|
|
42
54
|
Plugin API 1.3 adds the optional AgentRunner failure `cause` and the
|
|
43
55
|
`exhaustion-failure` shared-contract scenario. Legacy failures without `cause`
|
|
@@ -59,6 +71,37 @@ the durable provider locator as `BuildExecutionStart.workspaceRef`; local PID
|
|
|
59
71
|
supervision remains host-owned. A workspace plugin relying on these fields
|
|
60
72
|
should declare an API range containing `^1.5.0`.
|
|
61
73
|
|
|
74
|
+
Plugin API 1.8 adds optional forge failure classification and request accounting.
|
|
75
|
+
Import the runtime `ForgeFailure` constructor and `isForgeFailure`, plus types
|
|
76
|
+
`ForgeFailureDetails`, `ForgeRequestObserver`, and `ForgeRequestContext` from
|
|
77
|
+
`@defrex/autobuild/plugin-sdk`. Throw
|
|
78
|
+
`new ForgeFailure(message, { kind: 'rate-limited', resetAt })` with a valid ISO
|
|
79
|
+
reset timestamp, or `{ kind: 'transient', retry: 'retryable' }` for retryable
|
|
80
|
+
transport errors. Ordinary policy/permission refusals remain deferrals. Never
|
|
81
|
+
include credentials. The `forgeFailure: 'autobuild.forge-failure.v1'` discriminant
|
|
82
|
+
and validated details work across separately loaded SDK copies.
|
|
83
|
+
|
|
84
|
+
Optionally implement `Forge.observeRequests(observer): () => void`; return a
|
|
85
|
+
disposer and call registered observers once per wire request, including failed
|
|
86
|
+
requests and pagination. Pass `ForgeRequestContext` with the build slug when
|
|
87
|
+
known, or `{}` when unknown. The host fills missing build attribution from its
|
|
88
|
+
current build-scoped operation; otherwise the request is repository/unattributed.
|
|
89
|
+
Credential discovery and skipped calls are not provider requests. For example:
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
observeRequests(observer: ForgeRequestObserver) {
|
|
93
|
+
this.observers.add(observer)
|
|
94
|
+
return () => { this.observers.delete(observer) }
|
|
95
|
+
}
|
|
96
|
+
// At the actual transport boundary:
|
|
97
|
+
for (const observer of this.observers) observer({ build: context.build })
|
|
98
|
+
return transport(method, path, options)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Declare `apiVersion: '^1.8.0'` when using these capabilities. Compatible legacy
|
|
102
|
+
1.x plugins still load without observers and show unavailable counts. Arbitrary
|
|
103
|
+
legacy errors are not classified automatically.
|
|
104
|
+
|
|
62
105
|
Plugin API 1.7 extends the workspace-provider factory context with the
|
|
63
106
|
host-derived seams a store-requiring remote provider needs. Workspace-provider
|
|
64
107
|
factories additionally receive `storeRef` and `delegateCredential` (guaranteed present
|
|
@@ -316,6 +316,7 @@ it to exist. An unknown build returns `404 not-found`.
|
|
|
316
316
|
| `append` | `POST /builds/{slug}/events` | event write | `201` + build event envelope |
|
|
317
317
|
| `appendIfCurrent` | `POST /builds/{slug}/events/conditional` | `{"expectedSeq": nonnegative integer, "event": event write}` | appended: `201` + build event envelope; stream advanced: `200 null` |
|
|
318
318
|
| `getEvents` | `GET /builds/{slug}/events?since={n}&wait={s}` | optional `since` query value, parsed below; absence defaults to `0`. Optional `wait` in whole seconds, parsed per the event-wait rules below | `200` + envelopes whose `seq` is strictly greater than parsed `since`, in increasing sequence order |
|
|
319
|
+
| `appendWithArtifactsIfCurrent` | `POST /builds/{slug}/deposits/conditional` | atomic deposit request plus `expectedSeq` | `201` + `{event, artifacts}`, or `200` + `null` on stale head |
|
|
319
320
|
| `appendWithArtifacts` | `POST /builds/{slug}/deposits` | atomic deposit request | `201` + `{event, artifacts}` |
|
|
320
321
|
| `getReducerSnapshot` | `GET /builds/{slug}/snapshots/{reducer}?version={n}` | required `version` query value, a positive integer; `reducer` is a registry name (`^[A-Za-z][A-Za-z0-9._-]{0,63}$`) | `200` + `{"version", "cursor", "state"}` or `200 null` when absent, written by another reducer version, or ahead of the build log's tail; an unknown build is `404`, which the shipped client also maps to `null` |
|
|
321
322
|
| `putReducerSnapshot` | `PUT /builds/{slug}/snapshots/{reducer}` | `{"version": int >= 1, "cursor": int >= 0, "state": JSON}`, at most 16 MiB (`413` above) | `200 {"written": boolean}`; the stored cursor never decreases, so a write at an equal or lower cursor (or an equal cursor at an equal or lower version) and one past the log's tail answer `written: false` |
|
|
@@ -1085,6 +1086,16 @@ and metadata is the visibility boundary. Revision assignment, substitution,
|
|
|
1085
1086
|
event validation, and metadata/event commit must be serialized or
|
|
1086
1087
|
transactional so concurrent deposits receive distinct revisions and events.
|
|
1087
1088
|
|
|
1089
|
+
Conditional build deposits use `POST /builds/{slug}/deposits/conditional` and
|
|
1090
|
+
require nonnegative integer `expectedSeq`. The distinct endpoint fails closed
|
|
1091
|
+
against an older server; the client never falls back to an unguarded deposit.
|
|
1092
|
+
The backing store compares the head under the same transaction
|
|
1093
|
+
or build lock as the deposit. A stale head returns `200 null` without artifact
|
|
1094
|
+
metadata, revision allocation, timestamp updates, retention pruning or event
|
|
1095
|
+
append. A matching head follows the normal validation/rollback contract and
|
|
1096
|
+
returns `201 {event, artifacts}`. Immutable orphan blobs remain harmless.
|
|
1097
|
+
Terminal and suspension writers re-read and revalidate after a comparison miss.
|
|
1098
|
+
|
|
1088
1099
|
These rules apply identically to build, repository, and session deposits.
|
|
1089
1100
|
|
|
1090
1101
|
## 9. Errors and validation
|
|
@@ -1318,3 +1329,8 @@ The optional `integrationAuditPending` digest fact is introduced on the 0.14
|
|
|
1318
1329
|
release line without changing protocol identity 4. It survives build completion
|
|
1319
1330
|
and is cleared by audit settlement. Services omit it for historical 0.12/0.13
|
|
1320
1331
|
clients, retaining their decoders and the supported three-line window.
|
|
1332
|
+
|
|
1333
|
+
`tickets.migration-recorded` is a durable, decisive human-authored repository
|
|
1334
|
+
fact: `{ identity, from, to, mapping }`, where mapping contains source ticket IDs
|
|
1335
|
+
and destination IDs. All migration facts survive dispatcher-run turnover.
|
|
1336
|
+
Conflicting identity reuse or source-qualified mappings fail replay closed.
|
|
@@ -333,3 +333,8 @@ client version. Without it, both fields are projected away, preserving historica
|
|
|
333
333
|
strict decoders. Current hosted clients send all three capability headers and
|
|
334
334
|
default absent kind to `work`. Unfiltered listing includes all ticket states and
|
|
335
335
|
empty nodes for `ab ticket tree`; dispatch and landing behavior are unchanged.
|
|
336
|
+
|
|
337
|
+
Completed ticket imports record `tickets.migration-recorded` in the selected
|
|
338
|
+
BuildStore repository journal, with export identity, origin/destination adapter
|
|
339
|
+
names and the actual complete ID mapping. Requested-ID preservation alone does
|
|
340
|
+
not establish continuity for in-flight builds; see the migration procedure.
|
|
@@ -25,17 +25,46 @@ verification; reports retain their actual cycle base/head. Conflicted replay
|
|
|
25
25
|
runs reconcile and verification, and initial verification cannot be skipped
|
|
26
26
|
through post-reconcile policy.
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
Nodes observe parent movement durably but restack only on demand: before a
|
|
29
|
+
complete nonempty node verifies; before landing if its parent moved; when queued
|
|
30
|
+
dependency presence requires an ancestor change; on `ab restack <node>`; or on
|
|
31
|
+
accepted re-parenting. There is no eager mode or cadence option. Nested nodes
|
|
32
|
+
need their own demand. Existing frozen transactions, including ones reserved
|
|
33
|
+
before upgrade, finish first; later demand coalesces onto the latest parent.
|
|
34
|
+
Leaves keep verify-entry and awaiting-landing restacks for every target.
|
|
35
|
+
|
|
36
|
+
Presence demand uses change identities, never ticket resolution alone. It follows
|
|
37
|
+
only the path from the nearest proven ancestor source down to the dependent's
|
|
38
|
+
actual destination, processing ancestors first. Unrelated siblings stay idle;
|
|
39
|
+
changes absent from all ancestors cannot trigger a speculative replay. Tickets
|
|
40
|
+
remain queued until presence is observed in their destination.
|
|
41
|
+
|
|
42
|
+
`ab restack <node>` (operator tool `builds.restack`, input `{repo, slug}`) records
|
|
43
|
+
a durable request, coalescing pending demand. It refuses leaves, terminal nodes,
|
|
44
|
+
and unopened nodes. Paused or blocked nodes wait for their normal safety gates.
|
|
45
|
+
A request arriving during replay survives until its parent and required identities
|
|
46
|
+
are covered. Re-parenting invalidates requests for the old destination.
|
|
47
|
+
|
|
48
|
+
Both dashboards show `parent N commits ahead`, `parent current`, or
|
|
49
|
+
`parent distance unknown`. Distance counts commits reachable from the observed
|
|
50
|
+
parent but not the last confirmed contribution base; it is not elapsed time or
|
|
51
|
+
poll count. Samples are invalidated by replay or re-parenting. A stale node
|
|
52
|
+
cannot verify or land; inventory and child landings continue while it collects.
|
|
32
53
|
|
|
33
54
|
Before replacement the kernel publishes retained tips, displaced heads and the
|
|
34
55
|
temporary change under immutable exact archive refs. `restack.*` facts record
|
|
35
56
|
preparation, replay, intent, archived replacement, contention and completion.
|
|
36
57
|
Unpublished request/loss records alone cannot preserve objects from a released
|
|
37
|
-
sandbox.
|
|
38
|
-
|
|
58
|
+
sandbox. The forge is authoritative for publication: after a push or on recovery,
|
|
59
|
+
its branch head must equal the intended SHA before completion. Local refs are
|
|
60
|
+
caches refreshed without an expected-old guard after confirmation; checkout files
|
|
61
|
+
are untouched. Local-git's shared database is the forge and retains authoritative
|
|
62
|
+
CAS. Remote publication uses exact expected-head leases and durable reservations; contention retains evidence
|
|
63
|
+
and retries without overwriting another writer. An overtaken successful guarded
|
|
64
|
+
write can retain its factual receipt, but unconfirmed candidate ancestry cannot
|
|
65
|
+
prove a write or promote a base. Contribution ownership uses recorded boundaries,
|
|
66
|
+
stable build identities and confirmed foreign rewrite aliases, never a merge-base
|
|
67
|
+
against the current destination. Remote guests park for trusted
|
|
39
68
|
publication after teardown. Historical merge reconciliations keep their original
|
|
40
69
|
interpretation and supply a promoted contribution base for later replay.
|
|
41
70
|
|
|
@@ -52,7 +81,8 @@ child landings. Reservations freeze expected head, parent, contribution boundary
|
|
|
52
81
|
archives, changes and merge proofs. Lease expiry recovers the same operation,
|
|
53
82
|
not a competing one. Prepared/conflicted/replayed item receipts, publication
|
|
54
83
|
intent, proven replacement and settlement distinguish each recovery boundary.
|
|
55
|
-
Inventory
|
|
84
|
+
Inventory retains its sampled source boundary even while the confirmed parent
|
|
85
|
+
boundary stays unchanged. It exposes source identities, node-owned foreign commits, active operation,
|
|
56
86
|
conflict item and unsafe merge evidence.
|
|
57
87
|
|
|
58
88
|
Only a conflicted item attaches a reconcile runner. It receives the original
|
|
@@ -77,3 +107,8 @@ never preserves merge topology or decomposes an unsafe merge automatically.
|
|
|
77
107
|
|
|
78
108
|
See [integration trees](integration-tree.md), [landing](landing-policy.md), and
|
|
79
109
|
[migration](migration-1.0.md).
|
|
110
|
+
|
|
111
|
+
Native cancellation receipts are candidate- and operation-specific. Publication
|
|
112
|
+
retries confirm forge state before reusing a receipt; external re-enables require
|
|
113
|
+
another confirmed cancellation. Classified transient landing failures retain
|
|
114
|
+
retry eligibility and recheck authorization after repository forge cooldown.
|
|
@@ -156,6 +156,27 @@ Vercel team/project credential set; provide separate private-clone credentials;
|
|
|
156
156
|
use an HTTPS GitHub origin and hosted Store; authorize the Store token; or commit
|
|
157
157
|
and push the selected base branch.
|
|
158
158
|
|
|
159
|
+
## Keep per-build records in separate fragments
|
|
160
|
+
|
|
161
|
+
When a repository keeps per-build records, such as changelog entries, write a
|
|
162
|
+
separate fragment file for each build and assemble the consolidated record at
|
|
163
|
+
release. For example, use distinct filenames per build (these names are
|
|
164
|
+
illustrative):
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
changelog.d/
|
|
168
|
+
build-alpha.md
|
|
169
|
+
build-beta.md
|
|
170
|
+
CHANGELOG.md # assembled from the fragments at release
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Shared append-only files are an anti-pattern for finalize steps. Under the
|
|
174
|
+
integration tree, independent builds that append to the same shared lines can
|
|
175
|
+
conflict when their commits are replayed onto a destination that already has
|
|
176
|
+
other entries, including during restacks and node cascades. Each conflicting
|
|
177
|
+
replay costs an agent reconcile session. Separate fragment files remove that
|
|
178
|
+
shared edit surface; the repository owns the release-time assembly tooling.
|
|
179
|
+
|
|
159
180
|
## Repository identity is the origin, not a checkout path
|
|
160
181
|
|
|
161
182
|
Repository identity in the Store, dispatcher, `ab builds`, `ab build status`,
|
|
@@ -520,3 +541,7 @@ gate. External orchestrators follow these through `ab watch` with no slugs or an
|
|
|
520
541
|
explicit repository watch; `ab wait` remains build-only. The dashboard and operator
|
|
521
542
|
repository query retain all failures for that run. After correcting settings or
|
|
522
543
|
access, revalidate and restart dispatch to refresh its startup diagnostics.
|
|
544
|
+
|
|
545
|
+
Changing the connected ticket source does not itself migrate in-flight builds.
|
|
546
|
+
Follow [ticket migration](ticket-migration.md), keeping the existing BuildStore
|
|
547
|
+
and recording continuity before resuming build-related ticket writes.
|
|
@@ -54,6 +54,77 @@ evidence is not.
|
|
|
54
54
|
|
|
55
55
|
---
|
|
56
56
|
|
|
57
|
+
## Sizing and splitting
|
|
58
|
+
|
|
59
|
+
Every build pays a fixed cost no matter how small its diff: spec, plan and
|
|
60
|
+
plan review, code review, the repository's full verify suite, finalize,
|
|
61
|
+
landing, and a restack for everything queued behind it. Ten small tickets pay
|
|
62
|
+
that cost ten times, and a blocker chain pays it in series. Prefer fewer,
|
|
63
|
+
larger tickets: one ticket per coherent change, as large as one plan and one
|
|
64
|
+
review pass can hold without the quality bar slipping.
|
|
65
|
+
|
|
66
|
+
A ticket is the right size when its acceptance criteria describe one feature
|
|
67
|
+
or fix a reviewer can judge in a single pass, one plan can cover it without
|
|
68
|
+
deferring a design decision to a later build, and its out-of-scope list is
|
|
69
|
+
short and obvious. It is too big when its criteria fall into groups that share
|
|
70
|
+
no behavior, when part of it waits on a decision nobody has made, or when its
|
|
71
|
+
parts need different landing — one can ship now while another needs consent
|
|
72
|
+
or must wait.
|
|
73
|
+
|
|
74
|
+
Do not split:
|
|
75
|
+
|
|
76
|
+
- by layer (schema, then API, then UI) when the layers make one behavior
|
|
77
|
+
change;
|
|
78
|
+
- into "refactor, then feature" unless the refactor is valuable and safe on
|
|
79
|
+
its own;
|
|
80
|
+
- to make progress visible, or because the spec got long. A long spec with
|
|
81
|
+
clear criteria is fine.
|
|
82
|
+
|
|
83
|
+
### Cut along seams
|
|
84
|
+
|
|
85
|
+
A seam decides where to cut once a split is justified; it is not a reason to
|
|
86
|
+
split. A full-stack change that crosses an API boundary stays one ticket
|
|
87
|
+
unless its size says otherwise.
|
|
88
|
+
|
|
89
|
+
When a feature does need several tickets, find the seams before deciding the
|
|
90
|
+
cut: places where the code already has a narrow, stable contract between
|
|
91
|
+
parts — a port or adapter interface, a schema or event type, a wire protocol,
|
|
92
|
+
a CLI command's output, a module's public API. Read the code to find them;
|
|
93
|
+
don't guess. Put each ticket on one side of a seam.
|
|
94
|
+
|
|
95
|
+
A cut at a seam pays twice:
|
|
96
|
+
|
|
97
|
+
- **Fewer conflicts.** Tickets on opposite sides of a contract touch
|
|
98
|
+
different code, so they build in parallel and restack cleanly. Two tickets
|
|
99
|
+
that would edit the same functions are one ticket, or a blocker chain.
|
|
100
|
+
- **Testability.** The contract is the test boundary. Each side is verified
|
|
101
|
+
against it — the provider by contract tests, the consumer against a fake or
|
|
102
|
+
fixture — so neither build needs the other to prove it works.
|
|
103
|
+
|
|
104
|
+
If no seam exists where the work divides, keep it as one ticket, or make the
|
|
105
|
+
first ticket establish the contract with tests at the boundary and block the
|
|
106
|
+
tickets on either side of it until it lands. After that, they can build
|
|
107
|
+
concurrently.
|
|
108
|
+
|
|
109
|
+
State the seam in each ticket as behavior, not structure: what the contract
|
|
110
|
+
promises observably (the event, the command output, the protocol response) is
|
|
111
|
+
a fair acceptance criterion on both sides; file names and signatures still
|
|
112
|
+
belong to the planner. Record in Evidence why the cut falls where it does, so
|
|
113
|
+
a planner reading one ticket knows what its siblings own.
|
|
114
|
+
|
|
115
|
+
### Keep the blocker graph wide
|
|
116
|
+
|
|
117
|
+
A split feature takes as long as its longest blocker chain, not as long as
|
|
118
|
+
its ticket count. A wave of independent tickets finishes in about one build's
|
|
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 land first — usually the one
|
|
121
|
+
that establishes a shared contract — keep it to that contract and its tests,
|
|
122
|
+
so the wave behind it starts sooner, and fold nothing unrelated into it.
|
|
123
|
+
Add a blocker only for a real prerequisite, never to express a preferred
|
|
124
|
+
order.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
57
128
|
## Immutability during a build
|
|
58
129
|
|
|
59
130
|
The spec is the build's contract artifact (kind `spec`, revision 0). It
|
|
@@ -60,49 +60,10 @@ and claims the ticket only after they resolve and other readiness gates pass.
|
|
|
60
60
|
|
|
61
61
|
## Node tickets and targets
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
as its base and landing destination. The existing cascade restacks descendants
|
|
68
|
-
when a parent moves. Blockers remain a separate graph.
|
|
69
|
-
|
|
70
|
-
Use `ab ticket create "Integration" --body spec.md --kind node`, then
|
|
71
|
-
`ab ticket update <id> --target <node-id>`. Clear a target with `--no-target`;
|
|
72
|
-
reset kind with `--kind work`. Omitted fields preserve existing values.
|
|
73
|
-
`ab ticket show <id> [--json]` exposes both fields; `ab ticket tree [--json]`
|
|
74
|
-
shows the configured root and every ticket, including completed work and empty
|
|
75
|
-
nodes, nested by target with state. Siblings are sorted by id. Invalid external
|
|
76
|
-
graphs and listing diagnostics are reported explicitly.
|
|
77
|
-
|
|
78
|
-
Targets must exist and be nodes in the configured source. Self-targeting,
|
|
79
|
-
ancestor cycles and demoting a node with targeting tickets are refused before
|
|
80
|
-
any part of the requested update is written, regardless of ticket state.
|
|
81
|
-
Clear or reparent its children before demotion. File frontmatter persists the
|
|
82
|
-
fields; `ab ticket edit` displays them read-only. Change them through update.
|
|
83
|
-
Kind and target participate in content revisions and revision-checked writes.
|
|
84
|
-
File writes retain their existing best-effort, unlocked concurrency semantics.
|
|
85
|
-
|
|
86
|
-
Linear uses the exact `node` issue label for kind and the parent relation for
|
|
87
|
-
target, only when the parent carries that label. Ordinary grouping parents do
|
|
88
|
-
not impose targets and survive unrelated updates. Explicit target clear clears
|
|
89
|
-
the parent relation. Label replacements can demote nodes and receive the same
|
|
90
|
-
guards; explicit kind and label instructions must agree about `node`. Label
|
|
91
|
-
and parent connections are fully paginated. Linear still refuses guarded writes.
|
|
92
|
-
|
|
93
|
-
Hosted sources support kind and target with project-scoped transactional validation.
|
|
94
|
-
Existing tickets default to work with no target. Metadata changes increment the
|
|
95
|
-
revision once; equivalent aliases and unchanged values do not. Node demotion
|
|
96
|
-
checks all targeting tickets, including completed work. Legacy plugins without
|
|
97
|
-
integrationTree support read as work with no target and refuse metadata writes.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
A node remains incomplete while any ticket targeting it is unresolved, including
|
|
101
|
-
triage and backlog tickets. Done and cancelled tickets are terminal. A complete
|
|
102
|
-
node with landed contributions verifies its exact head before explicit per-build
|
|
103
|
-
landing consent can publish it. If node verification fails, file a repair child
|
|
104
|
-
with that node as its target; landing the repair triggers a fresh cycle. Human
|
|
105
|
-
forge merges are recorded escape hatches from these gates.
|
|
63
|
+
Read [nodes and targets](integration-tree.md) for lifecycle, validation and
|
|
64
|
+
source storage, and [choosing a destination](integration-tree.md#choosing-a-destination)
|
|
65
|
+
when filing a feature set. Blockers order work independently of landing targets;
|
|
66
|
+
landing authorization follows the repository's matched policy.
|
|
106
67
|
|
|
107
68
|
## When a blocker resolves
|
|
108
69
|
|
|
@@ -117,8 +78,8 @@ an open or aborted node, or ambiguous newest build generations remain queued.
|
|
|
117
78
|
Older successful generations are never substituted for the newest build.
|
|
118
79
|
|
|
119
80
|
- Same node: the blocking change lands directly into the target.
|
|
120
|
-
- Ancestor: the change lands into an ancestor, then
|
|
121
|
-
- Sibling: the blocking node lands into their common ancestor, then
|
|
81
|
+
- Ancestor: the change lands into an ancestor, then presence demand restacks only the required path to the target.
|
|
82
|
+
- Sibling: the blocking node lands into their common ancestor, then presence demand reaches the target through the minimal ancestor path.
|
|
122
83
|
- Descendant: the blocking node lands into the dependent's target ancestor.
|
|
123
84
|
|
|
124
85
|
Blockers that never had a build, and repositories without nodes, retain the
|
|
@@ -4,8 +4,9 @@ Export and import use the ordinary file ticket layout. They operate on tickets
|
|
|
4
4
|
and current attachments through the ticket source; neither command contacts the
|
|
5
5
|
forge. File and hosted sources support import. Linear supports export only.
|
|
6
6
|
|
|
7
|
-
1. Pause intake and
|
|
8
|
-
|
|
7
|
+
1. Pause intake and quiesce build-related ticket writes and other ticket writers
|
|
8
|
+
for the cutover. In-flight builds need not be aborted. Import preflight does
|
|
9
|
+
not reserve numbers against concurrent writers.
|
|
9
10
|
2. With the old `[tickets]` configuration, run `ab ticket export /path/to/export`.
|
|
10
11
|
The destination must be absent or empty. Export reads every state, including
|
|
11
12
|
archived Linear tickets and empty discoverable states, and publishes the
|
|
@@ -14,8 +15,20 @@ forge. File and hosted sources support import. Linear supports export only.
|
|
|
14
15
|
hosted ticket service. Keep the export directory intact.
|
|
15
16
|
4. Run `ab ticket import /path/to/export`. Inspect its printed ticket and state
|
|
16
17
|
mappings and `/path/to/export/.ab-import-map.json`.
|
|
17
|
-
5.
|
|
18
|
-
|
|
18
|
+
5. Import records a durable source/ID mapping in the same BuildStore and repository
|
|
19
|
+
that hold the existing builds, after tickets, metadata and assets finish.
|
|
20
|
+
Keep that BuildStore/repository identity through the cutover.
|
|
21
|
+
6. Inspect ticket bodies, labels, blockers, comments and attachments in the new
|
|
22
|
+
source. Confirm lifecycle configuration and the ready gate, then resume builds and intake.
|
|
23
|
+
|
|
24
|
+
Linear export reads full ticket details in batches and prints `read X/Y tickets`.
|
|
25
|
+
The total is shown as pending until inventory discovery finishes. If Linear reports
|
|
26
|
+
a rate limit with a usable future reset time, export prints the wait time, waits
|
|
27
|
+
until that reset, and retries the failed read while retaining completed pages.
|
|
28
|
+
Without a usable reset time, export fails immediately. A running dispatcher and
|
|
29
|
+
other clients authenticated as the same API user share the API budget, so they
|
|
30
|
+
can cause additional waits. Interrupting export with Ctrl-C publishes nothing;
|
|
31
|
+
the destination stays absent or empty until all ticket and attachment reads succeed.
|
|
19
32
|
|
|
20
33
|
Both commands also accept
|
|
21
34
|
`--store <ref>` to reach legacy BuildStore attachments. Keep the old store available
|
|
@@ -70,3 +83,36 @@ identity, establishes node kinds, then applies targets using the durable id map,
|
|
|
70
83
|
just like blockers. Input order does not matter. Resuming also restores edges on
|
|
71
84
|
adopted tickets; normal destination validation still guards existing graphs and
|
|
72
85
|
node demotion. Older work-only exports remain valid.
|
|
86
|
+
|
|
87
|
+
## In-flight builds
|
|
88
|
+
|
|
89
|
+
A recorded migration resolves old source-qualified ticket references through the
|
|
90
|
+
new source, including remapped IDs. Completeness, child targeting, capacity
|
|
91
|
+
ancestry, claimed target checks, lifecycle transitions and notices use that
|
|
92
|
+
mapping. Historical build events and ticket references remain unchanged. Moves
|
|
93
|
+
can chain across sources; mappings are never applied backward. A source switch
|
|
94
|
+
alone establishes no continuity. Missing migration evidence or an uncovered ID
|
|
95
|
+
fails closed and names the build and original ticket when operating on that
|
|
96
|
+
build or its frozen membership. Uncovered historical builds stay in their
|
|
97
|
+
original namespace during history searches; they cannot alias current tickets
|
|
98
|
+
or block unrelated intake. Separate trackers with the
|
|
99
|
+
same adapter name cannot be distinguished by historical references; this does
|
|
100
|
+
not establish continuity between them.
|
|
101
|
+
|
|
102
|
+
When using the export directory directly as the configured file tracker, run
|
|
103
|
+
`ab ticket migration record /path/to/export [--store <ref>]`. This verifies the
|
|
104
|
+
manifest inventory and creation keys against the destination and records identity
|
|
105
|
+
mappings for the original manifest IDs, without importing tickets. Additional
|
|
106
|
+
tickets filed in the directory after export are allowed and are not included in
|
|
107
|
+
the mapping. Every original ID must still exist with its recorded creation key.
|
|
108
|
+
Preserve `.ab-migration.json` for this step;
|
|
109
|
+
the tracker itself can operate without it. `.ab-import-map.json` is progress
|
|
110
|
+
information, never proof of continuity. Repeating an identical recording is safe;
|
|
111
|
+
conflicting evidence is refused.
|
|
112
|
+
|
|
113
|
+
Import is not transactional across ticket and build services. A partial import
|
|
114
|
+
records no continuity; rerun with the same directory to adopt by creation key.
|
|
115
|
+
If tickets finish but journal recording fails, the command reports that boundary:
|
|
116
|
+
rerun the same command to finish recording before resuming builds. The migration
|
|
117
|
+
journal belongs to the selected BuildStore even when ticket assets live on an
|
|
118
|
+
independent hosted service. Validate the destination configuration before resume.
|
|
@@ -35,8 +35,10 @@ You never push — the push is plumbing that happens when you finish.
|
|
|
35
35
|
reach the store only through this flag; the file is never committed.
|
|
36
36
|
|
|
37
37
|
`ab done` requires a **clean worktree** (everything committed) and the
|
|
38
|
-
notes deposit. In a local workspace it validates
|
|
39
|
-
|
|
38
|
+
notes deposit. In a local workspace it validates the recorded contribution boundary, pushes
|
|
39
|
+
the frozen HEAD SHA, confirms the authoritative branch head, and completes
|
|
40
|
+
the phase. Push/readback failures write no completion or pending publication
|
|
41
|
+
request; fix the failure and retry in the same session. In a remote workspace it records one publication
|
|
40
42
|
request and parks while the dispatcher publishes and records completion;
|
|
41
43
|
**do not run `ab done` again** after that success message. It is your only
|
|
42
44
|
terminal command besides `ab escalate`. If it reports a validation error,
|
package/skills/operate/SKILL.md
CHANGED
|
@@ -84,10 +84,10 @@ the same resolved working directory.
|
|
|
84
84
|
### Watch for attention events
|
|
85
85
|
|
|
86
86
|
`ab watch --json` is the standing monitor. Keep its default filter: every
|
|
87
|
-
record calls for action. It reports build escalations and merge decisions,
|
|
87
|
+
record calls for action. It reports build escalations, persistent janitor failures and merge decisions,
|
|
88
88
|
harvest escalations/recovery exhaustion, rejected configuration, reloads needing
|
|
89
|
-
restart, abnormal dispatcher stops/loss, degradation past reset (15 minutes
|
|
90
|
-
without reset), and five minutes of continuous tick failures. Advertised resets
|
|
89
|
+
restart, abnormal dispatcher stops/loss, ticket-source and forge degradation past reset (15 minutes
|
|
90
|
+
for ticket sources without reset), and five minutes of continuous tick failures. Advertised resets
|
|
91
91
|
wait for a post-reset tick to finish before requiring action; ordinary recovery
|
|
92
92
|
on that retry stays silent. Source grace and cooldown-driven failures do not
|
|
93
93
|
start the tick-failure clock. Routine outcomes and self-healing failures stay silent.
|
|
@@ -210,7 +210,11 @@ Read events with a cursor or a small `--events` count; logs are long.
|
|
|
210
210
|
`--review-round-ceiling <n>` raises the round limit, `--revise-spec <file>`
|
|
211
211
|
resolves with a revised spec. Run `ab help answer` for the full menu.
|
|
212
212
|
- `ab pause <slug>` / `ab resume <slug>`; `ab pause --all` / `ab resume --all`
|
|
213
|
-
hold and release the whole repository.
|
|
213
|
+
hold and release the whole repository. Pause immediately interrupts live agent
|
|
214
|
+
sessions and acknowledges after they stop. Resume continues the same native
|
|
215
|
+
session where supported; remote or unsupported sessions rerun fresh, with a
|
|
216
|
+
reason recorded in session.resume-fallback. Without a live agent (including
|
|
217
|
+
check-only verify), pause still takes effect at the next boundary.
|
|
214
218
|
- `ab abort <slug>` — destructive: closes the PR, removes branches, and
|
|
215
219
|
returns the ticket to triage.
|
|
216
220
|
- `ab hold <slug>` — persistently hold a landing and revoke earlier consent.
|
|
@@ -225,6 +229,11 @@ Read events with a cursor or a small `--events` count; logs are long.
|
|
|
225
229
|
|
|
226
230
|
### Tickets
|
|
227
231
|
|
|
232
|
+
For feature sets you file yourself, consult the shared
|
|
233
|
+
[destination choice guidance](../ab-guide/references/integration-tree.md#choosing-a-destination):
|
|
234
|
+
explicitly choose root or a node, evaluate the repository's effective landing
|
|
235
|
+
policy, and explain the landing flow to the human. Ask when intent is unclear.
|
|
236
|
+
|
|
228
237
|
`ab ticket create|update|block|unblock|list|show|move|states` file, edit, and
|
|
229
238
|
move tickets; the `ab-tickets` skill covers the tracker's details. Moving a
|
|
230
239
|
ticket into the ready state sends it to dispatch — do that only when the
|
|
@@ -336,7 +345,10 @@ Treat every default-watch record as a call to act:
|
|
|
336
345
|
the reported blocker.
|
|
337
346
|
- Dispatcher loss, abnormal stop, restart-required reload, rejected config, or
|
|
338
347
|
persistent tick failure: diagnose through repository status and report the
|
|
339
|
-
condition to the operator.
|
|
348
|
+
condition to the operator. Repository read failures fail the watch tick and
|
|
349
|
+
retry on the next tick, using the existing five-minute persistent-failure
|
|
350
|
+
attention. For validation failures, inspect the stored tick error for reducer,
|
|
351
|
+
scope, cursor, field path, and running version/commit. Never start or run a dispatcher.
|
|
340
352
|
- Persistent source degradation: inspect the source cause and reset evidence,
|
|
341
353
|
diagnose and report the continuing intake problem.
|
|
342
354
|
|
|
@@ -423,6 +435,51 @@ entry position: resuming suppresses the same episode, while a new candidate or
|
|
|
423
435
|
exit/re-entry can notify again. Explicit `--event` globs remain event-only.
|
|
424
436
|
Use `ab wait --for consent --for node-landed --for restack-conflicted --json`
|
|
425
437
|
for one wake; state waits return immediately when already satisfied. `--for
|
|
426
|
-
attention` also includes consent readiness and landing/conflict attention.
|
|
438
|
+
attention` also includes consent readiness, janitor failure attention and landing/conflict attention.
|
|
427
439
|
Resume event backlogs with `--since <cursor>`; keep handling emitted records
|
|
428
440
|
before interpreting terminal completion.
|
|
441
|
+
|
|
442
|
+
### Own-build read deferral attention
|
|
443
|
+
|
|
444
|
+
`phase.deferral-escalated` is ordinary blocked attention: repair the scoped
|
|
445
|
+
CLI/store access described in its question before answering retry or guidance.
|
|
446
|
+
The answer authorizes a fresh session and clears no genuine phase failures.
|
|
447
|
+
Repeated classified read failures park immediately again; they do not consume
|
|
448
|
+
the phase failure allowance. Default watch and attention waits deliver the new
|
|
449
|
+
raise with its own event type.
|
|
450
|
+
|
|
451
|
+
## Forge failure recovery
|
|
452
|
+
|
|
453
|
+
Janitor failures are durable per-build episodes. Eligible failures retry after
|
|
454
|
+
30, 60, 120, 240 seconds, then at the configured cap (300 seconds by default).
|
|
455
|
+
Skipped polls preserve the episode across restart. After
|
|
456
|
+
`policy.janitorFailureAttentionSeconds` (600 by default), `build.janitor-failing`
|
|
457
|
+
notifies default watchers and appears on the build row. A successful attempt
|
|
458
|
+
clears it. `policy.janitorBackoffMaxSeconds` sets the positive integer cap.
|
|
459
|
+
|
|
460
|
+
A classified forge rate limit records repository degradation with `resetAt`.
|
|
461
|
+
Forge work waits during cooldown; passing the deadline permits a recovery
|
|
462
|
+
request, and only success clears degradation. A further limit extends cooldown.
|
|
463
|
+
Native landing application failures keep candidate-specific retry eligibility,
|
|
464
|
+
including automatic decisions without a human command. Retries recheck consent,
|
|
465
|
+
holds, verification and the exact candidate. Uncertain enables remain pending
|
|
466
|
+
until cancellation can be confirmed after cooldown. Publication retries reuse
|
|
467
|
+
cancellation receipts only when the forge confirms the same disabled state for
|
|
468
|
+
the same candidate and publication operation.
|
|
469
|
+
|
|
470
|
+
Tick telemetry counts provider wire requests, including failures. Counts are
|
|
471
|
+
unavailable for uninstrumented adapters. Attribution retains at most ten builds
|
|
472
|
+
ordered by descending count then build name; repository requests are unattributed.
|
|
473
|
+
Repository status names a hotspot only when one build makes at least two requests
|
|
474
|
+
and more than half of attributed requests. Telemetry never controls workflow.
|
|
475
|
+
|
|
476
|
+
## Intentional node staleness
|
|
477
|
+
|
|
478
|
+
An open collecting node may intentionally trail its parent. Parent movement is
|
|
479
|
+
observed without starting replay. Use `ab restack <node>` (or `builds.restack`
|
|
480
|
+
with `{repo, slug}`) to request freshness; paused or blocked nodes retain the
|
|
481
|
+
request until their ordinary safety gates permit it. Completeness, landing,
|
|
482
|
+
queued dependency presence and accepted re-parenting supply automatic demand.
|
|
483
|
+
Nested nodes need independent demand. Inspect the shared parent commit distance
|
|
484
|
+
readout; unknown is unavailable evidence, not zero. Existing transactions finish
|
|
485
|
+
before fresh demand is evaluated. Leaves keep their usual restack points.
|
|
@@ -47,7 +47,9 @@ publish, collapse the node, choose another item, or rewrite the public branch.
|
|
|
47
47
|
Legacy tracked scratch may be inherited unchanged from either input; do not
|
|
48
48
|
author scratch changes as part of resolution.
|
|
49
49
|
5. Run `ab done --notes <notesPath>`. The kernel validates, archives recorded
|
|
50
|
-
evidence, and publishes with an exact expected-head lease.
|
|
50
|
+
evidence, and publishes with an exact expected-head lease. Exact forge
|
|
51
|
+
readback confirms publication; local refs are caches. Candidate ancestry alone
|
|
52
|
+
cannot establish an unconfirmed write or contribution boundary. If the branch
|
|
51
53
|
changed, it prepares another replay of the observed complete contribution
|
|
52
54
|
onto the same frozen base. Read context again, inspect and resolve that replay,
|
|
53
55
|
run checks, update notes, then retry completion. Never push yourself.
|