@defrex/autobuild 1.19.0 → 1.21.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 +88 -11
- package/docs/architecture.md +48 -8
- package/docs/assets/headline-wide.png +0 -0
- package/docs/dispatcher-hosting.md +6 -1
- package/docs/dispatcher.md +2 -2
- 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/troubleshooting.md +6 -0
- 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/cli/dispatch.ts +3 -0
- package/packages/core/src/events/repository.ts +45 -1
- 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/__snapshots__/reducer-identity-records/b440840a01ea216f.json +115 -0
- package/packages/core/src/kernel/dispatch-capacity.ts +47 -6
- 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 +3 -0
- package/packages/core/src/kernel/repository-read-facts.ts +6 -1
- 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 +472 -57
- package/packages/core/src/processes/pass-stages.ts +94 -4
- package/packages/core/src/processes/publication-loss.ts +29 -0
- package/packages/core/src/processes/repo-view.ts +50 -10
- 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 +5605 -5454
- package/packages/core/src/store/remote/protocol.ts +3 -0
- package/packages/core/src/store/remote/released-clients.json +22 -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/1.21.0.json +36612 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +18 -14
- package/packages/core/src/store/types.ts +5 -0
- package/packages/core/src/testing/reduced-read-budget.ts +412 -2
- package/skills/code-review/SKILL.md +5 -0
- package/skills/finalize/SKILL.md +5 -0
- package/skills/guide/SKILL.md +36 -9
- 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 +12 -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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnosis for a deterministic verify check that died from a signal.
|
|
3
|
+
*
|
|
4
|
+
* Several builds' agents and verify commands share one host, so a name or
|
|
5
|
+
* pattern kill (`pkill -f …`) run by another session can terminate this
|
|
6
|
+
* build's check. The victim's exit looks like any failure, so its report
|
|
7
|
+
* records which signal ended the command and whether the runner's own
|
|
8
|
+
* shutdown was in effect at that moment.
|
|
9
|
+
*
|
|
10
|
+
* Death by signal is read from the exit status with the shell convention
|
|
11
|
+
* 128+N: `sh -c` reports a signal-killed child (or grandchild, through a
|
|
12
|
+
* package-script runner) that way, and Bun's `proc.exited` does the same for
|
|
13
|
+
* the direct child.
|
|
14
|
+
*/
|
|
15
|
+
import { constants } from 'node:os'
|
|
16
|
+
|
|
17
|
+
const SIGNAL_NAMES: ReadonlyMap<number, string> = new Map(
|
|
18
|
+
Object.entries(constants.signals).map(([name, number]) => [number, name]),
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
/** The signal name for a 128+N exit status, or undefined for any other. */
|
|
22
|
+
export function signalFromExitStatus(exitCode: number): string | undefined {
|
|
23
|
+
if (exitCode <= 128 || exitCode > 192) return undefined
|
|
24
|
+
return SIGNAL_NAMES.get(exitCode - 128)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type CheckTermination = {
|
|
28
|
+
readonly metadata: { readonly signal: string; readonly runnerShutdown: boolean }
|
|
29
|
+
/** First line of the report, explaining who stopped the check. */
|
|
30
|
+
readonly line: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Report annotation for a signal-killed check, or undefined for a normal exit. */
|
|
34
|
+
export function describeCheckTermination(
|
|
35
|
+
exitCode: number,
|
|
36
|
+
runnerShutdown: boolean,
|
|
37
|
+
): CheckTermination | undefined {
|
|
38
|
+
const signal = signalFromExitStatus(exitCode)
|
|
39
|
+
if (signal === undefined) return undefined
|
|
40
|
+
const line = runnerShutdown
|
|
41
|
+
? `terminated by ${signal} (exit ${exitCode}) during the runner's own shutdown: an orderly stop, not a failure and not counted; the step reruns after relaunch.`
|
|
42
|
+
: `terminated by ${signal} (exit ${exitCode}) while the runner's own shutdown was not in effect, so another process sent the signal. Rerun the check before changing code.`
|
|
43
|
+
return { metadata: { signal, runnerShutdown }, line }
|
|
44
|
+
}
|