@defrex/autobuild 1.15.0 → 1.16.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 +19 -3
- package/docs/architecture.md +26 -6
- package/docs/configuration.md +8 -3
- package/docs/dispatcher-hosting.md +3 -0
- package/docs/troubleshooting.md +14 -3
- package/docs/workspaces.md +2 -1
- package/package.json +3 -3
- package/packages/core/src/cli/dispatch.ts +107 -22
- package/packages/core/src/events/repository.ts +12 -6
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/e28c68e63cbd265f.json +108 -0
- package/packages/core/src/kernel/reducer-revisions.ts +1 -0
- package/packages/core/src/ports/types.ts +10 -4
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +281 -75
- package/packages/core/src/processes/dispatcher.ts +481 -97
- package/packages/core/src/processes/invocation-budget.ts +6 -0
- package/packages/core/src/processes/launch-cut.ts +37 -0
- package/packages/core/src/store/reducer-value-shapes.json +2629 -2625
- package/packages/core/src/store/remote/released-clients.json +11 -0
- package/packages/core/src/store/remote/released-reducer-values/1.16.0.json +36358 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +18 -16
- package/packages/core/src/store/remote/released-value-policy.ts +7 -0
- package/packages/core/src/testing/reduced-read-budget.ts +88 -8
- package/skills/guide/SKILL.md +13 -2
- package/skills/operate/SKILL.md +7 -4
- package/templates/hosted-service/package.json +2 -2
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A runner launch the bounded invocation's work deadline cut after the
|
|
3
|
+
* build's execution lease was claimed (GitHub #1415). Kept free of runtime
|
|
4
|
+
* imports so the dispatcher can recognise it without loading the
|
|
5
|
+
* server-only invocation budget.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface CutLaunch {
|
|
9
|
+
slug: string
|
|
10
|
+
/** The execution lease holder the cut launch claimed. */
|
|
11
|
+
instance: string
|
|
12
|
+
/** Whether the provider start was requested: only then can a guest be
|
|
13
|
+
* running, and the lease is released only after a confirmed fence. */
|
|
14
|
+
startRequested: boolean
|
|
15
|
+
/** The open workspace the launch targeted, when known. */
|
|
16
|
+
workspace?: { provider: string; ref: string }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Thrown by the CLI's launch when the work deadline cut it mid-flight with
|
|
20
|
+
* its execution lease claimed and no execution handle. Nothing was recorded:
|
|
21
|
+
* the dispatcher settles the lease in teardown and carries the launch in the
|
|
22
|
+
* deferred-work hint. */
|
|
23
|
+
export class LaunchCutByDeadline extends Error {
|
|
24
|
+
override readonly name = 'LaunchCutByDeadline'
|
|
25
|
+
constructor(readonly cut: CutLaunch) {
|
|
26
|
+
super(
|
|
27
|
+
`the work deadline cut the launch of build ${cut.slug} ` +
|
|
28
|
+
(cut.startRequested
|
|
29
|
+
? 'after its provider start was requested'
|
|
30
|
+
: 'before its provider start'),
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function isLaunchCutByDeadline(error: unknown): error is LaunchCutByDeadline {
|
|
36
|
+
return error instanceof LaunchCutByDeadline
|
|
37
|
+
}
|