@defrex/autobuild 1.9.0 → 1.11.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 +3 -3
- package/SPEC.md +2232 -175
- package/bin/ab-dispatch-generation.ts +5 -1
- package/docs/accounts.md +2 -1
- package/docs/agent-runtimes.md +30 -3
- package/docs/answering-blocked-builds.md +35 -7
- package/docs/architecture.md +436 -63
- package/docs/build-store.md +10 -7
- package/docs/builds.md +5 -0
- package/docs/cli.md +40 -2
- package/docs/configuration-overview.md +5 -1
- package/docs/configuration.md +649 -74
- package/docs/dispatcher.md +79 -6
- package/docs/forges.md +8 -1
- package/docs/getting-started.md +1 -1
- package/docs/integration-overview.md +4 -2
- package/docs/integration-tree.md +102 -11
- package/docs/merge-policy.md +30 -14
- package/docs/migration-1.0.md +2 -1
- package/docs/operating.md +36 -6
- package/docs/operator-api.md +251 -20
- package/docs/operator-surfaces.md +85 -0
- package/docs/optimization-nodes.md +1100 -0
- package/docs/overview.md +1 -1
- package/docs/plugin-authoring.md +83 -13
- package/docs/remote-store-protocol.md +137 -17
- package/docs/remote-ticket-protocol.md +90 -2
- package/docs/restacking.md +119 -15
- package/docs/seams.md +2 -2
- package/docs/setup.md +27 -4
- package/docs/skills.md +4 -2
- package/docs/spec-standard.md +2 -1
- package/docs/ticket-dependencies.md +15 -3
- package/docs/ticket-migration.md +4 -2
- package/docs/ticket-sources.md +54 -14
- package/docs/tickets.md +21 -6
- package/docs/troubleshooting.md +11 -2
- package/docs/verification.md +15 -3
- package/docs/workspaces.md +6 -1
- package/package.json +9 -5
- package/packages/core/src/accounts/chatgpt-oauth.ts +7 -5
- package/packages/core/src/cli/accounts.ts +7 -2
- package/packages/core/src/cli/attempt.ts +103 -0
- package/packages/core/src/cli/attention.ts +11 -2
- package/packages/core/src/cli/binary-direct.ts +54 -1
- package/packages/core/src/cli/binary-lifecycle.ts +2 -1
- package/packages/core/src/cli/binary.ts +5 -3
- package/packages/core/src/cli/build-control.ts +407 -67
- package/packages/core/src/cli/context.ts +272 -15
- package/packages/core/src/cli/dashboard/detail.ts +26 -2
- package/packages/core/src/cli/dashboard/facts.ts +89 -56
- package/packages/core/src/cli/dashboard/header.ts +101 -0
- package/packages/core/src/cli/dashboard/integration-detail.ts +7 -2
- package/packages/core/src/cli/dashboard/landing-display.ts +15 -2
- package/packages/core/src/cli/dashboard/model.ts +133 -66
- package/packages/core/src/cli/dashboard/objective-row.ts +221 -0
- package/packages/core/src/cli/dashboard/poll.ts +178 -76
- package/packages/core/src/cli/dashboard/render.ts +172 -227
- package/packages/core/src/cli/dashboard/reopen-display.ts +39 -0
- package/packages/core/src/cli/dashboard/row-text.ts +538 -0
- package/packages/core/src/cli/dashboard/timeline.ts +288 -0
- package/packages/core/src/cli/dashboard/tree.ts +12 -1
- package/packages/core/src/cli/dashboard/vocabulary.ts +188 -0
- package/packages/core/src/cli/dispatch-args.ts +44 -1
- package/packages/core/src/cli/dispatch-frontend.ts +29 -30
- package/packages/core/src/cli/dispatch-launch-stop.ts +73 -0
- package/packages/core/src/cli/dispatch-launcher.ts +41 -46
- package/packages/core/src/cli/dispatch-repository-feed.ts +1 -1
- package/packages/core/src/cli/dispatch-web.ts +155 -0
- package/packages/core/src/cli/dispatch.ts +216 -38
- package/packages/core/src/cli/env.ts +42 -0
- package/packages/core/src/cli/help.ts +293 -12
- package/packages/core/src/cli/init-agent.ts +4 -1
- package/packages/core/src/cli/init-readiness-remote.ts +3 -2
- package/packages/core/src/cli/init-validation.ts +5 -5
- package/packages/core/src/cli/init.ts +3 -2
- package/packages/core/src/cli/judge-entry.ts +82 -0
- package/packages/core/src/cli/judge.ts +233 -0
- package/packages/core/src/cli/landings.ts +3 -2
- package/packages/core/src/cli/main.ts +481 -148
- package/packages/core/src/cli/mcp.ts +35 -3
- package/packages/core/src/cli/measurement-text.ts +19 -0
- package/packages/core/src/cli/objective.ts +154 -0
- package/packages/core/src/cli/operator-preference.ts +57 -0
- package/packages/core/src/cli/publication-settlement.ts +106 -22
- package/packages/core/src/cli/repo-lease.ts +3 -0
- package/packages/core/src/cli/repo-state.ts +56 -6
- package/packages/core/src/cli/repository-status.ts +205 -56
- package/packages/core/src/cli/status.ts +275 -16
- package/packages/core/src/cli/store-opening.ts +4 -0
- package/packages/core/src/cli/terminal-restore.ts +32 -7
- package/packages/core/src/cli/terminals.ts +205 -8
- package/packages/core/src/cli/ticket-start.ts +53 -0
- package/packages/core/src/cli/ticket.ts +166 -38
- package/packages/core/src/cli/upgrade-agent.ts +12 -8
- package/packages/core/src/cli/wait.ts +22 -8
- package/packages/core/src/cli/watch.ts +361 -95
- package/packages/core/src/cli/web.ts +139 -0
- package/packages/core/src/config/create-labels.ts +23 -0
- package/packages/core/src/config/live.ts +101 -14
- package/packages/core/src/config/load.ts +61 -20
- package/packages/core/src/config/local.ts +212 -0
- package/packages/core/src/config/pipeline-source.ts +3 -3
- package/packages/core/src/config/reference.ts +18 -0
- package/packages/core/src/config/roles.ts +182 -73
- package/packages/core/src/config/schema.ts +157 -19
- package/packages/core/src/events/catalog.ts +43 -3
- package/packages/core/src/events/compatibility.ts +7 -1
- package/packages/core/src/events/payloads.ts +685 -1
- package/packages/core/src/events/policy.ts +63 -0
- package/packages/core/src/events/repository.ts +153 -27
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +1797 -199
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/017d8dd5bb6dd80b.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/0ab2a90d0305dc9d.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/10a4657408d4e121.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1152a2e97ee81728.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/13ca84752c5f8b54.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1411d1cdbdd9911e.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1444fe1fa7fc802c.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1491ac0600349391.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/178e12f1759b7552.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1921f86f752428c9.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1972c1d66008ef6b.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/19e8e43e7f3f1a06.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/20a85c143c3e8164.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/21ce2c0bf58318e1.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/293dcb3a94fb3470.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/2ab7436356267118.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/2d084641735caaff.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3237bcecf68e5db9.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/33d0cc593610e56f.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3451ed2136dcc356.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/358ec8693f2237e6.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/35cf9ccc4478b2d2.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3649e7bd1203f154.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/378da6dece82202a.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/38c75099d9191471.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/398952f1f01db1a3.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3b64d352d56c9121.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3dc486226c05372d.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/431c9bb2ee8838e0.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4400dffca929e2f0.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/49064fc079964a5c.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4932c70a2af97faf.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4edded75f17742f4.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4f00c0f2c8afd159.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/516a5a7aadf97587.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/516dc6ea85d67cd7.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/536085773daf6b58.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/584e2ba74608e051.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/59ffaa6974094c72.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/5bb43afb121674c6.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/5f0ca42af862c4ee.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6118031132db9bfc.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/63107a8d58776b63.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/63546b08d4d6fa11.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/643d70429ce03dad.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/677ea92572c29082.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6ae5bf60504d6467.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6bd6275061aaffa5.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6efdc8defc75fccb.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/71c53d33f09d8204.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7267ca2757cffba7.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/76b7d4244082b3f9.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7749f918c6f10968.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7833e42d16301424.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7d4edad0614adaf1.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/837365898d04f45a.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/85f9f0c921b8b5bb.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8879f57a24733897.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/88cb9e71bdec972d.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/89625654b02e9ac1.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8a0cd6dd06cc155e.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8aa9ca8609dc051d.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8c8640255bd61658.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8cc15eb1807c0157.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8ced97c44bc0af3a.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8d4144004720b9f8.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8db633ead1807f8b.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8e42cdbd0994ab0c.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9011d0f6ff955ef9.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/916ebc5433801c41.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9539b995af5c54a9.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/95f391bfd7b7dbd7.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9613e8fa568a9281.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9a68f8753bd9038d.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9b25e58227080094.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9ee3919fbd4f9458.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a04a34cc2717147b.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a0b32c12e4e6edb6.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a55218252707bdd3.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a732fd08b31522a6.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a98af134be2da8a9.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a9d206a01f9039e5.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/abf7fe3c92c82f2d.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ac928b04842c00db.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/af953392d81911da.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/b0d877c44810ecb0.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/b0f7c6ebb2db57fc.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/b905c22ec17eed31.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/bce0c54e865f4b79.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/c68b7ee2e2610f30.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/c7f7e0378aeea237.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/c98cb1659eb142b6.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ca830adf06ed55a1.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/cb3a219f33e437ca.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/cf1e0c0d82567e0c.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d008d86d9ff77b30.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d1432a819d8e48c5.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d185ed6aa9192aff.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d5d5ccca80a893d8.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d873fad29d6c7e55.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/db84b12316e2da4a.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ddf6dc967d898767.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/dfc64de6e7bfc0a0.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e2f18fa32fe1f6d0.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e37393fed29e84c5.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e6a8585e2a054ff6.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e7e9e327baca6903.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e86447af0571672c.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ea819202d22122e5.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/eb4535585f2e84f6.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/eb7ddd5319d09e27.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/eca4959b2b87ae15.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ee10d7959ec4843c.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ef1b68347966ab26.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f3e55425cc41f230.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f40042c1cdb9fd43.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f48466215c790a3f.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f5b9ace9b59351e7.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f8155387eb5f375c.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/fa8f1475a55be935.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/fb21116a15d0b1f1.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/fe95444fbeabe592.json.gz +0 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/09bf0a1611d07363.json +984 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/10eac4988d66e161.json +1067 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/1a436b5fb45aee3e.json +1116 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/249db6f7a41f90e2.json +161 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/25dcb2fb6eaa83f4.json +858 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/2e1bdc763924616f.json +4932 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/30e9dabce3c4263d.json +399 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/3c27f918b194e3b3.json +465 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/4898ef339c68fa36.json +83 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/51816c0ffa62af6e.json +417 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/561bf45320062a44.json +83 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/5672d0233085d050.json +84 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/5e39f42cbdbf35ef.json +163 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/7771a7a2250f9964.json +868 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/79f0e0f4ccd43ba2.json +455 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/859c09edac738823.json +1086 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/881c491321bec99a.json +1074 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/965f25c3af1d2cdc.json +160 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9b76d89da575ca90.json +20 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9eb485320a72a9ff.json +233 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a283c1f3462b1cc1.json +81 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a60448c01016135e.json +18 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a6584fb61b6679bd.json +97 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a6e570fb126991ff.json +36 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a8acf22c968b6e3d.json +81 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/ba7b85895bf6698e.json +1153 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/c88365c25b3186d3.json +543 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/e8f0481b23f90056.json +711 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/ee55782ed40ebbac.json +110 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/fc5082fac8167f3d.json +98 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/fc66408cde0b6b04.json +637 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/fd55c329cfe921cc.json +1069 -0
- package/packages/core/src/kernel/attempt-creation-key.ts +20 -0
- package/packages/core/src/kernel/attempt-settlement.ts +125 -0
- package/packages/core/src/kernel/auto-merge-default.ts +1 -3
- package/packages/core/src/kernel/auto-merge.ts +1 -3
- package/packages/core/src/kernel/build-roster.ts +230 -0
- package/packages/core/src/kernel/dispatch-capacity.ts +316 -40
- package/packages/core/src/kernel/dispatch-placement.ts +1 -1
- package/packages/core/src/kernel/dispatch-settings.ts +1 -4
- package/packages/core/src/kernel/dispatch-status.ts +3 -5
- package/packages/core/src/kernel/dispatch-upgrade.ts +1 -1
- package/packages/core/src/kernel/engine.ts +152 -18
- package/packages/core/src/kernel/execution-intervals.ts +61 -0
- package/packages/core/src/kernel/forge-checks.ts +140 -0
- package/packages/core/src/kernel/forge-health.ts +2 -2
- package/packages/core/src/kernel/generated-files.ts +43 -0
- package/packages/core/src/kernel/generated-regeneration.ts +254 -0
- package/packages/core/src/kernel/generators/build-log.ts +30 -2
- package/packages/core/src/kernel/generators/optimization-log.ts +679 -0
- package/packages/core/src/kernel/generators/panel-log.ts +133 -0
- package/packages/core/src/kernel/generators/repository-journals.ts +13 -0
- package/packages/core/src/kernel/guarded-forge.ts +76 -11
- package/packages/core/src/kernel/harvest.ts +1 -4
- package/packages/core/src/kernel/head-paths.ts +4 -1
- package/packages/core/src/kernel/history-retention.ts +337 -0
- package/packages/core/src/kernel/incremental-fixtures.ts +6 -0
- package/packages/core/src/kernel/incremental.ts +14 -4
- package/packages/core/src/kernel/integration-landing.ts +64 -13
- package/packages/core/src/kernel/integration-stack.ts +123 -20
- package/packages/core/src/kernel/integration-state.ts +39 -2
- package/packages/core/src/kernel/janitor-failure.ts +2 -0
- package/packages/core/src/kernel/kernel-git.ts +1 -1
- package/packages/core/src/kernel/landing-measurement.ts +275 -0
- package/packages/core/src/kernel/landing-readiness.ts +2 -0
- package/packages/core/src/kernel/landing-state.ts +20 -1
- package/packages/core/src/kernel/leaf-restack-base.ts +33 -7
- package/packages/core/src/kernel/leaf-restack-state.ts +99 -4
- package/packages/core/src/kernel/log-index-value.ts +2 -0
- package/packages/core/src/kernel/log-index.ts +100 -3
- package/packages/core/src/kernel/measurement.ts +406 -0
- package/packages/core/src/kernel/mixed-version.ts +6 -3
- package/packages/core/src/kernel/node-landing.ts +92 -18
- package/packages/core/src/kernel/node-restack-state.ts +27 -1
- package/packages/core/src/kernel/node-restack-transaction.ts +80 -23
- package/packages/core/src/kernel/node-verification-context.ts +14 -4
- package/packages/core/src/kernel/open-pr-backpressure-state.ts +24 -0
- package/packages/core/src/kernel/open-pr-backpressure.ts +133 -0
- package/packages/core/src/kernel/optimization-admission.ts +490 -0
- package/packages/core/src/kernel/optimization.ts +953 -0
- package/packages/core/src/kernel/panel.ts +225 -0
- package/packages/core/src/kernel/phase-failures.ts +121 -0
- package/packages/core/src/kernel/phases.ts +42 -6
- package/packages/core/src/kernel/pr-attachments.ts +4 -16
- package/packages/core/src/kernel/pr-summary.ts +2 -2
- package/packages/core/src/kernel/published-branch-head.ts +60 -0
- package/packages/core/src/kernel/read-deferrals.ts +2 -2
- package/packages/core/src/kernel/read-facts.ts +69 -31
- package/packages/core/src/kernel/reconcile-restack.ts +352 -103
- package/packages/core/src/kernel/reducer-identity.ts +659 -0
- package/packages/core/src/kernel/reducer-registry.ts +62 -9
- package/packages/core/src/kernel/reducer-revisions.ts +75 -0
- package/packages/core/src/kernel/reducer.ts +269 -11
- package/packages/core/src/kernel/reopen-state.ts +48 -0
- package/packages/core/src/kernel/reopen.ts +143 -0
- package/packages/core/src/kernel/replay-retention.ts +208 -39
- package/packages/core/src/kernel/repository-attention.ts +1 -1
- package/packages/core/src/kernel/rollup.ts +61 -0
- package/packages/core/src/kernel/service-facts.ts +19 -7
- package/packages/core/src/kernel/setup-streak.ts +38 -0
- package/packages/core/src/kernel/step-durations.ts +257 -0
- package/packages/core/src/kernel/target-observation.ts +6 -1
- package/packages/core/src/kernel/target-rewrite-recovery.ts +116 -0
- package/packages/core/src/kernel/terminal-guard.ts +13 -5
- package/packages/core/src/kernel/ticket-handbacks.ts +1 -1
- package/packages/core/src/kernel/ticket-migrations.ts +1 -1
- package/packages/core/src/kernel/ticket-preparation.ts +1 -1
- package/packages/core/src/kernel/ticket-source-health.ts +1 -1
- package/packages/core/src/kernel/ticket-starts.ts +118 -0
- package/packages/core/src/kernel/ticket-wait.ts +37 -2
- package/packages/core/src/kernel/verify-diff-base.ts +67 -0
- package/packages/core/src/kernel/verify-stage-state.ts +1 -0
- package/packages/core/src/kernel/verify-stages.ts +51 -1
- package/packages/core/src/objective.ts +532 -0
- package/packages/core/src/ontology.ts +54 -6
- package/packages/core/src/operator/agent-context-serve.ts +631 -0
- package/packages/core/src/operator/annotations.ts +105 -4
- package/packages/core/src/operator/attention.ts +470 -0
- package/packages/core/src/operator/canonical-skills.ts +35 -0
- package/packages/core/src/operator/cli-equivalents.ts +270 -0
- package/packages/core/src/operator/context-prompts.ts +61 -0
- package/packages/core/src/operator/control.ts +2 -1
- package/packages/core/src/operator/index.ts +61 -1
- package/packages/core/src/operator/landings.ts +28 -19
- package/packages/core/src/operator/optimization.ts +314 -0
- package/packages/core/src/operator/protocol.ts +33 -1
- package/packages/core/src/operator/query.ts +137 -73
- package/packages/core/src/operator/read-view.ts +5 -2
- package/packages/core/src/operator/registry.ts +625 -59
- package/packages/core/src/operator/requests.ts +45 -20
- package/packages/core/src/operator/sandbox-host.ts +107 -11
- package/packages/core/src/operator/sandbox-resolver.ts +253 -0
- package/packages/core/src/operator/sandbox.ts +778 -82
- package/packages/core/src/operator/ticket-asset-list.ts +77 -0
- package/packages/core/src/operator/ticket-assets.ts +167 -0
- package/packages/core/src/operator/ticket-start.ts +152 -0
- package/packages/core/src/operator/tickets.ts +36 -4
- package/packages/core/src/plugin-sdk/index.ts +24 -0
- package/packages/core/src/plugins/manifest.ts +1 -1
- package/packages/core/src/plugins/registry.ts +1 -0
- package/packages/core/src/ports/forge/contract.ts +9 -0
- package/packages/core/src/ports/forge/fake.ts +114 -2
- package/packages/core/src/ports/forge/git-blob.ts +15 -0
- package/packages/core/src/ports/forge/git-rewrite.ts +6 -4
- package/packages/core/src/ports/forge/github-readiness.ts +1 -1
- package/packages/core/src/ports/forge/github-transport.ts +156 -1
- package/packages/core/src/ports/forge/github.ts +388 -100
- package/packages/core/src/ports/forge/local-git.ts +61 -1
- package/packages/core/src/ports/forge/readiness.ts +15 -3
- package/packages/core/src/ports/forge-failure.ts +46 -0
- package/packages/core/src/ports/forge-request-context.ts +23 -1
- package/packages/core/src/ports/forge-telemetry.ts +16 -0
- package/packages/core/src/ports/runner/antigravity-test.fixture.ts +149 -0
- package/packages/core/src/ports/runner/antigravity.ts +1071 -0
- package/packages/core/src/ports/runner/claude-test.fixture.ts +71 -0
- package/packages/core/src/ports/runner/claude.ts +6 -1
- package/packages/core/src/ports/runner/codex-test.fixture.ts +63 -0
- package/packages/core/src/ports/runner/codex.ts +11 -2
- package/packages/core/src/ports/runner/contract.ts +25 -1
- package/packages/core/src/ports/runner/fake.ts +2 -2
- package/packages/core/src/ports/runner/native-cli-fixture.ts +40 -5
- package/packages/core/src/ports/runner/native-process-fixture.ts +4 -1
- package/packages/core/src/ports/runner/pi.ts +23 -7
- package/packages/core/src/ports/runner/production.ts +19 -2
- package/packages/core/src/ports/runner/session-env.ts +65 -5
- package/packages/core/src/ports/runner/start-prompt.ts +6 -4
- package/packages/core/src/ports/tickets/contract.ts +75 -2
- package/packages/core/src/ports/tickets/fake.ts +11 -0
- package/packages/core/src/ports/tickets/file.ts +18 -0
- package/packages/core/src/ports/tickets/github-fake.ts +136 -4
- package/packages/core/src/ports/tickets/github.ts +407 -35
- package/packages/core/src/ports/tickets/hosted-index.ts +16 -1
- package/packages/core/src/ports/tickets/labels.ts +21 -0
- package/packages/core/src/ports/tickets/linear.ts +163 -0
- package/packages/core/src/ports/tickets/migration.ts +2 -0
- package/packages/core/src/ports/tickets/priority.ts +20 -0
- package/packages/core/src/ports/tickets/remote-protocol.ts +105 -6
- package/packages/core/src/ports/tickets/remote.ts +203 -17
- package/packages/core/src/ports/tickets/search.ts +139 -0
- package/packages/core/src/ports/tickets/tree.ts +17 -4
- package/packages/core/src/ports/types.ts +202 -6
- package/packages/core/src/ports/workspace/builtin-capabilities.ts +16 -4
- package/packages/core/src/ports/workspace/commit-preservation.ts +182 -64
- package/packages/core/src/ports/workspace/create.ts +18 -1
- package/packages/core/src/ports/workspace/fake.ts +340 -12
- package/packages/core/src/ports/workspace/git-worktree.ts +846 -43
- package/packages/core/src/ports/workspace/operator-sandbox.ts +129 -12
- package/packages/core/src/ports/workspace/process-group.ts +48 -0
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +1539 -221
- package/packages/core/src/processes/agent-context-assemble.ts +576 -0
- package/packages/core/src/processes/agent-context.ts +469 -0
- package/packages/core/src/processes/build-execution-state.ts +1 -3
- package/packages/core/src/processes/build-runner.ts +1982 -528
- package/packages/core/src/processes/dispatch-failure-budget.ts +1 -1
- package/packages/core/src/processes/dispatcher-selectors.ts +15 -13
- package/packages/core/src/processes/dispatcher.ts +3003 -308
- package/packages/core/src/processes/execution-no-progress.ts +40 -1
- package/packages/core/src/processes/execution-settlement.ts +2 -6
- package/packages/core/src/processes/harvest-execution-state.ts +2 -6
- package/packages/core/src/processes/harvest-runner.ts +7 -2
- package/packages/core/src/processes/infrastructure-failure-budget.ts +1 -3
- package/packages/core/src/processes/judge-launcher.ts +38 -0
- package/packages/core/src/processes/measurement-runner.ts +235 -0
- package/packages/core/src/processes/optimization-activity.ts +120 -0
- package/packages/core/src/processes/optimization-merges.ts +101 -0
- package/packages/core/src/processes/optimization-stop.ts +179 -0
- package/packages/core/src/processes/panel-runner.ts +756 -0
- package/packages/core/src/processes/phase-failure-budget.ts +2 -0
- package/packages/core/src/processes/publication-state.ts +1 -4
- package/packages/core/src/processes/repo-view.ts +154 -6
- package/packages/core/src/processes/sandbox-state.ts +54 -10
- package/packages/core/src/processes/tick-publication.ts +2 -0
- package/packages/core/src/processes/tick-state.ts +1 -3
- package/packages/core/src/processes/workspace-preparation.ts +76 -0
- package/packages/core/src/processes/workspace-preservation.ts +67 -9
- package/packages/core/src/scenarios/harness.ts +19 -13
- package/packages/core/src/store/account-redaction.ts +1 -0
- package/packages/core/src/store/adapter.ts +52 -1
- package/packages/core/src/store/agent-context.ts +432 -0
- package/packages/core/src/store/build-feed.ts +291 -0
- package/packages/core/src/store/build-scope.ts +19 -1
- package/packages/core/src/store/contract.ts +955 -14
- package/packages/core/src/store/digest.ts +104 -9
- package/packages/core/src/store/histogram.ts +113 -0
- package/packages/core/src/store/judge-authority.ts +161 -0
- package/packages/core/src/store/local/schema.ts +62 -0
- package/packages/core/src/store/local/store.ts +628 -22
- package/packages/core/src/store/local/ticket-asset-heads.ts +23 -0
- package/packages/core/src/store/memory.ts +461 -69
- package/packages/core/src/store/open-builds.ts +19 -0
- package/packages/core/src/store/phase-session.ts +256 -6
- package/packages/core/src/store/reduced-reads.ts +24 -4
- package/packages/core/src/store/reducer-value-shapes.json +18023 -11824
- package/packages/core/src/store/reducer-values.ts +6 -1
- package/packages/core/src/store/remote/client.ts +220 -4
- package/packages/core/src/store/remote/compatibility.ts +1 -1
- package/packages/core/src/store/remote/credentials.ts +31 -1
- package/packages/core/src/store/remote/index.ts +41 -0
- package/packages/core/src/store/remote/protocol.ts +107 -0
- package/packages/core/src/store/remote/released-clients.json +22 -0
- package/packages/core/src/store/remote/released-reducer-values/1.10.0.json +34439 -0
- package/packages/core/src/store/remote/released-reducer-values/1.11.0.json +35680 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +20 -16
- package/packages/core/src/store/remote/token.ts +13 -4
- package/packages/core/src/store/repo-state-events.ts +6 -8
- package/packages/core/src/store/retention.ts +23 -1
- package/packages/core/src/store/rollups.ts +337 -0
- package/packages/core/src/store/session-handle.ts +20 -2
- package/packages/core/src/store/session-reducer.ts +1 -4
- package/packages/core/src/store/snapshots.ts +10 -0
- package/packages/core/src/store/ticket-assets.ts +1 -3
- package/packages/core/src/store/types.ts +117 -9
- package/packages/core/src/testing/dispatch-read-budget.ts +1162 -2
- package/packages/core/src/testing/git-config-isolation.ts +27 -0
- package/packages/core/src/testing/index.ts +40 -0
- package/packages/core/src/testing/memory-operator-sandbox.ts +346 -0
- package/packages/core/src/testing/reduced-read-budget.ts +5349 -153
- package/packages/core/src/web/analytics-source.ts +303 -0
- package/packages/core/src/web/assets/Atkinson-OFL.txt +93 -0
- package/packages/core/src/web/assets/AtkinsonHyperlegibleNext.latin.woff2 +0 -0
- package/packages/core/src/web/assets/JetBrains-OFL.txt +93 -0
- package/packages/core/src/web/assets/JetBrainsMono.latin.woff2 +0 -0
- package/packages/core/src/web/assets/app.css +1 -0
- package/packages/core/src/web/assets/app.js +9 -0
- package/packages/core/src/web/assets/manifest.json +31 -0
- package/packages/core/src/web/assets/theme.js +1 -0
- package/packages/core/src/web/bounded.ts +31 -0
- package/packages/core/src/web/http.ts +315 -0
- package/packages/core/src/web/hub.ts +160 -0
- package/packages/core/src/web/options.ts +38 -0
- package/packages/core/src/web/overview-source.ts +322 -0
- package/packages/core/src/web/page.ts +56 -0
- package/packages/core/src/web/protocol.ts +151 -0
- package/packages/core/src/web/read-only.ts +23 -0
- package/packages/core/src/web/repository-source.ts +35 -0
- package/packages/core/src/web/server.ts +97 -0
- package/skills/code-review/SKILL.md +26 -2
- package/skills/finalize/SKILL.md +10 -4
- package/skills/guide/SKILL.md +743 -123
- package/skills/guide/references/accounts.md +2 -1
- package/skills/guide/references/integration-tree.md +102 -11
- package/skills/guide/references/merge-policy.md +30 -14
- package/skills/guide/references/migration-1.0.md +2 -1
- package/skills/guide/references/operator-api.md +251 -20
- package/skills/guide/references/optimization-nodes.md +1100 -0
- package/skills/guide/references/plugin-authoring.md +83 -13
- package/skills/guide/references/remote-store-protocol.md +137 -17
- package/skills/guide/references/remote-ticket-protocol.md +90 -2
- package/skills/guide/references/restacking.md +119 -15
- package/skills/guide/references/setup.md +27 -4
- package/skills/guide/references/spec-standard.md +2 -1
- package/skills/guide/references/ticket-dependencies.md +15 -3
- package/skills/guide/references/ticket-migration.md +4 -2
- package/skills/implement/SKILL.md +74 -5
- package/skills/judge/SKILL.md +43 -0
- package/skills/operate/SKILL.md +374 -57
- package/skills/plan/SKILL.md +28 -4
- package/skills/plan-review/SKILL.md +24 -3
- package/skills/propose/SKILL.md +121 -0
- package/skills/reconcile/SKILL.md +21 -2
- package/skills/spec/SKILL.md +63 -11
- package/skills/tickets/SKILL.md +94 -9
- package/templates/hosted-service/package.json +2 -2
package/docs/architecture.md
CHANGED
|
@@ -25,7 +25,11 @@ disagree, the code is authoritative.
|
|
|
25
25
|
forward. Pending operator commands remain actionable.
|
|
26
26
|
3. **Ingesters propose, humans dispatch.** Nothing auto-generated passes
|
|
27
27
|
Triage without a human grooming it to Ready, unless the repository waives
|
|
28
|
-
that gate explicitly with `[tickets].proposalState
|
|
28
|
+
that gate explicitly with `[tickets].proposalState` for its own harvest.
|
|
29
|
+
An optimization node's attempts are the one other path: grooming the
|
|
30
|
+
node's objective, purpose, budget and stop policy is the dispatch decision
|
|
31
|
+
for the attempts its proposer files, so within that budget they go
|
|
32
|
+
straight to Ready. The gate still holds for all other generated work.
|
|
29
33
|
4. **Every step leaves a paper trail** — queryable, not carried in the repo.
|
|
30
34
|
|
|
31
35
|
## Pipeline
|
|
@@ -84,6 +88,7 @@ remote-store protocol requires matching client and server versions.
|
|
|
84
88
|
| `packages/core/src/harvest/` | Structured occurrence, scan packet, proposal, and ledger schemas | §12 |
|
|
85
89
|
| `packages/core/src/store/session-reducer.ts` | The operator-session reducer: status, open turn, pending approval, wake settings and cursors, and the turn list, reduced purely from the session event log | §7.1.1 |
|
|
86
90
|
| `packages/core/src/store/` | BuildStore contract spanning builds, the repository journal, and operator sessions; interface-enforced build, operator-session, and local ambient-session scope wrappers; memory, SQLite/blob, and remote HTTP adapters | §7 |
|
|
91
|
+
| `packages/core/src/store/agent-context.ts` | The repository agent-context record, pointer and continuation-slot codecs, their size bounds, and the latest-revision reader | §12 |
|
|
87
92
|
| `packages/core/src/store/streams/` | The stream primitive's shared core (§7.6): record/chunk types and the `ai-ui-message-stream/v1` constants, SDK-backed close-time `UIMessage[]` assembly, and the uniform bounded-wait read loop | §7.6 |
|
|
88
93
|
| `packages/hosted-store-service/` | Environment-only hosted Fetch handler, lazy PostgreSQL/blob composition, offline token binary, the Next.js operator web app (`app/`, `server.ts`, `next.config.ts`, `vercel.json`), tests, and deployment guide | §7.2, §18 |
|
|
89
94
|
| `packages/hosted-dispatcher/` | The optional cron-driven hosted dispatcher: endpoint driver, deploy-time `pack-distribution` and `ship-deployment` binary, packed-distribution trace helper, Git stager (`ship-git.ts`, `elf.ts`) and runtime locator (`shipped-git.ts`), provider plugin shipper, tests, and operator guide | §7.2, §12, §18 |
|
|
@@ -93,11 +98,11 @@ remote-store protocol requires matching client and server versions.
|
|
|
93
98
|
| `packages/core/src/ports/` | TicketSource / Workspace / Forge / AgentRunner / Telemetry interfaces, adapters, and fakes; registry-aware builtin/plugin construction; eager primary/alternate runtime routing and provider-failure classification, awaited native identity observation and optional fresh-process native resume under `ports/runner/` | §3.2, §9, §13 |
|
|
94
99
|
| `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 |
|
|
95
100
|
| `packages/core/src/plugin-sdk/` | The sole supported `@defrex/autobuild/plugin-sdk` barrel: port/manifest types, contract suites, and reference fakes | §3.2.1 |
|
|
96
|
-
| `packages/core/src/processes/` | build-runner and standalone child composition, durable execution config/diagnostics, dispatcher (+ janitor duty, sandbox idle settlement and harvest trigger), harvest deterministic core + runner, configured hook delivery (`hooks.ts`, `hook-command.ts`, `hook-webhook.ts`) | §3.3, §7.1.2, §12, §15.7, §16.1 |
|
|
97
|
-
| `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 dispatch frontend (Store-backed, plus the viewer's ticket-source triage count), its private supervised kernel entry, and `bin/ab-build-runner.ts` (one child per build) | §8, §14, §16.3 |
|
|
101
|
+
| `packages/core/src/processes/` | build-runner and standalone child composition, durable execution config/diagnostics, dispatcher (+ janitor duty, sandbox idle settlement and harvest trigger), harvest deterministic core + runner, configured hook delivery (`hooks.ts`, `hook-command.ts`, `hook-webhook.ts`), repository agent-context capture (`agent-context.ts`, pure selection in `agent-context-assemble.ts`) | §3.3, §7.1.2, §12, §15.7, §16.1 |
|
|
102
|
+
| `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 dispatch frontend (Store-backed, plus the viewer's ticket-source triage count) and its in-process web server, its private supervised kernel entry, and `bin/ab-build-runner.ts` (one child per build) | §8, §14, §16.3 |
|
|
98
103
|
| `packages/core/src/cli/dashboard/` | `ab dispatch`'s fixed live frame: pure projection, renderer, poll cache, and deterministic image renderer | §14 |
|
|
99
104
|
| `bin/agent/ab` | Private launcher placed first on agent-session `PATH`; delegates to the canonical `bin/ab.ts` | §8.1 |
|
|
100
|
-
| `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 |
|
|
105
|
+
| `packages/core/src/config/` | `autobuild.toml` parsing and strict validation, the allowlisted `.autobuild/local.toml` override layer (`local.ts`), plus the pure role-key consumability diagnostics `ab dispatch` reports at startup (`roles.ts`); user reference in `docs/configuration.md` | §9, §16.1 |
|
|
101
106
|
| `packages/core/src/scenarios/` | End-to-end harness over a temporary Git origin and worktrees (integration tests) and product scenarios | — |
|
|
102
107
|
| `tools/` | This repository's local maintainer tooling, including verification, dashboard capture, and release cutting; not shipped product behavior | — |
|
|
103
108
|
| `skills/` | Canonical defaults; `ab init` vendors them to `.agents/skills/ab-*` and links `.claude/skills/ab-*` | §16.3 |
|
|
@@ -146,11 +151,39 @@ wrappers over the same fold, so results cannot diverge, and a property test
|
|
|
146
151
|
checks every split point of fixture and generated logs. The accumulator is plain
|
|
147
152
|
JSON, so it survives a serialize-and-parse round trip. `advance` never mutates
|
|
148
153
|
its input: it clones, then folds, so a state derived earlier is never disturbed
|
|
149
|
-
by a later advance. Each reducer publishes a `version
|
|
150
|
-
accumulator
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
by a later advance. Each reducer publishes a `version`, because a cached
|
|
155
|
+
accumulator is only valid for the version that wrote it. The version is derived,
|
|
156
|
+
never edited (`kernel/reducer-identity.ts`): a frozen legacy base, plus one for
|
|
157
|
+
each line naming the reducer's identity in the append-only revision ledger
|
|
158
|
+
`kernel/reducer-revisions.ts`, plus the versions of its declared parts. When an
|
|
159
|
+
accumulator shape or fold changes, `bun tools/reducer-revision.ts <shape|fold>
|
|
160
|
+
<identity> --reason "…"` appends a line with a random id. The ledger merges by
|
|
161
|
+
union (`.gitattributes`), so two branches that revise the same reducer combine
|
|
162
|
+
without a conflict into a version higher than either, and versions only grow.
|
|
163
|
+
Never delete a ledger line, even to revert: a lower version would be reduced
|
|
164
|
+
again on every read. The registry integration test's revision guard enforces
|
|
165
|
+
this against the verify base (`AB_VERIFY_BASE`): it fails a change that drops a
|
|
166
|
+
base ledger line, or under which any identity both commits construct derives a
|
|
167
|
+
lower version than the base's own code did, through the ledger, a frozen legacy
|
|
168
|
+
base or a part. A deregistered identity keeps its lines and is not compared.
|
|
169
|
+
`kernel/reducer-registry.ts` lists every reducer, and its
|
|
170
|
+
integration test checks the derivation and fails when an accumulator shape
|
|
171
|
+
changes without a revision. It also holds the identity records under
|
|
172
|
+
`kernel/__snapshots__/reducer-identity-records/`: per reducer identity and
|
|
173
|
+
revision set, the accumulator digest after each deterministic test corpus.
|
|
174
|
+
Every corpus a record has covered is kept in the content-addressed
|
|
175
|
+
`reducer-identity-corpora/` archive and stays checked under that identity, so
|
|
176
|
+
corpora may change freely while a fold change without a revision still fails.
|
|
177
|
+
`AB_UPDATE_REDUCER_SHAPES=1` on that test regenerates the shapes and adds one
|
|
178
|
+
new record file; record files are only ever added, never edited or deleted. One
|
|
179
|
+
state passes the records with a notice rather than silently: after revisions
|
|
180
|
+
combine through a clean restack and before anyone regenerates, the combined
|
|
181
|
+
identity has no record of its own. A base-relative clause catches a fold change
|
|
182
|
+
there: against the verify base (`AB_VERIFY_BASE`), a reducer whose change adds
|
|
183
|
+
no revision must fold every corpus as the base's records, or failing those the
|
|
184
|
+
base's own code, did. The clause is skipped, with a notice, in two cases: when
|
|
185
|
+
no base is supplied, and when the supplied base predates the revision ledger.
|
|
186
|
+
The revision guard skips, with its own notice, in the same two cases. Either way the identity-record checks above stay in force. Current-state consumers use the typed persisted
|
|
154
187
|
read helpers in `store/reduced-reads.ts`; whole-array reducers remain pure
|
|
155
188
|
reference projections for tests and explicit historical output.
|
|
156
189
|
|
|
@@ -211,6 +244,7 @@ Published clients with a recorded published catalog identity, or without a catal
|
|
|
211
244
|
identity, receive answers projected onto their
|
|
212
245
|
frozen released contracts in `store/remote/released-reducer-values/` and stamped
|
|
213
246
|
with their released reducer versions, including projection-capable published clients.
|
|
247
|
+
The projection covers both named reducer values and historical stream seeds.
|
|
214
248
|
`reducerValueForClient` omits optional `lastEvent` fields with newer event variants,
|
|
215
249
|
including nested build state, and filters `seenTypes` to known event types while
|
|
216
250
|
preserving canonical cursor, progress, and compatibility facts. An invalid envelope
|
|
@@ -244,6 +278,24 @@ wrong-version or ahead-of-log rows are repaired only by comparing the exact row
|
|
|
244
278
|
observed, atomically with the log boundary. A losing writer still returns its
|
|
245
279
|
correct prefix. Missing or unreadable cache state replays; log failures propagate.
|
|
246
280
|
|
|
281
|
+
**Derived reducers.** A `{kind: 'rollup', repo}` scope answers a value across a
|
|
282
|
+
repository's builds (SPEC §7.7). `kernel/rollup.ts` defines the three parts (a
|
|
283
|
+
registered build reducer, a pure invertible contribution, an accumulator with
|
|
284
|
+
`add` and `subtract`); `ROLLUPS` in `kernel/reducer-registry.ts` registers them.
|
|
285
|
+
`kernel/step-durations.ts` is the first rollup, folding
|
|
286
|
+
`cli/dashboard/timeline.ts`'s `buildTimeline` segments into the log-scale
|
|
287
|
+
histograms of `store/histogram.ts`. `kernel/build-roster.ts` is the second:
|
|
288
|
+
its `buildRosterEntry` build reducer feeds `buildRoster`, the live builds plus
|
|
289
|
+
a capped history of the newest finished ones, which `ab web`'s overview starts
|
|
290
|
+
from. `store/rollups.ts` is the one engine every
|
|
291
|
+
adapter runs over a narrow `RollupStorage` port: fast path on an unchanged
|
|
292
|
+
change position, otherwise an advance by the changed-builds feed, serialized
|
|
293
|
+
per key and committed atomically with each build's absorbed contribution in
|
|
294
|
+
`reducer_snapshots`. The memory adapter serializes with a keyed mutex, SQLite
|
|
295
|
+
with a `rollup-lease` row, and Postgres with a transaction-scoped advisory lock
|
|
296
|
+
whose transaction runs every query of the advance. Remote clients make one
|
|
297
|
+
`rollup-values` request and require an equal version.
|
|
298
|
+
|
|
247
299
|
The remote adapter makes one value request; only the finished answer crosses the
|
|
248
300
|
wire. The service uses named effective-configuration references for hosted ticket
|
|
249
301
|
operations (including policy publication) and semantic build/harvest lifecycle
|
|
@@ -260,8 +312,10 @@ source promise chains. Its build and journal facts come from persisted reduced
|
|
|
260
312
|
values. Reads after an append or lost conditional append consult that boundary
|
|
261
313
|
again, so no process-local memo suppresses a required delta. The adapter owns
|
|
262
314
|
cache persistence and recovery; the view neither writes work bundles nor hydrates
|
|
263
|
-
whole logs for decisions.
|
|
264
|
-
settled builds.
|
|
315
|
+
whole logs for decisions. The dispatcher's discovery (`refresh`) uses persisted
|
|
316
|
+
build digests, including for settled builds. Operator passes discover through
|
|
317
|
+
`refreshOpen` and the store's `listOpenBuilds`, which never reads a settled
|
|
318
|
+
build. Raw methods forward actual cursor event output.
|
|
265
319
|
|
|
266
320
|
JSON-safe companion projections preserve collection and optional-value contracts.
|
|
267
321
|
The build facts projection returns one prefix for engine routing; its log-index
|
|
@@ -327,16 +381,67 @@ identity for the finite `builds`, `build status`, and `artifact download` read
|
|
|
327
381
|
shells: no identity retains operator authority, while any partial, malformed,
|
|
328
382
|
shared-only, or mixed identity fails closed before Store opening. Remote
|
|
329
383
|
references keep the existing token-backed client unchanged. Local references
|
|
330
|
-
are wrapped by `packages/core/src/store/phase-session.ts`, which permits
|
|
384
|
+
are wrapped by `packages/core/src/store/phase-session.ts`, which permits the exact
|
|
331
385
|
ambient build or repository resource (this is the phase-session wrapper, not the
|
|
332
386
|
operator-session scope handle in `session-handle.ts`) and rejects
|
|
333
387
|
agent-attributed event writes
|
|
334
|
-
for any session other than `AB_SESSION`.
|
|
388
|
+
for any session other than `AB_SESSION`. One read-only exception serves a
|
|
389
|
+
targeted build that is not itself a node, such as an optimization attempt or
|
|
390
|
+
another node child: it may read its target node's `buildReadFacts` value, its
|
|
391
|
+
own repository's `repositoryReadFacts` value and that repository's record, so
|
|
392
|
+
attempt context, harness protection and `--no-improvement` work in the session.
|
|
393
|
+
The grant is derived once per handle from the scoped build's own facts. Every
|
|
394
|
+
other foreign read, any unrelated build or repository, and every foreign write
|
|
395
|
+
remain refused. The wrapper deliberately allows
|
|
335
396
|
non-agent actors because phase terminals also run trusted kernel plumbing in
|
|
336
397
|
that CLI process; resource authority still applies to every operation. Generic
|
|
337
398
|
sessionless opening remains unwrapped; only those three reads use the dedicated
|
|
338
399
|
ambient-aware finite opener.
|
|
339
400
|
|
|
401
|
+
**Judge panels.** `packages/core/src/kernel/panel.ts` holds a judge panel's
|
|
402
|
+
pure half: each judge's A/B order, the candidate's score, the win rate with
|
|
403
|
+
ties counted as half, and the latest run's reduced state (`BuildState.panel`).
|
|
404
|
+
`packages/core/src/processes/panel-runner.ts` materializes each pending judge's
|
|
405
|
+
root outside any repository from a private Git directory over the workspace's
|
|
406
|
+
objects, pins every harness path, copies `ab-judge` from the harness pin and
|
|
407
|
+
removes that material before any session starts. It computes the protected
|
|
408
|
+
locations (workspace, checkout, Git common directory, main checkout, local
|
|
409
|
+
store), refuses a scratch base or root in one of them or inside any Git
|
|
410
|
+
repository with fail-closed discovery, writes the judge-only launcher, and
|
|
411
|
+
refuses an interpreter or runtime executable found only in a protected
|
|
412
|
+
location. Its loop reclaims dangling sessions, completes saved preferences and
|
|
413
|
+
launches each wave concurrently. `packages/core/src/cli/judge-entry.ts` is the
|
|
414
|
+
judge-only `ab`, bundled into one file by
|
|
415
|
+
`packages/core/src/processes/judge-launcher.ts`. `sessionEnv` in
|
|
416
|
+
`packages/core/src/ports/runner/session-env.ts` builds the judge's launch
|
|
417
|
+
environment, scrubbing every inherited value that names a protected location;
|
|
418
|
+
`judgeAmbientAliases` in `panel-runner.ts` first resolves inherited paths so a
|
|
419
|
+
symlinked spelling of one, or one embedded after a prefix such as `-I`, is
|
|
420
|
+
scrubbed too.
|
|
421
|
+
`BuildRunner.runPanel` records the run's kernel facts, the order in
|
|
422
|
+
`panel.judge-started` before each session, and `panel.judged` after it, and
|
|
423
|
+
commits a local judge's preference outbox. Its `runJudge` runs the `judge`
|
|
424
|
+
role's primary-first provider chain for one judge, opening a session stream
|
|
425
|
+
per judge session and closing it before `panel.judge-ended`; the panel loop
|
|
426
|
+
hands each launch a preflight that checks an alternate's executable against
|
|
427
|
+
the run's filtered `PATH` and protected locations before it starts. `BuildRunner.runMeasurement`
|
|
428
|
+
calls it for an attempt's panel measurement request, under the panel id `attemptPanelId`
|
|
429
|
+
derives in `packages/core/src/kernel/measurement.ts`, and records the win rate
|
|
430
|
+
in `attempt.sampled`; the dispatcher decides it against the node's current ε
|
|
431
|
+
there too (`decideSampledMeasurement`, `panelDecision`), and
|
|
432
|
+
`packages/core/src/kernel/landing-measurement.ts` classifies the recorded win
|
|
433
|
+
rate for landing. A judge session has no read authority: `packages/core/src/store/judge-authority.ts` is the shared rule (one
|
|
434
|
+
`panel.preferred` for its own panel, judge and session, while that session is
|
|
435
|
+
open). Its `appendJudgePreference` decides and appends in one conditional step
|
|
436
|
+
for every holder of the store: the hosted `build-judge` route, the kernel's
|
|
437
|
+
outbox commit and the local wrapper in `packages/core/src/store/phase-session.ts`.
|
|
438
|
+
`packages/core/src/cli/judge.ts` implements `ab judge context` (no store read)
|
|
439
|
+
and `ab judge prefer`, and any read command run with `AB_JUDGE` set fails
|
|
440
|
+
before opening a store. The node runner calls
|
|
441
|
+
`runPanel` for a panel node's starting self-comparison and for its progress
|
|
442
|
+
after each accepted attempt, selected by `baselineMeasurementDue` and
|
|
443
|
+
`progressMeasurementDue` in `packages/core/src/kernel/measurement.ts`.
|
|
444
|
+
|
|
340
445
|
**Phase decisions.** `packages/core/src/kernel/phases.ts` owns the phase table,
|
|
341
446
|
`packages/core/src/kernel/engine.ts` the deterministic transitions;
|
|
342
447
|
`packages/core/src/processes/build-runner.ts` executes the decisions. Repeated phase starts
|
|
@@ -562,8 +667,10 @@ identical observations append nothing. `dispatch-frontend.ts` owns only terminal
|
|
|
562
667
|
`dispatch-process.ts` owns child supervision. SIGINT, SIGHUP, SIGQUIT, and
|
|
563
668
|
SIGTERM restore terminal modes immediately and begin one supervised drain;
|
|
564
669
|
persistent frontend and child handlers keep repeated signals graceful until the
|
|
565
|
-
kernel child is reaped, after which
|
|
566
|
-
|
|
670
|
+
kernel child is reaped, after which SIGHUP and SIGTERM are replayed in the
|
|
671
|
+
frontend, while a drained SIGQUIT exits 131 rather than dumping core. A
|
|
672
|
+
supervised generation returns SIGQUIT through `GENERATION_EXITS.stopped` and
|
|
673
|
+
the launcher exits 131. A parent-liveness watch remains the detached-kernel fallback.
|
|
567
674
|
The repository record carries constant-size, lease-holder-fenced tick telemetry:
|
|
568
675
|
`beginRepoTick` opens the unsafe boundary, and `finishRepoTick` atomically closes
|
|
569
676
|
it and appends selected tick facts. Unchanged standing ticket counts and diagnostics do
|
|
@@ -627,18 +734,23 @@ explicitly.
|
|
|
627
734
|
`processes/workspace-preservation.ts` owns the non-destructive fence, immutable
|
|
628
735
|
checkpoint and durable receipt ordering shared by both release paths in the
|
|
629
736
|
dispatcher. `ports/workspace/commit-preservation.ts` inventories the unpublished
|
|
630
|
-
change and restores exact refs, keeping detached producer objects
|
|
631
|
-
the named branch. Provider provisioning and start failures signal
|
|
737
|
+
change and restores exact refs or store copies, keeping detached producer objects
|
|
738
|
+
separate from the named branch. Provider provisioning and start failures signal
|
|
632
739
|
`WorkspaceCleanupRequired`; they cannot delete an existing build checkout.
|
|
633
740
|
|
|
634
741
|
Before releasing or replacing a build workspace, the dispatcher confirms a
|
|
635
742
|
non-destructive execution fence for the exact workspace and execution generation.
|
|
636
743
|
It preserves unpublished branch commits and distinct detached producer candidates
|
|
637
744
|
under immutable `refs/autobuild/archive/<build>/<sha>` refs, verifies their exact
|
|
638
|
-
readback, and records `workspace.commits-preserved` before cleanup.
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
745
|
+
readback, and records `workspace.commits-preserved` before cleanup. Where the
|
|
746
|
+
forge refuses an archive ref, the head is kept as a BuildStore copy instead
|
|
747
|
+
and the receipt is the decisive `workspace.commits-retained`, whose heads each
|
|
748
|
+
name either `remoteRef` or `storeBase`; a head kept by neither refuses the
|
|
749
|
+
release. Replacement provisioning restores those exact commits before starting
|
|
750
|
+
an agent, reading archive refs from the local repository with the local-git forge
|
|
751
|
+
and fetching each exact ref from the remote otherwise, and restoring store copies
|
|
752
|
+
through a dispatcher-side callback on any host, so a remote guest never holds
|
|
753
|
+
store credentials. A preserved
|
|
642
754
|
branch head that the build's latest 64 replaced heads cover, as the replaced
|
|
643
755
|
head itself or one of its ancestors, is kept only as archived objects: it is
|
|
644
756
|
never preserved or restored as the branch, and provisioning records the skip as
|
|
@@ -649,11 +761,14 @@ that exists without a provisioned checkout, records `workspace.commits-lost`,
|
|
|
649
761
|
naming known candidates and explicitly noting that any additional unpublished
|
|
650
762
|
SHAs could not be inspected. An environment that never started executing holds
|
|
651
763
|
no unpublished work: objects its checkout lacks mean nothing to preserve, so
|
|
652
|
-
cleanup records `workspace.commits-preserved`
|
|
653
|
-
heads, then releases and replaces it. Unknown fencing, inspection, transport, or
|
|
764
|
+
cleanup records `workspace.commits-preserved` (or `workspace.commits-retained`)
|
|
765
|
+
carrying forward earlier preserved heads, then releases and replaces it. Unknown fencing, inspection, transport, or
|
|
654
766
|
receipt-write outcomes leave the workspace and snapshots intact. A workspace
|
|
655
767
|
flagged by `workspace.cleanup-required` is never launched into: the dispatcher
|
|
656
|
-
releases it and provisions the next generation.
|
|
768
|
+
releases it and provisions the next generation. Provisioning cut off by a
|
|
769
|
+
recorded dispatcher teardown is the exception: the next invocation asks the
|
|
770
|
+
provider to verify and finish the same generation, and if it cannot, the
|
|
771
|
+
replacement consumes no infrastructure attempt. A preservation or release
|
|
657
772
|
failure is recorded against its build, as an infrastructure failure or janitor
|
|
658
773
|
attention, and never stops the dispatcher from advancing other builds.
|
|
659
774
|
Fencing is revalidated after restart; a saved receipt alone never authorizes
|
|
@@ -673,7 +788,8 @@ raise `BuildScopeError`. The shared Store suite applies these checks to memory,
|
|
|
673
788
|
SQLite, and remote clients, while HTTP token scope remains defense in depth.
|
|
674
789
|
|
|
675
790
|
**Live configuration.** `packages/core/src/config/live.ts` owns the running dispatcher's
|
|
676
|
-
immutable last-valid main-checkout snapshot
|
|
791
|
+
immutable last-valid main-checkout snapshot (`autobuild.toml` layered with
|
|
792
|
+
`.autobuild/local.toml` through `config/local.ts`), exhaustive hot/restart field
|
|
677
793
|
classification, and eager role resolver. The watch loop refreshes it before
|
|
678
794
|
each tick and publishes the exact accepted TOML and the composed effective JSON
|
|
679
795
|
atomically with a run-correlated `dispatcher.config-reloaded` repository fact
|
|
@@ -708,6 +824,29 @@ boundary in the reducer and log index, independently of reconcile identity.
|
|
|
708
824
|
The advisory `pipeline.settled` fact records that the engine reached a leaf's
|
|
709
825
|
`wait awaiting-pr`; `kernel/dispatch-capacity.ts` reads it so a finished build
|
|
710
826
|
parked for its merge decision holds no slot.
|
|
827
|
+
Reopening a settled leaf (SPEC §15.7) spans the same seams. The shared
|
|
828
|
+
`cli/build-control.ts` control appends the human `build.reopened` and, for a
|
|
829
|
+
spec, publishes the kernel's operator `spec.revised`; `ab reopen` and the
|
|
830
|
+
`builds.reopen` tool call it. `kernel/reopen.ts` holds the reduced-state
|
|
831
|
+
predicates the control's refusals, the engine's `awaiting-spec` park, capacity's
|
|
832
|
+
`reopen` slot request, landing readiness, `ab context` (`reopen.json`) and the
|
|
833
|
+
status surfaces share. The log index's `codeRestartSeq` is the code half's
|
|
834
|
+
restart boundary, so the engine re-runs implement, review, verify and finalize
|
|
835
|
+
without special cases, and the terminal guard lets the re-run finalize and
|
|
836
|
+
verify attempts complete again.
|
|
837
|
+
Slot admission order (SPEC §12) is arithmetic in `kernel/dispatch-capacity.ts`:
|
|
838
|
+
waiting entries carry the build's reduced `priority` (`build.created`,
|
|
839
|
+
`build.priority-set`), `startClaimDemand` counts pending start requests by
|
|
840
|
+
tier, `reservedAhead` counts the manual requests ahead of an urgent waiter and
|
|
841
|
+
also the urgent reservations, urgent requests and the latest admission scan's
|
|
842
|
+
`urgentWaiting` ahead of a normal waiter, `intakeCapacity` gives ordinary urgent
|
|
843
|
+
and normal claims separate budgets, and `startCapacity` gives each start tier
|
|
844
|
+
its own. The
|
|
845
|
+
dispatcher's `leafAdmission`, `nodeHasCapacity` and proposer admission defer a
|
|
846
|
+
normal waiter that fits while claims can run; `dispatch` forces that tick's
|
|
847
|
+
admission scan once per deferral key, and `admitDeferredParked` retries the
|
|
848
|
+
deferred admissions through their generic paths only after the scan completed
|
|
849
|
+
its urgent decision.
|
|
711
850
|
Ticket waits (SPEC §11) span four seams. `cli/terminals.ts` (`waitOn`, routed
|
|
712
851
|
as `ab wait-on`) appends the agent's terminal `wait.requested`; the build
|
|
713
852
|
digest marks it pending. The dispatcher's lease-sweep pass validates a pending
|
|
@@ -727,7 +866,9 @@ completes with `wait.published`; `serviceWaitRequest` enters the wait only
|
|
|
727
866
|
after that. `waitResumeRestackCycle` in the same module is the engine's
|
|
728
867
|
wait-resume restack predicate, decided ahead of the plan and code loops against
|
|
729
868
|
`leafBaseInUse` (`kernel/leaf-restack-state.ts`), which target observation
|
|
730
|
-
shares.
|
|
869
|
+
shares. `waitResumeReverifies` and `cleanWaitResumeCompletion` decide which
|
|
870
|
+
resumed completions open a new verify cycle (see "Leaf and reconcile restacking").
|
|
871
|
+
The runner's `restack()` replays published work through the guarded
|
|
731
872
|
automatic restack, fast-forwards an unpublished branch that has no commits the
|
|
732
873
|
target lacks and no uncommitted tracked changes (`advanceWaitResume`,
|
|
733
874
|
`restack.advanced`) and otherwise fails without discarding local work, and first supersedes a reconcile occurrence whose session
|
|
@@ -763,7 +904,7 @@ dispatch is tolerated. `Ticket.creationKey` is the optional stable external
|
|
|
763
904
|
create/adoption correlation, distinct from `Ticket.ref.id`; Linear projects its
|
|
764
905
|
issue UUID and file/fake preserve their idempotency metadata through create,
|
|
765
906
|
adoption, get, and list paths. Legacy/plugin tickets may omit it and dispatch
|
|
766
|
-
unchanged. The ticket-source port optionally exposes `listPage(criteria, page)` for paged operator reads. PostgreSQL counts matches and applies SQL LIMIT/OFFSET; other sources retain exhaustive-read slicing. CLI and dispatcher reads stay exhaustive. See [ticket source contract](ticket-sources.md#writing-your-own).
|
|
907
|
+
unchanged. The ticket-source port optionally exposes `listPage(criteria, page)` for paged operator reads. PostgreSQL counts matches and applies SQL LIMIT/OFFSET; the remote hosted client forwards pages over the `list-page` ticket operation; other sources retain exhaustive-read slicing. CLI and dispatcher reads stay exhaustive. The optional `search(query)` serves `tickets.search` and `ab ticket search`; PostgreSQL answers it with one keyset-paged bounded statement, the remote hosted client forwards it over the `search` ticket operation, and the Linear source answers it with one team-filtered GraphQL `issues` request per page; the GitHub source answers it with one GitHub issue-search request per page on GitHub's separate search quota; `ports/tickets/search.ts` holds the shared matcher and cursor pager, the `TicketSearchUnsupported` refusal for sources without it, and `searchTickets`, the caller entry point. See [ticket source contract](ticket-sources.md#writing-your-own).
|
|
767
908
|
|
|
768
909
|
The `github` source spans four modules. `ports/tickets/github.ts` is the
|
|
769
910
|
adapter: REST over the forge's `GitHubRequest` transport and credential order,
|
|
@@ -795,10 +936,17 @@ environment, and absolute repository root. `WorkspaceHandle.ref` remains a
|
|
|
795
936
|
provider identifier, `path` is absolute inside the execution environment, and
|
|
796
937
|
optional `localPath` explicitly identifies dispatcher reachability. Local Forge
|
|
797
938
|
operations fall back to the main checkout when `localPath` is absent.
|
|
798
|
-
`packages/core/src/ports/workspace/git-worktree.ts`
|
|
939
|
+
`packages/core/src/ports/workspace/git-worktree.ts` chooses between those
|
|
940
|
+
candidates on canonical paths, so build worktrees never sit inside the
|
|
941
|
+
checkout's package ancestry, validates the choice before each fresh provision
|
|
942
|
+
(`WorktreeIsolationError` otherwise), and adopts legacy in-checkout
|
|
943
|
+
registrations in place. It selects the branch-cut base once
|
|
799
944
|
at first creation, fetching into a build-scoped private ref; re-provisioning
|
|
800
945
|
resumes at the branch tip, so the first provisioning fact remains immutable
|
|
801
|
-
original provenance.
|
|
946
|
+
original provenance. Both providers record the verified checked-out commit as
|
|
947
|
+
that base: the worktree's HEAD after creation, and for `vercel-sandbox.ts` the
|
|
948
|
+
guest's HEAD and build branch read back after a fresh checkout or a reuse of a
|
|
949
|
+
completed sandbox. A remote workspace lost before its branch is published
|
|
802
950
|
can be freshly cut again; the latest `remote` or `local` provisioning base is
|
|
803
951
|
the fallback review boundary, while `existing` facts only describe resumes.
|
|
804
952
|
Each implementation terminal in `packages/core/src/cli/terminals.ts` records
|
|
@@ -851,7 +999,8 @@ read-only settings/policy inspection, keeping incomplete evidence unknown. Host
|
|
|
851
999
|
init validation invokes the configured registry forge outside guest probes.
|
|
852
1000
|
Dispatch inspects after acquiring its repository lease and writes validated
|
|
853
1001
|
`dispatcher.forge-readiness-failed` facts once per run/check for known hard
|
|
854
|
-
failures. `
|
|
1002
|
+
failures. `archive-refs` is a recommendation; historical facts naming it still
|
|
1003
|
+
decode. `kernel/dispatch-status.ts` retains their typed collection across ticks
|
|
855
1004
|
and reloads; the independent frontend and operator query project the same warnings.
|
|
856
1005
|
`ab watch` follows these repository attention events for external orchestrators.
|
|
857
1006
|
See [setup](setup.md#forge-readiness) for requirements and access guidance.
|
|
@@ -869,13 +1018,27 @@ dispatcher — requires an exported token before any side effect and never consu
|
|
|
869
1018
|
a checkout-less host has neither gh nor a keyring, and `vercel-sandbox` publication
|
|
870
1019
|
injects that same token.
|
|
871
1020
|
|
|
1021
|
+
**Vercel operator sandbox lifecycle (#1246).** `vercel-sandbox.ts` implements
|
|
1022
|
+
`open`/`status`/`close`/`refresh` with provisioning state in the guest under
|
|
1023
|
+
`VERCEL_OPERATOR_PROVISION_DIR` (`host` heartbeat, stage scripts, `tail.sh`,
|
|
1024
|
+
`pid`, `log`, `failed`), classified by one read-only probe in which a `failed`
|
|
1025
|
+
record outranks the marker. The host phase runs as a background attempt that
|
|
1026
|
+
the hosted service keeps alive through its `background` seam (Next's
|
|
1027
|
+
`after()` in `web/runtime.ts`); the tail runs detached. Sandboxes use the
|
|
1028
|
+
`idleMinutes` provider timeout and `sandboxHandle` extends it per tool call.
|
|
1029
|
+
The service (`operator/sandbox.ts`) settles outcomes through `settleOnce` and
|
|
1030
|
+
`recordFailure`, both bounded loops over the store's `appendRepoIfCurrent`.
|
|
1031
|
+
|
|
872
1032
|
**Hosted sandbox lifetime.** `createHostedOperatorSandboxService` owns its default
|
|
873
1033
|
local scratch root and removes it on construction failure or asynchronous,
|
|
874
1034
|
idempotent `dispose()`. Explicit caller scratch remains caller-owned. Disposal
|
|
875
1035
|
cleans local composition resources, independently of durable remote sandbox
|
|
876
|
-
`release`. The
|
|
877
|
-
`
|
|
878
|
-
|
|
1036
|
+
`release`. The hosted service's `OperatorSandboxResolver`
|
|
1037
|
+
(`packages/core/src/operator/sandbox-resolver.ts`) owns every backend it
|
|
1038
|
+
composes: it caches one per repository, effective-config revision and
|
|
1039
|
+
credential key, and disposes a superseded one on replacement. The operator
|
|
1040
|
+
archive handler reuses that cached backend and no longer disposes per request;
|
|
1041
|
+
a static backend retains its caller's lifetime. Distribution packing likewise protects both temporary roots
|
|
879
1042
|
from allocation onward and awaits both cleanup attempts before returning bytes
|
|
880
1043
|
or reporting failure.
|
|
881
1044
|
|
|
@@ -906,6 +1069,14 @@ refreshed durable consent/engine eligibility precede any repair. Comparison
|
|
|
906
1069
|
normalizes line endings and tolerates provider trimming of surrounding
|
|
907
1070
|
headline whitespace and trailing body whitespace while preserving the
|
|
908
1071
|
headline, body content, and squash method.
|
|
1072
|
+
On the same poll of a finished, open leaf, `checkPr` reads forge CI at the PR's
|
|
1073
|
+
live head through the optional `inspectHeadChecks` capability (GitHub: two
|
|
1074
|
+
ETag-conditional REST reads) and compares it with the reduced `ciFailure`
|
|
1075
|
+
already in hand, appending advisory `pr.checks-failed` or `pr.checks-cleared`
|
|
1076
|
+
only on a transition; an unchanged head reads no store rows. A read failure is
|
|
1077
|
+
unknown CI, never a janitor failure. `packages/core/src/kernel/forge-checks.ts`
|
|
1078
|
+
holds the pure classification, the failing-set digest and `currentCiFailure`,
|
|
1079
|
+
the selector every status surface and the attention predicates read.
|
|
909
1080
|
`packages/core/src/kernel/issue-keywords.ts` composes a build's sealed issue
|
|
910
1081
|
links into `Closes #N` / `Refs #N` lines, neutralizes closing keywords aimed at
|
|
911
1082
|
`refs` issues, and places the keyword paragraph before the trailer block; a
|
|
@@ -964,8 +1135,10 @@ merge from both completing between polls.
|
|
|
964
1135
|
|
|
965
1136
|
**Agent runtimes.** `packages/core/src/ports/runner/`: `runtime.ts` (capability-carrying
|
|
966
1137
|
registry plus boundary validation), `routing.ts` (eager role resolver),
|
|
967
|
-
`production.ts` (shipped Claude/Codex/Pi registrations), `codex.ts` (direct
|
|
968
|
-
Codex `exec --json` subprocess protocol with native thread resume), `
|
|
1138
|
+
`production.ts` (shipped Claude/Codex/Pi/Antigravity registrations), `codex.ts` (direct
|
|
1139
|
+
Codex `exec --json` subprocess protocol with native thread resume), `antigravity.ts`
|
|
1140
|
+
(direct `agy` stream-json subprocess, `--conversation` native resume, no
|
|
1141
|
+
one-shot), `pi.ts` and
|
|
969
1142
|
`pi-rpc.ts` (the local pi CLI prerequisite/auth probe and long-lived headless
|
|
970
1143
|
RPC protocol, minimum version 0.84.3), `one-shot.ts` (optional tool-free
|
|
971
1144
|
non-phase completions — slug naming via `packages/core/src/cli/dispatch.ts`, skill-conflict
|
|
@@ -1035,7 +1208,9 @@ slug routing. Upgrade performs the same composition lazily at its first merge
|
|
|
1035
1208
|
conflict.
|
|
1036
1209
|
|
|
1037
1210
|
`packages/core/src/cli/repo-state.ts` owns repository identity and store precedence
|
|
1038
|
-
(`--store` > `AB_STORE` > `[store] url` > `.autobuild/`)
|
|
1211
|
+
(`--store` > `AB_STORE` > `[store] url` > `.autobuild/`), and supplies the two
|
|
1212
|
+
build worktree candidates: the state tree's `worktrees/` and a per-checkout
|
|
1213
|
+
root under the host state home; `packages/core/src/cli/store-opening.ts` is the
|
|
1039
1214
|
production store composition boundary shared by finite sessionless queries and
|
|
1040
1215
|
phase sessions. Its shared scoping primitive preserves remote token composition
|
|
1041
1216
|
and adds local ambient authority only for filesystem stores. The dedicated
|
|
@@ -1092,7 +1267,14 @@ back to triage and records the requested role and missing parts. The
|
|
|
1092
1267
|
`abort.ticket-returned` checkpoint commits the move and comment, then the
|
|
1093
1268
|
repository `ticket.handed-back` report is appended before abandoned completion;
|
|
1094
1269
|
once that report exists the dispatcher writes nothing more to the ticket, so it
|
|
1095
|
-
is the safe boundary for a subsequent ticket move.
|
|
1270
|
+
is the safe boundary for a subsequent ticket move. An optimization attempt
|
|
1271
|
+
is the exception: cleanup settles it `aborted` on the node's log (or settles a
|
|
1272
|
+
merged attempt as a merge), skips the label, ticket move, comment,
|
|
1273
|
+
`abort.ticket-returned` checkpoint and `ticket.handed-back` report whatever
|
|
1274
|
+
the requested destination, and appends abandoned completion. The node's
|
|
1275
|
+
rejection sweep later moves the ticket to `tickets.rejectedState` and records
|
|
1276
|
+
`attempt.ticket-rejected` ([landing and
|
|
1277
|
+
settlement](optimization-nodes.md#landing-and-settlement)). Forge close/delete operations are
|
|
1096
1278
|
optional API 1.2 capabilities so older plugins load but leave cleanup visibly due.
|
|
1097
1279
|
AgentRunner failure causes and the exhaustion contract fixture are additive
|
|
1098
1280
|
plugin API 1.3 surfaces; legacy failures without a cause retain permanent-bit
|
|
@@ -1218,6 +1400,31 @@ acknowledges it only after complete admitted reads, and reuses unchanged snapsho
|
|
|
1218
1400
|
for up to ten seconds. Scoped discovery uses `listBuildsForRepo`; unchanged focused
|
|
1219
1401
|
frames make one counter request. Session feeds remain independent.
|
|
1220
1402
|
|
|
1403
|
+
Both dashboard frontends render one vocabulary. `cli/dashboard/vocabulary.ts`
|
|
1404
|
+
holds the browser-safe terms: status words and tones, step marks, and the
|
|
1405
|
+
clock-dependent step timers. Its only value import is `cells.ts`.
|
|
1406
|
+
`cli/dashboard/row-text.ts` projects the model into plain-data row, harvest,
|
|
1407
|
+
header, dispatcher-mode, attention-list, finished-row and overview text. The
|
|
1408
|
+
terminal renderer paints those values, and `web/protocol.ts` aliases the same
|
|
1409
|
+
types for the web frame, so a term changes in one place.
|
|
1410
|
+
`web/overview-source.ts` builds `ab web`'s overview from `buildRoster` and the
|
|
1411
|
+
changed-builds feed, through the poll cache's shared row and header helpers
|
|
1412
|
+
(`readRowEnrichment`, `projectRowWithEnrichment`, `repositoryDashboardHeader`
|
|
1413
|
+
in `cli/dashboard/poll.ts`), so the terminal and the web project rows the same
|
|
1414
|
+
way.
|
|
1415
|
+
`web/analytics-source.ts` answers the `/api/analytics` and
|
|
1416
|
+
`/api/builds/<slug>/timeline` routes in `web/http.ts` from the `stepDurations`
|
|
1417
|
+
rollup, one filtered `listBuildsPage` page and saved `buildTimeline` values,
|
|
1418
|
+
evicting its in-memory timelines by the changed-builds feed.
|
|
1419
|
+
The `ab web` pages in
|
|
1420
|
+
`packages/ui/src/app/` render the frame's projection values, import browser-safe
|
|
1421
|
+
values from `vocabulary.ts` (step timers and the verified progress label) so
|
|
1422
|
+
both frontends share those terms, use the page's embedded frame as
|
|
1423
|
+
a masked skeleton, and apply each frame through `StableFlow`'s layout
|
|
1424
|
+
transactions. `packages/ui/src/app/analytics.tsx` is the analytics page; it and
|
|
1425
|
+
the build page's timeline fetch the JSON routes when the frame's change
|
|
1426
|
+
position moves.
|
|
1427
|
+
|
|
1221
1428
|
The memory adapter maintains independent bigint counters; SQLite and PostgreSQL
|
|
1222
1429
|
increment `repo_change_positions` transactionally through triggers on build,
|
|
1223
1430
|
build-event, repository-event insertion and null-safe repository lease holder
|
|
@@ -1227,6 +1434,37 @@ its own repository-authorized route before the journal-existence gate. PostgreSQ
|
|
|
1227
1434
|
counter DDL is additive, outside the guarded core schema/checksum, and must be
|
|
1228
1435
|
explicitly migrated before the service rollout. Existing writers use the same
|
|
1229
1436
|
triggers; rerunning migration preserves positions without replaying old events.
|
|
1437
|
+
|
|
1438
|
+
`listOpenBuilds` is served the same way. The memory adapter keeps a per-repository
|
|
1439
|
+
set at each build-event write; SQLite and PostgreSQL keep an additive
|
|
1440
|
+
`open_builds` table maintained by triggers on build insertion and on
|
|
1441
|
+
`build.completed`, `build.aborted` and `build.reopened` appends. Each SQL adapter
|
|
1442
|
+
backfills the table once, when its bootstrap or migration creates it. Like the
|
|
1443
|
+
counter DDL, it sits outside the guarded core schema and must be migrated before
|
|
1444
|
+
a hosted rollout serves `open-builds`; until then the route fails rather than
|
|
1445
|
+
listing every build.
|
|
1446
|
+
|
|
1447
|
+
Positions are ordered. `packages/core/src/store/build-feed.ts` holds the shared
|
|
1448
|
+
changed-builds feed and paged-listing vocabulary (`listBuildsChangedSince`,
|
|
1449
|
+
`listBuildsPage`, cursor and position codecs). Each build's latest position
|
|
1450
|
+
lives in `build_change_positions`, written by the same trigger that advances
|
|
1451
|
+
the counter (memory: a one-node-per-build linked list); its first creation
|
|
1452
|
+
backfills existing builds once at a bumped head. The paged listing's filters
|
|
1453
|
+
read `build_listing_facts`: one row per build holding `created_at`, a mirror of
|
|
1454
|
+
`updated_at`, `node` and `merged`, kept by triggers in the writing transaction
|
|
1455
|
+
(a build insert seeds it, `build.created` sets `node`, `build.completed` sets
|
|
1456
|
+
`merged`, `build.reopened` clears it, and each `builds.updated_at` change is
|
|
1457
|
+
copied). Seven indexes, one per filter class (kind, merged, kind and merged,
|
|
1458
|
+
plus all builds for update order) and order (creation or update), make every
|
|
1459
|
+
filtered page one backward range scan of its own index. SQLite names that
|
|
1460
|
+
index with `INDEXED BY`. PostgreSQL has no hints, so each index leads with its
|
|
1461
|
+
class's columns and the statement bounds and orders by the row `(class
|
|
1462
|
+
columns, key, slug)`; any other index would need a full sort, so no plan can
|
|
1463
|
+
walk a wider index and discard rows when classes cluster in time. The memory
|
|
1464
|
+
adapter keeps the same classes as sorted slug lists, moved in the step that
|
|
1465
|
+
writes the fact or `updatedAt`. Its first creation backfills existing builds
|
|
1466
|
+
once from their latest relevant events. The PostgreSQL DDL is additive, like
|
|
1467
|
+
the counter's, and must be migrated before the service rollout.
|
|
1230
1468
|
`detail.ts` projects chronological session history from the same retained log,
|
|
1231
1469
|
including a distinct transcriptless `reclaimed` ending, and `transcript.ts`
|
|
1232
1470
|
heuristically presents ordinary opaque transcript artifacts with a raw
|
|
@@ -1258,8 +1496,14 @@ proven per tool by `operator/registry.contract.test.ts`. Every binding is genera
|
|
|
1258
1496
|
from the table and never widens beyond the operator services: the shipped one is
|
|
1259
1497
|
`packages/core/src/cli/mcp.ts` (`ab mcp`, a stdio MCP server over the registry that
|
|
1260
1498
|
fails closed inside a phase, exactly as repository-wide `ab builds` does); the
|
|
1261
|
-
hosted HTTP and MCP transports register from the same table.
|
|
1262
|
-
|
|
1499
|
+
hosted HTTP and MCP transports register from the same table. The hosted MCP
|
|
1500
|
+
binding registers the service's `operatorTools`, computed by the same
|
|
1501
|
+
`operatorToolTable` the operator server dispatches through, so advertisement
|
|
1502
|
+
equals dispatch. Its per-repository mode (`/mcp/<host><path>`, in
|
|
1503
|
+
`web/mcp.ts`) serves the same table for one repository, converting each
|
|
1504
|
+
schema exactly as the SDK's `McpServer` does and then removing `repo`; both
|
|
1505
|
+
modes share one per-call closure. Checked-in risk classes live in
|
|
1506
|
+
`operator/annotations.ts` (SPEC §8.9).
|
|
1263
1507
|
|
|
1264
1508
|
**Init and upgrade.** `packages/core/src/cli/init.ts` owns deterministic skill vendoring,
|
|
1265
1509
|
ignore maintenance, runtime probes, and the stack-neutral first config. It then
|
|
@@ -1341,7 +1585,10 @@ BuildStore for other sources. `packages/core/src/store/ticket-assets.ts`
|
|
|
1341
1585
|
holds the types, the limits, and the one validator every adapter calls;
|
|
1342
1586
|
`packages/core/src/cli/ticket-assets.ts` holds the filesystem walk, the download
|
|
1343
1587
|
writer, and the note builder; `ab ticket attach`, `asset get`, and `asset rm`
|
|
1344
|
-
live in `packages/core/src/cli/ticket.ts`.
|
|
1588
|
+
live in `packages/core/src/cli/ticket.ts`. `packages/core/src/operator/ticket-assets.ts`
|
|
1589
|
+
is the operator half behind the `tickets.asset.*` registry tools, sharing the
|
|
1590
|
+
listing projection and id keying in `operator/ticket-asset-list.ts` with the CLI.
|
|
1591
|
+
The optional hosted source asset
|
|
1345
1592
|
capability reuses RemoteBuildStore transport with the ticket URL and credential.
|
|
1346
1593
|
Other sources retain the existing store path.
|
|
1347
1594
|
A claim freezes the ticket's current assets into the build (SPEC §6.3):
|
|
@@ -1354,6 +1601,16 @@ and `ab context` writes them under `$AB_CONTEXT_DIR/assets/`.
|
|
|
1354
1601
|
through `repositoryReadFacts`; `processes/dispatcher.ts` retries them under the
|
|
1355
1602
|
existing repository ownership before intake. This pre-record recovery differs
|
|
1356
1603
|
from `dispatch.failed`, which completes an already established build.
|
|
1604
|
+
`kernel/ticket-starts.ts` reduces operator single-ticket start requests
|
|
1605
|
+
(`ticket.start-*`) and the durable canonical identities of hosted active builds
|
|
1606
|
+
(`ticket.identity-recorded`) into `repositoryReadFacts`. `operator/ticket-start.ts`
|
|
1607
|
+
is the one request/cancel seam behind `ab start` (`cli/ticket-start.ts`), the
|
|
1608
|
+
`tickets.start` tool and the HTTP start routes. The dispatcher's
|
|
1609
|
+
`honorStartRequests` stage runs twice per tick, for `manual` and `urgent`
|
|
1610
|
+
requests before intake and for `normal` requests after intake and the deferred
|
|
1611
|
+
parked admissions. It admits pending requests through `dispatch()` in its
|
|
1612
|
+
targeted mode, which skips the ready listing and scan checkpoint, budgets each
|
|
1613
|
+
ticket by its request's tier, but keeps every admission gate.
|
|
1357
1614
|
`kernel/build-creation.ts` derives the keyed canonical slug that the dispatcher and
|
|
1358
1615
|
the hosted server share. The optional `BuildStore.buildCreationIdentity` port says
|
|
1359
1616
|
whether a store creates at the exact slug (method absent), at that derived slug for
|
|
@@ -1426,10 +1683,12 @@ The two remote clients get client-only coverage in core itself, against an
|
|
|
1426
1683
|
injected `fetchFn` with responses built from the protocol's wire schemas.
|
|
1427
1684
|
`HostedTicketSource` (`ports/tickets/remote.test.ts`) is in-memory unit
|
|
1428
1685
|
coverage that runs in `bun run test`. `RemoteBuildStore`
|
|
1429
|
-
(`store/remote/client.
|
|
1430
|
-
minting/verification) is
|
|
1686
|
+
(`store/remote/client.test.ts`, which also pins scoped-token
|
|
1687
|
+
minting/verification) is also in-memory unit coverage running in `bun run test`.
|
|
1688
|
+
Its remaining timed subscription paging test lives in
|
|
1689
|
+
`store/remote/client.integration.test.ts`. The full over-the-wire seam
|
|
1431
1690
|
suites (client → HTTP → server) live in `packages/hosted-store-service`
|
|
1432
|
-
(`*.seam.integration.test.ts`) and run
|
|
1691
|
+
(`*.seam.integration.test.ts`) and run alongside that timed subscription test
|
|
1433
1692
|
in `bun run test:integration`.
|
|
1434
1693
|
|
|
1435
1694
|
To run the Linear contract manually against a destructive scratch target:
|
|
@@ -1468,10 +1727,12 @@ protection permissions. The fixture creates and deletes temporary branches,
|
|
|
1468
1727
|
PRs, comments, and a required-check protection rule; it never pushes to or
|
|
1469
1728
|
merges into the default branch. Use a dedicated scratch repository only.
|
|
1470
1729
|
|
|
1471
|
-
The deterministic Claude, Codex, and
|
|
1472
|
-
normal test run. Their live registrations add real
|
|
1473
|
-
coverage for successful start, continue, end,
|
|
1474
|
-
execution, and one-shot completion
|
|
1730
|
+
The deterministic Claude, Codex, Pi, and Antigravity adapter contracts run
|
|
1731
|
+
offline in every normal test run. Their live registrations add real
|
|
1732
|
+
transport/authentication smoke coverage for successful start, continue, end,
|
|
1733
|
+
environment refresh, managed CLI execution, and one-shot completion where the
|
|
1734
|
+
runtime declares it. Antigravity declares no one-shot, so its live run skips
|
|
1735
|
+
that block:
|
|
1475
1736
|
|
|
1476
1737
|
```sh
|
|
1477
1738
|
AB_RUN_LIVE_PORT_CONTRACTS=1 \
|
|
@@ -1485,6 +1746,10 @@ bun test packages/core/src/ports/runner/codex.live.integration.test.ts
|
|
|
1485
1746
|
AB_RUN_LIVE_PORT_CONTRACTS=1 \
|
|
1486
1747
|
AB_PI_CONTRACT_MODEL=openai/gpt-… \
|
|
1487
1748
|
bun test packages/core/src/ports/runner/pi.live.integration.test.ts
|
|
1749
|
+
|
|
1750
|
+
AB_RUN_LIVE_PORT_CONTRACTS=1 \
|
|
1751
|
+
AB_ANTIGRAVITY_CONTRACT_MODEL=gemini-… \
|
|
1752
|
+
bun test packages/core/src/ports/runner/antigravity.live.integration.test.ts
|
|
1488
1753
|
```
|
|
1489
1754
|
|
|
1490
1755
|
Claude uses the locally installed Claude Code CLI and its configured login; the
|
|
@@ -1561,7 +1826,11 @@ process-scoped (`kernel/guarded-forge.ts`) and record only
|
|
|
1561
1826
|
`forge.credential-limited`; the `dispatcher.forge-degraded` admission remains
|
|
1562
1827
|
for runners pinned to older releases. This exception grants no repository administration,
|
|
1563
1828
|
recovery, lease, or other journal writes. The agent-visible build-scoped Store
|
|
1564
|
-
still denies repository writes.
|
|
1829
|
+
still denies repository writes. A build-judge grant, issued only by its
|
|
1830
|
+
build's runner after `panel.judge-started`, is write-only: the request guard
|
|
1831
|
+
refuses every read before any other route logic and admits one
|
|
1832
|
+
`panel.preferred` for its exact panel, judge and session while that session is
|
|
1833
|
+
open. Ticket routes deny build grants and allow harvest grants only the reads and
|
|
1565
1834
|
runner filing operations they require. Ticket sources and assets are partitioned
|
|
1566
1835
|
by the authenticated project.
|
|
1567
1836
|
|
|
@@ -1679,6 +1948,9 @@ compatibility facade. Metadata is excluded from hosted persistence/protocols.
|
|
|
1679
1948
|
|
|
1680
1949
|
The product dispatcher owns the workspace-free node lifecycle:
|
|
1681
1950
|
spec → node.opening → node.opened → collecting → complete → verify:* → consent → merge.
|
|
1951
|
+
An optimization node measures its starting value after opening and then
|
|
1952
|
+
repeats propose → collecting: an `ab-propose` session deposits proposals and
|
|
1953
|
+
the dispatcher files each as an attempt ticket targeting the node.
|
|
1682
1954
|
The ordinary work pipeline is unchanged. `build.created` freezes kind, target
|
|
1683
1955
|
ticket/build identity and resolved parent in `baseBranch`. Integration facts
|
|
1684
1956
|
are projected by the shared reducer and digests, including collecting/empty
|
|
@@ -1716,11 +1988,27 @@ fetch of only that exact archive ref (without tags, configured refmap expansion
|
|
|
1716
1988
|
depth limit) restores missing commits and their missing ancestry, writes no shallow
|
|
1717
1989
|
boundary, leaves an already-shallow repository's existing boundaries unchanged, and
|
|
1718
1990
|
verifies the commits locally before returning.
|
|
1991
|
+
`kernel/history-retention.ts` retains leaf history best effort: the archive ref
|
|
1992
|
+
where the forge accepts it, else a `history-objects-<sha>` BuildStore thin pack
|
|
1993
|
+
excluding the frozen target base (`kernel/replay-retention.ts`), else one
|
|
1994
|
+
build-scoped `history-unretained` observation; `history.retained` records store,
|
|
1995
|
+
target and unretained commits. Its readers restore from the local repository,
|
|
1996
|
+
the archive ref, store copies, then the published branches, and a commit
|
|
1997
|
+
retained nowhere redoes the work (`<id>-redo`, or candidate retirement). A
|
|
1998
|
+
refusal is a plain error; `ArchiveConflictError` (an immutable ref naming a
|
|
1999
|
+
different SHA) and classified transient failures never fall back. Node writes
|
|
2000
|
+
use the same order and record `node.history-retained`; node recovery restores
|
|
2001
|
+
reserved inputs before reading them and abandons a reservation whose inputs are
|
|
2002
|
+
kept nowhere. Workspace preservation (`preserveRetained`, `retainPreservedCopy`)
|
|
2003
|
+
is strict: archive ref, else store copy, else release is refused; a reused copy
|
|
2004
|
+
keeps its saved base, which preservation retains in turn and
|
|
2005
|
+
`restoreRetainedHead` follows to a bounded depth.
|
|
1719
2006
|
GitHub uses explicit Git transport leases; local-git uses shared-database
|
|
1720
2007
|
`update-ref` CAS without network calls. Exact authoritative readback acknowledges
|
|
1721
2008
|
publication. Remote-backed local refs are caches refreshed without expected-old
|
|
1722
|
-
CAS after confirmation, even if absent or recreated; checkout files are untouched. Trusted remote publication
|
|
1723
|
-
replacement after guest teardown
|
|
2009
|
+
CAS after confirmation, even if absent or recreated; checkout files are untouched. Trusted remote publication retains history before
|
|
2010
|
+
replacement after guest teardown, through the kernel's `retain` callback over the
|
|
2011
|
+
provider's Git transport; it never uses ordinary append-only publication
|
|
1724
2012
|
for restacks. Prepared, replayed, intended and rewritten facts support recovery.
|
|
1725
2013
|
A contended rewrite preserves the observed work and retries on the same base.
|
|
1726
2014
|
|
|
@@ -1736,17 +2024,29 @@ uncommitted tracked changes; a wait
|
|
|
1736
2024
|
declared by an unintended reconcile occurrence on a moved target first abandons
|
|
1737
2025
|
that occurrence with `reconcile.superseded`, then replays onto the new target
|
|
1738
2026
|
(see Ticket waits above). `reconcile-restack.ts` shares collapse, detached replay,
|
|
1739
|
-
|
|
2027
|
+
retain-before-replacement and expected-head publication mechanics. Automatic
|
|
1740
2028
|
transactions emit `restack.*`; clean completion never starts a reconcile cycle.
|
|
1741
2029
|
Pre-PR conflicts adopt the prepared replay through ordinary reconcile. Initial
|
|
1742
2030
|
verification remains mandatory; waiting conflicts use post-reconcile policy.
|
|
2031
|
+
A conflict confined to `[[generated]]` files is first regenerated in the runner:
|
|
2032
|
+
`kernel/generated-files.ts` classifies conflicted paths by declaration,
|
|
2033
|
+
`kernel/generated-regeneration.ts` runs the commands on the reproduced conflict
|
|
2034
|
+
and commits or restores it, and `reconcile-restack.ts` (leaf) and the build
|
|
2035
|
+
runner's node-conflict path (node items) record `restack.regenerated` and
|
|
2036
|
+
`node.item-regenerated`. The engine reads only those facts.
|
|
1743
2037
|
|
|
1744
2038
|
The dispatcher observes targets without changing workspaces; execution ownership
|
|
1745
2039
|
and session settlement fence mutation. Transaction targets stay frozen while
|
|
1746
2040
|
later moves coalesce. `publication.requested` carries automatic transaction
|
|
1747
2041
|
identity through trusted remote teardown and publication. The runner settles
|
|
1748
2042
|
local resolver intent only after its session ends. Verification facts
|
|
1749
|
-
cite the cycle's base/head
|
|
2043
|
+
cite the cycle's base/head (`leafVerifiedRestack` in `kernel/verify-stages.ts`).
|
|
2044
|
+
A clean wait-resume `restack.completed` for a wait declared in `verify:*` or
|
|
2045
|
+
`finalize` is a verify cycle boundary: the log index records it as
|
|
2046
|
+
`waitResumeVerifyBoundary`, the reducer moves `verify.cycleSince`, and the
|
|
2047
|
+
engine's stage selection and cycle boundary both read it through
|
|
2048
|
+
`leafVerifyCycleInputs`. It is not a replay boundary, so the verify-entry
|
|
2049
|
+
restack does not run again. Clean awaiting-merge leaf rewrites preserve completed
|
|
1750
2050
|
verification when build-owned config is unchanged, even when the old pin commit
|
|
1751
2051
|
is no longer an ancestor. Changed config still supersedes while waiting.
|
|
1752
2052
|
Ancestry gates cycles that run further steps; those cycles capture fresh config.
|
|
@@ -1881,7 +2181,13 @@ fast-forward shape against the frozen parent. Exact authoritative head readback
|
|
|
1881
2181
|
or a durable confirmed receipt establishes publication; ancestry alone cannot
|
|
1882
2182
|
acknowledge an unconfirmed candidate. Shared status vocabulary exposes provenance
|
|
1883
2183
|
and mismatch attention in both frontends. Human forge merges remain observable
|
|
1884
|
-
escape hatches independent of completeness and verification.
|
|
2184
|
+
escape hatches independent of completeness and verification. A recorded
|
|
2185
|
+
`integration.landed` ends node verification: `integrationAdmissible` and
|
|
2186
|
+
`decideNext` stop preparation and runner work, the session bracket and stage
|
|
2187
|
+
loop cancel agent members through their existing subscriptions, and `checkPr`
|
|
2188
|
+
withdraws a live verifier lease so the runner's next heartbeat aborts a running
|
|
2189
|
+
check. Settlement waits for the open execution to end. Preparation also skips a
|
|
2190
|
+
node whose comparison is empty.
|
|
1885
2191
|
|
|
1886
2192
|
### Merge authorization
|
|
1887
2193
|
|
|
@@ -2001,10 +2307,26 @@ heads require immutable commit ancestry proof against the accepted target and
|
|
|
2001
2307
|
the destination base already used by replay. Missing capability or failed proof
|
|
2002
2308
|
defers new replay. A non-descendant without kernel lineage records
|
|
2003
2309
|
`target.rewritten` with branch,
|
|
2004
|
-
previous SHA and observed SHA, retains the accepted target
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2310
|
+
previous SHA and observed SHA, and retains the accepted target. Repeated rewrite
|
|
2311
|
+
pairs are deduplicated. Returning to a safe target clears the wait
|
|
2312
|
+
(`target.rewrite-cleared` when the accepted tip is unchanged). Upstream
|
|
2313
|
+
force-pushes are never adopted on top of existing work automatically:
|
|
2314
|
+
|
|
2315
|
+
- A leaf with no work of its own (no published head, no PR, no commits beyond
|
|
2316
|
+
its base in use) is reprovisioned from the current target by its next runner,
|
|
2317
|
+
without operator action: `target.rewrite-reprovision-prepared`, a branch
|
|
2318
|
+
reset, then `target.rewrite-recovered` (`reprovisioned`). A runner that dies
|
|
2319
|
+
mid-reset completes it forward.
|
|
2320
|
+
- A leaf with work raises one `policy/target-rewritten` escalation per episode
|
|
2321
|
+
(a run of rewrites of the same rejected base), naming that base, the new
|
|
2322
|
+
target head and its own commits. `ab answer <slug> --accept-target` waives
|
|
2323
|
+
the rejected base (`target.rewrite-recovered`, `accepted`) and restacks its
|
|
2324
|
+
own commits onto the target at the next replay boundary; `ab abort` is the
|
|
2325
|
+
other way out.
|
|
2326
|
+
- A node waits, and raises watch/wait attention once per episode.
|
|
2327
|
+
|
|
2328
|
+
`ab build status` names a leaf's recovery state, and the base when the build's
|
|
2329
|
+
first provision adopted it from a pre-existing branch. Accepted node reparenting
|
|
2008
2330
|
starts a new branch scope; frozen transactions recover their retained inputs.
|
|
2009
2331
|
|
|
2010
2332
|
Kernel restacks of a node are admitted through durable guarded publication
|
|
@@ -2028,12 +2350,15 @@ polls read no receipts or event rows.
|
|
|
2028
2350
|
|
|
2029
2351
|
A historical `publication.lost` does not prove that every copy of its candidate
|
|
2030
2352
|
is gone. Recovery checks the exact branch and private archive refs and retained
|
|
2031
|
-
|
|
2032
|
-
|
|
2353
|
+
store copies first. Replay copies are read in either format (chunked manifest or
|
|
2354
|
+
legacy base64 pack); a thin pack whose base is missing fetches the published target
|
|
2355
|
+
first and applies with `git index-pack --fix-thin`. An available candidate is
|
|
2356
|
+
retained best effort before guarded publication continues; a refused archive does
|
|
2357
|
+
not block it. A genuinely missing reconcile or automatic restack candidate records
|
|
2033
2358
|
`publication.candidate-retired`, abandons its obsolete request, and replays the
|
|
2034
2359
|
producing operation with a fresh transaction identity. Its frozen target,
|
|
2035
2360
|
reconcile occurrence or automatic trigger, cycle, and message survive. The
|
|
2036
|
-
retired candidate is excluded from
|
|
2361
|
+
retired candidate is excluded from retention requirements unless independently
|
|
2037
2362
|
required by proven history. This reconstruction consumes no infrastructure
|
|
2038
2363
|
attempt and no additional conflict occurrence; it needs no operator guidance.
|
|
2039
2364
|
A bare retry also clears an existing infrastructure-limit escalation through
|
|
@@ -2090,6 +2415,11 @@ clears the attention, closes the escalation unanswered and the build continues.
|
|
|
2090
2415
|
Answering it with a bare retry makes the janitor attempt on its next tick. An
|
|
2091
2416
|
episode raises at most one escalation; a new episode after recovery can raise
|
|
2092
2417
|
another. `policy.janitorBackoffMaxSeconds` sets the positive integer cap.
|
|
2418
|
+
A pending control the janitor can act on wakes it during backoff: an abort, a
|
|
2419
|
+
pause, a resume of a paused build, a queued discard or an unacknowledged landing
|
|
2420
|
+
command. A leaf's resume that only cancelled a never-acknowledged pause is not
|
|
2421
|
+
one and waits out the backoff; a node's janitor acknowledges every pending
|
|
2422
|
+
control itself, so any node command wakes it.
|
|
2093
2423
|
A dispatcher that cannot execute Git for kernel node work (a missing or
|
|
2094
2424
|
unloadable `git` for the bare clone) records no janitor failures. It records
|
|
2095
2425
|
one durable `dispatcher.kernel-git-unavailable` repository condition, node work
|
|
@@ -2098,6 +2428,25 @@ succeeds.
|
|
|
2098
2428
|
|
|
2099
2429
|
A rate limit the dispatcher classifies on its own authenticated request
|
|
2100
2430
|
records repository degradation with `resetAt`.
|
|
2431
|
+
The built-in GitHub forge also treats a successful response, 304 included,
|
|
2432
|
+
that reports `x-ratelimit-remaining: 0` with a future reset at most 65 minutes
|
|
2433
|
+
away (one hour plus five minutes of clock skew) as that quota's limit.
|
|
2434
|
+
The response keeps its result, and the process's next
|
|
2435
|
+
request for the same quota (`core`, `graphql`, …) fails as that rate limit
|
|
2436
|
+
without being sent, so cooldown follows the rules here without an avoidable
|
|
2437
|
+
refusal. Other quotas are unaffected. A missing, malformed, past or
|
|
2438
|
+
implausible reset enters no cooldown, and no later response clears one early:
|
|
2439
|
+
only the reset passing, or an explicit `forge-clear`, does. After a clear, the
|
|
2440
|
+
next request goes to GitHub as a probe, and an actual limit restores the
|
|
2441
|
+
cooldown.
|
|
2442
|
+
The first limit of an episode records an ordinary `dispatcher.forge-degraded`,
|
|
2443
|
+
which wakes `ab watch` once. A later reset inside the unexpired episode extends
|
|
2444
|
+
the cooldown durably as a degradation marked `continued` that wakes nothing; an
|
|
2445
|
+
equal or earlier reset writes nothing. A limit after the reset has passed, or
|
|
2446
|
+
after recovery, opens a new episode. A rate-limited or unreadable response on
|
|
2447
|
+
landing, gate inspection or PR polling is a typed forge failure or an unproven
|
|
2448
|
+
state, never "no checks", "ungated", "closed" or "merged"; merge-freshness
|
|
2449
|
+
inspection defers instead of recording best-effort evidence.
|
|
2101
2450
|
Forge work waits during cooldown; passing the deadline permits a recovery
|
|
2102
2451
|
request; a successful probe records automatic recovery. An authorized operator
|
|
2103
2452
|
may explicitly override erroneous recorded state with
|
|
@@ -2151,7 +2500,15 @@ using exact-resource ETags; authenticated 304s spare the REST primary quota.
|
|
|
2151
2500
|
Adapter caches are bounded and restart/eviction falls back to fresh reads.
|
|
2152
2501
|
Writes, including Git publication and rewrites, invalidate observations before
|
|
2153
2502
|
attempting the mutation so acknowledgement reads remain fresh. Leaf PR polling
|
|
2154
|
-
keeps its existing cadence.
|
|
2503
|
+
keeps its existing cadence. Gate branch and rules reads, merge-freshness
|
|
2504
|
+
protection and rulesets, landing, retarget and auto-merge PR reads, commit and
|
|
2505
|
+
history reads, merge-queue activity, summary-comment listing and branch
|
|
2506
|
+
existence revalidate the same way. Both caches hold the raw representation and
|
|
2507
|
+
every caller validates it with its own schema, so consumers of one resource
|
|
2508
|
+
share one request and one ETag; a representation that fails validation loses
|
|
2509
|
+
its ETag. Reads that must be fresh, including merge inspections, still reach
|
|
2510
|
+
GitHub every time, conditionally when an ETag is cached. Readiness diagnostics
|
|
2511
|
+
and post-mutation readbacks stay unconditional.
|
|
2155
2512
|
|
|
2156
2513
|
For node cadence, durable wakes, restart behavior and CLI evidence, see
|
|
2157
2514
|
[node polling and status](integration-tree.md#polling-and-status).
|
|
@@ -2162,6 +2519,18 @@ primary quota, REST 304s and GraphQL calls. Transport failures and historical or
|
|
|
2162
2519
|
legacy observations can remain unclassified; absent fields never imply zero.
|
|
2163
2520
|
Shared requests are attributed to their first requester; cache hits count zero.
|
|
2164
2521
|
|
|
2522
|
+
An adapter may also report the primary rate-limit headers a response carried
|
|
2523
|
+
(`resource`, `limit`, `remaining`, `resetAt`), including on 304s and limited
|
|
2524
|
+
failures; GitHub does. No extra `/rate_limit` request is made. Tick telemetry's
|
|
2525
|
+
optional `rateLimits` carries the latest reading per resource with its
|
|
2526
|
+
`observedAt`, at most eight resources and none older than a day, across ticks
|
|
2527
|
+
and dispatcher restarts, so a cooldown tick with no requests still reports the
|
|
2528
|
+
last known quota. Secondary limits carry no headers and appear only as the
|
|
2529
|
+
degradation. `ab repository status` shows them as `forgeRateLimit`: each
|
|
2530
|
+
reading, `stale` once its window has reset (current quota unknown), and
|
|
2531
|
+
`paused`/`pausedUntil` while the dispatcher's rate-limit cooldown holds forge
|
|
2532
|
+
landing and polling. Absent fields mean unknown, never full quota.
|
|
2533
|
+
|
|
2165
2534
|
Ticket-source continuity is reduced by `kernel/ticket-migrations.ts` from durable
|
|
2166
2535
|
repository `tickets.migration-recorded` facts. Import publishes only complete
|
|
2167
2536
|
mappings; current-operation resolvers leave build records and old events intact.
|
|
@@ -2193,7 +2562,8 @@ pending controls, merge intent and ended PRs refuse the no-escalation path.
|
|
|
2193
2562
|
A concurrent state change refuses publication with a retry explanation;
|
|
2194
2563
|
uncited artifacts are inert. Leaves still require an open escalation and
|
|
2195
2564
|
restart from `plan` after any unfinished reconcile resumes under the revised
|
|
2196
|
-
spec and its publication is confirmed.
|
|
2565
|
+
spec and its publication is confirmed. A settled, unmerged leaf awaiting merge
|
|
2566
|
+
revises without an escalation through `ab reopen`.
|
|
2197
2567
|
|
|
2198
2568
|
Verification stages are planned purely in `kernel/verify-stages.ts`, shared by
|
|
2199
2569
|
leaf and integration decisions in `kernel/engine.ts`. The build runner keeps
|
|
@@ -2218,7 +2588,10 @@ Successful identity persistence materializes grants into member rows without
|
|
|
2218
2588
|
placeholder users or invitations. Mutations and connection decisions serialize
|
|
2219
2589
|
through the project registry singleton (after the connection row where relevant).
|
|
2220
2590
|
Admission and project filtering read durable state on each browser request and
|
|
2221
|
-
MCP callback; session claims and activeOrganizationId confer no authority.
|
|
2591
|
+
MCP callback; session claims and activeOrganizationId confer no authority. Each
|
|
2592
|
+
MCP callback also checks the token's RFC 8707 resource binding
|
|
2593
|
+
(`web/mcp-resource-binding.ts`, one `verification` row read): a token bound to
|
|
2594
|
+
one per-repository URL is refused everywhere else.
|
|
2222
2595
|
|
|
2223
2596
|
## Operator presence
|
|
2224
2597
|
|