@defrex/autobuild 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/SPEC.md +53 -9
- package/docs/architecture.md +23 -7
- package/docs/assets/headline-wide.png +0 -0
- package/docs/dispatcher.md +1 -1
- package/docs/merge-policy.md +2 -1
- package/docs/operator-surfaces.md +1 -1
- package/docs/plugin-authoring.md +11 -4
- package/docs/process-ownership.md +43 -0
- package/docs/remote-store-protocol.md +7 -0
- package/docs/restacking.md +11 -2
- package/docs/setup.md +7 -2
- package/docs/verification.md +1 -1
- package/package.json +3 -3
- package/packages/core/src/cli/dashboard/model.ts +1 -0
- package/packages/core/src/cli/dashboard/vocabulary.ts +3 -0
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +1 -0
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/3f0c4e6d1d54e5bf.json +92 -0
- package/packages/core/src/kernel/dispatch-capacity.ts +15 -3
- package/packages/core/src/kernel/engine.ts +15 -2
- package/packages/core/src/kernel/janitor-failure.ts +1 -0
- package/packages/core/src/kernel/reducer-revisions.ts +1 -0
- package/packages/core/src/processes/build-runner.ts +67 -7
- package/packages/core/src/processes/check-termination.ts +44 -0
- package/packages/core/src/processes/dispatcher.ts +131 -18
- package/packages/core/src/processes/publication-loss.ts +29 -0
- package/packages/core/src/processes/repo-view.ts +2 -1
- package/packages/core/src/store/contract.ts +43 -0
- package/packages/core/src/store/digest.ts +19 -1
- package/packages/core/src/store/reducer-value-shapes.json +8 -0
- package/packages/core/src/store/remote/protocol.ts +3 -0
- package/packages/core/src/store/remote/released-clients.json +11 -0
- package/packages/core/src/store/remote/released-reducer-values/1.20.0.json +36469 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +16 -14
- package/packages/core/src/store/types.ts +5 -0
- package/packages/core/src/testing/reduced-read-budget.ts +131 -0
- package/skills/code-review/SKILL.md +5 -0
- package/skills/finalize/SKILL.md +5 -0
- package/skills/guide/SKILL.md +18 -7
- package/skills/guide/references/merge-policy.md +2 -1
- package/skills/guide/references/plugin-authoring.md +11 -4
- package/skills/guide/references/process-ownership.md +43 -0
- package/skills/guide/references/remote-store-protocol.md +7 -0
- package/skills/guide/references/restacking.md +11 -2
- package/skills/guide/references/setup.md +7 -2
- package/skills/harvest/SKILL.md +5 -0
- package/skills/harvest-review/SKILL.md +5 -0
- package/skills/implement/SKILL.md +5 -0
- package/skills/judge/SKILL.md +4 -0
- package/skills/operate/SKILL.md +5 -0
- package/skills/plan/SKILL.md +5 -0
- package/skills/plan-review/SKILL.md +5 -0
- package/skills/propose/SKILL.md +5 -0
- package/skills/reconcile/SKILL.md +5 -0
- package/templates/hosted-service/package.json +2 -2
|
@@ -11,13 +11,14 @@ import release8 from './1.17.0.json'
|
|
|
11
11
|
import release9 from './1.18.0.json'
|
|
12
12
|
import release10 from './1.19.0.json'
|
|
13
13
|
import release11 from './1.2.0.json'
|
|
14
|
-
import release12 from './1.
|
|
15
|
-
import release13 from './1.
|
|
16
|
-
import release14 from './1.
|
|
17
|
-
import release15 from './1.
|
|
18
|
-
import release16 from './1.
|
|
19
|
-
import release17 from './1.
|
|
20
|
-
import release18 from './1.
|
|
14
|
+
import release12 from './1.20.0.json'
|
|
15
|
+
import release13 from './1.3.0.json'
|
|
16
|
+
import release14 from './1.4.0.json'
|
|
17
|
+
import release15 from './1.5.0.json'
|
|
18
|
+
import release16 from './1.6.0.json'
|
|
19
|
+
import release17 from './1.7.0.json'
|
|
20
|
+
import release18 from './1.8.0.json'
|
|
21
|
+
import release19 from './1.9.0.json'
|
|
21
22
|
import type { ReducerValueCatalog } from '../../reducer-value-validation'
|
|
22
23
|
export interface ReleasedReducerValues extends ReducerValueCatalog {
|
|
23
24
|
versions: Record<string, number>
|
|
@@ -35,11 +36,12 @@ export const RELEASED_REDUCER_VALUES: Readonly<Record<string, ReleasedReducerVal
|
|
|
35
36
|
'1.18.0.json': release9,
|
|
36
37
|
'1.19.0.json': release10,
|
|
37
38
|
'1.2.0.json': release11,
|
|
38
|
-
'1.
|
|
39
|
-
'1.
|
|
40
|
-
'1.
|
|
41
|
-
'1.
|
|
42
|
-
'1.
|
|
43
|
-
'1.
|
|
44
|
-
'1.
|
|
39
|
+
'1.20.0.json': release12,
|
|
40
|
+
'1.3.0.json': release13,
|
|
41
|
+
'1.4.0.json': release14,
|
|
42
|
+
'1.5.0.json': release15,
|
|
43
|
+
'1.6.0.json': release16,
|
|
44
|
+
'1.7.0.json': release17,
|
|
45
|
+
'1.8.0.json': release18,
|
|
46
|
+
'1.9.0.json': release19,
|
|
45
47
|
}
|
|
@@ -205,6 +205,11 @@ export interface BuildDigest {
|
|
|
205
205
|
* has not moved to the rejected role yet: a post-terminal duty that keeps
|
|
206
206
|
* a completed node polled, like `reclaimPending`. Absent otherwise. */
|
|
207
207
|
rejectionsPending?: true
|
|
208
|
+
/** A completed build whose PR merged still has an open workspace (its
|
|
209
|
+
* latest `workspace.provisioned` / `workspace.cleanup-required` has no
|
|
210
|
+
* later `workspace.released`): a post-terminal cleanup duty that keeps the
|
|
211
|
+
* build janitor-visited, like `reclaimPending`. Absent otherwise. */
|
|
212
|
+
releasePending?: true
|
|
208
213
|
}
|
|
209
214
|
|
|
210
215
|
export type RepoTickCompletion =
|
|
@@ -10861,3 +10861,134 @@ export async function waivedTargetObservationReadBudget(): Promise<void> {
|
|
|
10861
10861
|
expect(metrics).toEqual({ historicalRows: 0, tailRows: 0 })
|
|
10862
10862
|
}
|
|
10863
10863
|
}
|
|
10864
|
+
|
|
10865
|
+
/** #1443: a completed merged build whose workspace release is still pending
|
|
10866
|
+
* (`releasePending`) is revisited by the janitor on every pass until its
|
|
10867
|
+
* cleanup lands. Each such visit reads only that build's saved values: no
|
|
10868
|
+
* event row at or below the pass's boundary, and the same reduced reads at
|
|
10869
|
+
* 100 and 100,000 events. The digest that clears it advances over the new
|
|
10870
|
+
* rows alone, and once released nothing is read for it again. Fresh
|
|
10871
|
+
* dispatchers per pass: no per-process cache. */
|
|
10872
|
+
export async function mergedReleaseReadBudget(): Promise<void> {
|
|
10873
|
+
const { MemoryBuildStore } = await import('../store/memory')
|
|
10874
|
+
const { WorkspaceRecoveryDeferred } = await import('../ports/workspace/recovery-step')
|
|
10875
|
+
const { isWorkDigest } = await import('../processes/repo-view')
|
|
10876
|
+
const repo = '/repos/merged-release'
|
|
10877
|
+
const slug = 'merged-release'
|
|
10878
|
+
const base = 'a'.repeat(40)
|
|
10879
|
+
const perPass: Record<number, number[]> = {}
|
|
10880
|
+
for (const length of [100, 100_000]) {
|
|
10881
|
+
const clock = (() => {
|
|
10882
|
+
let now = Date.parse('2026-12-01T00:00:00Z')
|
|
10883
|
+
return Object.assign(() => new Date(now), { advance: (ms: number) => (now += ms) })
|
|
10884
|
+
})()
|
|
10885
|
+
const store = new MemoryBuildStore({ clock })
|
|
10886
|
+
await store.ensureRepo(repo)
|
|
10887
|
+
const forge = new FakeForge()
|
|
10888
|
+
forge.seedBranch('main', base)
|
|
10889
|
+
let deferred = true
|
|
10890
|
+
const dispatcher = () =>
|
|
10891
|
+
new Dispatcher({
|
|
10892
|
+
store,
|
|
10893
|
+
tickets: new FakeTicketSource([]),
|
|
10894
|
+
workspaces: {
|
|
10895
|
+
name: 'remote-test',
|
|
10896
|
+
preservation: async () => {
|
|
10897
|
+
throw new Error('a merged build is never preserved')
|
|
10898
|
+
},
|
|
10899
|
+
recovery: {
|
|
10900
|
+
fence: async () => {
|
|
10901
|
+
throw new Error('a merged build is never fenced')
|
|
10902
|
+
},
|
|
10903
|
+
reap: async () => {
|
|
10904
|
+
if (deferred) throw new WorkspaceRecoveryDeferred('cleanup', { remainingMs: 0 })
|
|
10905
|
+
return { outcome: 'confirmed', snapshots: { outcome: 'confirmed', deleted: 0 } }
|
|
10906
|
+
},
|
|
10907
|
+
},
|
|
10908
|
+
async provision() {
|
|
10909
|
+
throw new Error('not used')
|
|
10910
|
+
},
|
|
10911
|
+
async release() {},
|
|
10912
|
+
},
|
|
10913
|
+
forge,
|
|
10914
|
+
config: parseConfig('[tickets]\nsource = "file"\nreadyState = "Ready"'),
|
|
10915
|
+
repo,
|
|
10916
|
+
exec: async () => ({ stdout: `${base}\trefs/heads/main\n`, stderr: '', exitCode: 0 }),
|
|
10917
|
+
launchRunner: async () => 'scheduled',
|
|
10918
|
+
ids: sequentialIds(),
|
|
10919
|
+
clock,
|
|
10920
|
+
})
|
|
10921
|
+
const pass = async () => {
|
|
10922
|
+
clock.advance(60_000)
|
|
10923
|
+
await dispatcher().tick({ acceptNewWork: false })
|
|
10924
|
+
}
|
|
10925
|
+
await store.createBuild({ slug, repo, branch: `ab/${slug}` })
|
|
10926
|
+
const append = (type: string, payload: unknown, actor = DISPATCHER) =>
|
|
10927
|
+
store.append(slug, { actor, type, payload } as never)
|
|
10928
|
+
await append('build.created', {
|
|
10929
|
+
ticket: { source: 'fake', id: 'T-1', title: slug },
|
|
10930
|
+
repo,
|
|
10931
|
+
baseBranch: 'main',
|
|
10932
|
+
})
|
|
10933
|
+
await append('workspace.provisioned', {
|
|
10934
|
+
provider: 'remote-test',
|
|
10935
|
+
ref: `${slug}-g0`,
|
|
10936
|
+
path: '/remote/workspace',
|
|
10937
|
+
branch: `ab/${slug}`,
|
|
10938
|
+
base: { source: 'existing', sha: base },
|
|
10939
|
+
})
|
|
10940
|
+
await append('spec.imported', {
|
|
10941
|
+
artifact: { kind: 'spec', rev: 0 },
|
|
10942
|
+
ticket: { source: 'fake', id: 'T-1', title: slug },
|
|
10943
|
+
})
|
|
10944
|
+
await append('finalize.completed', { pr: { number: 3, url: 'u', headSha: 'h' } }, KERNEL)
|
|
10945
|
+
await seedBuildFiller(store, slug, length, INERT_BUILD_FILLER)
|
|
10946
|
+
forge.setPrState(3, { state: 'merged', sha: 'b'.repeat(40), headSha: 'h' })
|
|
10947
|
+
await pass() // completes; the cleanup defers
|
|
10948
|
+
let digest = (await readBuildDigests(store, repo)).get(slug)!
|
|
10949
|
+
expect(digest.terminal).toBe('done')
|
|
10950
|
+
expect(digest.releasePending).toBe(true)
|
|
10951
|
+
expect(isWorkDigest(digest)).toBe(true)
|
|
10952
|
+
|
|
10953
|
+
const metrics = { historicalRows: 0, tailRows: 0 }
|
|
10954
|
+
let reducerReads = 0
|
|
10955
|
+
const getReducerValue = store.getReducerValue.bind(store)
|
|
10956
|
+
store.getReducerValue = async (...args) => {
|
|
10957
|
+
reducerReads++
|
|
10958
|
+
return getReducerValue(...args)
|
|
10959
|
+
}
|
|
10960
|
+
let boundary = buildEventRows(store, slug).at(-1)!.seq
|
|
10961
|
+
await pass() // warm durable projections
|
|
10962
|
+
const restore = instrumentBuildRows(store, slug, () => boundary, metrics)
|
|
10963
|
+
perPass[length] = []
|
|
10964
|
+
for (let visit = 0; visit < 3; visit++) {
|
|
10965
|
+
boundary = buildEventRows(store, slug).at(-1)!.seq
|
|
10966
|
+
metrics.historicalRows = metrics.tailRows = reducerReads = 0
|
|
10967
|
+
await pass()
|
|
10968
|
+
perPass[length]!.push(reducerReads)
|
|
10969
|
+
expect(metrics.historicalRows).toBe(0)
|
|
10970
|
+
}
|
|
10971
|
+
expect(new Set(perPass[length]).size).toBe(1)
|
|
10972
|
+
|
|
10973
|
+
// The release lands: the digest advances over the new rows alone and
|
|
10974
|
+
// drops the build from the work set.
|
|
10975
|
+
deferred = false
|
|
10976
|
+
boundary = buildEventRows(store, slug).at(-1)!.seq
|
|
10977
|
+
await pass()
|
|
10978
|
+
metrics.historicalRows = metrics.tailRows = 0
|
|
10979
|
+
digest = (await readBuildDigests(store, repo)).get(slug)!
|
|
10980
|
+
expect(digest.releasePending).toBeUndefined()
|
|
10981
|
+
expect(isWorkDigest(digest)).toBe(false)
|
|
10982
|
+
expect(metrics.historicalRows).toBe(0)
|
|
10983
|
+
|
|
10984
|
+
// Released and settled: later passes read nothing of it.
|
|
10985
|
+
boundary = Number.POSITIVE_INFINITY
|
|
10986
|
+
await pass()
|
|
10987
|
+
metrics.historicalRows = metrics.tailRows = 0
|
|
10988
|
+
for (let idle = 0; idle < 2; idle++) await pass()
|
|
10989
|
+
expect(metrics).toEqual({ historicalRows: 0, tailRows: 0 })
|
|
10990
|
+
restore()
|
|
10991
|
+
Reflect.deleteProperty(store, 'getReducerValue')
|
|
10992
|
+
}
|
|
10993
|
+
expect(perPass[100]).toEqual(perPass[100_000])
|
|
10994
|
+
}
|
|
@@ -18,6 +18,11 @@ repositories or configuration through parent directories, including focused test
|
|
|
18
18
|
and Git probes. Do not relocate required installed tooling or retained evidence;
|
|
19
19
|
manifest-directed artifact paths remain authoritative. Never commit scratch.
|
|
20
20
|
|
|
21
|
+
Other builds' agents and verify commands share this host. Stop only processes
|
|
22
|
+
your session started, by the PID or process group you recorded; never by name
|
|
23
|
+
or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`). See
|
|
24
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
25
|
+
|
|
21
26
|
## Session shape
|
|
22
27
|
|
|
23
28
|
1. Run `ab context`. You get `$AB_CONTEXT_DIR/spec.md`, `$AB_CONTEXT_DIR/plan.md`, the commit range
|
package/skills/finalize/SKILL.md
CHANGED
|
@@ -11,6 +11,11 @@ never touch the forge).
|
|
|
11
11
|
|
|
12
12
|
Guidance is an external operator answer, from the operator agent or a human.
|
|
13
13
|
|
|
14
|
+
Other builds' agents and verify commands share this host. Stop only processes
|
|
15
|
+
your session started, by the PID or process group you recorded; never by name
|
|
16
|
+
or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`). See
|
|
17
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
18
|
+
|
|
14
19
|
## Session shape
|
|
15
20
|
|
|
16
21
|
1. Run `ab context`. You get `$AB_CONTEXT_DIR/spec.md`, `$AB_CONTEXT_DIR/plan.md`, every verify report (including earlier failed cycles),
|
package/skills/guide/SKILL.md
CHANGED
|
@@ -25,6 +25,7 @@ Idle nodes consume no runner capacity and empty nodes have no PR.
|
|
|
25
25
|
- [Optimization nodes](references/optimization-nodes.md): when to use one, a run end to end, grooming the objective, the `autobuild-objective` marker, objective schema, refusals, paired harness-pinned measurement and the noise check, revisions, derived progress, the proposer phase, attempt priority, and the landing gate and attempt settlement, active hours, stopping and completion.
|
|
26
26
|
- [Migration from 0.x](references/migration-1.0.md)
|
|
27
27
|
- [Moving ticket sources](references/ticket-migration.md): recorded migrations preserve in-flight build continuity.
|
|
28
|
+
- [Process ownership](references/process-ownership.md): on a shared host, stop only processes your session started, by recorded PID; never by name or pattern. Also how to read a signal-killed verify report.
|
|
28
29
|
|
|
29
30
|
## How to use this skill
|
|
30
31
|
|
|
@@ -585,8 +586,10 @@ The distinctions that change an administrator's answer:
|
|
|
585
586
|
`node.history-retained` (node) record the non-forge outcomes. Workspace
|
|
586
587
|
preservation of unpublished commits is strict: archive ref, else store copy
|
|
587
588
|
(`workspace.commits-retained`), else the release is refused. Abort cleanup
|
|
588
|
-
is
|
|
589
|
-
`workspace.commits-lost` and releases.
|
|
589
|
+
is one exception: when preservation fails it records
|
|
590
|
+
`workspace.commits-lost` and releases. Merged completion is the other: a
|
|
591
|
+
merged build completes first and its workspace is released without
|
|
592
|
+
preservation, since the merged commit is on the target.
|
|
590
593
|
`github` publishes through GitHub. `local-git` performs no remote/network/`gh`
|
|
591
594
|
operation: durable PR records live under private Git refs, and the review
|
|
592
595
|
locator is `refs/heads/ab/<slug>`. Once merge authorization (auto or consent;
|
|
@@ -1031,7 +1034,7 @@ subtables are part of this section — their fields are listed here.
|
|
|
1031
1034
|
| `steps` | `[]` | strings or nonempty arrays of names; no duplicate names | Ordered stages. Members start together; every pass or skip is required before the next stage. Each name needs a matching table. |
|
|
1032
1035
|
| `failFast` | `false` | optional boolean on either verify kind | A failure cancels unfinished members of its stage, then tears down and relaunches the whole execution before implement. |
|
|
1033
1036
|
| `kind` | — | **required**, `"check"` \| `"agent"` | Discriminator. `check` is deterministic (command + pass/fail, never an agent); `agent` runs a skill that returns `pass`, `fail`, or `skip`. |
|
|
1034
|
-
| `command` | — | **required when `kind = "check"`**, nonempty string | Ref into `[commands]` — the key, not a shell string. Pass/fail is the command's exit status. Runs with `AB_VERIFY_BASE` set to the verify diff base when one exists. |
|
|
1037
|
+
| `command` | — | **required when `kind = "check"`**, nonempty string | Ref into `[commands]` — the key, not a shell string. Pass/fail is the command's exit status. A command killed by a signal names the signal in its report and whether the runner's own shutdown was in effect; a check the runner's shutdown stops leaves an uncounted report and reruns. Runs with `AB_VERIFY_BASE` set to the verify diff base when one exists. |
|
|
1035
1038
|
| `skill` | — | **required when `kind = "agent"`**, nonempty string | Installed skill name to run (e.g. a repository-authored `"verify-acceptance"`). |
|
|
1036
1039
|
| `paths` | — | optional nonempty array of positive repository-relative globs | Makes either step kind apply when any changed path matches any selector. Omitted means unconditional. |
|
|
1037
1040
|
| `afterReconcile` | repository: `true`; step: inherited | boolean | Step override wins over `[verify].afterReconcile`; false skips this step after reconciliation only. |
|
|
@@ -1107,6 +1110,9 @@ repositories or configuration through parent directories, including focused test
|
|
|
1107
1110
|
and Git probes. Do not relocate required installed tooling or retained evidence;
|
|
1108
1111
|
manifest-directed artifact paths remain authoritative. Never commit scratch.
|
|
1109
1112
|
|
|
1113
|
+
Stop only processes the session started, by recorded PID or process group;
|
|
1114
|
+
see [process ownership](references/process-ownership.md).
|
|
1115
|
+
|
|
1110
1116
|
Keep concurrent verifiers in their distinct context directories.
|
|
1111
1117
|
|
|
1112
1118
|
An agent verify step is handed the build's pinned ticket assets under
|
|
@@ -1246,8 +1252,8 @@ phase failure or retrying the completed phase. Without a terminal, the oversized
|
|
|
1246
1252
|
write follows the parking policy above. Other store statuses retain their
|
|
1247
1253
|
existing retry policy.
|
|
1248
1254
|
|
|
1249
|
-
Before releasing or replacing a build workspace,
|
|
1250
|
-
non-destructive execution fence for the exact workspace and execution generation.
|
|
1255
|
+
Before releasing or replacing a build workspace, other than completing a
|
|
1256
|
+
merged build, the dispatcher confirms a non-destructive execution fence for the exact workspace and execution generation.
|
|
1251
1257
|
It preserves unpublished branch commits and distinct detached producer candidates
|
|
1252
1258
|
under immutable `refs/autobuild/archive/<build>/<sha>` refs, verifies their exact
|
|
1253
1259
|
readback, and records `workspace.commits-preserved` before cleanup. Where the
|
|
@@ -1273,7 +1279,12 @@ cleanup records `workspace.commits-preserved` (or `workspace.commits-retained`)
|
|
|
1273
1279
|
carrying forward earlier preserved heads, then releases and replaces it. Unknown fencing, inspection, transport, or
|
|
1274
1280
|
receipt-write outcomes leave the workspace and snapshots intact, except under
|
|
1275
1281
|
abort cleanup, which records `workspace.commits-lost` and tears the workspace
|
|
1276
|
-
down.
|
|
1282
|
+
down. Merged completion skips this ordering: the janitor records
|
|
1283
|
+
`build.completed` first, then releases the workspace without a fence,
|
|
1284
|
+
preservation or resume, since the merged commit is on the target. A pending
|
|
1285
|
+
publication still passes the merged pre-release guard before cleanup, and a
|
|
1286
|
+
cleanup the pass cannot finish stays pending (`releasePending`) and retries
|
|
1287
|
+
on later janitor visits. A workspace
|
|
1277
1288
|
flagged by `workspace.cleanup-required` is never launched into: the dispatcher
|
|
1278
1289
|
releases it and provisions the next generation. Provisioning cut off by a
|
|
1279
1290
|
recorded dispatcher teardown is the exception: the next invocation asks the
|
|
@@ -2859,7 +2870,7 @@ parenthesized note beside it (`merge decision`) says which case. The header's
|
|
|
2859
2870
|
| green | held | `ABORTING` | an abort was requested and the runner is still stopping |
|
|
2860
2871
|
| teal | requested | `QUEUED` | parked work waiting for admission; the note names the request (`resume`, `reconcile`, `verification`, `reopen`, `propose`) and marks urgent, high and low waiters |
|
|
2861
2872
|
| amber | none | `WAITING` | a finished pipeline waiting for a merge decision (`merge decision`) or on hold (`on hold`), an entered ticket wait (`on <ids>`), or a `revise-spec` answer waiting for its revision (`spec revision`) |
|
|
2862
|
-
| amber | none | `MERGING` | a finished pipeline with merge consent, waiting for merge gates or the forge |
|
|
2873
|
+
| amber | none | `MERGING` | a finished pipeline with merge consent, waiting for merge gates or the forge, or a merged PR whose completion is pending (`merged`) |
|
|
2863
2874
|
| amber | none | `PAUSED` | an acknowledged pause |
|
|
2864
2875
|
| amber | none | `COLLECTING` | an integration build collecting child work |
|
|
2865
2876
|
| red | none | `BLOCKED` | an open escalation other than a ticket wait's own, or a failed node verification waiting for a repair child; the note `done` marks a completed build whose open escalation awaits acknowledgement |
|
|
@@ -264,7 +264,8 @@ displaced history under immutable exact archive refs
|
|
|
264
264
|
- **Workspace preservation** keeps unpublished workspace commits under archive
|
|
265
265
|
refs, else as BuildStore copies. When neither holds them, release is refused,
|
|
266
266
|
except under abort cleanup, which records `workspace.commits-lost` and
|
|
267
|
-
releases
|
|
267
|
+
releases, and merged completion, which releases without preserving: the
|
|
268
|
+
merged commit is already on the target.
|
|
268
269
|
- There is never a branch or tag fallback. When an environment refuses non-branch
|
|
269
270
|
Git pushes, as Claude Code on the web's GitHub proxy does, the GitHub adapter
|
|
270
271
|
creates the same archive ref through REST ref creation and confirms it by exact
|
|
@@ -136,8 +136,8 @@ applying a thin replay pack whose base is missing, and return true for an
|
|
|
136
136
|
available leaf candidate even when archiving it is refused. Missing capabilities fail
|
|
137
137
|
safely at destructive boundaries. `WorkspaceRecovery.fence(handle)` reports
|
|
138
138
|
confirmed, absent, or unknown without deleting an environment or its snapshots.
|
|
139
|
-
|
|
140
|
-
receipt. `provision` accepts exact `restoration` heads; branch ancestry must be
|
|
139
|
+
Outside merged completion, dispatcher-authorized reap follows only the durable
|
|
140
|
+
fence and preservation/loss receipt. `provision` accepts exact `restoration` heads; branch ancestry must be
|
|
141
141
|
verified, and detached producer objects must never overwrite the named branch.
|
|
142
142
|
`provision` also receives `restorationArchives`: `local` for the local-git
|
|
143
143
|
forge, whose repository already holds the archive refs and must not be fetched
|
|
@@ -158,9 +158,16 @@ archive transport refuses a head's archive ref, call it with your trusted Git
|
|
|
158
158
|
transport. It keeps the head as a BuildStore copy and resolves to the copy's
|
|
159
159
|
exclusion base; record the head with that `storeBase` in place of `remoteRef`.
|
|
160
160
|
It throws when the head cannot be kept; rethrow so release is refused. A
|
|
161
|
-
provider that ignores it preserves strictly. Abort cleanup is
|
|
161
|
+
provider that ignores it preserves strictly. Abort cleanup is one exception:
|
|
162
162
|
when preservation fails, the dispatcher records the commits as lost
|
|
163
|
-
(`workspace.commits-lost`) and releases anyway.
|
|
163
|
+
(`workspace.commits-lost`) and releases anyway. Merged completion is the other:
|
|
164
|
+
the merged commit is on the target, so the dispatcher records `build.completed`
|
|
165
|
+
first, then reaps the workspace with no fence, `preserve` call or resume. A
|
|
166
|
+
pending publication passes the merged pre-release guard before reap. For a
|
|
167
|
+
merged build, `reap` can rely only on that guard having run and on the build
|
|
168
|
+
being terminal; it must not expect a fence or receipt, and a reap that cannot
|
|
169
|
+
finish stays pending and is retried on later janitor visits. Every other
|
|
170
|
+
release keeps the strict ordering above. A `restoration` head may name
|
|
164
171
|
`storeBase` instead of `remoteRef`. Then `provision` receives
|
|
165
172
|
`restoreStored({ exec, workspacePath, sha })`: when the commit is absent, call
|
|
166
173
|
it with your trusted transport, and fail provisioning when it resolves false.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Stopping processes on a shared host
|
|
2
|
+
|
|
3
|
+
Several builds' agents and the kernel's verify commands run side by side on
|
|
4
|
+
one host. A name or pattern kill matches every process with that name, so it
|
|
5
|
+
also stops other builds' work. The victim's verify check records an ordinary
|
|
6
|
+
failed attempt and spends verify budget, and nothing in its output tells the
|
|
7
|
+
kill apart from a real failure.
|
|
8
|
+
|
|
9
|
+
## Rule
|
|
10
|
+
|
|
11
|
+
Stop only processes your session started, by the PID or process group you
|
|
12
|
+
recorded when you started them.
|
|
13
|
+
|
|
14
|
+
## Forbidden
|
|
15
|
+
|
|
16
|
+
- `pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`.
|
|
17
|
+
- Any selection by command name or pattern, including names that look like
|
|
18
|
+
yours: `tsc`, `node`, `bun`, browsers, dev servers.
|
|
19
|
+
|
|
20
|
+
## Recipes
|
|
21
|
+
|
|
22
|
+
| Need | Do |
|
|
23
|
+
|---|---|
|
|
24
|
+
| Stop a background command | `cmd & pid=$!` when starting it, then `kill "$pid"` |
|
|
25
|
+
| Stop a process tree | `setsid cmd & pid=$!`, then `kill -TERM -- -"$pid"` |
|
|
26
|
+
| Bound a command's runtime | `timeout 300 cmd`, or the harness's own background-task stop |
|
|
27
|
+
| The PID was lost | Leave the process; it ends with the session's teardown. Never hunt for it by name. |
|
|
28
|
+
|
|
29
|
+
**Not yours:** the kernel's verify check commands and every other session's
|
|
30
|
+
processes, whatever their names.
|
|
31
|
+
|
|
32
|
+
## Reading a signal-killed verify report
|
|
33
|
+
|
|
34
|
+
A check command that dies from a signal names the signal on the first line
|
|
35
|
+
of its `verify-report:<step>` artifact, and its metadata carries `signal` and
|
|
36
|
+
`runnerShutdown`.
|
|
37
|
+
|
|
38
|
+
- `runnerShutdown: false` — the runner's own shutdown was not in effect, so
|
|
39
|
+
another process sent the signal. Rerun the check before changing code, and
|
|
40
|
+
record it with `ab observe` if it recurs.
|
|
41
|
+
- `runnerShutdown: true` — the runner stopped the check during its own
|
|
42
|
+
shutdown. That is an orderly stop: not a failure, not counted, and the step
|
|
43
|
+
reruns after relaunch.
|
|
@@ -899,6 +899,13 @@ The member is additive and keeps the protocol version. A digest without it is
|
|
|
899
899
|
an older service's answer: the activity pass fails closed with a typed
|
|
900
900
|
capability error and never reads the build's events instead.
|
|
901
901
|
|
|
902
|
+
`releasePending` is `true` on a completed build whose PR merged while its
|
|
903
|
+
workspace is still open (no `workspace.released` after its latest
|
|
904
|
+
`workspace.provisioned` or `workspace.cleanup-required`). It keeps the build in
|
|
905
|
+
the dispatcher's janitor work set until its release lands. The member is
|
|
906
|
+
additive and keeps the protocol version; an older service omits it, and its
|
|
907
|
+
clients retry a merged build's pending release only once the service deploys.
|
|
908
|
+
|
|
902
909
|
The digest is derived from the event log on every call — the server persists
|
|
903
910
|
nothing and there is no refresh step. Protocol version `3` reshaped the
|
|
904
911
|
digest's `observations` from bare sequence numbers to `{seq, ts}` pairs and
|
|
@@ -199,8 +199,17 @@ displaced heads and the temporary change, best effort, per commit:
|
|
|
199
199
|
transaction reserves again from the published branches.
|
|
200
200
|
- Workspace preservation is strict: archive ref, else a `history-objects-<sha>`
|
|
201
201
|
store copy over the preservation base, else release is refused. Abort cleanup
|
|
202
|
-
is
|
|
203
|
-
`workspace.commits-lost` and releases.
|
|
202
|
+
is one exception: when preservation fails it records
|
|
203
|
+
`workspace.commits-lost` and releases. Merged completion is the other: the
|
|
204
|
+
merged commit is on the target, so a merged build's workspace is released
|
|
205
|
+
without preservation, after `build.completed` is recorded.
|
|
206
|
+
Before cleanup, a pending `publication.requested` is covered when its commit
|
|
207
|
+
equals the merged PR's head or landing, or a host-side forge ancestry proof
|
|
208
|
+
places it below either. A covered request is recorded `publication.lost`
|
|
209
|
+
without settlement; an uncovered request, or one whose ancestry is unknown,
|
|
210
|
+
is settled as every release settles it. A cleanup the pass cannot finish
|
|
211
|
+
leaves the build completed with `releasePending` set, and later janitor
|
|
212
|
+
visits retry it. Store-kept
|
|
204
213
|
heads go on decisive `workspace.commits-retained`, and replacement
|
|
205
214
|
provisioning restores them on any host.
|
|
206
215
|
|
|
@@ -416,6 +416,9 @@ repositories or configuration through parent directories, including focused test
|
|
|
416
416
|
and Git probes. Do not relocate required installed tooling or retained evidence;
|
|
417
417
|
manifest-directed artifact paths remain authoritative. Never commit scratch.
|
|
418
418
|
|
|
419
|
+
Stop only processes the session started, by recorded PID or process group;
|
|
420
|
+
see [process ownership](process-ownership.md).
|
|
421
|
+
|
|
419
422
|
|
|
420
423
|
1. Run `ab context` and read `"$AB_CONTEXT_DIR/context.json"`. The verifier receives
|
|
421
424
|
`$AB_CONTEXT_DIR/spec.md`, the configured step,
|
|
@@ -519,8 +522,10 @@ Archive refs are a recommendation (WARN or UNKNOWN, never FAIL):
|
|
|
519
522
|
build and proceed.
|
|
520
523
|
- **Workspace preservation** keeps unpublished workspace commits as BuildStore
|
|
521
524
|
copies where refused, and refuses to release the workspace only when the store
|
|
522
|
-
copy fails too. Abort cleanup is
|
|
523
|
-
`workspace.commits-lost` and releases.
|
|
525
|
+
copy fails too. Abort cleanup is one exception: it records
|
|
526
|
+
`workspace.commits-lost` and releases. Merged completion is the other: the
|
|
527
|
+
merged PR head already covers the work, so the workspace is released without
|
|
528
|
+
preservation after the build completes.
|
|
524
529
|
|
|
525
530
|
Require **linear history** on protected root and node target branches to prevent
|
|
526
531
|
merge commits from GitHub's update-branch action. On the configured root, enable
|
package/skills/harvest/SKILL.md
CHANGED
|
@@ -9,6 +9,11 @@ You are the harvest producer. The repository runner has already scanned and
|
|
|
9
9
|
claimed a fixed set of structured `observation.recorded` occurrences. You
|
|
10
10
|
cluster and author; you never create or move tickets.
|
|
11
11
|
|
|
12
|
+
Other builds' agents and verify commands share this host. Stop only processes
|
|
13
|
+
your session started, by the PID or process group you recorded; never by name
|
|
14
|
+
or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`). See
|
|
15
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
16
|
+
|
|
12
17
|
1. Run `ab harvest context`. Read `.ab/observations.json`,
|
|
13
18
|
`.ab/originating-tickets.json`, and `.ab/ledger.json`. The originating-ticket
|
|
14
19
|
context shows scan-time source match, existence, and resolution state; filing
|
|
@@ -8,6 +8,11 @@ description: Fresh adversarial review of one harvest proposal set. Invoked only
|
|
|
8
8
|
You are the fresh skeptic in the observation-harvest convergence loop. You do
|
|
9
9
|
not author proposals or touch tickets.
|
|
10
10
|
|
|
11
|
+
Other builds' agents and verify commands share this host. Stop only processes
|
|
12
|
+
your session started, by the PID or process group you recorded; never by name
|
|
13
|
+
or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`). See
|
|
14
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
15
|
+
|
|
11
16
|
1. Run `ab harvest context`.
|
|
12
17
|
2. Review `.ab/proposals.json` against `.ab/observations.json`,
|
|
13
18
|
`.ab/originating-tickets.json`, `.ab/ledger.json`, and every prior
|
|
@@ -24,6 +24,11 @@ repositories or configuration through parent directories, including focused test
|
|
|
24
24
|
and Git probes. Do not relocate required installed tooling or retained evidence;
|
|
25
25
|
manifest-directed artifact paths remain authoritative. Never commit scratch.
|
|
26
26
|
|
|
27
|
+
Other builds' agents and verify commands share this host. Stop only processes
|
|
28
|
+
your session started, by the PID or process group you recorded; never by name
|
|
29
|
+
or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`). See
|
|
30
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
31
|
+
|
|
27
32
|
|
|
28
33
|
## Session shape
|
|
29
34
|
|
package/skills/judge/SKILL.md
CHANGED
|
@@ -20,6 +20,10 @@ vote.
|
|
|
20
20
|
rubric and the purpose care about in both trees; compare them directly
|
|
21
21
|
rather than scoring each on its own. Run read-only commands if they help
|
|
22
22
|
you understand the work, but leave both trees unmodified.
|
|
23
|
+
|
|
24
|
+
Other builds' agents and verify commands share this host. Stop only
|
|
25
|
+
processes your session started, by the PID or process group you recorded;
|
|
26
|
+
never by name or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`).
|
|
23
27
|
4. Weigh the purpose above the rubric's wording. A variant that satisfies the
|
|
24
28
|
letter of a criterion while working against the purpose is worse, not
|
|
25
29
|
better: penalize keyword stuffing, text addressed to judges or reviewers,
|
package/skills/operate/SKILL.md
CHANGED
|
@@ -927,6 +927,11 @@ waits, end the message with one line saying so, such as
|
|
|
927
927
|
- Stop only a dispatcher this session started, only when requested, using a clean
|
|
928
928
|
stop and waiting for drain. Never adopt, restart, kill or manage another
|
|
929
929
|
session's dispatcher. Diagnose and report trouble without process intervention.
|
|
930
|
+
- Other builds' agents and verify commands share this host. Stop only processes
|
|
931
|
+
your session started, such as `ab watch` and `ab wait` monitors, by the PID or
|
|
932
|
+
process group you recorded; never by name or pattern (`pkill`, `pkill -f`,
|
|
933
|
+
`killall`, `kill $(pgrep …)`). See
|
|
934
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
930
935
|
- `ab web` is always permitted, including while a dispatcher is running; it is a
|
|
931
936
|
read-only surface and does not acquire a dispatcher lease.
|
|
932
937
|
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -24,6 +24,11 @@ repositories or configuration through parent directories, including focused test
|
|
|
24
24
|
and Git probes. Do not relocate required installed tooling or retained evidence;
|
|
25
25
|
manifest-directed artifact paths remain authoritative. Never commit scratch.
|
|
26
26
|
|
|
27
|
+
Other builds' agents and verify commands share this host. Stop only processes
|
|
28
|
+
your session started, by the PID or process group you recorded; never by name
|
|
29
|
+
or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`). See
|
|
30
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
31
|
+
|
|
27
32
|
|
|
28
33
|
## Session shape
|
|
29
34
|
|
|
@@ -9,6 +9,11 @@ You are a fresh skeptic reviewing the plan against the spec. You have no
|
|
|
9
9
|
memory of prior rounds by design — a fresh reviewer catches more. Your
|
|
10
10
|
verdict travels the typed channel; nothing you print matters to the pipeline.
|
|
11
11
|
|
|
12
|
+
Other builds' agents and verify commands share this host. Stop only processes
|
|
13
|
+
your session started, by the PID or process group you recorded; never by name
|
|
14
|
+
or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`). See
|
|
15
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
16
|
+
|
|
12
17
|
## Session shape
|
|
13
18
|
|
|
14
19
|
1. Run `ab context`. You get `$AB_CONTEXT_DIR/spec.md`, `$AB_CONTEXT_DIR/plan.md` (latest revision),
|
package/skills/propose/SKILL.md
CHANGED
|
@@ -19,6 +19,11 @@ Scratch output, including the proposal file, belongs under `.ab/` (prefer the
|
|
|
19
19
|
current `$AB_CONTEXT_DIR`), never at the worktree root, and must not be
|
|
20
20
|
committed.
|
|
21
21
|
|
|
22
|
+
Other builds' agents and verify commands share this host. Stop only processes
|
|
23
|
+
your session started, by the PID or process group you recorded; never by name
|
|
24
|
+
or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`). See
|
|
25
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
26
|
+
|
|
22
27
|
## Session shape
|
|
23
28
|
|
|
24
29
|
1. Run `ab context`. Read the printed manifest and its `materialized` paths,
|
|
@@ -34,6 +34,11 @@ repositories or configuration through parent directories, including focused test
|
|
|
34
34
|
and Git probes. Do not relocate required installed tooling or retained evidence;
|
|
35
35
|
manifest-directed artifact paths remain authoritative. Never commit scratch.
|
|
36
36
|
|
|
37
|
+
Other builds' agents and verify commands share this host. Stop only processes
|
|
38
|
+
your session started, by the PID or process group you recorded; never by name
|
|
39
|
+
or pattern (`pkill`, `pkill -f`, `killall`, `kill $(pgrep …)`). See
|
|
40
|
+
[process ownership](../ab-guide/references/process-ownership.md).
|
|
41
|
+
|
|
37
42
|
|
|
38
43
|
## Session shape
|
|
39
44
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"build": "ab-hosted-service-build"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@defrex/autobuild-hosted-store-service": "1.
|
|
8
|
-
"@defrex/autobuild": "1.
|
|
7
|
+
"@defrex/autobuild-hosted-store-service": "1.20.0",
|
|
8
|
+
"@defrex/autobuild": "1.20.0",
|
|
9
9
|
"next": "16.1.6",
|
|
10
10
|
"react": "19.2.4",
|
|
11
11
|
"react-dom": "19.2.4"
|