@defrex/autobuild 1.7.0 → 1.8.1
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 +316 -47
- package/docs/answering-blocked-builds.md +44 -3
- package/docs/architecture.md +62 -7
- package/docs/cli.md +1 -0
- package/docs/configuration-overview.md +1 -1
- package/docs/configuration.md +49 -9
- package/docs/dispatcher.md +1 -1
- package/docs/integration-overview.md +2 -2
- package/docs/integration-tree.md +7 -4
- package/docs/merge-policy.md +78 -6
- package/docs/migration-1.0.md +4 -2
- package/docs/operating.md +3 -2
- package/docs/operator-api.md +26 -5
- package/docs/operator-surfaces.md +10 -0
- package/docs/plugin-authoring.md +1 -1
- package/docs/remote-store-protocol.md +9 -1
- package/docs/restacking.md +23 -4
- package/docs/ticket-dependencies.md +9 -4
- package/docs/tickets.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/package.json +3 -3
- package/packages/core/src/cli/attention.ts +1 -0
- package/packages/core/src/cli/build-control.ts +65 -7
- package/packages/core/src/cli/context.ts +55 -14
- package/packages/core/src/cli/dashboard/actions.ts +13 -4
- package/packages/core/src/cli/dashboard/landing-display.ts +32 -8
- package/packages/core/src/cli/dashboard/model.ts +61 -8
- package/packages/core/src/cli/dashboard/render.ts +28 -3
- package/packages/core/src/cli/dashboard/tree.ts +9 -1
- package/packages/core/src/cli/help.ts +69 -7
- package/packages/core/src/cli/landings.ts +1 -1
- package/packages/core/src/cli/main.ts +60 -9
- package/packages/core/src/cli/publication-settlement.ts +10 -0
- package/packages/core/src/cli/status.ts +178 -12
- package/packages/core/src/cli/terminals.ts +197 -4
- package/packages/core/src/cli/wait.ts +1 -0
- package/packages/core/src/cli/watch.ts +71 -0
- package/packages/core/src/config/landing.ts +12 -0
- package/packages/core/src/config/path-selectors.ts +68 -0
- package/packages/core/src/config/schema.ts +40 -58
- package/packages/core/src/events/catalog.ts +17 -3
- package/packages/core/src/events/compatibility.ts +2 -1
- package/packages/core/src/events/head-paths-limits.ts +25 -0
- package/packages/core/src/events/payloads.ts +315 -20
- package/packages/core/src/events/policy.ts +21 -0
- package/packages/core/src/events/repository.ts +30 -1
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +247 -6
- package/packages/core/src/kernel/consent-revocation.ts +72 -0
- package/packages/core/src/kernel/dispatch-capacity.ts +19 -8
- package/packages/core/src/kernel/engine.ts +48 -8
- package/packages/core/src/kernel/head-paths-state.ts +63 -0
- package/packages/core/src/kernel/head-paths.ts +401 -0
- package/packages/core/src/kernel/landing-policy-identity.ts +20 -0
- package/packages/core/src/kernel/landing-policy.ts +55 -2
- package/packages/core/src/kernel/landing-readiness.ts +104 -9
- package/packages/core/src/kernel/landing-state.ts +44 -4
- package/packages/core/src/kernel/leaf-restack-base.ts +34 -0
- package/packages/core/src/kernel/leaf-restack-state.ts +22 -2
- package/packages/core/src/kernel/log-index.ts +27 -1
- package/packages/core/src/kernel/node-polling.ts +13 -3
- package/packages/core/src/kernel/node-restack-state.ts +8 -1
- package/packages/core/src/kernel/node-restack-transaction.ts +45 -0
- package/packages/core/src/kernel/read-deferrals.ts +3 -1
- package/packages/core/src/kernel/read-facts.ts +28 -1
- package/packages/core/src/kernel/reducer-registry.ts +22 -1
- package/packages/core/src/kernel/reducer.ts +316 -17
- package/packages/core/src/kernel/target-observation.ts +2 -5
- package/packages/core/src/kernel/terminal-guard.ts +52 -3
- package/packages/core/src/kernel/ticket-handbacks.ts +40 -0
- package/packages/core/src/kernel/ticket-preparation.ts +12 -1
- package/packages/core/src/kernel/ticket-wait.ts +345 -0
- package/packages/core/src/kernel/verify-applicability.ts +9 -19
- package/packages/core/src/ontology.ts +1 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/index.ts +3 -0
- package/packages/core/src/operator/protocol.ts +15 -2
- package/packages/core/src/operator/registry.ts +97 -5
- package/packages/core/src/operator/repository-events.ts +67 -0
- package/packages/core/src/ports/tickets/fake.ts +5 -0
- package/packages/core/src/ports/types.ts +3 -2
- package/packages/core/src/processes/build-execution-state.ts +30 -1
- package/packages/core/src/processes/build-runner.ts +150 -18
- package/packages/core/src/processes/dispatcher.ts +739 -97
- package/packages/core/src/processes/execution-no-progress.ts +22 -2
- package/packages/core/src/processes/phase-failure-budget.ts +1 -0
- package/packages/core/src/processes/publication-state.ts +6 -1
- package/packages/core/src/store/digest.ts +41 -2
- package/packages/core/src/store/reduced-reads.ts +4 -1
- package/packages/core/src/store/reducer-value-shapes.json +10108 -8432
- package/packages/core/src/store/remote/client.ts +28 -2
- package/packages/core/src/store/remote/protocol.ts +11 -1
- package/packages/core/src/store/remote/released-clients.json +22 -0
- package/packages/core/src/store/remote/released-reducer-values/1.8.0.json +29043 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +2 -0
- package/packages/core/src/store/repo-state-events.ts +2 -0
- package/packages/core/src/store/types.ts +16 -0
- package/packages/core/src/testing/reduced-read-budget.ts +347 -0
- package/skills/code-review/SKILL.md +8 -0
- package/skills/finalize/SKILL.md +4 -0
- package/skills/guide/SKILL.md +125 -26
- package/skills/guide/references/integration-tree.md +7 -4
- package/skills/guide/references/merge-policy.md +78 -6
- package/skills/guide/references/migration-1.0.md +4 -2
- package/skills/guide/references/operator-api.md +26 -5
- package/skills/guide/references/plugin-authoring.md +1 -1
- package/skills/guide/references/remote-store-protocol.md +9 -1
- package/skills/guide/references/restacking.md +23 -4
- package/skills/guide/references/ticket-dependencies.md +9 -4
- package/skills/implement/SKILL.md +15 -1
- package/skills/operate/SKILL.md +104 -13
- package/skills/plan/SKILL.md +17 -2
- package/skills/plan-review/SKILL.md +8 -0
- package/skills/reconcile/SKILL.md +21 -5
- package/skills/tickets/SKILL.md +5 -4
- package/templates/hosted-service/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ From the repository you want built, install Autobuild as a development dependenc
|
|
|
26
26
|
<!-- release-install:start -->
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
bun add -d --exact @defrex/autobuild@1.
|
|
29
|
+
bun add -d --exact @defrex/autobuild@1.8.1
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- release-install:end -->
|
package/SPEC.md
CHANGED
|
@@ -706,15 +706,18 @@ Leaf branches are collapsed into one build change and restacked onto the frozen
|
|
|
706
706
|
target branch's current head at verify entry, before any verifier or exclusion.
|
|
707
707
|
This is kernel work within the fixed grammar, not another phase. A verify failure
|
|
708
708
|
returns to implementation; its new commits append to the canonical change, and
|
|
709
|
-
the next approved cycle collapses and restacks again.
|
|
710
|
-
|
|
709
|
+
the next approved cycle collapses and restacks again. A build resuming from a
|
|
710
|
+
ticket wait (§11 "Ticket waits") first restacks onto the target's current head
|
|
711
|
+
when the target moved, so the resumed phase sees the merged blockers. While
|
|
712
|
+
waiting to merge after finalize and its post-steps, an observed target move
|
|
713
|
+
also schedules a restack.
|
|
711
714
|
For a node-targeted leaf, published finalize-step commits also schedule one
|
|
712
715
|
waiting restack, even when the target SHA is unchanged, so guarded merge
|
|
713
716
|
preserves one canonical build identity.
|
|
714
717
|
Clean waiting restacks retain existing verification when build-owned config is
|
|
715
718
|
unchanged (§16.1), including when replay replaces the pin commit's ancestry.
|
|
716
|
-
Conflicts use reconcile and its captured post-reconcile policy. A conflict before initial verification
|
|
717
|
-
skip initial checks through that policy.
|
|
719
|
+
Conflicts use reconcile and its captured post-reconcile policy. A conflict before initial verification,
|
|
720
|
+
including one at a wait resume, cannot skip initial checks through that policy.
|
|
718
721
|
|
|
719
722
|
|
|
720
723
|
## 6. The spec
|
|
@@ -1220,7 +1223,7 @@ The base-selection invariants make this safe with Git:
|
|
|
1220
1223
|
back to the local base and records the diagnostic.
|
|
1221
1224
|
- **Re-provisioning resumes; eligible restacks rewrite.** Provisioning alone
|
|
1222
1225
|
resumes the published branch. The kernel collapses and restacks at verify
|
|
1223
|
-
entry and after target moves while awaiting merge. The first
|
|
1226
|
+
entry, at a ticket-wait resume, and after target moves while awaiting merge. The first
|
|
1224
1227
|
`workspace.provisioned` base stays immutable branch-cut provenance; later
|
|
1225
1228
|
`existing` facts are resume evidence, not new cuts. A remote workspace lost
|
|
1226
1229
|
before publication may be freshly cut again; the latest `remote` or `local`
|
|
@@ -1229,10 +1232,14 @@ The base-selection invariants make this safe with Git:
|
|
|
1229
1232
|
- **Review loops keep their starting effective base.** The initial loop uses
|
|
1230
1233
|
the latest fresh cut; after a successful verify-entry restack, later failure
|
|
1231
1234
|
loops use that restacked contribution base. Plan, implementation and
|
|
1232
|
-
code-review never rewrite the branch
|
|
1233
|
-
|
|
1235
|
+
code-review never rewrite the branch; the one exception is the kernel's
|
|
1236
|
+
wait-resume restack between phases, after which the resumed loop uses the
|
|
1237
|
+
restacked base. Previously recorded review ranges remain immutable,
|
|
1238
|
+
including between rounds.
|
|
1234
1239
|
- **Each implementation completion records its proven contribution boundary.**
|
|
1235
|
-
`ab done` uses the current projected contribution base
|
|
1240
|
+
`ab done` uses the current projected contribution base (the completed
|
|
1241
|
+
range's base, else `implement.contributionBase`, the base a wait-resume
|
|
1242
|
+
restack or fast-forward moved an uncompleted build onto), falling back to the
|
|
1236
1243
|
latest fresh-cut provisioning base (`remote` or `local`, never an `existing`
|
|
1237
1244
|
resume). It validates that immutable base against HEAD and records it verbatim.
|
|
1238
1245
|
A moving or rewritten destination never changes the review range, and review
|
|
@@ -1247,7 +1254,8 @@ The base-selection invariants make this safe with Git:
|
|
|
1247
1254
|
to code review and every agent verify step. Node integration cycles retain
|
|
1248
1255
|
their separate range semantics.
|
|
1249
1256
|
- **Verification names its actual base.** Successful restack or reconcile
|
|
1250
|
-
publication promotes the contribution/path base
|
|
1257
|
+
publication promotes the contribution/path base, as does a wait-resume
|
|
1258
|
+
fast-forward (`restack.advanced`). Every new verify start and
|
|
1251
1259
|
result, including skips, cites the cycle's base and head. Those citations stay
|
|
1252
1260
|
frozen throughout the cycle and survive clean waiting restacks; historical
|
|
1253
1261
|
facts without citations remain readable. Upstream-only paths are excluded.
|
|
@@ -1741,7 +1749,8 @@ an internal runner option, not an accepted `[policy]` TOML key. Reconcile
|
|
|
1741
1749
|
execution and unchanged-base progress budgets retain their existing accounting.
|
|
1742
1750
|
|
|
1743
1751
|
**Every phase ends with exactly one terminal command** — `done`, `verdict`,
|
|
1744
|
-
or `escalate
|
|
1752
|
+
or `escalate`, or in a work build `wait-on`, which declares a ticket wait
|
|
1753
|
+
(§11). The CLI rejects a second terminal call, and each terminal
|
|
1745
1754
|
validates its preconditions before emitting the phase event (no `done`
|
|
1746
1755
|
without the required artifacts; no `done` on a dirty worktree in
|
|
1747
1756
|
`implement`). A normally completed turn that ends **without** any terminal
|
|
@@ -2388,8 +2397,8 @@ Answering `phase-attempt-limit` or `non-retryable-phase-failure` re-arms only
|
|
|
2388
2397
|
the matching phase and `round`; a missing round cannot broaden either cause.
|
|
2389
2398
|
`review-round-limit` retains the same matching-round effect.
|
|
2390
2399
|
`verify-failure-limit` is the explicit phase-level case and re-arms every
|
|
2391
|
-
phase-runner failure round for its verify target. `reconcile-no-progress
|
|
2392
|
-
`setup-failure-limit` have no phase-runner failure-budget effect (setup's own
|
|
2400
|
+
phase-runner failure round for its verify target. `reconcile-no-progress`,
|
|
2401
|
+
`setup-failure-limit` and `wait-unresolvable` have no phase-runner failure-budget effect (setup's own
|
|
2393
2402
|
answer/retry accounting remains separate). Agent and stall raises, and
|
|
2394
2403
|
cause-less historical policy raises, retain the legacy shape rule: a matching
|
|
2395
2404
|
round resets that round and an absent round resets all rounds for the target.
|
|
@@ -2408,6 +2417,160 @@ even if it is also roundless. Cause-less historical roundless
|
|
|
2408
2417
|
without migration. Routing uses these typed event fields and never parses the
|
|
2409
2418
|
human-facing `question`.
|
|
2410
2419
|
|
|
2420
|
+
**Ticket waits.** A phase agent in a work build that cannot proceed until other
|
|
2421
|
+
tickets complete ends its session with `ab wait-on <ticket-id>... --reason
|
|
2422
|
+
<text>` instead of an escalation. The command is a terminal (§8.4). It checks
|
|
2423
|
+
only what needs no ticket source — 1 to 20 unique nonblank ids, a nonblank
|
|
2424
|
+
reason, no prior terminal in the session, a work build, and not the build's own
|
|
2425
|
+
recorded ticket id — and appends one `wait.requested {id, phase, round,
|
|
2426
|
+
tickets, reason, publication?}` as the session's agent actor. A build holds one ticket wait
|
|
2427
|
+
at a time: while another session's request is undecided or its wait is open,
|
|
2428
|
+
the command is refused with no write, checked against the same log prefix the
|
|
2429
|
+
append commits to, so of two concurrent verifiers only one declares and the
|
|
2430
|
+
other keeps its ordinary terminals. A session therefore needs only
|
|
2431
|
+
its build-phase store grant, local or hosted; it never holds a ticket-source
|
|
2432
|
+
credential for a wait.
|
|
2433
|
+
|
|
2434
|
+
An `implement` declaration first makes the session's commits durable, so a
|
|
2435
|
+
resume replays only published work. It requires a clean worktree, as `ab done`
|
|
2436
|
+
does. When HEAD is ahead of the published head (or of the contribution base
|
|
2437
|
+
before any publication), it publishes HEAD through the implement terminal's
|
|
2438
|
+
guarded publication. A local workspace pushes before the fact: a failed push
|
|
2439
|
+
throws, writes nothing and leaves the same session retryable, and the request
|
|
2440
|
+
records `publication {branch, base, sha, settlement: published}`. A remote
|
|
2441
|
+
workspace first deposits `publication.requested {operation: wait, id, branch,
|
|
2442
|
+
sha, base}` and records `settlement: requested`; the dispatcher's settlement
|
|
2443
|
+
stage publishes it and appends `wait.published {id, sha}`. The dispatcher
|
|
2444
|
+
enters such a wait only after `wait.published`. A recorded `publication.lost`
|
|
2445
|
+
refuses it with cause `publication-lost`, and the declaring phase re-runs with
|
|
2446
|
+
that refusal as guidance. Other phases author no branch commits and publish
|
|
2447
|
+
nothing.
|
|
2448
|
+
|
|
2449
|
+
The dispatcher holds the ticket source, so it validates every request on its
|
|
2450
|
+
next tick, for local and hosted builds alike. The build digest marks a request
|
|
2451
|
+
without an outcome (`waitPending`), and only such a build is read further. Until
|
|
2452
|
+
the request is decided, the engine decides `wait ticket-wait` and the build
|
|
2453
|
+
keeps its slot. The dispatcher resolves each id through the source and refuses
|
|
2454
|
+
the request when an id is unknown, is the build's own ticket after
|
|
2455
|
+
canonicalisation, has already completed, or the build has no source ticket. A
|
|
2456
|
+
refusal appends `wait.refused {id, cause, tickets, message}` naming the
|
|
2457
|
+
offending ids (cause `unknown-ticket`, `own-ticket`, `completed`,
|
|
2458
|
+
`no-source-ticket` or `publication-lost`). Nothing is written to the ticket and no wait begins; the
|
|
2459
|
+
declaring phase re-runs at the same round or attempt, with the refusal message
|
|
2460
|
+
as its guidance. Accepted, the dispatcher adds every id not already in the
|
|
2461
|
+
build ticket's `blockedBy` (so a retry after a lost append adds no duplicate),
|
|
2462
|
+
then appends `wait.entered {id, escalation, tickets, reason, question}` with
|
|
2463
|
+
the canonical ticket refs. A ticket-source failure writes nothing, reports a
|
|
2464
|
+
diagnostic and is retried on the next tick.
|
|
2465
|
+
|
|
2466
|
+
An entered wait opens an escalation with id `escalation`, the declaring phase
|
|
2467
|
+
and round, `source: agent`, the declaring session and the waited tickets as
|
|
2468
|
+
`refs`; its question begins `Waiting on`. The build is `blocked`. A work build
|
|
2469
|
+
whose only open escalation is its wait, and which has no runner working, holds
|
|
2470
|
+
no capacity slot and keeps its branch, workspace and completed phase work
|
|
2471
|
+
(§12 "What holds a slot"). A wait ends at its first end fact: an
|
|
2472
|
+
`escalation.answered` on its escalation with any resolution (cause
|
|
2473
|
+
`operator`), `wait.ended {id, cause, message}`, whose `cause` is
|
|
2474
|
+
`automatic` when its blockers completed or `operator` when an operator surface
|
|
2475
|
+
ends it without answering, or the dispatcher's unresolvable raise below (cause
|
|
2476
|
+
`unresolvable`). `wait.ended` closes the escalation as `guidance`
|
|
2477
|
+
with its message as the answer; an end for an unknown, already ended or
|
|
2478
|
+
superseded wait is ignored. Answering a wait never resets a phase-failure
|
|
2479
|
+
budget.
|
|
2480
|
+
|
|
2481
|
+
The dispatcher ends waits itself. The build digest carries `ticketWait {id,
|
|
2482
|
+
escalation, tickets}` exactly while an entered wait is open: set by
|
|
2483
|
+
`wait.entered`, cleared by a matching `wait.ended`, by an answer to its
|
|
2484
|
+
escalation, or by a `wait-unresolvable` raise. Once per tick, before the lease
|
|
2485
|
+
sweep's per-build pass and whether or not the repository is paused, the
|
|
2486
|
+
dispatcher collects the open waits of nonterminal work builds from the digests
|
|
2487
|
+
the tick already read, resolves each ref through the repository's ticket
|
|
2488
|
+
migrations, and reads the union of their ids in one batched
|
|
2489
|
+
`dependencyStates` call with the rejected-role overlay (§12). No open wait
|
|
2490
|
+
means no call, and the stage reads no event rows. Per wait:
|
|
2491
|
+
|
|
2492
|
+
- every ticket exists, is resolved and is not rejected: `wait.ended {id,
|
|
2493
|
+
cause: automatic, message}`, appended conditionally on the build's reduced
|
|
2494
|
+
`lastSeq`, ends the wait on the tick after the last ticket completes;
|
|
2495
|
+
- any ticket is rejected or no longer exists: one `escalation.raised {source:
|
|
2496
|
+
policy, policyCause: wait-unresolvable, phase, round, question, refs}` with
|
|
2497
|
+
the wait's phase and round, the offending ids as `refs`, and a question
|
|
2498
|
+
naming each ticket and why it can never complete;
|
|
2499
|
+
- otherwise some ticket is still pending, and the wait stays in place. A
|
|
2500
|
+
partially completed wait is never released.
|
|
2501
|
+
|
|
2502
|
+
The reducer reads a `wait-unresolvable` raise against an open wait as its end:
|
|
2503
|
+
`wait.ended` becomes `{cause: unresolvable, seq, message: question}`, the
|
|
2504
|
+
wait's own escalation closes as answered `guidance` with the question as its
|
|
2505
|
+
answer, and the new escalation carries the wait's `wait: {id}` marker. The
|
|
2506
|
+
build is `blocked` on an ordinary policy escalation, in the default attention
|
|
2507
|
+
filter, and holds its slot. Because the digest clears on the raise it is never
|
|
2508
|
+
raised twice. Its answer routes and delivers like a wait answer: a reviewer
|
|
2509
|
+
resumes the same review round, the session's `guidance.json` carries the
|
|
2510
|
+
`wait` block, and after the answer the ended wait requests its resume slot; a
|
|
2511
|
+
`revise-spec` answer waits for the revision and `abort` aborts. A raise against
|
|
2512
|
+
a wait that is not open records an ordinary escalation. A source failure writes
|
|
2513
|
+
nothing, reports a diagnostic and is retried on the next tick. Hosted clients
|
|
2514
|
+
read `ticketWait` from the digest wire answer; an older service that omits it
|
|
2515
|
+
yields no automatic release, and operators still end waits by answering.
|
|
2516
|
+
|
|
2517
|
+
An ended wait requests a `resume` slot and is admitted before new ticket
|
|
2518
|
+
claims, as a parked finished build is; a `revise-spec` answer instead waits for
|
|
2519
|
+
the revision. The dispatcher observes the leaf's target when it launches the
|
|
2520
|
+
resume. Before the declaring phase resumes, and ahead of the plan and code
|
|
2521
|
+
loops, the engine decides a `restack` with trigger `wait-resume` and cycle
|
|
2522
|
+
`wait.ended`'s seq when the accepted target differs from the base the build's
|
|
2523
|
+
work sits on. When the target has not moved, no restack runs. A build with
|
|
2524
|
+
published work replays it through the guarded automatic restack (`restack.*`
|
|
2525
|
+
facts carry the `wait-resume` trigger); a conflict runs `reconcile` for that
|
|
2526
|
+
transaction, which counts as initial verification, and the declaring phase
|
|
2527
|
+
resumes after `restack.completed`. A build with nothing published, whose local
|
|
2528
|
+
branch has no commits the target lacks and whose workspace has no uncommitted
|
|
2529
|
+
tracked changes (plan, plan-review, implement before its first commit),
|
|
2530
|
+
fast-forwards its local branch to the fresh target snapshot and records `restack.advanced
|
|
2531
|
+
{trigger, cycle, observation, branch, from, to}`; nothing is written remotely
|
|
2532
|
+
and no conflict is possible. That fact promotes the contribution base for the
|
|
2533
|
+
implement terminal, conditional verification and later restack decisions. A
|
|
2534
|
+
Unpublished local commits or uncommitted tracked changes fail the restack
|
|
2535
|
+
rather than being discarded. The decision is taken once per wait end: a target move after the build
|
|
2536
|
+
resumed never restacks a running phase.
|
|
2537
|
+
|
|
2538
|
+
A reconcile session that declares a wait leaves its occurrence frozen onto its
|
|
2539
|
+
original target. When the wait ends with the target moved, and the occurrence
|
|
2540
|
+
has recorded no publish intent, the kernel supersedes it: the runner aborts the
|
|
2541
|
+
pending replay, discarding the resolver's undeposited resolution, and records
|
|
2542
|
+
`reconcile.superseded {attempt, cycle, cause: wait-resume, restackId?}`, which
|
|
2543
|
+
closes the occurrence and any automatic restack it belonged to without a
|
|
2544
|
+
completion. It then runs the wait-resume restack from the unchanged published
|
|
2545
|
+
head, so the resumed reconcile session resolves a replay onto the current
|
|
2546
|
+
target, or none when the replay is clean. With the target unchanged the same
|
|
2547
|
+
attempt resumes with its replay intact.
|
|
2548
|
+
|
|
2549
|
+
The engine's ordinary rules then re-run the declaring phase: a
|
|
2550
|
+
producer at the same round, a reviewer at the same review round, an agent
|
|
2551
|
+
verifier at the same step and attempt, and finalize or reconcile. Guidance
|
|
2552
|
+
reaches the session through its usual carrier, and its
|
|
2553
|
+
`$AB_CONTEXT_DIR/guidance.json` gains a `wait` block — `{id, tickets, reason,
|
|
2554
|
+
outcome: refused | ended, cause, message}` — whenever the guidance is the
|
|
2555
|
+
wait's refusal or answer (including the answer to its `wait-unresolvable`
|
|
2556
|
+
escalation), or when the wait ended without guidance text. A
|
|
2557
|
+
review phase's wait resumes that review round and never feeds the next
|
|
2558
|
+
producer. `ab build status` shows a requested, open, or ended-but-not-resumed
|
|
2559
|
+
wait and the tickets it names. Node builds cannot declare waits.
|
|
2560
|
+
|
|
2561
|
+
The wait's reduced state is part of the build state contract:
|
|
2562
|
+
`waitRequest {id, session, phase, round, tickets, reason, seq, publication?,
|
|
2563
|
+
outcome?}`, where `publication` is `{branch, base, sha, published, requestSeq?,
|
|
2564
|
+
lost?}`, and
|
|
2565
|
+
`outcome` is `{kind: entered, seq}` or `{kind: refused, cause, tickets,
|
|
2566
|
+
message, seq}`, and `wait {id, escalation, session, phase, round, tickets,
|
|
2567
|
+
reason, enteredSeq, enteredAt, ended?: {cause: operator | automatic |
|
|
2568
|
+
unresolvable, seq, message}, resumedSeq?}`.
|
|
2569
|
+
Each holds only the latest request or entered wait. `resumedSeq` is the first
|
|
2570
|
+
`session.started`, `spec.revised`, wait-resume `restack.prepared` or
|
|
2571
|
+
`restack.advanced` after the end; from then on the build holds a slot again. Open and answered escalation records carry `wait: {id}` as the
|
|
2572
|
+
wait marker, including the `wait-unresolvable` escalation that ended the wait.
|
|
2573
|
+
|
|
2411
2574
|
## 12. The outer loop
|
|
2412
2575
|
|
|
2413
2576
|
```
|
|
@@ -2432,14 +2595,18 @@ has finished its pipeline (every verify step and every finalize post-step for
|
|
|
2432
2595
|
the current spec) holds no slot while it waits for a merge decision, for merge
|
|
2433
2596
|
gates or the forge, or on hold, and the slot goes to the next ready ticket. The
|
|
2434
2597
|
dispatcher records the finish as an advisory `pipeline.settled` fact when the
|
|
2435
|
-
engine first decides `wait awaiting-pr`. A build
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
for
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2598
|
+
engine first decides `wait awaiting-pr`. A work build waiting on other tickets
|
|
2599
|
+
(an entered ticket wait, §11) with no runner working also holds no slot, and
|
|
2600
|
+
keeps its branch, workspace and completed phase work. Any other build that has
|
|
2601
|
+
not finished keeps its slot, even while paused, blocked on a question, waiting
|
|
2602
|
+
for the dispatcher to check a ticket wait, or interrupted between
|
|
2603
|
+
`finalize.completed` and its post-steps. When a finished build must restack,
|
|
2604
|
+
re-verify or reconcile, or a ticket wait ends, the build is admitted before new
|
|
2605
|
+
ticket claims, as a node is: intake reserves a slot for it (`resume` for an
|
|
2606
|
+
ended wait), and its wait records nothing, consumes no attempt and raises no
|
|
2607
|
+
attention. Abort and pause acknowledgements are not gated. A finished or
|
|
2608
|
+
waiting build keeps its workspace, so retained workspaces can exceed
|
|
2609
|
+
`capacity`; running work cannot.
|
|
2443
2610
|
|
|
2444
2611
|
Additional scheduled ingesters such as `ingest:sentry` remain an open design
|
|
2445
2612
|
thread and have no shipped config surface. Observation harvest is
|
|
@@ -2596,7 +2763,12 @@ The TicketSource **initiates and receives projections; it is never consulted
|
|
|
2596
2763
|
mid-build and never used as artifact storage.** Dispatch reads the ticket
|
|
2597
2764
|
(including the spec) as part of initiation — at claim time, or on a later tick
|
|
2598
2765
|
while an interrupted dispatch still lacks its imported spec. After import, the
|
|
2599
|
-
build never reads the tracker again.
|
|
2766
|
+
build never reads the tracker again. The one mid-build consultation is the
|
|
2767
|
+
dispatcher's, not the build's: validating a declared ticket wait resolves its
|
|
2768
|
+
ids and records them in the build ticket's `blockedBy`, and while waits are
|
|
2769
|
+
open one batched dependency read per tick checks whether their tickets
|
|
2770
|
+
completed (§11 "Ticket waits").
|
|
2771
|
+
Human-legibility projections (spec
|
|
2600
2772
|
posted as a comment, final summary, status transitions) flow outward only.
|
|
2601
2773
|
This keeps the abstraction honest: a file-based TicketSource with nowhere to
|
|
2602
2774
|
put blobs must be fully workable.
|
|
@@ -2663,7 +2835,8 @@ and reviewer, while the filing read is authoritative. Both paths remain
|
|
|
2663
2835
|
initiation, so the never-consulted-mid-build rule is untouched. A
|
|
2664
2836
|
dependency-blocked ticket stays
|
|
2665
2837
|
queued source work rather than becoming a blocked build: the runtime `blocked`
|
|
2666
|
-
status is for builds awaiting a human
|
|
2838
|
+
status is for builds awaiting a human or waiting on other tickets after they
|
|
2839
|
+
started (§11 "Ticket waits").
|
|
2667
2840
|
|
|
2668
2841
|
**Forge issue links.** A ticket may record the forge issues it addresses, each
|
|
2669
2842
|
as `{issue, intent}`: `issue` is a positive issue number and `intent` is
|
|
@@ -2864,7 +3037,8 @@ idle node polling, so a slot freed in any tick goes to the node, not to a new
|
|
|
2864
3037
|
claim. Its candidate occupancy excludes itself and capacity-bearing blocked or
|
|
2865
3038
|
paused descendants, following accepted source-qualified build target ancestry.
|
|
2866
3039
|
Running descendants and unrelated builds still count; ordinary blocked and
|
|
2867
|
-
paused work retains its slot for every other admission
|
|
3040
|
+
paused work retains its slot for every other admission, except a work build
|
|
3041
|
+
parked by a ticket wait, which holds none. Provisioning reserves
|
|
2868
3042
|
node occupancy before the runner starts. This exception never raises the budget
|
|
2869
3043
|
for new claims. Status and both dashboards report actual occupancy, configured
|
|
2870
3044
|
capacity, effective display capacity and the nodes using descendant-held slots.
|
|
@@ -2917,7 +3091,8 @@ Human forge merges are an explicit escape hatch, even while incomplete, paused
|
|
|
2917
3091
|
or unverified. The janitor records human provenance and whether the actual merged
|
|
2918
3092
|
head had a successful cycle, then completes the node ticket.
|
|
2919
3093
|
Closing without merge or aborting closes admission and returns the ticket to
|
|
2920
|
-
triage
|
|
3094
|
+
triage (or ready, when the abort asks for it); children already claimed retain
|
|
3095
|
+
their frozen base. Nested nodes work.
|
|
2921
3096
|
A forge plugin needs node branch creation, comparison and
|
|
2922
3097
|
head-read capabilities to admit node tickets.
|
|
2923
3098
|
|
|
@@ -2970,7 +3145,7 @@ dependency presence requires an ancestor change; on `ab restack <node>`; or on
|
|
|
2970
3145
|
accepted re-parenting. There is no eager mode or cadence option. Nested nodes
|
|
2971
3146
|
need their own demand. Existing frozen transactions, including ones reserved
|
|
2972
3147
|
before upgrade, finish first; later demand coalesces onto the latest parent.
|
|
2973
|
-
Leaves keep verify-entry and awaiting-merge restacks for every target.
|
|
3148
|
+
Leaves keep verify-entry, wait-resume and awaiting-merge restacks for every target.
|
|
2974
3149
|
|
|
2975
3150
|
Presence demand uses change identities, never ticket resolution alone. It follows
|
|
2976
3151
|
only the path from the nearest proven ancestor source down to the dependent's
|
|
@@ -3295,7 +3470,7 @@ durable failure. A human may discard only such a queued build. Discard is
|
|
|
3295
3470
|
dispatcher cleanup, returns the ticket to its
|
|
3296
3471
|
configured Ready state, and completes with
|
|
3297
3472
|
`discarded`; it is deliberately distinct from abort, which returns work to
|
|
3298
|
-
Triage for human judgment. Any selected nonterminal build can be aborted from
|
|
3473
|
+
Triage for human judgment by default, or to Ready when the operator asks. Any selected nonterminal build can be aborted from
|
|
3299
3474
|
the list or detail view with `a`; Enter confirms and Escape cancels, so the first
|
|
3300
3475
|
keypress never writes destructive intent. CLI and dashboard both append the same
|
|
3301
3476
|
`build.abort-requested` fact through the shared control service. The concrete
|
|
@@ -3404,9 +3579,9 @@ with illustrative members:
|
|
|
3404
3579
|
|
|
3405
3580
|
| Family | Examples |
|
|
3406
3581
|
|---|---|
|
|
3407
|
-
| Build lifecycle | `build.created` (carrying `assets`, the claim-time pin, §6.3), `workspace.provisioned`, `workspace.cleanup-required`, `workspace.fenced`, `workspace.commits-preserved`, `workspace.commits-lost`, `workspace.released`, `execution.started`, `execution.ended`, `infrastructure.failed`, `infrastructure.cleanup-attempted`, `dispatch.comment-posted`, `dispatch.failed`, `runner.attached`, `runner.runtime-recorded`, `runner.setup-failed`, `abort.remote-branch-deleted`, `abort.local-branch-deleted`, `abort.ticket-returned`, `build.completed` |
|
|
3408
|
-
| Operator commands [D2] | `build.pause-requested` → `build.paused`; `build.discard-requested`; `build.hold-requested`; `build.land-requested` → `landing.command-acknowledged`; `escalation.answered` (optionally carrying a validated `reviewRoundCeiling`, or the `assets` sampled with a revise-from-ticket authorization) |
|
|
3409
|
-
| Merge policy | `landing.decided` (candidate, matched rule/default, labels, target, mode); `landing.native-enable-started`; `landing.native-applied` |
|
|
3582
|
+
| Build lifecycle | `build.created` (carrying `assets`, the claim-time pin, §6.3), `workspace.provisioned`, `workspace.cleanup-required`, `workspace.fenced`, `workspace.commits-preserved`, `workspace.commits-lost`, `workspace.released`, `execution.started`, `execution.ended`, `infrastructure.failed`, `infrastructure.cleanup-attempted`, `dispatch.comment-posted`, `dispatch.failed`, `runner.attached`, `runner.runtime-recorded`, `runner.setup-failed`, `abort.remote-branch-deleted`, `abort.local-branch-deleted`, `abort.ticket-returned`, `build.ticket-returned`, `build.completed` |
|
|
3583
|
+
| Operator commands [D2] | `build.abort-requested {reason?, to?}` → `build.aborted`; `build.pause-requested` → `build.paused`; `build.discard-requested`; `build.hold-requested`; `build.land-requested` → `landing.command-acknowledged`; `escalation.answered` (optionally carrying a validated `reviewRoundCeiling`, or the `assets` sampled with a revise-from-ticket authorization) |
|
|
3584
|
+
| Merge policy | `landing.decided` (candidate, matched rule/default, labels, target, mode, matched `paths?` summary); advisory `landing.deferred` (candidate, reason, rule, policy); kernel `landing.consent-revoked {commandSeq, source, rule, previousHead, head, consentedHead?, paths}`; `landing.native-enable-started`; `landing.native-applied` |
|
|
3410
3585
|
| Spec | `spec.imported`, `spec.authored`, `spec.revised` (either positive `escalation` sequence or exclusive `operator: {user, via?}` provenance for an idle node; optionally carrying `assets`, a re-pin of the ticket's assets, §6.3) |
|
|
3411
3586
|
| Sessions | `session.started` (including optional write-ahead continuation intent, budget ceiling, and the effective first `prompt` the bracket sent: the start prompt, the live continuation message, or the interruption notice); `session.suspended` with partial transcript and active duration; `session.resumed` acceptance (stale reports are inert); reasoned `session.resume-fallback`; kernel-only `session.native-handle-recorded` with bracket and native execution identity; `session.ended` with transcript ref and usage (ordinary completion — the analysis corpus), or `session.ended {outcome: reclaimed, reclaimedBy: {instance, resumedFromSeq}}` (explicit transcriptless takeover) |
|
|
3412
3587
|
| Plan/code loops | `plan.started` … `plan-review.verdict`; `implement.started` … `code-review.verdict` |
|
|
@@ -3414,20 +3589,43 @@ with illustrative members:
|
|
|
3414
3589
|
| Integration attention | Kernel/dispatcher `integration.verification-failed {id, head, parent, steps, guidance}`: one durable failed-cycle notification, recovered from exact verification receipts |
|
|
3415
3590
|
| PR summary | Kernel-authored `pr-summary.requested {occurrence, boundary}`, `pr-summary.attempted {occurrence, boundary, pr}`, `pr-summary.result {attempt, outcome, eligibleAfter?}`, `pr-summary.settled {request, disposition}`; sequence identities correlate durable starts, completed boundaries, attempts, and handoffs (§7.5) |
|
|
3416
3591
|
| PR attachments | `pr-attachment.designated`, `pr-attachment.hosted`, `pr-attachment.reclaimed`, `pr-attachment.reclaim-failed` |
|
|
3417
|
-
| Leaf restacking | `target.moved {branch, sha, lineage?}`, `target.rewritten {branch, previousSha, sha}`, `target.rewrite-cleared {branch, sha, lineage?}`, advisory `target.distance {branch, sha, head, count}`, `restack.prepared`, `restack.replayed`, `restack.publish-intended`, `restack.rewritten`, `restack.contended`, `restack.completed` |
|
|
3418
|
-
|
|
|
3592
|
+
| Leaf restacking | `target.moved {branch, sha, lineage?}`, `target.rewritten {branch, previousSha, sha}`, `target.rewrite-cleared {branch, sha, lineage?}`, advisory `target.distance {branch, sha, head, count}`, `restack.prepared`, `restack.replayed`, `restack.publish-intended`, `restack.rewritten`, `restack.contended`, `restack.completed` (trigger `verify-entry`, `wait-resume` or `awaiting-landing`), `restack.advanced {trigger: wait-resume, cycle, observation, branch, from, to}` |
|
|
3593
|
+
| Head path facts | advisory `head.paths-recorded {source, head, destination, mergeBase, total, preview, resolution?, artifact}` |
|
|
3594
|
+
| Post-PR [D1] | `pr.merged`, `pr.conflicted`, `reconcile.progress-checked`, `reconcile.started`, `reconcile.prepared`, `reconcile.replayed`, `reconcile.publish-intended`, `reconcile.rewritten`, `reconcile.contended`, `reconcile.completed`, kernel `reconcile.superseded {attempt, cycle, cause: wait-resume, restackId?}` (§11 "Ticket waits") |
|
|
3419
3595
|
| Cross-cutting | `observation.recorded`, `escalation.raised`, `phase.failed`, `session.build-read-failed`, `session.build-read-recovered`, `phase.deferred`, `phase.deferral-escalated` |
|
|
3420
|
-
|
|
|
3596
|
+
| Ticket waits (§11) | Agent `wait.requested {id, phase, round, tickets, reason, publication?: {branch, base, sha, settlement: published \| requested}}`; dispatcher `wait.published {id, sha}`, `wait.refused {id, cause: unknown-ticket \| own-ticket \| completed \| no-source-ticket \| publication-lost, tickets, message}` and `wait.entered {id, escalation, tickets, reason, question}`; dispatcher, kernel or human `wait.ended {id, cause: operator \| automatic, message}`; dispatcher policy `escalation.raised {policyCause: wait-unresolvable}` ends an open wait whose ticket was rejected or deleted |
|
|
3597
|
+
| Repository journal | dispatcher setting facts; run lifecycle, effective config, tick/queue diagnostics, reload and runner outcomes; the `harvest.*` workflow, recovery, and ledger facts; `ticket-preparation.*` claim boundaries; `ticket.handed-back` and `ticket.handback-settled` |
|
|
3421
3598
|
|
|
3422
3599
|
Abort cleanup is a dispatcher-owned ordered saga. While an execution lease is
|
|
3423
3600
|
live, the janitor defers the saga so it cannot race process-tree teardown. Once
|
|
3424
3601
|
that supervisor releases the lease, or an abruptly orphaned lease expires, cleanup
|
|
3425
3602
|
closes an open unmerged PR without overriding a racing merge, releases the workspace,
|
|
3426
3603
|
deletes the exact published remote branch and exact local branch, unions the
|
|
3427
|
-
`autobuild:aborted` label into the current ticket labels,
|
|
3428
|
-
|
|
3604
|
+
`autobuild:aborted` label into the current ticket labels, moves the ticket once
|
|
3605
|
+
to its destination and posts an abort notice, reports the hand-back, and only
|
|
3606
|
+
then completes as `abandoned`. The destination is configured Triage unless the
|
|
3607
|
+
request carried `to: ready`; then the ticket moves straight to configured Ready
|
|
3608
|
+
with its blockers untouched, or falls back to Triage, listing the missing parts,
|
|
3609
|
+
when its body no longer conforms to the spec standard. External effects are
|
|
3429
3610
|
idempotent and the three `abort.*` facts checkpoint projections across crashes;
|
|
3430
|
-
|
|
3611
|
+
`abort.ticket-returned` records the destination, the requested role, the reason
|
|
3612
|
+
and the missing parts, so a retry reports exactly what the committed move did
|
|
3613
|
+
and never writes the ticket again. Missing Forge capabilities or outages leave
|
|
3614
|
+
the remainder due on the next tick.
|
|
3615
|
+
|
|
3616
|
+
Every dispatcher hand-back of a claimed or ready ticket other than completion —
|
|
3617
|
+
abort, spec-standard bounce, preparation recovery returning a confirmed claim,
|
|
3618
|
+
closed-unmerged PR and discard — appends one repository `ticket.handed-back`
|
|
3619
|
+
only after its move is committed, and it is default watch attention. A build
|
|
3620
|
+
hand-back's identity is its slug: closed-PR and discard moves checkpoint as
|
|
3621
|
+
`build.ticket-returned`, and the dispatcher refreshes its repository view and
|
|
3622
|
+
skips the report when the reduced set of reported, unsettled identities already
|
|
3623
|
+
holds the slug, so an append whose acknowledgement was lost is never repeated.
|
|
3624
|
+
`ticket.handback-settled` follows `build.completed` and prunes the identity; a
|
|
3625
|
+
failed settlement is retried by a later tick, which keeps the reduced value
|
|
3626
|
+
bounded by in-flight hand-backs. A preparation hand-back's identity is its
|
|
3627
|
+
attempt, marked reported in the preparation reduction and pruned by its
|
|
3628
|
+
resolution.
|
|
3431
3629
|
|
|
3432
3630
|
One deliberate subtlety worth recording: `pr.conflicted.baseSha` is
|
|
3433
3631
|
detection-time evidence, while `reconcile.progress-checked.baseSha` is the
|
|
@@ -3582,8 +3780,13 @@ runner is attached; it does not acquire a leaf pipeline.
|
|
|
3582
3780
|
|
|
3583
3781
|
`status ∈ queued | running | collecting | paused | blocked | done | aborted`, plus
|
|
3584
3782
|
`{phase, round, openEscalations[], reviewRoundCeilings?, pr?, autoMerge,
|
|
3585
|
-
lastEvent}`. `blocked` ≡ an `escalation.raised`
|
|
3586
|
-
|
|
3783
|
+
lastEvent}`. `blocked` ≡ an open escalation: an `escalation.raised` (or the
|
|
3784
|
+
escalation a `phase.deferral-escalated` or `wait.entered` opens) without a
|
|
3785
|
+
matching `escalation.answered`, matched by id; a ticket wait's escalation also
|
|
3786
|
+
closes on `wait.ended` and on a `wait-unresolvable` raise. `waitRequest` and
|
|
3787
|
+
`wait` project the latest ticket-wait request and entered wait (§11 "Ticket
|
|
3788
|
+
waits"); `wait.ended?: {cause: operator | automatic | unresolvable, seq,
|
|
3789
|
+
message}` is the wait's first end. `reviewRoundCeilings` projects valid
|
|
3587
3790
|
review-limit answers independently for the plan and code loops after the latest
|
|
3588
3791
|
`spec.revised`; status and dashboard surfaces expose any projected values.
|
|
3589
3792
|
`paused` ≡ a `build.paused` without a later `build.resumed`, and takes
|
|
@@ -3976,6 +4179,28 @@ until publication. Confirmed publication reattaches the matching workspace HEAD
|
|
|
3976
4179
|
to the build branch so a later verify → implement cycle can publish normally.
|
|
3977
4180
|
Missing third-party forge capabilities refuse actionably.
|
|
3978
4181
|
|
|
4182
|
+
Every candidate head a build produces records the paths it changes, once per
|
|
4183
|
+
head, before the write that establishes it: finalize and finalize post-step
|
|
4184
|
+
pushes, automatic restacks, leaf reconciles, node rewrites and node
|
|
4185
|
+
integration cycles, on local and remote execution. `head.paths-recorded`
|
|
4186
|
+
names the producing `source`, the `head`, the `destination` it would land on
|
|
4187
|
+
and their `mergeBase`. Its paths are every path that differs between the
|
|
4188
|
+
merge base and the head with rename detection off, so a rename counts its old
|
|
4189
|
+
and new path and a deletion counts its path. A reconcile-produced head also
|
|
4190
|
+
carries `resolution`: the paths where the resolved head differs from the
|
|
4191
|
+
purely mechanical three-way replay of the build's change onto the
|
|
4192
|
+
destination, conflict markers included. Conflicted files the resolver
|
|
4193
|
+
settled and any extra edits count; changes that arrived cleanly from the
|
|
4194
|
+
destination do not. The complete sets live in an atomically deposited
|
|
4195
|
+
`head-paths` artifact; the event and build state carry only the exact
|
|
4196
|
+
`total` and a sorted `preview` of at most 100 paths, and build state keeps
|
|
4197
|
+
the newest four summaries, first per head. A head is "not recorded" until
|
|
4198
|
+
such a fact names it, which is distinct from "recorded and empty"; heads a
|
|
4199
|
+
build did not produce and heads that predate the fact read as not recorded.
|
|
4200
|
+
The dispatcher never derives the fact on a poll; merge-rule path predicates
|
|
4201
|
+
read it, and a reconcile's `resolution` decides protected consent revocation
|
|
4202
|
+
(§15.7).
|
|
4203
|
+
|
|
3979
4204
|
Automatic leaf transactions use `restack.*`, independently of reconcile attempt
|
|
3980
4205
|
numbers. Preparation freezes the trigger, verify-cycle boundary, absorbed target
|
|
3981
4206
|
observation, old base/head, target base, single-change commit, workspace/local
|
|
@@ -4052,25 +4277,63 @@ observable regardless of trailer evidence.
|
|
|
4052
4277
|
|
|
4053
4278
|
Ordered `[[merge]]` rules in `autobuild.toml` decide authorization. Each rule
|
|
4054
4279
|
requires `mode = "auto" | "consent"` and may match `into = "root" | "node" |
|
|
4055
|
-
<node-ticket-id>`, `from = "leaf" | "node"`,
|
|
4056
|
-
`label
|
|
4057
|
-
|
|
4280
|
+
<node-ticket-id>`, `from = "leaf" | "node"`, an exact, case-sensitive
|
|
4281
|
+
`label`, and the paths the candidate head changes: `paths` matches when at
|
|
4282
|
+
least one changed path matches a selector, `within` when every changed path
|
|
4283
|
+
matches and at least one path changed. Path selectors share the
|
|
4284
|
+
`[verify.<step>].paths` grammar and case sensitivity, and an invalid selector
|
|
4285
|
+
is rejected at load naming its rule index. Predicates are ANDed; the first
|
|
4286
|
+
matching rule wins. Omitted predicates match anything. With no match, leaves
|
|
4287
|
+
use auto and nodes require consent.
|
|
4058
4288
|
The target is the immutable destination frozen at claim, not a ticket's current
|
|
4059
4289
|
parent. Labels are sampled from a successful source-ticket read at readiness;
|
|
4060
4290
|
unavailable ticket data defers the decision instead of supplying empty labels.
|
|
4061
4291
|
|
|
4292
|
+
Path predicates read only the candidate head's recorded head path fact: the
|
|
4293
|
+
reduced summary, plus one read of the complete `head-paths` artifact at
|
|
4294
|
+
decision time when a reached path rule needs paths beyond the preview. When
|
|
4295
|
+
evaluation reaches a path rule whose head has no recorded fact, the
|
|
4296
|
+
dispatcher appends one advisory `landing.deferred {candidate, reason, rule,
|
|
4297
|
+
policy}` and decides nothing; it never evaluates the head as an empty change.
|
|
4298
|
+
The deferral holds without further reads or evaluation until the candidate or
|
|
4299
|
+
the `[[merge]]` rules' identity changes, and `ab build status` explains it. A
|
|
4300
|
+
recorded empty change matches neither predicate. Protective path rules belong
|
|
4301
|
+
first, because first match still wins.
|
|
4302
|
+
|
|
4062
4303
|
A leaf becomes ready after verification and finalize on a current base; a node
|
|
4063
|
-
must be complete and verified at its exact head and parent.
|
|
4304
|
+
must be complete and verified at its exact head and parent. A pending pause or
|
|
4305
|
+
abort defers readiness; a resume that only cancelled a never-acknowledged pause
|
|
4306
|
+
does not. `landing.decided`
|
|
4064
4307
|
records that candidate, the sampled labels, resulting mode, and the full matched
|
|
4065
|
-
rule and index (or explicit default).
|
|
4066
|
-
|
|
4308
|
+
rule and index (or explicit default). When the matched rule has a path
|
|
4309
|
+
predicate it also records the changed paths its selectors matched: the exact
|
|
4310
|
+
total and the first 20, sorted. Editing configuration cannot change this
|
|
4311
|
+
recorded decision. A replacement candidate gets a new decision once ready,
|
|
4312
|
+
evaluated on its own changed paths, and that decision governs: native
|
|
4313
|
+
auto-merge armed under the old decision is cancelled before a replacement head
|
|
4314
|
+
is published.
|
|
4067
4315
|
Policy is live dispatcher configuration, outside the pinned execution pipeline.
|
|
4068
4316
|
|
|
4069
4317
|
`ab hold <slug>` durably suppresses merge and revokes previous consent, even
|
|
4070
4318
|
before readiness. `ab merge <slug>` requires readiness, clears hold, and consents
|
|
4071
4319
|
to this build/node merge into its frozen destination. Consent survives head
|
|
4072
|
-
replacement, restacking, verification and re-finalization until another
|
|
4073
|
-
completion. It is consent to the merge, not approval of an immutable diff.
|
|
4320
|
+
replacement, clean restacking, verification and re-finalization until another
|
|
4321
|
+
hold or completion. It is consent to the merge, not approval of an immutable diff.
|
|
4322
|
+
Consent given under a rule with `paths` or `within` predicates is the exception:
|
|
4323
|
+
the consent records that rule, and when a reconcile's own edits (its recorded
|
|
4324
|
+
`resolution`) touch a file those predicates match, the kernel appends
|
|
4325
|
+
decisive `landing.consent-revoked` naming the consent, rule, matched paths
|
|
4326
|
+
(sorted, first 20 plus total), and the previous and new heads. It is written
|
|
4327
|
+
where the leaf reconcile completion or node rewrite records the new head, before
|
|
4328
|
+
its publication intent, from recorded facts only; no poll derives it. The fact
|
|
4329
|
+
removes that consent only, so the build returns to the consent queue for its new
|
|
4330
|
+
head and needs fresh consent. Clean restacks record no resolution and keep
|
|
4331
|
+
consent, as do reconciles that edit no matched file and consent under rules
|
|
4332
|
+
without path predicates. Accepted node reparenting also revokes consent.
|
|
4333
|
+
The optional `ab merge <slug> --head <sha>` (operator `head`) refuses with
|
|
4334
|
+
`head-mismatch`, recording nothing, unless `<sha>` (full or at least seven
|
|
4335
|
+
characters) is the current candidate head. The consented head is the head of
|
|
4336
|
+
the recorded decision the consent named; `--head` does not change survival.
|
|
4074
4337
|
Commands and acknowledgements are sequence-correlated; hold acknowledgement
|
|
4075
4338
|
requires confirmed native cancellation, while merge acknowledgement accepts
|
|
4076
4339
|
consent without claiming that merge gates passed. The same actions are available
|
|
@@ -4275,8 +4538,12 @@ ordinary boundary reload resumes.
|
|
|
4275
4538
|
|
|
4276
4539
|
Merge policy is an ordered `[[merge]]` array. Each rule requires
|
|
4277
4540
|
`mode = "auto" | "consent"` and may match `into = "root" | "node" | <node-ticket-id>`,
|
|
4278
|
-
`from = "leaf" | "node"`,
|
|
4541
|
+
`from = "leaf" | "node"`, an exact, case-sensitive `label`, and changed-path
|
|
4542
|
+
predicates `paths` (any changed path matches) and `within` (every changed path
|
|
4543
|
+
matches, at least one changed) over the candidate head's recorded paths, with
|
|
4544
|
+
the `[verify.<step>].paths` selector grammar. Predicates
|
|
4279
4545
|
within a rule are ANDed; omitted predicates are wildcards; first match wins.
|
|
4546
|
+
A reached path rule without recorded paths defers the decision (§15.7).
|
|
4280
4547
|
The destination is the frozen target identity, and labels are sampled when
|
|
4281
4548
|
readiness is recorded. No matching rule, including no rules, means leaf auto /
|
|
4282
4549
|
node consent. Policy is hot dispatcher-owned configuration, not pinned build
|
|
@@ -4833,11 +5100,13 @@ The web dashboard consumes shared terminology without introducing a tree surface
|
|
|
4833
5100
|
`ab merges [--json] [--store <ref>]` and registry `merges.list` expose the
|
|
4834
5101
|
same deterministic, repository-scoped ready consent/held candidates. A recorded
|
|
4835
5102
|
current decision is required; auto-authorized and consented candidates are absent.
|
|
5103
|
+
Queue entries and build status show the current candidate head and the head
|
|
5104
|
+
consent was given at (null without consent).
|
|
4836
5105
|
Source `ab ticket tree` / `tickets.tree` enumerate all ticket states with listing
|
|
4837
5106
|
diagnostics; effective build targets remain frozen independently of source metadata.
|
|
4838
5107
|
|
|
4839
5108
|
Default watch attention includes `integration.verification-failed`, `integration.landed`, `node.item-conflicted`,
|
|
4840
|
-
and conflicted `restack.replayed`. Derived `build.consent-ready` observations
|
|
5109
|
+
`landing.consent-revoked`, and conflicted `restack.replayed`. Derived `build.consent-ready` observations
|
|
4841
5110
|
carry target, branch, candidate and the durable readiness entry position in the
|
|
4842
5111
|
existing cursor envelope. Cursor identities retain readiness episodes across
|
|
4843
5112
|
restart; a new candidate or exit/re-entry can wake again. Explicit event globs
|
|
@@ -7,13 +7,13 @@ Every action below is sessionless, records a human-authored fact, and accepts
|
|
|
7
7
|
|
|
8
8
|
| Need | Command | Effect |
|
|
9
9
|
|---|---|---|
|
|
10
|
-
| Give the phase a decision or missing information | `ab answer <slug> <text>` | Records `guidance`. In a review loop it feeds the next producer round. |
|
|
11
|
-
| Try again without guidance | `ab answer <slug>` | Records a bare `retry`; no prose is delivered to an agent. |
|
|
10
|
+
| Give the phase a decision or missing information | `ab answer <slug> <text>` | Records `guidance`. In a review loop it feeds the next producer round; a ticket wait's answer instead resumes the phase that declared it, including the same review round. |
|
|
11
|
+
| Try again without guidance | `ab answer <slug>` | Records a bare `retry`; no prose is delivered to an agent, except that a ticket wait's resumed phase still gets a one-line summary and its `wait` block. |
|
|
12
12
|
| Widen an exhausted review loop | `ab answer <slug> [<text>] --review-round-ceiling <n>` | Answers the open `review-round-limit` escalation and replaces the configured cap with absolute ceiling `n` for that loop and spec revision only. |
|
|
13
13
|
| Retire a review disagreement | `ab answer <slug> --dismiss` | Records `dismiss-finding` for each escalation that cites a real finding id. The next reviewer is told not to re-raise that chain. |
|
|
14
14
|
| Replace the build contract from a file | `ab answer <slug> --revise-spec <file>` | Records the replacement as the next spec revision and restarts leaves at `plan`; nodes recollect and verify. |
|
|
15
15
|
| Re-import an amended ticket | `ab answer <slug> --revise-spec-from-ticket` | Reads the build's recorded ticket and performs the same revision. |
|
|
16
|
-
| Abandon the build | `ab abort <slug
|
|
16
|
+
| Abandon the build | `ab abort <slug> [--to ready] [--reason <text>]` | Irrevocably requests abort; cleanup returns the ticket to Triage, or with `--to ready` to Ready with its blockers kept, and then reports `ticket.handed-back`. Ready requires the current ticket to meet the spec standard; otherwise cleanup returns it to Triage, and the comment and event name the requested destination and the missing parts. |
|
|
17
17
|
|
|
18
18
|
The dashboard's blocked-build `r` shortcut requests an inline answer step that
|
|
19
19
|
supports guidance and a blank retry. While that step is open, it is exclusive
|
|
@@ -44,6 +44,47 @@ startup, a successful attempt closes it unanswered, and a bare retry only brings
|
|
|
44
44
|
the next attempt forward. Startup still recovers unblocked work and acknowledges
|
|
45
45
|
pending operator commands.
|
|
46
46
|
|
|
47
|
+
## Ending a ticket wait
|
|
48
|
+
|
|
49
|
+
A build whose agent ran `ab wait-on` asks to wait on other tickets. Until the
|
|
50
|
+
dispatcher validates the request on its next tick, the build keeps its
|
|
51
|
+
capacity slot and `ab build status <slug>` reports the wait as requested. A
|
|
52
|
+
refused request writes nothing to the source ticket; the request and its
|
|
53
|
+
refusal stay in the build log, and the declaring phase re-runs with the
|
|
54
|
+
refusal as guidance.
|
|
55
|
+
|
|
56
|
+
Once accepted, the build's escalation question begins `Waiting on`,
|
|
57
|
+
`ab build status <slug>` shows a `waiting on:` line naming the tickets, its
|
|
58
|
+
ticket lists those tickets in `blockedBy`, and the build holds no capacity
|
|
59
|
+
slot. `ab builds` and both dashboards show it as `waiting` on those tickets
|
|
60
|
+
rather than as a blocked question; in `ab builds --json` its `status` stays
|
|
61
|
+
`blocked` and a `wait` field names the tickets. On either dashboard, `r` or
|
|
62
|
+
RESUME on a waiting build answers it. The dispatcher ends the wait on its
|
|
63
|
+
first tick after every named ticket completes; a wait with some tickets still
|
|
64
|
+
open stays in place. To end it early, for example when the work landed another
|
|
65
|
+
way, `ab answer <slug> <text>` or a bare `ab answer <slug>` ends the wait.
|
|
66
|
+
Either way the build takes the next free slot ahead of new ticket claims. If its target
|
|
67
|
+
branch has moved past the base the build's work sits on, the build first
|
|
68
|
+
restacks onto the target's current head so the resumed phase sees the merged blockers; a conflicting
|
|
69
|
+
restack shows as `reconcile` and resolves first. The phase that declared the
|
|
70
|
+
wait then re-runs at the same round or attempt. Its `guidance.json` carries a
|
|
71
|
+
`wait` block naming the tickets, the reason, and how the wait ended.
|
|
72
|
+
|
|
73
|
+
If a named ticket is rejected or deleted, the wait can never end by itself.
|
|
74
|
+
The dispatcher then ends it with an ordinary `wait-unresolvable` escalation
|
|
75
|
+
that names the ticket and why, and the build shows as blocked in the default
|
|
76
|
+
attention filter. Answer it with guidance to resume the declaring phase without
|
|
77
|
+
that ticket, revise the spec, or abort. Guidance resumes the same phase with
|
|
78
|
+
the same `wait` block.
|
|
79
|
+
|
|
80
|
+
A wait declared in `implement` first publishes the build's commits, so the
|
|
81
|
+
agent must commit or discard its changes before running `ab wait-on`; the
|
|
82
|
+
command refuses a dirty worktree. When a local push fails, the command
|
|
83
|
+
records no wait and the same session can fix the failure and run it again.
|
|
84
|
+
When a remote publication is lost before the wait is entered, the dispatcher refuses the
|
|
85
|
+
wait with cause `publication-lost` and implement re-runs with the refusal as
|
|
86
|
+
guidance.
|
|
87
|
+
|
|
47
88
|
## Widening an exhausted review loop
|
|
48
89
|
|
|
49
90
|
`--review-round-ceiling` is available only while the selected build has one open
|