@defrex/autobuild 1.0.0-beta.3 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SPEC.md +317 -20
- package/bin/ab-dispatch-generation.ts +93 -0
- package/docs/answering-blocked-builds.md +21 -3
- package/docs/architecture.md +166 -7
- package/docs/configuration.md +173 -5
- package/docs/integration-tree.md +87 -2
- package/docs/integration.md +54 -0
- package/docs/operator-api.md +58 -5
- package/docs/remote-store-protocol.md +4 -1
- package/docs/restacking.md +4 -1
- package/docs/setup.md +20 -0
- package/docs/spec-standard.md +23 -5
- package/package.json +3 -3
- package/packages/core/src/cli/artifact.ts +5 -4
- package/packages/core/src/cli/attention.ts +2 -0
- package/packages/core/src/cli/binary-direct.ts +190 -0
- package/packages/core/src/cli/binary-lifecycle.ts +46 -0
- package/packages/core/src/cli/binary.ts +24 -210
- package/packages/core/src/cli/build-control.ts +105 -2
- package/packages/core/src/cli/context.ts +41 -1
- package/packages/core/src/cli/dashboard/hand-pushed.ts +24 -0
- package/packages/core/src/cli/dashboard/handoff.ts +64 -0
- package/packages/core/src/cli/dashboard/integration-detail.ts +3 -0
- package/packages/core/src/cli/dashboard/model.ts +34 -10
- package/packages/core/src/cli/dashboard/render.ts +24 -2
- package/packages/core/src/cli/dashboard/rollback.ts +30 -0
- package/packages/core/src/cli/dispatch-args.ts +53 -0
- package/packages/core/src/cli/dispatch-crash-budget.ts +15 -0
- package/packages/core/src/cli/dispatch-frontend.ts +52 -5
- package/packages/core/src/cli/dispatch-handoff.ts +276 -0
- package/packages/core/src/cli/dispatch-launch-contract.ts +170 -0
- package/packages/core/src/cli/dispatch-launcher.ts +580 -0
- package/packages/core/src/cli/dispatch-parent-watch.ts +44 -0
- package/packages/core/src/cli/dispatch-preflight.ts +272 -0
- package/packages/core/src/cli/dispatch-presentation-job.ts +46 -0
- package/packages/core/src/cli/dispatch-presentation-ownership.ts +9 -0
- package/packages/core/src/cli/dispatch-process.ts +22 -90
- package/packages/core/src/cli/dispatch-readiness.ts +47 -0
- package/packages/core/src/cli/dispatch-repository-feed.ts +5 -1
- package/packages/core/src/cli/dispatch-runtime-cache.ts +522 -0
- package/packages/core/src/cli/dispatch-runtime-dependencies.ts +291 -0
- package/packages/core/src/cli/dispatch-runtime-use.ts +336 -0
- package/packages/core/src/cli/dispatch-upgrade-controller.ts +221 -0
- package/packages/core/src/cli/dispatch-upgrade-install.ts +258 -0
- package/packages/core/src/cli/dispatch-upgrade-source.ts +309 -0
- package/packages/core/src/cli/dispatch-upgrade-target.ts +190 -0
- package/packages/core/src/cli/dispatch.ts +604 -60
- package/packages/core/src/cli/dispatcher-liveness.ts +1 -1
- package/packages/core/src/cli/harvest.ts +28 -11
- package/packages/core/src/cli/help.ts +6 -3
- package/packages/core/src/cli/installation.ts +5 -3
- package/packages/core/src/cli/main-checkout.ts +59 -0
- package/packages/core/src/cli/main.ts +15 -45
- package/packages/core/src/cli/node-verification-provenance.ts +97 -0
- package/packages/core/src/cli/repo-state.ts +3 -58
- package/packages/core/src/cli/repository-status.ts +67 -3
- package/packages/core/src/cli/runtime-spawn.ts +16 -0
- package/packages/core/src/cli/status.ts +57 -3
- package/packages/core/src/cli/upgrade-followup.ts +25 -0
- package/packages/core/src/cli/wait.ts +3 -0
- package/packages/core/src/cli/watch.ts +7 -0
- package/packages/core/src/config/live.ts +1 -0
- package/packages/core/src/config/schema.ts +8 -4
- package/packages/core/src/distribution-packaging.ts +116 -0
- package/packages/core/src/events/catalog.ts +6 -0
- package/packages/core/src/events/payloads.ts +53 -9
- package/packages/core/src/events/policy.ts +25 -0
- package/packages/core/src/events/repository.ts +184 -4
- package/packages/core/src/events/runtime.ts +16 -0
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +2515 -78
- package/packages/core/src/kernel/dispatch-drain-recovery.ts +121 -0
- package/packages/core/src/kernel/dispatch-status.ts +4 -2
- package/packages/core/src/kernel/dispatch-upgrade.ts +171 -0
- package/packages/core/src/kernel/dispatcher-liveness.ts +7 -0
- package/packages/core/src/kernel/generators/repository-journals.ts +82 -0
- package/packages/core/src/kernel/guarded-forge.ts +1 -1
- package/packages/core/src/kernel/harvest.ts +98 -4
- package/packages/core/src/kernel/integration-attention.ts +20 -0
- package/packages/core/src/kernel/integration-state.ts +80 -11
- package/packages/core/src/kernel/landing-readiness.ts +6 -1
- package/packages/core/src/kernel/mixed-version.ts +34 -0
- package/packages/core/src/kernel/node-polling.ts +160 -0
- package/packages/core/src/kernel/read-facts.ts +40 -5
- package/packages/core/src/kernel/reducer-registry.ts +3 -0
- package/packages/core/src/kernel/reducer.ts +75 -14
- package/packages/core/src/kernel/service-facts.ts +11 -4
- package/packages/core/src/operator/presentation.ts +7 -0
- package/packages/core/src/operator/query.ts +6 -2
- package/packages/core/src/operator/registry.ts +1 -1
- package/packages/core/src/plugins/load.ts +4 -1
- package/packages/core/src/plugins/runtime-snapshot.ts +128 -0
- package/packages/core/src/ports/forge/contract.ts +29 -0
- package/packages/core/src/ports/forge/github.ts +189 -61
- package/packages/core/src/ports/forge-failure.ts +1 -0
- package/packages/core/src/ports/forge-telemetry.ts +3 -0
- package/packages/core/src/ports/runner/session-env.ts +1 -0
- package/packages/core/src/ports/types.ts +10 -0
- package/packages/core/src/ports/workspace/distribution-archive.ts +22 -149
- package/packages/core/src/ports/workspace/distribution-release.ts +56 -0
- package/packages/core/src/ports/workspace/git-worktree.ts +2 -1
- package/packages/core/src/ports/workspace/local-build-execution.ts +37 -17
- package/packages/core/src/processes/build-child-exit.ts +5 -26
- package/packages/core/src/processes/build-runner.ts +81 -11
- package/packages/core/src/processes/dispatcher.ts +254 -23
- package/packages/core/src/processes/execution-no-progress.ts +6 -0
- package/packages/core/src/processes/execution-relaunch.ts +30 -0
- package/packages/core/src/processes/execution-settlement.ts +16 -7
- package/packages/core/src/processes/harvest-runner.ts +328 -292
- package/packages/core/src/processes/process-group-reaper.ts +17 -10
- package/packages/core/src/runtime-identity.ts +22 -3
- package/packages/core/src/store/contract.ts +153 -0
- package/packages/core/src/store/local/store.ts +197 -72
- package/packages/core/src/store/reduced-reads.ts +8 -0
- package/packages/core/src/store/reducer-value-shapes.json +5783 -3305
- package/packages/core/src/store/remote/client.ts +43 -0
- package/packages/core/src/store/repo-state-events.ts +20 -3
- package/packages/core/src/store/types.ts +7 -0
- package/skills/guide/SKILL.md +231 -23
- package/skills/guide/references/integration-tree.md +87 -2
- package/skills/guide/references/operator-api.md +53 -4
- package/skills/guide/references/plugin-authoring.md +45 -4
- package/skills/guide/references/remote-store-protocol.md +4 -1
- package/skills/guide/references/restacking.md +4 -1
- package/skills/guide/references/setup.md +20 -0
- package/skills/guide/references/spec-standard.md +23 -5
- package/skills/harvest/SKILL.md +4 -0
- package/skills/harvest-review/SKILL.md +4 -0
- package/skills/operate/SKILL.md +78 -8
- package/skills/spec/SKILL.md +19 -1
- package/skills/tickets/SKILL.md +19 -0
package/docs/architecture.md
CHANGED
|
@@ -89,7 +89,7 @@ remote-store protocol requires matching client and server versions.
|
|
|
89
89
|
| `packages/core/src/plugins/` | Strict versioned plugin manifests, dual-root repository/package Bun loading, owner-aware adapter registration, contract/credential metadata, and runtime-factory materialization | §3.2.1, §9 |
|
|
90
90
|
| `packages/core/src/plugin-sdk/` | The sole supported `@defrex/autobuild/plugin-sdk` barrel: port/manifest types, contract suites, and reference fakes | §3.2.1 |
|
|
91
91
|
| `packages/core/src/processes/` | build-runner and standalone child composition, durable execution config/diagnostics, dispatcher (+ janitor duty, harvest trigger, and the last-step orchestrator resume/reap/wake pass, origin-mode-gated), orchestrator tick step, harvest deterministic core + runner | §3.3, §7.1.2, §12, §15.7 |
|
|
92
|
-
| `packages/core/src/cli/` and `bin/` | The `ab` CLI — the only agent↔store channel — plus the shared presentation-only durable-progress projection, init/upgrade, the Store-only dispatch frontend, its private supervised kernel entry, and `bin/ab-build-runner.ts` (one child per build) | §8, §14, §16.3 |
|
|
92
|
+
| `packages/core/src/cli/` and `bin/` | The `ab` CLI — the only agent↔store channel — plus the shared presentation-only durable-progress projection, init/upgrade, the filesystem-only dispatch launcher and immutable generation cache, the Store-only dispatch frontend, its private supervised kernel entry, and `bin/ab-build-runner.ts` (one child per build) | §8, §14, §16.3 |
|
|
93
93
|
| `packages/core/src/cli/dashboard/` | `ab dispatch`'s fixed live frame: pure projection, renderer, poll cache, and deterministic image renderer | §14 |
|
|
94
94
|
| `bin/agent/ab` | Private launcher placed first on agent-session `PATH`; delegates to the canonical `bin/ab.ts` | §8.1 |
|
|
95
95
|
| `packages/core/src/config/` | `autobuild.toml` parsing and strict validation, plus the pure role-key consumability diagnostics `ab dispatch` reports at startup (`roles.ts`); user reference in `docs/configuration.md` | §9, §16.1 |
|
|
@@ -423,7 +423,83 @@ reaps the complete inherited process group, escalating group-wide from SIGTERM
|
|
|
423
423
|
through the existing bounded delay to SIGKILL; only then is it a liveness signal
|
|
424
424
|
and only then does the kernel release the exact lease. Interactive `ab dispatch` runs the kernel owner in the
|
|
425
425
|
private `bin/ab-dispatch-kernel.ts` child;
|
|
426
|
-
`dispatch-
|
|
426
|
+
`dispatch-launcher.ts` freezes the invoking distribution and installed production
|
|
427
|
+
dependencies offline under `.autobuild/runtime/`, then starts
|
|
428
|
+
`bin/ab-dispatch-generation.ts` using the pinned v1 process contract. It loads
|
|
429
|
+
only filesystem/process helpers and never opens a Store. The generation's
|
|
430
|
+
frontend, kernel, local runners and agent CLI use one completed immutable root;
|
|
431
|
+
`dispatch-runtime-use.ts` protects current/previous/held/live entries during
|
|
432
|
+
spawn and pruning. Source guest archives are captured at installation. Source generations deliver
|
|
433
|
+
the exact packed source archive; registry generations keep a separate,
|
|
434
|
+
digest-validated GitHub release asset matching the cached manifest version,
|
|
435
|
+
resolved and atomically cached at first guest use. Local launch remains offline.
|
|
436
|
+
Installation provenance uses Bun store/lock evidence across isolated and hoisted
|
|
437
|
+
layouts, preserving source/forge markers before staging.
|
|
438
|
+
The normalized host archive retains its independent compiler boundary. Guest
|
|
439
|
+
archive delivery uses the authenticated provider transport after launcher startup,
|
|
440
|
+
keeping HTTP code outside the resident launcher’s eager filesystem/process graph.
|
|
441
|
+
`--once`, origin/hosted paths and injected hot dashboard rendering remain direct.
|
|
442
|
+
`dispatch-upgrade-target.ts` reads manifest and lock blobs from one authoritative
|
|
443
|
+
base snapshot, or rereads the original install pathname when unpinned. Frozen
|
|
444
|
+
launcher eligibility selects source mode for a source root sharing the dispatched
|
|
445
|
+
repository's Git common directory. `dispatch-upgrade-source.ts` exports exact
|
|
446
|
+
commits into private cache staging and fingerprints actual packed contents and
|
|
447
|
+
the production-reachable Bun lock closure. Source preparation installs with the
|
|
448
|
+
frozen lock and scripts disabled, then publishes through the existing immutable
|
|
449
|
+
runtime cache. Neither resolution nor installation changes an operator/build
|
|
450
|
+
worktree. Excluded-file commits change observed provenance without adoption.
|
|
451
|
+
`dispatch-upgrade-install.ts` stages and validates exact targets;
|
|
452
|
+
`dispatch-upgrade-controller.ts` checks immediately and every 60 seconds, suppresses
|
|
453
|
+
failed target inputs and publishes durable prepared targets. `dispatch-preflight.ts`
|
|
454
|
+
checks target configuration, provider compatibility and actual protocol-write
|
|
455
|
+
admission before requesting yield. `kernel/dispatch-upgrade.ts` folds correlated
|
|
456
|
+
acceptance, terminal release, takeover, per-execution retirement and completion.
|
|
457
|
+
The runtime-owned `dispatch-handoff.ts` reader lets the filesystem-only launcher
|
|
458
|
+
supervise overlapping generations without owning Store or config decisions.
|
|
459
|
+
A runtime-owned repository-record projection binds the journal transport before
|
|
460
|
+
initial spawn and across handoffs, including when later config edits are invalid.
|
|
461
|
+
`dispatch-frontend.ts` acknowledges terminal release only after joining input
|
|
462
|
+
and rendering. The old kernel releases repository authority but retains local
|
|
463
|
+
execution supervision until completion or the hot policy deadline. Build-log
|
|
464
|
+
execution authorization permits expected mixed-version deferral without restart
|
|
465
|
+
attention. Accepted authorization also carries the target runtime.
|
|
466
|
+
`processes/execution-relaunch.ts` compares immutable identities from existing
|
|
467
|
+
boundary facts; local and remote runners finish the phase, record an instance-correlated
|
|
468
|
+
relaunch request and clean up. Confirmed teardown records a neutral relaunch
|
|
469
|
+
outcome. The current owner's ordinary lease sweep resumes durable work promptly,
|
|
470
|
+
including after an ownership gap. Remote captures authorize exact guest runtimes
|
|
471
|
+
independently of local retirement, including late attachment after completion.
|
|
472
|
+
The existing repository execution digests bound recovery and handoff capture reads
|
|
473
|
+
to open executions; multiple historical captures share one read per live build.
|
|
474
|
+
Guests detach without losing leases; re-attachment refreshes their archive before
|
|
475
|
+
the next phase. Deadline suspension applies only to local runners. `kernel/dispatch-drain-recovery.ts` reconstructs unfinished retirement
|
|
476
|
+
after a predecessor dies. Cutover suspends immediately when provider evidence
|
|
477
|
+
cannot establish safe overlap. Automatic upgrades can be disabled; targets
|
|
478
|
+
without preflight capability require manual restart.
|
|
479
|
+
|
|
480
|
+
**Automatic runtime rollback.** The filesystem/process-only launcher in
|
|
481
|
+
`cli/dispatch-launcher.ts` owns the crash budget, anchored to durable takeover.
|
|
482
|
+
`cli/dispatch-crash-budget.ts` counts three failed exits within ten minutes;
|
|
483
|
+
`cli/dispatch-launch-contract.ts` negotiates a separate rollback capability while
|
|
484
|
+
preserving v1 launch/overlap compatibility. Generation-owned readers expose takeover
|
|
485
|
+
and capability evidence. `cli/dispatch-handoff.ts` validates recovery against that
|
|
486
|
+
evidence and deposits the idempotent rollback fact after lease acquisition.
|
|
487
|
+
`kernel/dispatch-upgrade.ts` reduces lineage holds and historical rollback;
|
|
488
|
+
`cli/dispatch-upgrade-controller.ts` clears a hold only after resolving a different
|
|
489
|
+
target. `cli/dispatch-runtime-use.ts` transfers reservations to generation-owned
|
|
490
|
+
hold retention under the pruning lock. Existing runner leases and decisive-read
|
|
491
|
+
deferrals remain the boundary recovery authority.
|
|
492
|
+
|
|
493
|
+
Local harvest suspends durably before repository lease release on handoff or
|
|
494
|
+
clean stop. The next generation resumes eligible native sessions with fresh
|
|
495
|
+
logical credentials, or records a reasoned `harvest.session.resume-fallback`
|
|
496
|
+
and starts fresh. Orderly suspension spends no recovery attempt; real crashes
|
|
497
|
+
retain recovery accounting.
|
|
498
|
+
|
|
499
|
+
The advisory
|
|
500
|
+
`dispatcher.upgrade-target-resolved` fact independently retains each run's latest
|
|
501
|
+
successful mode/base/SHA observation without clearing failure evidence; repeated
|
|
502
|
+
identical observations append nothing. `dispatch-frontend.ts` owns only terminal/Store adapters and
|
|
427
503
|
`dispatch-process.ts` owns child supervision. SIGINT, SIGHUP, SIGQUIT, and
|
|
428
504
|
SIGTERM restore terminal modes immediately and begin one supervised drain;
|
|
429
505
|
persistent frontend and child handlers keep repeated signals graceful until the
|
|
@@ -459,7 +535,7 @@ appends transcriptless reclaimed `session.ended` facts for unrelated open
|
|
|
459
535
|
sessions before `runner.attached` cites that same boundary. Partial closure is
|
|
460
536
|
retry-safe; historical orphan-only logs keep their
|
|
461
537
|
old projection until an actual takeover records those facts. The supervisor
|
|
462
|
-
|
|
538
|
+
waits for graceful kernel-child teardown without a force-kill deadline
|
|
463
539
|
and projects the same normal, forced, or abnormal result (with available
|
|
464
540
|
process/error detail) that the repository run-stopped evidence records. Ordinary
|
|
465
541
|
kernel teardown stops and reaps all build groups. Every build-child terminal
|
|
@@ -902,7 +978,10 @@ alternate targets, and independently inherited build-session budget.
|
|
|
902
978
|
`build-runner.ts` and `harvest-runner.ts` own the deterministic
|
|
903
979
|
primary-first attempt loop: each substitution opens a new session bracket,
|
|
904
980
|
records provenance on its start, and only complete-chain exhaustion consumes an
|
|
905
|
-
existing phase/session attempt.
|
|
981
|
+
existing phase/session attempt. A suspended harvest turn first tries its recorded
|
|
982
|
+
route, then the remaining targets in configured order; provider evidence retains
|
|
983
|
+
configured indexes, and only the primary stays live for producer revisions.
|
|
984
|
+
This keeps runtime availability routing out of
|
|
906
985
|
agent judgment while preserving transcript and artifact actor attribution.
|
|
907
986
|
|
|
908
987
|
A normal `bun test` runs the memory/fake/local registrations, including a fake
|
|
@@ -923,12 +1002,39 @@ A claim freezes the ticket's current assets into the build (SPEC §6.3):
|
|
|
923
1002
|
`spec.revised.assets`) record the pinned revisions, `state.pinnedAssets` in the
|
|
924
1003
|
reducer projects them, `getPinnedTicketAsset` reads them back by pinned revision,
|
|
925
1004
|
and `ab context` writes them under `.ab/assets/`.
|
|
1005
|
+
|
|
926
1006
|
For hosted tickets, `store/ticket-asset-snapshots.ts` copies exact revisions
|
|
927
1007
|
into chunked immutable repository artifacts in the build store before pinning.
|
|
928
1008
|
Reads use explicit manifest/chunk revisions without a ticket connection. Old
|
|
929
1009
|
pins retain ticket-row reads; existing service attachments need no migration,
|
|
930
1010
|
and attachments in old local stores are not moved.
|
|
931
1011
|
|
|
1012
|
+
In node `verify:*` context, `nodeVerification` in the manifest identifies the frozen
|
|
1013
|
+
`range`, `indexPath`, `contributions`, `handPushedCommits` and `unattributedCommits`. Each contribution
|
|
1014
|
+
has `build`, its current stored `ticket` identity, `spec: {kind: 'spec', rev}`,
|
|
1015
|
+
`specPath` and `commits`. The JSON index repeats this metadata and adds the
|
|
1016
|
+
exhaustive ordered `commits: [{sha, build?}]` mapping. Paths are workspace-relative
|
|
1017
|
+
and reflect scratch allocation, including legacy tracked-file collisions.
|
|
1018
|
+
Contribution specs normally live at `.ab/contributions/<build>/spec.md`; the index
|
|
1019
|
+
normally lives at `.ab/node-verification.json`. These files are marked `derived`
|
|
1020
|
+
in `materialized`, with their source build and revision recorded in the metadata.
|
|
1021
|
+
|
|
1022
|
+
Membership comes from build identity trailers on every commit reachable in the
|
|
1023
|
+
frozen parent-to-head range, including earlier cycles and merge side history.
|
|
1024
|
+
Specs use the current event-authorized revision, never an unsanctioned latest
|
|
1025
|
+
deposit or mutable ticket body. Unknown identities, ambiguous or invalid trailers,
|
|
1026
|
+
and missing source data fail hydration. Commits without a build trailer are
|
|
1027
|
+
listed as unattributed, a mechanical absence of a trailer rather than an authorization verdict.
|
|
1028
|
+
`handPushedCommits: [{sha, originalSha, message}]` identifies node-owned hand-pushed
|
|
1029
|
+
commits in the frozen range. Ownership uses the durable first-parent contribution
|
|
1030
|
+
boundary; inherited and merge-side history are not automatically owned. Confirmed
|
|
1031
|
+
rewrite aliases preserve original identity, and `message` is the full commit message.
|
|
1032
|
+
These messages express maintainer-authorized intent: judge quality and consistency;
|
|
1033
|
+
never fail these commits solely for lacking a covering spec.
|
|
1034
|
+
Other node changes are authorized when the node spec or the spec of the contribution
|
|
1035
|
+
that introduced it covers it; use the commit mapping to find that spec.
|
|
1036
|
+
Leaf verification context is unchanged.
|
|
1037
|
+
|
|
932
1038
|
Both `ab dispatch` and sessionless `ab ticket` load the repository's plugins
|
|
933
1039
|
before selecting their TicketSource; dispatch passes that one adapter instance
|
|
934
1040
|
through readiness, dependency, harvest, and completion paths. The Linear,
|
|
@@ -1263,7 +1369,8 @@ columns. Reservations live in the event stream and survive lease expiry.
|
|
|
1263
1369
|
The contribution boundary advances only on completed restacks. Reachable build
|
|
1264
1370
|
identities include inherited parent changes; foreign counts include only the
|
|
1265
1371
|
node's own contribution, preventing a parent rewrite from inflating descendants'
|
|
1266
|
-
foreign
|
|
1372
|
+
hand-pushed inventory (node-owned foreign commits). Status text and JSON expose
|
|
1373
|
+
both inventory and active items, retaining original identities after rewrites.
|
|
1267
1374
|
|
|
1268
1375
|
|
|
1269
1376
|
Integration completion is sampled by `kernel/integration-completeness.ts` from
|
|
@@ -1315,8 +1422,10 @@ SIGINT/SIGTERM. A conditional artifact deposit records `session.suspended`
|
|
|
1315
1422
|
with cause `shutdown`, the native handle, active milliseconds, partial transcript
|
|
1316
1423
|
and any known incremental usage. A terminal fact that lands first prevents
|
|
1317
1424
|
suspension; suspension fences the old session's terminal credentials permanently.
|
|
1318
|
-
|
|
1319
|
-
|
|
1425
|
+
Graceful shutdown waits for provider cleanup and durable suspension without a
|
|
1426
|
+
wall-clock force-exit deadline. Only after the runner leader exits does bounded
|
|
1427
|
+
process-group cleanup reap remaining descendants. Abnormal parent loss retains
|
|
1428
|
+
the detached reaper recovery path.
|
|
1320
1429
|
|
|
1321
1430
|
On attachment the runner retains an eligible current phase/round session and
|
|
1322
1431
|
records takeover. Matching host, workspace and runtime permit native resume;
|
|
@@ -1396,6 +1505,56 @@ ordered by descending count then build name; repository requests are unattribute
|
|
|
1396
1505
|
Repository status names a hotspot only when one build makes at least two requests
|
|
1397
1506
|
and more than half of attributed requests. Telemetry never controls workflow.
|
|
1398
1507
|
|
|
1508
|
+
GitHub shares in-flight and completed PR, branch/ref and comparison observations
|
|
1509
|
+
across builds within one dispatcher tick. Opened nodes prime their tips and
|
|
1510
|
+
commit distance with at most two reads: PR plus comparison, or parent branch
|
|
1511
|
+
plus reversed comparison without a PR. Priming is best-effort: failures add a
|
|
1512
|
+
diagnostic and ordinary parent/target observations continue, so a deleted parent
|
|
1513
|
+
can still be replaced. Forge cooldowns and rate limits retain their gates.
|
|
1514
|
+
Each admitted poll revalidates mutable resources
|
|
1515
|
+
using exact-resource ETags; authenticated 304s spare the REST primary quota.
|
|
1516
|
+
Adapter caches are bounded and restart/eviction falls back to fresh reads.
|
|
1517
|
+
Writes, including Git publication and rewrites, invalidate observations before
|
|
1518
|
+
attempting the mutation so acknowledgement reads remain fresh. Leaf PR polling
|
|
1519
|
+
keeps its existing cadence. Readiness and landing inspections remain fresh.
|
|
1520
|
+
|
|
1521
|
+
For node cadence, durable wakes, restart behavior and CLI evidence, see
|
|
1522
|
+
[node polling and status](integration-tree.md#polling-and-status).
|
|
1523
|
+
|
|
1524
|
+
The total includes all attempted requests. Optional `restPrimary`,
|
|
1525
|
+
`restNotModified` and `graphql` counts distinguish REST responses charged to the
|
|
1526
|
+
primary quota, REST 304s and GraphQL calls. Transport failures and historical or
|
|
1527
|
+
legacy observations can remain unclassified; absent fields never imply zero.
|
|
1528
|
+
Shared requests are attributed to their first requester; cache hits count zero.
|
|
1529
|
+
|
|
1399
1530
|
Ticket-source continuity is reduced by `kernel/ticket-migrations.ts` from durable
|
|
1400
1531
|
repository `tickets.migration-recorded` facts. Import publishes only complete
|
|
1401
1532
|
mappings; current-operation resolvers leave build records and old events intact.
|
|
1533
|
+
|
|
1534
|
+
## Integration verification reporting
|
|
1535
|
+
|
|
1536
|
+
A failed node verification cycle records `integration.verification-failed` with its prepared cycle id, failed steps, exact head and parent, and guidance to file a repair child targeting the node. The kernel reports durable failed receipts; dispatcher housekeeping recovers missing reports for the current cycle using a per-cycle CAS guard. Superseded cycles are never backfilled with repair instructions: recovery requires the latest prepared cycle to match the node’s observed head and parent. This fact is decisive evidence and bookkeeping, and does not change verification or leaf routing.
|
|
1537
|
+
|
|
1538
|
+
Default watch and new hosted wake settings include this event. Watch cursors deliver each failed cycle once and baseline failures when first armed; reconcile build status after arming. `ab wait --for attention` also detects a current failed node cycle before the report is written. Historical facts remain queryable after repair without retaining current attention. Explicit event globs and existing stored wake choices are preserved.
|
|
1539
|
+
|
|
1540
|
+
`packages/core/src/kernel/integration-state.ts` retains reported cycle identities and selects missing failures from exact receipts. `kernel/integration-attention.ts` owns their CAS append; `processes/build-runner.ts` reports after verification and `processes/dispatcher.ts` recovers missing facts before per-build janitor gates. The shared `cli/dashboard/model.ts` projects current failure as blocked attention for both frontends.
|
|
1541
|
+
|
|
1542
|
+
## Operator node spec revisions
|
|
1543
|
+
|
|
1544
|
+
Operators may explicitly revise an opened idle collecting node or a node blocked on failed
|
|
1545
|
+
integration verification without an escalation. Use
|
|
1546
|
+
`ab answer <node> --revise-spec replacement.md` or, after amending its ticket,
|
|
1547
|
+
`ab answer <node> --revise-spec-from-ticket`. Ticket edits alone do not revise
|
|
1548
|
+
the build. Both forms enforce the same spec standard as leaf revisions.
|
|
1549
|
+
Each kernel `spec.revised` records the exact artifact and operator identity
|
|
1550
|
+
(with optional transport provenance); earlier revisions remain readable.
|
|
1551
|
+
Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
|
|
1552
|
+
The node recollects and verifies the new revision, including on the same head
|
|
1553
|
+
and parent after a failed cycle. Earlier cycles remain historical evidence
|
|
1554
|
+
and cannot block or authorize landing under the replacement. Children keep
|
|
1555
|
+
their specs, claims and targets; contributions are not restarted.
|
|
1556
|
+
Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
1557
|
+
pending controls, landing intent and ended PRs refuse the no-escalation path.
|
|
1558
|
+
A concurrent state change refuses publication with a retry explanation;
|
|
1559
|
+
uncited artifacts are inert. Leaves still require an open escalation and
|
|
1560
|
+
restart from `plan`.
|
package/docs/configuration.md
CHANGED
|
@@ -223,6 +223,7 @@ These fields hot-reload:
|
|
|
223
223
|
| `[verify]` and `[finalize]` | Next engine step selection for a build whose OWN branch carries it. Dispatcher readiness, resume, and recovery use the same pin. An approved plan's stored verify selection remains authoritative, and a base-branch reload does not retarget an in-flight build. |
|
|
224
224
|
| `[workspace]` provider and config (including `provisioning`) | Next launch of a build whose OWN branch carries it. A base-branch reload never re-provisions an in-flight build. |
|
|
225
225
|
| `[roles]` | Next agent invocation for that role. Runtime, model, args, alternates, and the session budget are captured together and delivered live. |
|
|
226
|
+
| `[upgrade]` | Cancels preparation when disabled; automatic target checks every 60 seconds. |
|
|
226
227
|
| `[policy]` | Next policy, convergence, or agent-session boundary, delivered live. A running session keeps its captured budget. |
|
|
227
228
|
| `tickets.readyLabels`, `tickets.readyState`, `tickets.readyAssignee` | Next ready-ticket scan. |
|
|
228
229
|
| `tickets.triageState`, `tickets.proposalState` | Next dispatcher handback or harvest filing boundary. |
|
|
@@ -672,12 +673,14 @@ checkout-only hooks such as Husky are not provisioning dependencies. A Bun
|
|
|
672
673
|
install or verification failure identifies the configured image and expected
|
|
673
674
|
universal-image capabilities, deletes the partial environment, and leaves no
|
|
674
675
|
readiness marker. A retry also deletes any named sandbox without that marker
|
|
675
|
-
instead of adopting partial setup. The installed distribution's identity — package version
|
|
676
|
-
protocol version — is recorded in the guest's
|
|
676
|
+
instead of adopting partial setup. The installed distribution's identity — package version, remote-store
|
|
677
|
+
protocol version and SHA256 of the exact installed archive — is recorded in the guest's
|
|
677
678
|
`/opt/autobuild/.distribution-version` marker; a reused sandbox whose marker
|
|
678
679
|
no longer matches the identity the current system would deliver is refreshed
|
|
679
680
|
by reinstalling the archive before reuse, so an upgraded dispatcher retrofits
|
|
680
|
-
its persistent guests
|
|
681
|
+
its persistent guests. Cached registry generations deliver their own manifest
|
|
682
|
+
version’s validated GitHub release asset, resolved on first guest use and cached
|
|
683
|
+
separately from the normalized host archive. Local launches need no asset fetch; source generations deliver exact packed source bytes (see "Guest distribution version selection and delivery"
|
|
681
684
|
in docs/setup.md for the release-and-upgrade delivery path and the hosted
|
|
682
685
|
store's supported client window). Immediately
|
|
683
686
|
before every build-child launch, the adapter verifies the
|
|
@@ -882,6 +885,32 @@ Cross-field validation rejects:
|
|
|
882
885
|
selectors are validated even though the mandatory step will not use them for
|
|
883
886
|
applicability.
|
|
884
887
|
|
|
888
|
+
In node `verify:*` context, `nodeVerification` in the manifest identifies the frozen
|
|
889
|
+
`range`, `indexPath`, `contributions`, `handPushedCommits` and `unattributedCommits`. Each contribution
|
|
890
|
+
has `build`, its current stored `ticket` identity, `spec: {kind: 'spec', rev}`,
|
|
891
|
+
`specPath` and `commits`. The JSON index repeats this metadata and adds the
|
|
892
|
+
exhaustive ordered `commits: [{sha, build?}]` mapping. Paths are workspace-relative
|
|
893
|
+
and reflect scratch allocation, including legacy tracked-file collisions.
|
|
894
|
+
Contribution specs normally live at `.ab/contributions/<build>/spec.md`; the index
|
|
895
|
+
normally lives at `.ab/node-verification.json`. These files are marked `derived`
|
|
896
|
+
in `materialized`, with their source build and revision recorded in the metadata.
|
|
897
|
+
|
|
898
|
+
Membership comes from build identity trailers on every commit reachable in the
|
|
899
|
+
frozen parent-to-head range, including earlier cycles and merge side history.
|
|
900
|
+
Specs use the current event-authorized revision, never an unsanctioned latest
|
|
901
|
+
deposit or mutable ticket body. Unknown identities, ambiguous or invalid trailers,
|
|
902
|
+
and missing source data fail hydration. Commits without a build trailer are
|
|
903
|
+
listed as unattributed, a mechanical absence of a trailer rather than an authorization verdict.
|
|
904
|
+
`handPushedCommits: [{sha, originalSha, message}]` identifies node-owned hand-pushed
|
|
905
|
+
commits in the frozen range. Ownership uses the durable first-parent contribution
|
|
906
|
+
boundary; inherited and merge-side history are not automatically owned. Confirmed
|
|
907
|
+
rewrite aliases preserve original identity, and `message` is the full commit message.
|
|
908
|
+
These messages express maintainer-authorized intent: judge quality and consistency;
|
|
909
|
+
never fail these commits solely for lacking a covering spec.
|
|
910
|
+
Other node changes are authorized when the node spec or the spec of the contribution
|
|
911
|
+
that introduced it covers it; use the commit mapping to find that spec.
|
|
912
|
+
Leaf verification context is unchanged.
|
|
913
|
+
|
|
885
914
|
### Role routing for an agent verify step
|
|
886
915
|
|
|
887
916
|
An agent verify step selects `[roles.<step>]` by its **logical step name** —
|
|
@@ -1200,6 +1229,7 @@ Optional. Every field receives its own default. All are positive integers except
|
|
|
1200
1229
|
|
|
1201
1230
|
| Field | Default | Constraints | Purpose |
|
|
1202
1231
|
|---|---:|---|---|
|
|
1232
|
+
| `upgradeDrainSeconds` | `900` | positive integer | Deadline for a retiring generation, relative to handoff start; hot-reloaded during drain. |
|
|
1203
1233
|
| `sessionBudgetSeconds` | `3600` | positive integer | Active-time bound for each build agent session unless its logical role overrides it. Native continuation retains the original ceiling; suspension does not consume it. |
|
|
1204
1234
|
| `stallRounds` | `3` | positive integer | Escalate when the same review finding survives this many rounds. |
|
|
1205
1235
|
| `maxVerifyAttempts` | `3` | positive integer | Bound failure-driven verify → implement retry cycles. |
|
|
@@ -1210,6 +1240,8 @@ Optional. Every field receives its own default. All are positive integers except
|
|
|
1210
1240
|
| `maxReviewRounds` | `6` | positive integer | Default bound for each plan/review and implement/review convergence loop. An operator may replace it for one parked build loop and current spec revision with `ab answer --review-round-ceiling`; other builds are unaffected. |
|
|
1211
1241
|
| `harvestThreshold` | `5` | positive integer | New unclaimed observation occurrences needed to start one harvest run. |
|
|
1212
1242
|
| `janitorFailureAttentionSeconds` | `600` | positive integer | Consecutive janitor failure duration before build attention. |
|
|
1243
|
+
| `nodeIdleAfterSeconds` | `600` | positive integer | Quiet period before opened integration nodes enter idle polling. |
|
|
1244
|
+
| `nodeIdlePollSeconds` | `120` | positive integer | Interval between idle node checks; durable activity wakes the next tick. |
|
|
1213
1245
|
| `janitorBackoffMaxSeconds` | `300` | positive integer | Cap on exponential janitor retry delay, starting at 30 seconds. |
|
|
1214
1246
|
| `harvestMaxDrift` | `3` | nonnegative integer | Other builds merged after the oldest unclaimed observation needed to start a run; `0` disables drift. |
|
|
1215
1247
|
|
|
@@ -1484,7 +1516,7 @@ restart-classified as a whole.
|
|
|
1484
1516
|
| `model` | — | nonblank string, required when `enabled = true` | Provider-qualified model string for the turn runner, in the same vocabulary as `[roles]` model strings (a leading `vercel-ai-gateway/` prefix is accepted and stripped). Resolved through the deployment's gateway credential. |
|
|
1485
1517
|
| `invocationBudgetSeconds` | `240` | positive integer, clamped to 300 | Wall-clock budget for one turn invocation. A larger value is clamped — not rejected — to the 300-second hosted function limit the runner executes under (`ORCHESTRATOR_ROUTE_LIMIT_SECONDS`, the same number the operator route pins as `maxDuration`). |
|
|
1486
1518
|
| `approvals` | see below | array of `tool` or `tool:qualifier` strings | Registry tool names whose calls suspend a turn until the operator answers. Default: `["builds.control:abort", "builds.control:discard", "builds.answer:revise-spec", "sandbox.publish", "tickets.move:ready"]`. Empty (`[]`) means none — autonomous operation. An entry naming an absent or unknown tool is **inert by design**, never a config error: the list stays stable while the registry grows, and a tool's removal cannot break parsing. A `tool:qualifier` entry applies to the named discriminator value only (for example `tickets.move:ready` approves moving a ticket to `ready`); for a tool without a discriminator, only the bare form matches. |
|
|
1487
|
-
| `wake` | inherits the default | array of event-type globs | The attention events a **new** session wakes for. Kept schema-optional so absent (inherit the
|
|
1519
|
+
| `wake` | inherits the default | array of event-type globs | The attention events a **new** session wakes for. Kept schema-optional so absent (inherit the legacy hosted wake set including `integration.verification-failed`, independently of CLI watch defaults) and `[]` (never wake; message-only) stay distinct. Each glob must match at least one build or repository-journal event type, validated with the same compiler `ab watch` uses. Existing sessions never retroactively inherit; an explicit `PUT .../wake` always wins. |
|
|
1488
1520
|
| `sandbox` | — | strict subtable; absence reads as the defaults | Sandbox behavior knobs. |
|
|
1489
1521
|
|
|
1490
1522
|
`[orchestrator.sandbox]` fields:
|
|
@@ -2024,7 +2056,7 @@ attention. Autobuild never rewrites the target to undo either outcome. Merge
|
|
|
2024
2056
|
gates and the serialized node-writer publication rules remain authoritative.
|
|
2025
2057
|
### Failure budgets and own-build read deferrals
|
|
2026
2058
|
|
|
2027
|
-
`policy.maxVerifyAttempts` counts distinct failed logical verify cycles after
|
|
2059
|
+
For leaves, `policy.maxVerifyAttempts` counts distinct failed logical verify cycles after
|
|
2028
2060
|
the latest spec revision. Passing and skipped cycles, including target movement
|
|
2029
2061
|
through restack or reconcile, consume zero. Cycle identifiers remain monotonic;
|
|
2030
2062
|
pass, pass, pass, fail at cycle 4 spends one failure. Duplicate completion
|
|
@@ -2051,3 +2083,139 @@ execution and unchanged-base progress budgets retain their existing accounting.
|
|
|
2051
2083
|
|
|
2052
2084
|
Default `ab watch` and `ab wait --for attention` include
|
|
2053
2085
|
`phase.deferral-escalated`; explicit event filters replace the default set.
|
|
2086
|
+
|
|
2087
|
+
## Integration verification attention
|
|
2088
|
+
|
|
2089
|
+
A failed node verification cycle records `integration.verification-failed` with its prepared cycle id, failed steps, exact head and parent, and guidance to file a repair child targeting the node. The kernel reports durable failed receipts; dispatcher housekeeping recovers missing reports for the current cycle using a per-cycle CAS guard. Superseded cycles are never backfilled with repair instructions: recovery requires the latest prepared cycle to match the node’s observed head and parent. This fact is decisive evidence and bookkeeping, and does not change verification or leaf routing.
|
|
2090
|
+
|
|
2091
|
+
Default watch and new hosted wake settings include this event. Watch cursors deliver each failed cycle once and baseline failures when first armed; reconcile build status after arming. `ab wait --for attention` also detects a current failed node cycle before the report is written. Historical facts remain queryable after repair without retaining current attention. Explicit event globs and existing stored wake choices are preserved.
|
|
2092
|
+
|
|
2093
|
+
## Immutable dispatcher generations
|
|
2094
|
+
|
|
2095
|
+
Resident checkout dispatch runs from an immutable generation snapshot under the
|
|
2096
|
+
main checkout's `.autobuild/runtime/` cache. Configuration and plugin selection
|
|
2097
|
+
still use the checkout. A launcher freezes the currently installed distribution
|
|
2098
|
+
and production dependencies offline; all later local runners and agent CLIs use
|
|
2099
|
+
that same snapshot. Automatic adoption is enabled by default through `[upgrade]`
|
|
2100
|
+
below; a manual restart is required when automatic upgrades are disabled or the
|
|
2101
|
+
launcher contract changes. `--once`, origin mode and hosted cron retain their
|
|
2102
|
+
direct execution paths.
|
|
2103
|
+
|
|
2104
|
+
## `[upgrade]`
|
|
2105
|
+
|
|
2106
|
+
`[upgrade]` is a strict, hot-reloaded table:
|
|
2107
|
+
|
|
2108
|
+
| Field | Default | Meaning |
|
|
2109
|
+
| --- | --- | --- |
|
|
2110
|
+
| `automatic` | `true` | Check and adopt changed runtime targets automatically. |
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
<!-- config-fragment -->
|
|
2114
|
+
```toml
|
|
2115
|
+
[upgrade]
|
|
2116
|
+
automatic = true
|
|
2117
|
+
```
|
|
2118
|
+
|
|
2119
|
+
`automatic` defaults to true, including for older saved configuration. Resident
|
|
2120
|
+
checkout dispatchers check immediately and every **60 seconds**, independently
|
|
2121
|
+
of ticket scans. A dependency or devDependency declaration of
|
|
2122
|
+
`@defrex/autobuild` on the authoritative forge base branch selects **pinned**
|
|
2123
|
+
mode. Manifest and `bun.lock` must agree at the same commit. Working-tree pins,
|
|
2124
|
+
feature branches and stale tracking refs never select a runtime. Unsupported or
|
|
2125
|
+
missing declared-dependency metadata raises attention rather than switching modes.
|
|
2126
|
+
Without a declaration, **installed** mode rereads the original installation
|
|
2127
|
+
pathname across handoffs. A launch from a source root sharing the dispatched
|
|
2128
|
+
repository's Git common directory selects **source** mode first. The launcher
|
|
2129
|
+
freezes that eligibility and the initial packaged-content baseline across
|
|
2130
|
+
successors; changing the operator checkout cannot change what a generation runs.
|
|
2131
|
+
Source targets use the forge-authoritative base commit. Installation exports that
|
|
2132
|
+
exact commit into private cache staging, requires the committed Bun lock, and runs
|
|
2133
|
+
`bun install --frozen-lockfile --ignore-scripts --no-progress`. The immutable
|
|
2134
|
+
cached distribution records that commit and follows normal cache pruning.
|
|
2135
|
+
|
|
2136
|
+
Source equality compares actual packed contents and production-reachable lock
|
|
2137
|
+
records, including nested dependencies, rather than version or SHA. An excluded
|
|
2138
|
+
RFC, website or test change does not hand off; documentation included by the
|
|
2139
|
+
package's files rules does. Unrelated workspace lock records do not trigger an
|
|
2140
|
+
upgrade. Unsupported reachable dependency metadata raises attention.
|
|
2141
|
+
|
|
2142
|
+
A successor first validates configuration and the actual selected store without
|
|
2143
|
+
starting repository work or terminal input/output. Provider compatibility evidence
|
|
2144
|
+
chooses drain when sharing is safe and cutover otherwise. SQLite compares its
|
|
2145
|
+
untouched catalog with target requirements; HTTP uses the live service's client
|
|
2146
|
+
and protocol admission. Missing evidence chooses cutover. A target outside the hosted client overlap
|
|
2147
|
+
window also requires cutover; target admission and successful protocol writes
|
|
2148
|
+
are still mandatory. Cutover never makes a rejected target runnable. Successful durable
|
|
2149
|
+
protocol writes are also required: a service that admits the client but rejects
|
|
2150
|
+
a new yield fact fails preflight, leaving the predecessor active with target and
|
|
2151
|
+
reason in repository attention. Failed targets are not retried every tick; a change in selected-store compatibility
|
|
2152
|
+
evidence allows the normal target-check cadence to retry.
|
|
2153
|
+
|
|
2154
|
+
Local harvest suspends durably before repository lease release on handoff or
|
|
2155
|
+
clean stop. The next generation resumes eligible native sessions with fresh
|
|
2156
|
+
logical credentials, or records a reasoned `harvest.session.resume-fallback`
|
|
2157
|
+
and starts fresh. Orderly suspension spends no recovery attempt; real crashes
|
|
2158
|
+
retain recovery accounting.
|
|
2159
|
+
|
|
2160
|
+
The predecessor serializes acceptance with ticks and launch admission, joins
|
|
2161
|
+
repository-owned harvest and provisioning work, and records the exact local
|
|
2162
|
+
executions, start time and deadline. Its terminal frontend removes and joins
|
|
2163
|
+
input/render work before acknowledging terminal release. Only after that durable
|
|
2164
|
+
acknowledgement and a successful repository lease claim may the successor draw
|
|
2165
|
+
or consume input. Only the successor ticks, claims, runs janitor/harvest and
|
|
2166
|
+
launches runners. Execution leases remain with existing local runners; remote
|
|
2167
|
+
executions detach immediately. Their exact instances and recorded guest runtimes
|
|
2168
|
+
are captured separately on `dispatcher.handoff-started.remoteBuilds`. This
|
|
2169
|
+
authorization work survives local retirement completion and late attachment;
|
|
2170
|
+
it never adds to local drain counts or delays predecessor exit. Guests retain
|
|
2171
|
+
their leases and heartbeats and request neutral relaunch after their current
|
|
2172
|
+
phase completes. The successor re-attaches with refreshed guest bytes.
|
|
2173
|
+
|
|
2174
|
+
A draining predecessor supervises its captured local executions until they settle
|
|
2175
|
+
or `policy.upgradeDrainSeconds` (900 seconds by default) elapses. The deadline
|
|
2176
|
+
tracks accepted live policy changes relative to the original start. Remaining
|
|
2177
|
+
local sessions suspend through the normal durable native-resume path before
|
|
2178
|
+
process-group cleanup. Cutover uses this suspension path immediately and waits
|
|
2179
|
+
for predecessor stop before takeover. Retirement completion records drained and
|
|
2180
|
+
suspended counts separately from takeover. A successor reconstructs unfinished
|
|
2181
|
+
retirement from execution leases and durable build facts after predecessor death.
|
|
2182
|
+
An unrelated dispatcher taking the lease still causes ordinary supersession and
|
|
2183
|
+
teardown.
|
|
2184
|
+
|
|
2185
|
+
With rollback-capable launcher and generation peers, three failed successor exits
|
|
2186
|
+
within ten minutes of the original durable takeover restore the immediately previous
|
|
2187
|
+
cached runtime. The first two failures restart the same runtime without repeating
|
|
2188
|
+
preflight. Preflight failures never count; outside that window ordinary failure
|
|
2189
|
+
exit behavior applies. Rollback goes back one runtime only. The launcher opens no
|
|
2190
|
+
store: it passes a validated, versioned recovery context to the restored generation,
|
|
2191
|
+
which records `dispatcher.runtime-rolled-back` under repository authority and holds
|
|
2192
|
+
the failed target for that launcher lineage. Store compatibility changes, resolution
|
|
2193
|
+
errors and disabling/re-enabling upgrades do not clear this hold. A successfully
|
|
2194
|
+
resolved different target records `dispatcher.rollback-hold-cleared`; a fresh operator
|
|
2195
|
+
launch starts a new lineage. Both previous and held runtimes remain protected from
|
|
2196
|
+
cache pruning. Existing phase executions keep their leases and continue on the
|
|
2197
|
+
restored runtime at the next boundary; unreadable decisive facts defer a build with
|
|
2198
|
+
attention before any action. Peers without negotiated rollback capability retain
|
|
2199
|
+
existing failure behavior and report that capable runtimes are required.
|
|
2200
|
+
|
|
2201
|
+
Repository status exposes per-run resolved target, handoff and failure details.
|
|
2202
|
+
`dispatcher.upgrade-target-resolved` records the first successful resolution and
|
|
2203
|
+
later changed observations, including equal-content advances. Its source mode,
|
|
2204
|
+
base and target SHA remain visible separately from the running commit and earlier
|
|
2205
|
+
handoff/failure facts. Repeated identical polls append no resolution facts.
|
|
2206
|
+
|
|
2207
|
+
Repository status exposes both generations, mode, takeover, outstanding draining executions and deadline, plus per-run target and failure details. Upgrade
|
|
2208
|
+
failure is repository attention, naming the target and reason. Resolution/install
|
|
2209
|
+
failure leaves the running generation active and suppresses the same failed input
|
|
2210
|
+
until target or selected-store compatibility evidence changes or a fresh operator launch. Unrelated base advances do not
|
|
2211
|
+
retry failed installs. Operator stop always wins over replacement startup.
|
|
2212
|
+
|
|
2213
|
+
Set `automatic = false` to cancel pending preparation and retain manual restart
|
|
2214
|
+
behavior. A launcher contract change also requires a manual restart. A legacy v1 launcher
|
|
2215
|
+
without overlap supervision requires restart before another automatic adoption. `--once`,
|
|
2216
|
+
origin/hosted dispatch and direct development presentation modes do not auto-upgrade.
|
|
2217
|
+
`ab upgrade` still updates the pin/installation and merges skills locally, commits
|
|
2218
|
+
when eligible, and never pushes. Pinned dispatchers follow after that commit
|
|
2219
|
+
reaches the base branch; installed-mode dispatchers follow their replaced install.
|
|
2220
|
+
Source-mode dispatchers follow changes to packaged inputs merged to the base,
|
|
2221
|
+
including shipped canonical skills, without a version bump.
|
package/docs/integration-tree.md
CHANGED
|
@@ -103,6 +103,22 @@ source targets, while build status shows the effective destination.
|
|
|
103
103
|
|
|
104
104
|
## Collect, verify and land
|
|
105
105
|
|
|
106
|
+
Node `verify:*` context additionally exposes `nodeVerification`: the frozen
|
|
107
|
+
range, a JSON index path, contribution build slugs, current stored ticket
|
|
108
|
+
identities, event-authorized spec revisions and spec paths, and their commits.
|
|
109
|
+
The index maps every commit in the range using build identity trailers,
|
|
110
|
+
including earlier-cycle contributions and merge side history. Commits without
|
|
111
|
+
an identity are listed as unattributed (a mechanical classification). The manifest
|
|
112
|
+
and index also expose `handPushedCommits: [{sha, originalSha, message}]` for owned
|
|
113
|
+
hand-pushed commits in the frozen range, preserving original identity across restacks.
|
|
114
|
+
Their full messages express maintainer-authorized intent: judge quality and
|
|
115
|
+
consistency, and never fail them solely for lacking a covering spec. Other node
|
|
116
|
+
changes are authorized when covered by the current event-authorized node spec or the spec
|
|
117
|
+
of the contribution introducing it; use the commit mapping to find that spec.
|
|
118
|
+
Missing or ambiguous provenance fails hydration. Leaf context is unchanged.
|
|
119
|
+
See [iterating inside a node](#iterating-inside-a-node) for authoring and evolving
|
|
120
|
+
these sources of intent.
|
|
121
|
+
|
|
106
122
|
Create a node and direct work into it (replace ids with those returned by your
|
|
107
123
|
source):
|
|
108
124
|
|
|
@@ -127,8 +143,10 @@ publication; tracker edits cannot be transactional with a forge write.
|
|
|
127
143
|
|
|
128
144
|
The kernel runs all configured verify steps with normal path applicability on
|
|
129
145
|
the exact node head and parent. Either moving invalidates eligibility, even a
|
|
130
|
-
clean restack. Failed verification blocks the node
|
|
131
|
-
it; the repaired landed head permits a new cycle.
|
|
146
|
+
clean restack. Failed verification blocks the node and emits `integration.verification-failed` once per prepared cycle. Default watch and new hosted wake settings include it; `ab wait --for attention` also detects the current failure before notification. The fact names failed steps, head, parent and repair guidance. Watch baselines prior failures; reconcile status after arming. A new cycle can notify again, while historical facts do not keep a repaired node blocked. Recovery reports only the latest prepared cycle while its head and parent remain current; superseded failures are not backfilled. Recheck current status before filing a repair, since the node may have advanced after notification. To recover, file a repair child targeting
|
|
147
|
+
it; the repaired landed head permits a new cycle. If the contract changed, an
|
|
148
|
+
operator can explicitly revise the spec instead and verify again on the same head
|
|
149
|
+
(see operator node spec revisions below). Historical reports keep their
|
|
132
150
|
actual head/base citations. Integration grammar is collect → verify → land →
|
|
133
151
|
close, with restacking and repair cycles along the way.
|
|
134
152
|
|
|
@@ -145,6 +163,38 @@ merged head was verified, then completes the ticket. Closing without merge or
|
|
|
145
163
|
aborting closes admission and returns the ticket to triage; already claimed
|
|
146
164
|
children retain their frozen destination.
|
|
147
165
|
|
|
166
|
+
## Iterating inside a node
|
|
167
|
+
|
|
168
|
+
Write the node spec as a finite integration charter: its goal, observable
|
|
169
|
+
completion conditions for the whole, and destination and landing expectations
|
|
170
|
+
under the effective policy. Put feature specifics in spec-standard children.
|
|
171
|
+
An open node supports three ways to iterate:
|
|
172
|
+
|
|
173
|
+
- **Add children.** Create spec-standard tickets targeting the node's ticket id,
|
|
174
|
+
for example `ab ticket create "Account settings" --body settings.md --target <node-id>`.
|
|
175
|
+
Ordinary children run their normal pipeline. Verification uses the provenance
|
|
176
|
+
mapping to judge changes against the introducing child's spec or the current
|
|
177
|
+
event-authorized node charter; a child contribution need not also be promised
|
|
178
|
+
independently by the charter.
|
|
179
|
+
- **Push small maintainer-authorized tweaks.** Push to the node's recorded branch
|
|
180
|
+
with meaningful commit messages describing intent. Verification reads the frozen
|
|
181
|
+
range's owned `handPushedCommits` messages, judges quality and consistency, and
|
|
182
|
+
cannot fail a tweak solely because it lacks a covering spec. This is maintainer
|
|
183
|
+
iteration, not permission for phase agents to bypass their publication boundary.
|
|
184
|
+
- **Revise the charter when the charter itself changes.** Use
|
|
185
|
+
`ab answer <node> --revise-spec replacement.md`, or update the ticket and import
|
|
186
|
+
it with `ab answer <node> --revise-spec-from-ticket`. A ticket edit alone does
|
|
187
|
+
not revise an active build. Children retain their specs, claims and targets;
|
|
188
|
+
the node recollects and verifies the replacement revision, including on the
|
|
189
|
+
same head and parent after failed verification. See
|
|
190
|
+
[operator node spec revisions](#operator-node-spec-revisions) for admission
|
|
191
|
+
restrictions.
|
|
192
|
+
|
|
193
|
+
Open children keep the node incomplete, including triage, backlog and ready
|
|
194
|
+
children. Completion remains finite: landed or otherwise ended nodes close
|
|
195
|
+
admission. Iteration does not relax verification of the exact head and parent,
|
|
196
|
+
or the configured readiness, consent and landing gates described above.
|
|
197
|
+
|
|
148
198
|
## Changing a parent
|
|
149
199
|
|
|
150
200
|
`ab ticket update NODE-1 --target NODE-2` reparents an open node;
|
|
@@ -194,3 +244,38 @@ verification and landing, for queued dependency presence, on operator request,
|
|
|
194
244
|
and after accepted re-parenting. Descendants need independent demand; presence
|
|
195
245
|
requests follow only the minimal proven ancestor path. See
|
|
196
246
|
[restacking](restacking.md#timing-and-evidence) for timing, requests and distance.
|
|
247
|
+
|
|
248
|
+
## Polling and status
|
|
249
|
+
|
|
250
|
+
Opened integration nodes poll every tick until their durable activity has been
|
|
251
|
+
quiet for `policy.nodeIdleAfterSeconds` (default 600 seconds), then poll every
|
|
252
|
+
`policy.nodeIdlePollSeconds` (default 120 seconds). Holds and waiting for consent
|
|
253
|
+
qualify normally. Child claims, PR and landing activity, operator commands
|
|
254
|
+
(including repeated holds), restack requests and answers wake the next tick.
|
|
255
|
+
GitHub-only changes are discovered on the next due check, within the idle
|
|
256
|
+
interval plus normal tick scheduling while the dispatcher is running; failure,
|
|
257
|
+
cooldown and transport-budget gates still apply. Pending operations retain
|
|
258
|
+
active polling and action-time readiness checks remain fresh. Successful
|
|
259
|
+
`node.poll-checked` facts preserve quiet history across restarts; missing facts
|
|
260
|
+
force a fresh check. `ab build status` reports active or idle cadence and the
|
|
261
|
+
last successful check (or unrecorded evidence).
|
|
262
|
+
|
|
263
|
+
## Operator node spec revisions
|
|
264
|
+
|
|
265
|
+
Operators may explicitly revise an opened idle collecting node or a node blocked on failed
|
|
266
|
+
integration verification without an escalation. Use
|
|
267
|
+
`ab answer <node> --revise-spec replacement.md` or, after amending its ticket,
|
|
268
|
+
`ab answer <node> --revise-spec-from-ticket`. Ticket edits alone do not revise
|
|
269
|
+
the build. Both forms enforce the same spec standard as leaf revisions.
|
|
270
|
+
Each kernel `spec.revised` records the exact artifact and operator identity
|
|
271
|
+
(with optional transport provenance); earlier revisions remain readable.
|
|
272
|
+
Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
|
|
273
|
+
The node recollects and verifies the new revision, including on the same head
|
|
274
|
+
and parent after a failed cycle. Earlier cycles remain historical evidence
|
|
275
|
+
and cannot block or authorize landing under the replacement. Children keep
|
|
276
|
+
their specs, claims and targets; contributions are not restarted.
|
|
277
|
+
Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
278
|
+
pending controls, landing intent and ended PRs refuse the no-escalation path.
|
|
279
|
+
A concurrent state change refuses publication with a retry explanation;
|
|
280
|
+
uncited artifacts are inert. Leaves still require an open escalation and
|
|
281
|
+
restart from `plan`.
|