@defrex/autobuild 1.11.1 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/SPEC.md +601 -203
- package/bin/ab-build-runner.ts +8 -0
- package/docs/answering-blocked-builds.md +32 -2
- package/docs/architecture.md +188 -57
- package/docs/assets/headline-wide.png +0 -0
- package/docs/cli.md +1 -1
- package/docs/configuration.md +120 -23
- package/docs/dispatcher.md +19 -8
- package/docs/integration-overview.md +1 -1
- package/docs/integration-tree.md +33 -18
- package/docs/merge-policy.md +7 -2
- package/docs/operating.md +5 -3
- package/docs/operator-api.md +48 -25
- package/docs/operator-surfaces.md +39 -3
- package/docs/optimization-nodes.md +10 -8
- package/docs/plugin-authoring.md +46 -18
- package/docs/remote-store-protocol.md +51 -12
- package/docs/remote-ticket-protocol.md +85 -38
- package/docs/restacking.md +48 -3
- package/docs/setup.md +2 -1
- package/docs/ticket-migration.md +2 -2
- package/docs/ticket-sources.md +23 -8
- package/docs/tickets.md +4 -4
- package/docs/troubleshooting.md +17 -2
- package/docs/verification.md +3 -1
- package/package.json +3 -3
- package/packages/core/src/cli/ambient-errors.ts +17 -0
- package/packages/core/src/cli/bounded-io.ts +174 -0
- package/packages/core/src/cli/build-control.ts +72 -6
- package/packages/core/src/cli/dashboard/actions.ts +4 -0
- package/packages/core/src/cli/dashboard/integration-row.ts +43 -19
- package/packages/core/src/cli/dashboard/model.ts +93 -29
- package/packages/core/src/cli/dashboard/poll.ts +231 -34
- package/packages/core/src/cli/dashboard/queue.ts +21 -10
- package/packages/core/src/cli/dashboard/render.ts +14 -37
- package/packages/core/src/cli/dashboard/row-text.ts +26 -8
- package/packages/core/src/cli/dashboard/tone-ansi.ts +39 -0
- package/packages/core/src/cli/dashboard/vocabulary.ts +165 -20
- package/packages/core/src/cli/dispatch-frontend.ts +2 -1
- package/packages/core/src/cli/dispatch-handoff.ts +41 -10
- package/packages/core/src/cli/dispatch-launch-contract.ts +5 -0
- package/packages/core/src/cli/dispatch-launcher-cadence.ts +80 -0
- package/packages/core/src/cli/dispatch-launcher.ts +9 -10
- package/packages/core/src/cli/dispatch-preflight.ts +12 -3
- package/packages/core/src/cli/dispatch-release-observer.ts +53 -0
- package/packages/core/src/cli/dispatch-runtime-cache.ts +204 -82
- package/packages/core/src/cli/dispatch-runtime-dependencies.ts +250 -43
- package/packages/core/src/cli/dispatch-tickets.ts +33 -12
- package/packages/core/src/cli/dispatch-upgrade-install.ts +36 -16
- package/packages/core/src/cli/dispatch-upgrade-source.ts +8 -2
- package/packages/core/src/cli/dispatch-yield-observer.ts +82 -0
- package/packages/core/src/cli/dispatch.ts +595 -149
- package/packages/core/src/cli/env.ts +2 -15
- package/packages/core/src/cli/help.ts +43 -28
- package/packages/core/src/cli/main.ts +11 -7
- package/packages/core/src/cli/production-store.ts +102 -0
- package/packages/core/src/cli/publication-settlement.ts +4 -0
- package/packages/core/src/cli/remote-poll.ts +22 -5
- package/packages/core/src/cli/repo-state.ts +2 -3
- package/packages/core/src/cli/repository-status.ts +44 -28
- package/packages/core/src/cli/sessionless-store.ts +26 -0
- package/packages/core/src/cli/status.ts +188 -47
- package/packages/core/src/cli/store-opening.ts +26 -57
- package/packages/core/src/cli/store-ref.ts +6 -1
- package/packages/core/src/cli/ticket-start.ts +3 -3
- package/packages/core/src/cli/ticket.ts +12 -11
- package/packages/core/src/cli/wait.ts +8 -28
- package/packages/core/src/cli/watch.ts +113 -50
- package/packages/core/src/config/reference-metadata.ts +7 -1
- package/packages/core/src/config/reference.ts +5 -2
- package/packages/core/src/config/schema.ts +51 -16
- package/packages/core/src/distribution-packaging.ts +156 -18
- package/packages/core/src/events/catalog-identity.ts +28 -0
- package/packages/core/src/events/catalog.ts +3 -9
- package/packages/core/src/events/compatibility.ts +2 -30
- package/packages/core/src/events/payloads.ts +85 -14
- package/packages/core/src/events/policy.ts +3 -0
- package/packages/core/src/events/repository.ts +15 -4
- package/packages/core/src/events/sessions.ts +1 -1
- package/packages/core/src/events/validation-error.ts +12 -0
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +36 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/0a10010ee5cf2e47.json +577 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/227701361be6d1e0.json +490 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/3064e337cc75f8d6.json +310 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/76e5043bae7a80ab.json +86 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/87a917802870bbed.json +87 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9d85616e5b9e24c1.json +500 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a1e90a969d32a367.json +307 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/c7c94fbe7f63cf07.json +84 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/da3bc91c49211eab.json +310 -0
- package/packages/core/src/kernel/auto-merge-default.ts +2 -1
- package/packages/core/src/kernel/capacity-build.ts +21 -0
- package/packages/core/src/kernel/clean-restack-policy.ts +40 -0
- package/packages/core/src/kernel/discard-in-flight.ts +13 -0
- package/packages/core/src/kernel/dispatch-capacity.ts +578 -235
- package/packages/core/src/kernel/done-escalations.ts +269 -0
- package/packages/core/src/kernel/engine.ts +30 -17
- package/packages/core/src/kernel/integration-landing.ts +24 -4
- package/packages/core/src/kernel/integration-stack.ts +39 -0
- package/packages/core/src/kernel/janitor-failure.ts +20 -1
- package/packages/core/src/kernel/log-index-value.ts +3 -0
- package/packages/core/src/kernel/log-index.ts +41 -2
- package/packages/core/src/kernel/measurement.ts +24 -0
- package/packages/core/src/kernel/open-pr-backpressure.ts +3 -3
- package/packages/core/src/kernel/read-facts.ts +8 -370
- package/packages/core/src/kernel/reducer-registry.ts +43 -125
- package/packages/core/src/kernel/reducer-revisions.ts +18 -0
- package/packages/core/src/kernel/reducer-value-entry.ts +98 -0
- package/packages/core/src/kernel/reducer-value-index.ts +75 -0
- package/packages/core/src/kernel/reducer.ts +84 -16
- package/packages/core/src/kernel/reopen-state.ts +10 -0
- package/packages/core/src/kernel/repository-attention.ts +14 -5
- package/packages/core/src/kernel/repository-read-facts.ts +375 -0
- package/packages/core/src/kernel/ticket-starts.ts +15 -4
- package/packages/core/src/kernel/verify-stage-state.ts +145 -3
- package/packages/core/src/kernel/verify-stages.ts +46 -7
- package/packages/core/src/operator/attention.ts +28 -3
- package/packages/core/src/operator/done-escalations.ts +38 -0
- package/packages/core/src/operator/presentation.ts +14 -1
- package/packages/core/src/operator/protocol.ts +8 -5
- package/packages/core/src/operator/query.ts +72 -57
- package/packages/core/src/operator/registry.ts +19 -15
- package/packages/core/src/operator/ticket-start.ts +8 -7
- package/packages/core/src/operator/tickets.ts +28 -9
- package/packages/core/src/plugin-sdk/index.ts +10 -0
- package/packages/core/src/plugins/manifest.ts +14 -1
- package/packages/core/src/ports/forge/create.ts +8 -0
- package/packages/core/src/ports/forge/github-transport.ts +5 -1
- package/packages/core/src/ports/forge/github.ts +3 -0
- package/packages/core/src/ports/tickets/contract.ts +147 -76
- package/packages/core/src/ports/tickets/create.ts +47 -7
- package/packages/core/src/ports/tickets/fake.ts +8 -4
- package/packages/core/src/ports/tickets/file-codec.ts +4 -3
- package/packages/core/src/ports/tickets/file.ts +7 -3
- package/packages/core/src/ports/tickets/github.ts +1 -0
- package/packages/core/src/ports/tickets/grants.ts +11 -3
- package/packages/core/src/ports/tickets/hosted-index.ts +5 -0
- package/packages/core/src/ports/tickets/linear.ts +28 -9
- package/packages/core/src/ports/tickets/migration.ts +4 -4
- package/packages/core/src/ports/tickets/operations.ts +4 -2
- package/packages/core/src/ports/tickets/priority-labels.ts +213 -0
- package/packages/core/src/ports/tickets/priority.ts +127 -21
- package/packages/core/src/ports/tickets/remote-protocol.ts +10 -0
- package/packages/core/src/ports/tickets/remote.ts +104 -11
- package/packages/core/src/ports/tickets/revision.ts +5 -3
- package/packages/core/src/ports/tickets/search.ts +9 -0
- package/packages/core/src/ports/tickets/tree.ts +8 -6
- package/packages/core/src/ports/types.ts +30 -15
- package/packages/core/src/ports/workspace/build-execution.ts +4 -0
- package/packages/core/src/ports/workspace/builtin-capabilities.ts +4 -0
- package/packages/core/src/ports/workspace/create.ts +16 -3
- package/packages/core/src/ports/workspace/execution-exit-marker.ts +41 -0
- package/packages/core/src/ports/workspace/fake.ts +15 -3
- package/packages/core/src/ports/workspace/recovery-step.ts +101 -0
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +510 -145
- package/packages/core/src/processes/build-execution-state.ts +4 -0
- package/packages/core/src/processes/build-runner.ts +14 -1
- package/packages/core/src/processes/dispatcher.ts +777 -288
- package/packages/core/src/processes/execution-no-progress.ts +1 -0
- package/packages/core/src/processes/execution-settlement.ts +1 -0
- package/packages/core/src/processes/harvest-runner.ts +12 -7
- package/packages/core/src/processes/infrastructure-failure-budget.ts +7 -2
- package/packages/core/src/processes/invocation-budget.ts +176 -0
- package/packages/core/src/processes/publication-loss.ts +38 -3
- package/packages/core/src/processes/workspace-preservation.ts +86 -15
- package/packages/core/src/store/contract.ts +81 -3
- package/packages/core/src/store/event-reads.ts +30 -1
- package/packages/core/src/store/local/capabilities.ts +115 -0
- package/packages/core/src/store/local/store.ts +86 -56
- package/packages/core/src/store/reduced-reads.ts +32 -1
- package/packages/core/src/store/reducer-value-read.ts +235 -0
- package/packages/core/src/store/reducer-value-shapes.json +6722 -6475
- package/packages/core/src/store/reducer-value-validation.ts +181 -33
- package/packages/core/src/store/reducer-values.ts +36 -204
- package/packages/core/src/store/remote/client.ts +169 -29
- package/packages/core/src/store/remote/compatibility.ts +113 -56
- package/packages/core/src/store/remote/credentials.ts +4 -1
- package/packages/core/src/store/remote/protocol.ts +3 -0
- package/packages/core/src/store/remote/released-clients.json +22 -0
- package/packages/core/src/store/remote/released-reducer-values/1.12.0.json +35806 -0
- package/packages/core/src/store/remote/released-reducer-values/1.13.0.json +35966 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +20 -16
- package/packages/core/src/store/remote/released-value-policy.ts +144 -0
- package/packages/core/src/store/remote/retry.ts +406 -0
- package/packages/core/src/store/rollup-lease.ts +41 -0
- package/packages/core/src/store/rollups.ts +7 -38
- package/packages/core/src/store/snapshots.ts +1 -1
- package/packages/core/src/testing/dispatch-read-budget.ts +409 -14
- package/packages/core/src/testing/import-graph.ts +78 -0
- package/packages/core/src/testing/index.ts +2 -0
- package/packages/core/src/testing/invocation-budget.ts +42 -0
- package/packages/core/src/testing/reduced-read-budget.ts +602 -40
- package/packages/core/src/testing/released-value-coverage.ts +423 -0
- package/packages/core/src/testing/slot-agreement.ts +52 -0
- package/packages/core/src/web/assets/app.js +5 -5
- package/packages/core/src/web/overview-source.ts +19 -6
- package/skills/guide/SKILL.md +245 -103
- package/skills/guide/references/integration-tree.md +33 -18
- package/skills/guide/references/merge-policy.md +7 -2
- package/skills/guide/references/operator-api.md +48 -25
- package/skills/guide/references/optimization-nodes.md +10 -8
- package/skills/guide/references/plugin-authoring.md +46 -18
- package/skills/guide/references/remote-store-protocol.md +51 -12
- package/skills/guide/references/remote-ticket-protocol.md +85 -38
- package/skills/guide/references/restacking.md +48 -3
- package/skills/guide/references/setup.md +2 -1
- package/skills/guide/references/ticket-migration.md +2 -2
- package/skills/operate/SKILL.md +114 -65
- package/skills/plan/SKILL.md +4 -3
- package/skills/spec/SKILL.md +9 -5
- package/skills/tickets/SKILL.md +25 -17
- package/templates/hosted-service/package.json +2 -2
|
@@ -184,7 +184,7 @@ The operation names and `input` values are:
|
|
|
184
184
|
| `list-ready` | `{labels?: string[], state?: string}` | `TicketListing` |
|
|
185
185
|
| `list-targeting` | `{nodeId: string}` | `TicketListing` of every state |
|
|
186
186
|
| `list-page` | `{criteria: {labels?, state?}, page: {limit, offset?, order?}}` | `TicketPageListing` (`{tickets, diagnostics, total}`) |
|
|
187
|
-
| `search` | `{text, state?, labels?, limit, cursor?}` | `{tickets: {id, title, state?, labels, kind, target?}[], cursor?, diagnostics}` |
|
|
187
|
+
| `search` | `{text, state?, labels?, limit, cursor?}` | `{tickets: {id, title, state?, labels, kind, target?, priority?}[], cursor?, diagnostics}` |
|
|
188
188
|
| `get` | `{id}` | `Ticket \| null` |
|
|
189
189
|
| `claim` | `{id}` | `{claimed: boolean}` |
|
|
190
190
|
| `comment` | `{id, body}` | `{ok: true}` |
|
|
@@ -225,11 +225,35 @@ remain unchanged. These rules apply only to hosted tickets, not file or Linear i
|
|
|
225
225
|
## Errors and conformance
|
|
226
226
|
|
|
227
227
|
Errors are JSON `{ "error": string, "kind": "validation" | "not-found" |
|
|
228
|
-
"auth" | "conflict" | "internal" }`. Authentication runs before
|
|
229
|
-
or backend construction. Responses never include exception causes,
|
|
230
|
-
environment values, or credentials. Client 401/403 responses become
|
|
228
|
+
"auth" | "conflict" | "internal" | "unavailable" }`. Authentication runs before
|
|
229
|
+
body parsing or backend construction. Responses never include exception causes,
|
|
230
|
+
stacks, environment values, or credentials. Client 401/403 responses become
|
|
231
231
|
`AuthError`; other backend messages remain actionable.
|
|
232
232
|
|
|
233
|
+
A hosted service answers `503` with kind `unavailable` and a `Retry-After`
|
|
234
|
+
header in seconds when its database is saturated (no free connection slots, or
|
|
235
|
+
a pool acquisition timed out) or when the service is shutting down. The
|
|
236
|
+
response carries no backend detail.
|
|
237
|
+
|
|
238
|
+
The client retries transient failures exactly as the store client does: a
|
|
239
|
+
`429`, `502`, `503`, `504`, a `500` with `kind: "internal"` or no protocol body,
|
|
240
|
+
or a transport failure, at most three attempts within one 10 s bound.
|
|
241
|
+
|
|
242
|
+
- **Retried on any transient failure:** `policy`, `list-ready`,
|
|
243
|
+
`list-targeting`, `list-page`, `search`, `states`, `state-counts`, `get`,
|
|
244
|
+
`dependency-states`, `transition`, `update`, `add-blocker`, `remove-blocker`,
|
|
245
|
+
`mutate-if-revision`, and `create` with an idempotency key. Each is a read or
|
|
246
|
+
a set-or-replace write; a repeated revision check fails as a typed conflict.
|
|
247
|
+
- **Never retried after a response:** `claim`, `comment`, `add-state` and an
|
|
248
|
+
unkeyed `create`. They retry only a `429` or a transport failure that
|
|
249
|
+
preceded delivery.
|
|
250
|
+
- **Exhaustion** surfaces as `RemoteUnavailableError` with the service's
|
|
251
|
+
message; `AuthError` and the typed protocol errors keep precedence.
|
|
252
|
+
|
|
253
|
+
A dispatcher publishes `policy` and settles `list-targeting` at its first tick
|
|
254
|
+
boundary rather than while it starts, so a transient failure there fails only
|
|
255
|
+
that tick.
|
|
256
|
+
|
|
233
257
|
The shared `TicketSource` contract is normative for protocol implementations.
|
|
234
258
|
Project partitions must be isolated. The direct Linear client retains its
|
|
235
259
|
separate opt-in GraphQL contract; this protocol does not proxy Linear.
|
|
@@ -307,7 +331,7 @@ snapshot of fields, blockers and revision.
|
|
|
307
331
|
`POST /tickets/mutate-if-revision` accepts the usual authenticated context and
|
|
308
332
|
`input: { id, expectedRevision, mutation }`. Mutation is one of
|
|
309
333
|
`{ kind: "update", patch: { title?, body?, labels?, kind?, target?,
|
|
310
|
-
priority?: "urgent" | "normal" } }`,
|
|
334
|
+
priority?: "urgent" | "high" | "normal" | "low" } }`,
|
|
311
335
|
`{ kind: "transition", state }`, or
|
|
312
336
|
`{ kind: "blockers", operation: "block" | "unblock", ids: string[] }`.
|
|
313
337
|
Unknown keys and empty patches are refused. Success returns `{ ok: true }`.
|
|
@@ -387,8 +411,12 @@ response without the header, or a `404` or `400` refusal of `list-targeting`
|
|
|
387
411
|
without it, means the service predates the operation. Against such a service
|
|
388
412
|
the client never declares it, and integration observation uses the exhaustive
|
|
389
413
|
listing by that explicit decision. An inconclusive probe (a network failure or
|
|
390
|
-
an unmarked gateway error) fails
|
|
391
|
-
|
|
414
|
+
an unmarked gateway error) fails preparation. An ordinary consumer prepares
|
|
415
|
+
while constructing the source, so construction fails. A dispatcher prepares at
|
|
416
|
+
its first tick boundary: exhausted transient unavailability fails that tick and
|
|
417
|
+
preparation runs again at the next one, while any other failure stops the run.
|
|
418
|
+
A targeted read the service later refuses fails closed, with no fallback within
|
|
419
|
+
the pass.
|
|
392
420
|
|
|
393
421
|
## Issue links
|
|
394
422
|
|
|
@@ -425,40 +453,57 @@ not establish continuity for in-flight builds; see the migration procedure.
|
|
|
425
453
|
|
|
426
454
|
## Priority
|
|
427
455
|
|
|
428
|
-
Hosted tickets store `priority`,
|
|
429
|
-
update and guarded update accept it as an optional field. A create that
|
|
430
|
-
files a normal ticket, and an update that omits it never changes it.
|
|
431
|
-
existed before the field read as normal. A priority change
|
|
432
|
-
revision, and rewriting the same value is a no-op.
|
|
433
|
-
|
|
434
|
-
Ticket responses
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
`
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
`
|
|
449
|
-
|
|
456
|
+
Hosted tickets store `priority`: `"urgent"`, `"high"`, `"normal"` or `"low"`.
|
|
457
|
+
Create, update and guarded update accept it as an optional field. A create that
|
|
458
|
+
omits it files a normal ticket, and an update that omits it never changes it.
|
|
459
|
+
Tickets that existed before the field read as normal. A priority change
|
|
460
|
+
increments the revision, and rewriting the same value is a no-op.
|
|
461
|
+
|
|
462
|
+
Ticket responses project priority by the capability headers the client sends,
|
|
463
|
+
independently of the other capabilities and of the client version:
|
|
464
|
+
|
|
465
|
+
| Client sends | Response `priority` |
|
|
466
|
+
|---|---|
|
|
467
|
+
| `x-autobuild-ticket-priority-levels: 1` | the stored level, on every ticket, `normal` included |
|
|
468
|
+
| only `x-autobuild-ticket-priority: 1` | `urgent` stays `urgent`; `high`, `low` and `normal` read as `normal` |
|
|
469
|
+
| neither | absent, for historical strict decoders, whose writes never name it and so never clear it |
|
|
470
|
+
|
|
471
|
+
Search hits carry an optional `priority`, projected the same way and stripped
|
|
472
|
+
for clients without the levels header. Every `/tickets/*` response, including
|
|
473
|
+
errors, carries both `x-autobuild-ticket-priority: 1` and
|
|
474
|
+
`x-autobuild-ticket-priority-levels: 1`.
|
|
475
|
+
|
|
476
|
+
`list-ready` returns urgent tickets first, then high, then normal, then low,
|
|
477
|
+
each level in filing order, for every client. Ordering happens within the
|
|
478
|
+
existing listing; it adds no per-ticket reads. `list-ready` stays exhaustive;
|
|
479
|
+
paged reads use `list-page`.
|
|
480
|
+
|
|
481
|
+
Refusals, all before anything is written:
|
|
482
|
+
|
|
483
|
+
- A service whose backing source cannot store the level answers
|
|
484
|
+
`409 { "kind": "conflict", "code": "priority-unsupported" }`.
|
|
485
|
+
- A service predating priority refuses the unknown field with a `400`
|
|
486
|
+
validation error and no capability header.
|
|
487
|
+
- A service that stores only `urgent` and `normal` refuses `high` or `low`
|
|
488
|
+
with a `400` validation error and no `x-autobuild-ticket-priority-levels`
|
|
489
|
+
header. The client sends the request; the older service rejects it before
|
|
490
|
+
persisting anything.
|
|
491
|
+
|
|
492
|
+
Clients report each as `TicketPriorityUnsupported` naming the `hosted` source.
|
|
493
|
+
Current clients omit `normal` on create, so a plain create still works against
|
|
494
|
+
an older service.
|
|
450
495
|
|
|
451
496
|
## Paged listing
|
|
452
497
|
|
|
453
498
|
`list-page` answers one window of the tickets matching `criteria`, from the
|
|
454
499
|
backing source's native paging. `limit` and `offset` are nonnegative integers;
|
|
455
|
-
`offset` defaults to 0. `order` is `oldest` (the default), which is
|
|
456
|
-
order: urgent
|
|
457
|
-
first, regardless of
|
|
500
|
+
`offset` defaults to 0. `order` is `oldest` (the default), which is priority
|
|
501
|
+
order: urgent, then high, then normal, then low, each in filing order. `newest`
|
|
502
|
+
is newest filed first, regardless of priority. Offset and limit apply after ordering, so
|
|
458
503
|
consecutive windows traverse the listing with no omissions or duplicates.
|
|
459
504
|
`total` counts every match before slicing, also for a zero limit or an offset
|
|
460
505
|
past the end. The service returns the page in the order the source answered;
|
|
461
|
-
it does not re-sort it
|
|
506
|
+
it does not re-sort it by priority. Cost follows the window, not the project's
|
|
462
507
|
ticket count.
|
|
463
508
|
|
|
464
509
|
A backing source without native paging answers `409` with
|
|
@@ -469,8 +514,9 @@ ticket grants and harvest delegations receive `403`.
|
|
|
469
514
|
Every `/tickets/*` response, including errors, carries
|
|
470
515
|
`x-autobuild-ticket-paging: 1`. A current client declares `listPage` only after
|
|
471
516
|
a response from the service has carried that header. It settles the decision on
|
|
472
|
-
the response that already finishes
|
|
473
|
-
targeted-listing probe), with no extra probe
|
|
517
|
+
the response that already finishes preparation (the policy sync or the
|
|
518
|
+
targeted-listing probe), with no extra probe, whether preparation runs during
|
|
519
|
+
ordinary source construction or at a dispatcher's first tick. An ok response without the header
|
|
474
520
|
means the service predates the operation. Against such a service the client
|
|
475
521
|
never declares `listPage`, and paged operator listings read `list-ready` and
|
|
476
522
|
slice it, as for any source without native paging. A `list-page` request that the
|
|
@@ -498,8 +544,9 @@ for duplicate checks before filing:
|
|
|
498
544
|
stable across pages: the PostgreSQL backend answers newest ticket number
|
|
499
545
|
first. `cursor` is opaque; pass the previous page's `cursor` with the same
|
|
500
546
|
text and filters. It is absent on the last page.
|
|
501
|
-
- **Hits.** `id`, `title`, `state`, `labels`, `kind` and `
|
|
502
|
-
search read itself
|
|
547
|
+
- **Hits.** `id`, `title`, `state`, `labels`, `kind`, `target` and `priority`
|
|
548
|
+
come from the search read itself; `priority` follows the
|
|
549
|
+
[priority projection](#priority). Bodies are never returned, and there is no read per hit.
|
|
503
550
|
- **Refusals.** A backing source without search answers `409` with
|
|
504
551
|
`code: "search-unsupported"`. A malformed or foreign cursor answers `400` with
|
|
505
552
|
`code: "search-cursor-invalid"` and the `cursor`. Clients report them as
|
|
@@ -513,7 +560,7 @@ for duplicate checks before filing:
|
|
|
513
560
|
Every `/tickets/*` response, including errors, carries
|
|
514
561
|
`x-autobuild-ticket-search: 1`. A current client declares `search` only after a
|
|
515
562
|
response from the service has carried that header, settled on the response that
|
|
516
|
-
already finishes
|
|
563
|
+
already finishes preparation, with no extra probe. Against a service
|
|
517
564
|
predating the operation (an ok response without the header) the client never
|
|
518
565
|
declares `search`, so callers refuse with `TicketSearchUnsupported` before any
|
|
519
566
|
request and nothing is listed. A `search` request that the service later refuses
|
|
@@ -89,7 +89,9 @@ waiting leaves restack when the target moves. Node-target finalize contributions
|
|
|
89
89
|
are canonicalized before guarded merge even when the target SHA is unchanged.
|
|
90
90
|
Clean replay starts no agent. A clean awaiting-merge leaf rewrite preserves completed
|
|
91
91
|
verification when build-owned config is unchanged, even when replay replaces
|
|
92
|
-
the pin commit's ancestry
|
|
92
|
+
the pin commit's ancestry, unless a
|
|
93
|
+
[clean-restack policy](#clean-restack-re-verification) opts steps in for a
|
|
94
|
+
root-targeting leaf. Reports retain their actual cycle base/head.
|
|
93
95
|
Changed config still starts a fresh verification cycle while waiting. Before
|
|
94
96
|
running further verification steps, cycles also require known pin ancestry;
|
|
95
97
|
a future cycle captures fresh config from its checkout. Configuration
|
|
@@ -195,7 +197,9 @@ displaced heads and the temporary change, best effort, per commit:
|
|
|
195
197
|
before the guarded update landed abandons the reservation, and the next node
|
|
196
198
|
transaction reserves again from the published branches.
|
|
197
199
|
- Workspace preservation is strict: archive ref, else a `history-objects-<sha>`
|
|
198
|
-
store copy over the preservation base, else release is refused.
|
|
200
|
+
store copy over the preservation base, else release is refused. Abort cleanup
|
|
201
|
+
is the one exception: when preservation fails it records
|
|
202
|
+
`workspace.commits-lost` and releases. Store-kept
|
|
199
203
|
heads go on decisive `workspace.commits-retained`, and replacement
|
|
200
204
|
provisioning restores them on any host.
|
|
201
205
|
|
|
@@ -230,6 +234,45 @@ interpretation and supply a promoted contribution base for later replay.
|
|
|
230
234
|
|
|
231
235
|
Replay retention (`replay-objects-<sha>`) and leaf history retention (`history-objects-<sha>`) store thin Git packs in bounded binary chunks, with a fixed-size completion manifest written only after every chunk is acknowledged. Digest-keyed chunks make interrupted writes retryable; incomplete uploads are never restored. Recovery validates all chunk sizes and the pack digest before installation, and requires the base objects (restoring node prefixes in order). Existing single-artifact base64 packs remain readable. Retained replay and history artifacts are read only when the requested commit is missing locally, never by idle polling.
|
|
232
236
|
|
|
237
|
+
## Clean-restack re-verification
|
|
238
|
+
|
|
239
|
+
A cleanly restacked waiting leaf lands without re-running verification by
|
|
240
|
+
default. To catch semantic drift a clean replay cannot see, such as a new lint
|
|
241
|
+
rule, a tightened type or a changed shared export on the target, opt steps in:
|
|
242
|
+
|
|
243
|
+
```toml
|
|
244
|
+
[verify.lint]
|
|
245
|
+
kind = "check"
|
|
246
|
+
command = "lint"
|
|
247
|
+
afterCleanRestack = true
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
| Setting | Default | Effect |
|
|
251
|
+
|---|---|---|
|
|
252
|
+
| `[verify].afterCleanRestack` | `false` (omitted) | Repository default for every step. |
|
|
253
|
+
| `[verify.<step>].afterCleanRestack` | inherited | Overrides the default in either direction. |
|
|
254
|
+
|
|
255
|
+
- **Scope.** Only a root-targeting leaf's clean awaiting-merge restack,
|
|
256
|
+
including a resolved `[[generated]]` regeneration. A leaf targeting an
|
|
257
|
+
integration node relies on the node's own verification before root.
|
|
258
|
+
- **Frozen policy.** When at least one step is enabled, the runner records the
|
|
259
|
+
resolved ordered policy as `cleanRestackPolicy` on
|
|
260
|
+
`restack.publish-intended`, `restack.rewritten` and `restack.completed`.
|
|
261
|
+
Recovery after a crash keeps it, even if configuration changed.
|
|
262
|
+
- **Fresh cycle.** That completion starts a verify cycle at a new attempt on
|
|
263
|
+
the restacked base and head. Opted-in steps run under the usual plan and
|
|
264
|
+
`paths` rules; the others record `skipped` with
|
|
265
|
+
`skipCause = "clean-restack-policy"`. No further restack runs.
|
|
266
|
+
- **Landing.** The leaf does not land until the cycle is satisfied. A failure
|
|
267
|
+
routes to implement, code review and ordinary verification, and counts
|
|
268
|
+
toward `maxVerifyAttempts`. On success, landing consent survives as for any
|
|
269
|
+
clean restack.
|
|
270
|
+
- **Cost.** Every target move under a waiting leaf re-runs the opted-in steps.
|
|
271
|
+
Prefer cheap deterministic checks; an agent step re-runs only when opted in.
|
|
272
|
+
|
|
273
|
+
Omitted or all-false settings record nothing, so existing builds behave
|
|
274
|
+
exactly as before.
|
|
275
|
+
|
|
233
276
|
## Node contributions and recovery
|
|
234
277
|
|
|
235
278
|
Node replay enumerates oldest-first first-parent contributions above the last
|
|
@@ -271,7 +314,9 @@ committed unchanged.
|
|
|
271
314
|
- **Leaf restack.** `restack.regenerated` records the files, the commands and
|
|
272
315
|
the outcome. A `resolved` replay's head is retained before the fact is
|
|
273
316
|
written, and then publishes like a clean restack, so verification follows the
|
|
274
|
-
clean-restack rules
|
|
317
|
+
clean-restack rules, including any
|
|
318
|
+
[clean-restack policy](#clean-restack-re-verification) while waiting to merge;
|
|
319
|
+
the configured verify steps still check the result.
|
|
275
320
|
The regeneration counts as conflict resolution for merge consent: consent
|
|
276
321
|
given under a `paths` or `within` rule is revoked, with
|
|
277
322
|
`landing.consent-revoked`, when the regenerated files match it, even though
|
|
@@ -504,7 +504,8 @@ Archive refs are a recommendation (WARN or UNKNOWN, never FAIL):
|
|
|
504
504
|
build and proceed.
|
|
505
505
|
- **Workspace preservation** keeps unpublished workspace commits as BuildStore
|
|
506
506
|
copies where refused, and refuses to release the workspace only when the store
|
|
507
|
-
copy fails too.
|
|
507
|
+
copy fails too. Abort cleanup is the exception: it records
|
|
508
|
+
`workspace.commits-lost` and releases.
|
|
508
509
|
|
|
509
510
|
Require **linear history** on protected root and node target branches to prevent
|
|
510
511
|
merge commits from GitHub's update-branch action. On the configured root, enable
|
|
@@ -93,7 +93,7 @@ timestamps remain in the export; imported comments use the target's metadata.
|
|
|
93
93
|
|
|
94
94
|
Portable records use TOML frontmatter between `+++` fences and an unchanged
|
|
95
95
|
Markdown body. Alongside `id`, `title`, `labels`, `blockedBy` and `idempotencyKey`,
|
|
96
|
-
optional `issueLinks` contain `issue` and `intent` (`closes` or `refs`), optional `priority` is `"urgent"` (absent means normal), optional `comments` contain `body`, `createdAt` and optional `author`. Optional
|
|
96
|
+
optional `issueLinks` contain `issue` and `intent` (`closes` or `refs`), optional `priority` is `"urgent"`, `"high"` or `"low"` (absent means normal), optional `comments` contain `body`, `createdAt` and optional `author`. Optional
|
|
97
97
|
`attachments` contain `kind`, `name`, `layout` (`file` or `tree`) and `entries`:
|
|
98
98
|
`{ type = "dir", path = "empty" }` or
|
|
99
99
|
`{ type = "file", path = "image.png", base64 = "…" }`. Common asset limits and
|
|
@@ -109,7 +109,7 @@ no continuous sync, assignee migration, state history or build-history migration
|
|
|
109
109
|
|
|
110
110
|
Integration-tree `kind` and `target` are preserved in portable frontmatter.
|
|
111
111
|
Import validates the complete target graph before changing the destination and
|
|
112
|
-
refuses a destination that cannot preserve metadata. Issue links and
|
|
112
|
+
refuses a destination that cannot preserve metadata. Issue links and
|
|
113
113
|
priority are preserved the same way, and a destination that cannot store them is refused before any write. It creates or adopts every
|
|
114
114
|
identity, establishes node kinds, then applies targets using the durable id map,
|
|
115
115
|
just like blockers. Input order does not matter. Resuming also restores edges on
|