@defrex/autobuild 1.16.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/SPEC.md +132 -9
- package/docs/answering-blocked-builds.md +34 -1
- package/docs/architecture.md +42 -3
- package/docs/configuration.md +44 -7
- package/docs/dispatcher-hosting.md +5 -3
- package/docs/operator-api.md +29 -6
- package/docs/plugin-authoring.md +30 -1
- package/docs/remote-store-protocol.md +13 -3
- package/docs/remote-ticket-protocol.md +37 -2
- package/docs/restacking.md +46 -1
- package/docs/setup.md +24 -9
- package/docs/ticket-sources.md +28 -1
- package/docs/troubleshooting.md +54 -2
- package/docs/workspaces.md +3 -1
- package/package.json +4 -4
- package/packages/core/src/cli/accounts.ts +3 -0
- package/packages/core/src/cli/binary-direct.ts +14 -1
- package/packages/core/src/cli/binary.ts +10 -7
- package/packages/core/src/cli/dashboard/refresh.ts +8 -0
- package/packages/core/src/cli/dispatch.ts +503 -334
- package/packages/core/src/cli/secrets.ts +2 -0
- package/packages/core/src/config/schema.ts +17 -3
- package/packages/core/src/events/payloads.ts +8 -5
- package/packages/core/src/events/repository.ts +37 -1
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/d41044cb2e54809c.json +194 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/e0f89f52e48cbf62.json +197 -0
- package/packages/core/src/kernel/engine.ts +118 -0
- package/packages/core/src/kernel/reconcile-restack.ts +72 -9
- package/packages/core/src/kernel/reducer-revisions.ts +5 -0
- package/packages/core/src/kernel/repository-read-facts.ts +9 -2
- package/packages/core/src/kernel/ticket-preparation.ts +10 -0
- package/packages/core/src/kernel/tracked-dirt.ts +173 -0
- package/packages/core/src/ontology.ts +1 -0
- package/packages/core/src/operator/index.ts +10 -0
- package/packages/core/src/operator/merged-builds.ts +51 -0
- package/packages/core/src/operator/registry.ts +254 -110
- package/packages/core/src/operator/repo-argument.ts +43 -0
- package/packages/core/src/operator/tickets.ts +139 -25
- package/packages/core/src/plugin-sdk/index.ts +4 -0
- package/packages/core/src/plugins/manifest.ts +1 -1
- package/packages/core/src/ports/tickets/completion.ts +71 -0
- package/packages/core/src/ports/tickets/contract.ts +73 -0
- package/packages/core/src/ports/tickets/github-fake.ts +8 -0
- package/packages/core/src/ports/tickets/github-issues.ts +1 -0
- package/packages/core/src/ports/tickets/github.ts +18 -6
- package/packages/core/src/ports/tickets/grants.ts +2 -0
- package/packages/core/src/ports/tickets/hosted-index.ts +8 -0
- package/packages/core/src/ports/tickets/linear.ts +18 -2
- package/packages/core/src/ports/tickets/remote-protocol.ts +37 -8
- package/packages/core/src/ports/tickets/remote.ts +43 -3
- package/packages/core/src/ports/tickets/tree.ts +11 -1
- package/packages/core/src/ports/types.ts +47 -4
- package/packages/core/src/ports/workspace/vercel-command-diagnostics.ts +144 -0
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +649 -160
- package/packages/core/src/processes/build-child.ts +15 -1
- package/packages/core/src/processes/build-runner.ts +349 -20
- package/packages/core/src/processes/dispatcher.ts +880 -283
- package/packages/core/src/processes/harvest-child.ts +21 -1
- package/packages/core/src/processes/harvest-runner.ts +82 -35
- package/packages/core/src/processes/pass-stages.ts +32 -6
- package/packages/core/src/processes/phase-failure-budget.ts +1 -0
- package/packages/core/src/processes/provisioning-progress.ts +23 -0
- package/packages/core/src/processes/repo-view.ts +25 -4
- package/packages/core/src/processes/workspace-preparation.ts +1 -0
- package/packages/core/src/store/adapter.ts +34 -5
- package/packages/core/src/store/build-feed.ts +148 -22
- package/packages/core/src/store/build-scope.ts +12 -3
- package/packages/core/src/store/caller-attribution.ts +170 -0
- package/packages/core/src/store/contract.ts +1038 -165
- package/packages/core/src/store/local/schema.ts +12 -1
- package/packages/core/src/store/local/store.ts +260 -25
- package/packages/core/src/store/memory.ts +156 -9
- package/packages/core/src/store/phase-session.ts +23 -3
- package/packages/core/src/store/reducer-value-shapes.json +8196 -8118
- package/packages/core/src/store/remote/client.ts +90 -11
- package/packages/core/src/store/remote/credentials.ts +2 -0
- package/packages/core/src/store/remote/index.ts +31 -5
- package/packages/core/src/store/remote/protocol.ts +45 -8
- package/packages/core/src/store/remote/released-clients.json +22 -0
- package/packages/core/src/store/remote/released-reducer-values/1.17.0.json +36367 -0
- package/packages/core/src/store/remote/released-reducer-values/1.18.0.json +36436 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +20 -16
- package/packages/core/src/store/session-handle.ts +12 -3
- package/packages/core/src/store/types.ts +48 -3
- package/packages/core/src/testing/dispatch-read-budget.ts +143 -16
- package/packages/core/src/testing/index.ts +2 -0
- package/packages/core/src/testing/reduced-read-budget.ts +420 -6
- package/skills/guide/SKILL.md +67 -13
- package/skills/guide/references/operator-api.md +29 -6
- package/skills/guide/references/plugin-authoring.md +30 -1
- package/skills/guide/references/remote-store-protocol.md +13 -3
- package/skills/guide/references/remote-ticket-protocol.md +37 -2
- package/skills/guide/references/restacking.md +46 -1
- package/skills/guide/references/setup.md +24 -9
- package/skills/operate/SKILL.md +42 -4
- package/templates/hosted-service/package.json +2 -2
package/skills/operate/SKILL.md
CHANGED
|
@@ -334,6 +334,10 @@ Read events with a cursor or a small `--events` count; logs are long.
|
|
|
334
334
|
target was force-pushed while it had work of its own. It restacks the build's
|
|
335
335
|
own commits onto the current target; abort is the alternative. A leaf with no
|
|
336
336
|
work recovers from a rewritten target by itself and raises nothing.
|
|
337
|
+
A `dirty-worktree` escalation names tracked files changed outside
|
|
338
|
+
`[[generated]]`, usually by `[commands].setup`; answer with guidance or a bare
|
|
339
|
+
retry, never abort: the build returns to implement to commit, revert or
|
|
340
|
+
regenerate them.
|
|
337
341
|
Idle collecting or verification-failed nodes need no escalation and recollect
|
|
338
342
|
for verification on the same head; children and contributions remain intact.
|
|
339
343
|
Active work, pause, pending controls and merge intent refuse revision. Leaves
|
|
@@ -510,11 +514,14 @@ operator tools. Which repository you act on depends on the connector:
|
|
|
510
514
|
|
|
511
515
|
- **Per-repository connector** (a URL such as `<origin>/mcp/github.com/acme/widgets`,
|
|
512
516
|
copied from the project's Settings tab): it serves that one repository. Its
|
|
513
|
-
tools have no `repo` argument; do not add one, because
|
|
514
|
-
|
|
517
|
+
tools have no `repo` argument; do not add one, because any `repo`, even
|
|
518
|
+
naming that repository, is refused with code `repo-argument`.
|
|
515
519
|
- **Deployment-wide connector** (`<origin>/mcp`): every tool requires `repo`.
|
|
516
520
|
Call `repositories.list` to find the identities you can reach.
|
|
517
521
|
|
|
522
|
+
The argument is `repo`, never `repository`; a `repository` argument is
|
|
523
|
+
refused on both connectors.
|
|
524
|
+
|
|
518
525
|
Either way, follow each advertised tool schema exactly.
|
|
519
526
|
|
|
520
527
|
### Load context first
|
|
@@ -587,7 +594,12 @@ Your tools are the operator registry. The read-only ones are always safe:
|
|
|
587
594
|
- `repository.attention` — the attention digest: everything waiting on the
|
|
588
595
|
operator, each item naming its resolving tool call. The first call of each
|
|
589
596
|
round.
|
|
590
|
-
- `builds.list` — active, queued, or all builds, with effective status.
|
|
597
|
+
- `builds.list` — active, queued, or all builds, with effective status. Scope
|
|
598
|
+
`merged` answers "what shipped": merged builds, most recently merged first,
|
|
599
|
+
each with `mergedAt`, `kind`, `ticket`, `pr` and the node `target` of a child
|
|
600
|
+
build. Narrow it with `since` (inclusive) and `until` (exclusive) instants
|
|
601
|
+
and page with `limit` and the returned `next` as `cursor`. Use `active` and
|
|
602
|
+
`queued` for what lands next.
|
|
591
603
|
- `builds.get` — one build's detail.
|
|
592
604
|
- `builds.events` — one build's event log from a cursor (use a cursor; logs
|
|
593
605
|
are long).
|
|
@@ -628,6 +640,11 @@ that does the job, and say what you are doing before you do it:
|
|
|
628
640
|
- `tickets.list`, `tickets.get` — read the ticket queue and one ticket, with
|
|
629
641
|
its current assets. A long
|
|
630
642
|
queue pages with `limit`, `offset` and `order`; `total` counts every match.
|
|
643
|
+
For a "what shipped" digest, pass `since`/`until` (the state defaults to
|
|
644
|
+
done), `order: "completed"`, `excludeLabels` for repository-defined
|
|
645
|
+
categories, and `summary: true` to drop bodies; tickets carry `resolvedAt`,
|
|
646
|
+
and children carry `targetTitle`. On a hosted source, a range over 5,000
|
|
647
|
+
tickets refuses with `code: "completion-range-too-broad"`, so narrow it.
|
|
631
648
|
- `tickets.search` — search ticket titles and bodies across every state, with
|
|
632
649
|
optional `state`, `labels`, `limit` and `cursor`. Use it to check for
|
|
633
650
|
duplicates before `tickets.create`. A source without search refuses with
|
|
@@ -772,7 +789,8 @@ Treat every default-watch record as a call to act:
|
|
|
772
789
|
- Ticket hand-back (`ticket.handed-back`): the dispatcher returned a claimed or
|
|
773
790
|
ready ticket other than as completion, and the move is already committed.
|
|
774
791
|
`cause` is `abort`, `spec-bounce`, `preparation-failed`, `pr-closed` or
|
|
775
|
-
`discard
|
|
792
|
+
`discard`. A preparation the work deadline cut or deferred is carried, never
|
|
793
|
+
handed back as `preparation-failed`. `state` and `role` say where it went, `requested` the role an abort
|
|
776
794
|
asked for when it fell back, `missing` the spec-standard parts, and `reason`
|
|
777
795
|
the operator's text. An abort to ready needs nothing more. For triage, groom
|
|
778
796
|
the ticket and move it on when intended; for a spec bounce, fix the missing
|
|
@@ -885,6 +903,10 @@ waits, end the message with one line saying so, such as
|
|
|
885
903
|
logical credentials, or records a reasoned `harvest.session.resume-fallback`
|
|
886
904
|
and starts fresh. Orderly suspension spends no recovery attempt; real
|
|
887
905
|
crashes retain recovery accounting.
|
|
906
|
+
A hosted harvest launch that is still preparing stops at its next boundary,
|
|
907
|
+
and teardown joins it before releasing the lease. A harvest that a
|
|
908
|
+
dispatcher launches never claims, renews or releases the repository lease
|
|
909
|
+
on its own behalf.
|
|
888
910
|
- Human checkout dispatch defaults to viewer for hosted placement. Humans can use
|
|
889
911
|
`--takeover` to dispatch locally with a displacement warning; unreadable placement
|
|
890
912
|
fails closed and names `--viewer` and `--takeover` as explicit recovery choices.
|
|
@@ -1130,6 +1152,11 @@ slow cold resume of a stopped sandbox: retry, or suggest raising
|
|
|
1130
1152
|
`recoveryTimeoutMs` within the hosted invocation budget. `at step fence` or
|
|
1131
1153
|
`at step cleanup` points at sandbox or provider state worth checking before a
|
|
1132
1154
|
retry; `at step preserve` at the checkout, forge credentials or branch.
|
|
1155
|
+
`during start` with `runtime "X" install failed after its preflight failed` or
|
|
1156
|
+
`runtime "X" preflight failed after install` means the configured
|
|
1157
|
+
`runtimeProvisioning.X` install or preflight is broken, or its pin is wrong:
|
|
1158
|
+
fix the config, then retry. A role change by itself never needs an abort; the
|
|
1159
|
+
next launch installs the newly selected runtime.
|
|
1133
1160
|
A dispatch log line `build X: resume deferred by the invocation budget` (or
|
|
1134
1161
|
`provision deferred`, or `launch deferred` for a launch the work deadline cut),
|
|
1135
1162
|
counted as `recoveryDeferred` or `provisioningDeferred`, is normal: nothing is
|
|
@@ -1138,6 +1165,12 @@ first. The same build deferring across several invocations means the hosted
|
|
|
1138
1165
|
budget cannot fit that work: report it, and do not retry it. A `fence` line that
|
|
1139
1166
|
repeats with an infrastructure failure at step `fence` means the provider
|
|
1140
1167
|
cannot confirm the sandbox stopped: check the sandbox.
|
|
1168
|
+
A line `ticket X: preparation carried by the invocation budget`, counted as
|
|
1169
|
+
`preparationsCarried`, is normal too: the hosted invocation had no time to
|
|
1170
|
+
finish preparing that ticket, so it holds the ticket and the next invocation
|
|
1171
|
+
prepares it first. Do not retry, move or re-file the ticket. The same ticket
|
|
1172
|
+
carried across several invocations means its preparation outlasts the hosted
|
|
1173
|
+
budget: report it with the stage the line names.
|
|
1141
1174
|
Each hosted invocation logs `stages:` with time and items per stage, and `ab
|
|
1142
1175
|
repository status` shows the latest as `last pass stages:`. `(share)` on a
|
|
1143
1176
|
stage is normal under load. Settlement, janitor, hand-back, recovery, resume
|
|
@@ -1147,6 +1180,11 @@ started; priority-ordered admission and intake loops keep their order.
|
|
|
1147
1180
|
deadline stopped. The same stage or part stopping at the deadline on
|
|
1148
1181
|
invocation after invocation means one visit there outlasts the window: report
|
|
1149
1182
|
it with those lines.
|
|
1183
|
+
The hosted store service logs one `autobuild.store-request` line per request
|
|
1184
|
+
naming its caller: dispatcher invocation, run and stage, build or harvest
|
|
1185
|
+
runner, or operator client (`cli`, `mcp`, `web`). For a store traffic burst or
|
|
1186
|
+
database pressure, report the callers and stages that dominate those lines;
|
|
1187
|
+
`caller: null` is an older client.
|
|
1150
1188
|
|
|
1151
1189
|
Leaf restack and reconcile publication retry classified transient forge or transport
|
|
1152
1190
|
failures six times after the initial attempt, waiting 30, 60, 120, 240, 300 and
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"build": "ab-hosted-service-build"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@defrex/autobuild-hosted-store-service": "1.
|
|
8
|
-
"@defrex/autobuild": "1.
|
|
7
|
+
"@defrex/autobuild-hosted-store-service": "1.18.0",
|
|
8
|
+
"@defrex/autobuild": "1.18.0",
|
|
9
9
|
"next": "16.1.6",
|
|
10
10
|
"react": "19.2.4",
|
|
11
11
|
"react-dom": "19.2.4"
|