@usine/core 0.5.1-next.271.g56e79a7 → 0.5.1-next.273.g2ca5ae8
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 +6 -4
- package/dist/attempt/attempt.d.ts +14 -1
- package/dist/attempt/attempt.d.ts.map +1 -1
- package/dist/attempt/attempt.js +30 -0
- package/dist/attempt/attempt.js.map +1 -1
- package/dist/attempt/channel.d.ts +1 -1
- package/dist/attempt/failure.d.ts +10 -4
- package/dist/attempt/failure.d.ts.map +1 -1
- package/dist/attempt/failure.js +7 -3
- package/dist/attempt/failure.js.map +1 -1
- package/dist/attempt/outcome.d.ts +1 -1
- package/dist/attempt/start.d.ts +5 -1
- package/dist/attempt/start.d.ts.map +1 -1
- package/dist/attempt/start.js +4 -0
- package/dist/attempt/start.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,11 +12,11 @@ Domain model for [usine](https://github.com/basaltbytes/usine): event, run, step
|
|
|
12
12
|
| `@usine/core/run`, `@usine/core/run/state` | `Run`, `RunId`; the run state machine as a tagged union with typestate transitions (`RunState.start`, `RunState.supersede`, and others) |
|
|
13
13
|
| `@usine/core/step`, `@usine/core/step/result` | `Step`, `StepName`; `StepResult` and its facts (`Commit`, `PullRequest`, `Comment`) |
|
|
14
14
|
| `@usine/core/step/harvest` | `harvestFacts`, `harvestPostedComments`, `HarvestError`, `HarvestSpec`, `AttemptWindowsRead`: the commits and pull requests in an attempt's finished checkout, and the comments and reviews it posted on its item, read with the caller's `git`/`gh` runner |
|
|
15
|
-
| `@usine/core/attempt` | `Attempt`, `FailureResolution` (the time and operator of a failure resolution), `AttemptId`, `AttemptNumber`, `AttemptTask`, `OutOfMemoryKills` (the processes the kernel killed in an attempt's containers for memory), `ContainerOutOfMemoryKills` (those of one container, by `ContainerId`), `totalOutOfMemoryKills`, `shouldAutoRetry`, and `AttemptWindow`, `windowOf`, `windowHolds`, `windowsOverlap`, `AttemptWindows` |
|
|
15
|
+
| `@usine/core/attempt` | `Attempt`, `FailureResolution` (the time and operator of a failure resolution), `AttemptId`, `AttemptNumber`, `AttemptTask`, `OutOfMemoryKills` (the processes the kernel killed in an attempt's containers for memory), `ContainerOutOfMemoryKills` (those of one container, by `ContainerId`), `totalOutOfMemoryKills`, `shouldAutoRetry`, `MAX_AUTO_ATTEMPTS`, `ProviderRetry`, `pendingProviderRetry`, and `AttemptWindow`, `windowOf`, `windowHolds`, `windowsOverlap`, `AttemptWindows` |
|
|
16
16
|
| `@usine/core/attempt/outcome` | `AttemptSucceeded`, `AttemptFailed`, `AttemptCanceled`, `AttemptOutcome` |
|
|
17
|
-
| `@usine/core/attempt/failure` | `GitHubPushFailure`, `InfraFailure`, `DefectFailure`, `AgentFailure`, `RunawayFailure`, `ChildSessionBudgetFailure`, `AttemptFailure`, `isAutoRetryableFailure` |
|
|
17
|
+
| `@usine/core/attempt/failure` | `GitHubPushFailure`, `InfraFailure`, `DefectFailure`, `ProviderCapacityFailure`, `AgentFailure`, `RunawayFailure`, `ChildSessionBudgetFailure`, `AttemptFailure`, `isAutoRetryableFailure` |
|
|
18
18
|
| `@usine/core/attempt/salvage` | `SalvageRef`, `salvageRefFor`, `SalvagePushed`, `SalvagePartlyPushed` (pushed work whose checkout keeps the files that the push left out), `SalvageRetained`, `SalvageRejected` (a push that the remote refused for good), `AttemptSalvage`, `AttemptRecovery` (its `rejected` is the recorded `SalvageRejected`, whose commit recovery doesn't push again), `RecoverySink` (its `windows` reads the windows a recovered attempt's harvest needs) |
|
|
19
|
-
| `@usine/core/attempt/start` | Why an attempt started: `StartedByEvent`, `StartedByRetry`, `StartedByEditAndRetry` (with the operator login), `StartedByInfraRetry`, `StartedAfterRestart`, `AttemptStart`, `OperatorRetryStart` |
|
|
19
|
+
| `@usine/core/attempt/start` | Why an attempt started: `StartedByEvent`, `StartedByRetry`, `StartedByEditAndRetry` (with the operator login), `StartedByInfraRetry`, `StartedByProviderRetry`, `StartedAfterRestart`, `AttemptStart`, `OperatorRetryStart` |
|
|
20
20
|
| `@usine/core/attempt/channel` | `RunSpec`, versioned envelopes, the `Sink` (stores envelopes, records the salvage, comments, and out-of-memory kills, reads the `transcript` and the harvest's `windows`), and the `admit` reducer. Import as a namespace (`AttemptChannel.Started`). |
|
|
21
21
|
| `@usine/core/agent`, `/agent/brain`, `/agent/session` | `Agent`, `AgentName`, `AgentPersona`, parent model resolution, `githubSignature` (the last line of an agent's GitHub comments); `BrainSpec`, `ModelId`, `Harness`, `Effort`; `AgentSessionId`, session descriptors, `AgentSessionEvent`, `ChildSessionBudget`, `ChildSessionCount` |
|
|
22
22
|
| `@usine/core/agent/capability` | `HarnessCapability`, `HarnessReady`, `HarnessUnavailableError`, and the credential-free `HarnessReadiness` preflight response |
|
|
@@ -39,7 +39,7 @@ An item-level `CycleBudgetAsk`, which can exist before another run opens, record
|
|
|
39
39
|
|
|
40
40
|
Each attempt records its child `BrainSpec`, its effective Pi parent model, why it started (`start`, none for attempts from before usine recorded it), when a restart last reattached it (`reattachedAt`), and how many processes the kernel killed in its containers for memory, with the memory limit of the last container that had kills (`outOfMemory`, none if it killed none or the attempt ran without a container). A reattachment runs the attempt in a new container, so `outOfMemory` adds up the kills of each container. `RunSpec` is the immutable repo, payload, task, agent context, and child-session budget that the parent starts from.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Infrastructure failures (`InfraFailure`) and provider capacity refusals (`ProviderCapacityFailure`) retry automatically, up to a cap. Agent failures wait for the operator. Runaway guard failures, exhausted child-session budgets, and `DefectFailure` never retry automatically; `DefectFailure` records a defect caught at a boundary that needs a serializable outcome, with its original cause.
|
|
43
43
|
|
|
44
44
|
`GitHubPushFailure` records the repository, refused ref, and diagnostic for an HTTP 403 on a push with a single-repository installation token. It does not retry automatically. `SalvageRetained.pushFailure` preserves this failure alongside the retained checkout; older salvage records decode it as `None`.
|
|
45
45
|
|
|
@@ -72,3 +72,5 @@ Envelopes include `PROTOCOL_VERSION` (7), which the transcript store uses to rea
|
|
|
72
72
|
`WorkerUnresponsive.unansweredProbes` records consecutive unanswered probes; older notices decode to 1. `WORKER_UNRESPONSIVE_PROBES` is the shared attention threshold of 3. The executor reports at that threshold so consumers can distinguish persistent outages from the first missed probe.
|
|
73
73
|
|
|
74
74
|
`ProvisionerTimings` in `/worker` validates provisioner waits and check intervals in seconds, including ordered creation backoff bounds. Defaults are 600 seconds for SSH, 30 to 600 seconds for backoff, and 86400 seconds between machine checks.
|
|
75
|
+
|
|
76
|
+
`ProviderCapacityFailure` records a temporary model provider refusal. It permits an automatic retry under the same attempt cap as `InfraFailure`. `pendingProviderRetry` derives the next attempt number, provider message, and earliest start from a running run's last failed attempt: two minutes after attempt 1 and five after attempt 2. `StartedByProviderRetry` distinguishes these starts from infrastructure retries.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Array as EffectArray, DateTime, Option, Schema } from "effect";
|
|
2
2
|
import { Agent } from "../agent/agent.ts";
|
|
3
3
|
import { BrainSpec } from "../agent/brain.ts";
|
|
4
|
+
import type { RunState } from "../run/state.ts";
|
|
4
5
|
import { Comment } from "../step/result.ts";
|
|
5
6
|
import { AttemptFailure } from "./failure.ts";
|
|
6
7
|
/** The ID of an Attempt; each retry gets a new ID under the same Run and Step. */
|
|
@@ -9,6 +10,8 @@ export type AttemptId = typeof AttemptId.Type;
|
|
|
9
10
|
/** The 1-based position of the Attempt in its Step. */
|
|
10
11
|
export declare const AttemptNumber: Schema.brand<Schema.Int, "AttemptNumber">;
|
|
11
12
|
export type AttemptNumber = typeof AttemptNumber.Type;
|
|
13
|
+
/** The total attempt cap for automatic retries, including the first try. */
|
|
14
|
+
export declare const MAX_AUTO_ATTEMPTS: number & import("effect/Brand").Brand<"AttemptNumber">;
|
|
12
15
|
/** The task text for the agent: the interpolated loop prompt or the operator's edit-and-retry text. */
|
|
13
16
|
export declare const AttemptTask: Schema.brand<Schema.String, "AttemptTask">;
|
|
14
17
|
export type AttemptTask = typeof AttemptTask.Type;
|
|
@@ -72,7 +75,7 @@ declare const Attempt_base: Schema.Class<Attempt, Schema.Struct<{
|
|
|
72
75
|
readonly endedAt: Schema.Option<Schema.DateTimeUtc>;
|
|
73
76
|
readonly salvage: Schema.Option<Schema.Union<readonly [typeof import("./salvage.ts").SalvagePushed, typeof import("./salvage.ts").SalvagePartlyPushed, typeof import("./salvage.ts").SalvageRetained, typeof import("./salvage.ts").SalvageRejected]>>;
|
|
74
77
|
readonly failureResolution: Schema.withConstructorDefault<Schema.Option<typeof FailureResolution>>;
|
|
75
|
-
readonly start: Schema.withConstructorDefault<Schema.Option<Schema.Union<readonly [typeof import("./start.ts").StartedByEvent, typeof import("./start.ts").StartedByRetry, typeof import("./start.ts").StartedByEditAndRetry, typeof import("./start.ts").StartedByInfraRetry, typeof import("./start.ts").StartedAfterRestart]>>>;
|
|
78
|
+
readonly start: Schema.withConstructorDefault<Schema.Option<Schema.Union<readonly [typeof import("./start.ts").StartedByEvent, typeof import("./start.ts").StartedByRetry, typeof import("./start.ts").StartedByEditAndRetry, typeof import("./start.ts").StartedByInfraRetry, typeof import("./start.ts").StartedByProviderRetry, typeof import("./start.ts").StartedAfterRestart]>>>;
|
|
76
79
|
readonly reattachedAt: Schema.withConstructorDefault<Schema.Option<Schema.DateTimeUtc>>;
|
|
77
80
|
readonly comments: Schema.withConstructorDefault<Schema.$Array<typeof Comment>>;
|
|
78
81
|
readonly outOfMemory: Schema.withConstructorDefault<Schema.Option<typeof OutOfMemoryKills>>;
|
|
@@ -129,5 +132,15 @@ export declare const shouldAutoRetry: (options: {
|
|
|
129
132
|
readonly number: AttemptNumber;
|
|
130
133
|
readonly maxAutoAttempts: AttemptNumber;
|
|
131
134
|
}) => boolean;
|
|
135
|
+
declare const ProviderRetry_base: Schema.Class<ProviderRetry, Schema.Struct<{
|
|
136
|
+
readonly nextAttempt: Schema.brand<Schema.Int, "AttemptNumber">;
|
|
137
|
+
readonly retryAt: Schema.DateTimeUtcFromString;
|
|
138
|
+
readonly message: Schema.NonEmptyString;
|
|
139
|
+
}>, {}>;
|
|
140
|
+
/** The next attempt after a provider capacity refusal, with its earliest start time. */
|
|
141
|
+
export declare class ProviderRetry extends ProviderRetry_base {
|
|
142
|
+
}
|
|
143
|
+
/** Returns a pending capacity retry from persisted state, including after an orchestrator restart. */
|
|
144
|
+
export declare const pendingProviderRetry: (state: RunState, attempts: ReadonlyArray<Attempt>) => Option.Option<ProviderRetry>;
|
|
132
145
|
export {};
|
|
133
146
|
//# sourceMappingURL=attempt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attempt.d.ts","sourceRoot":"","sources":["../../src/attempt/attempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,QAAQ,EAAU,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChF,OAAO,EAAE,KAAK,EAAa,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAW,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"attempt.d.ts","sourceRoot":"","sources":["../../src/attempt/attempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,QAAQ,EAAU,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChF,OAAO,EAAE,KAAK,EAAa,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAW,MAAM,mBAAmB,CAAC;AAGvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAA0B,MAAM,cAAc,CAAC;AAKtE,kFAAkF;AAClF,eAAO,MAAM,SAAS,kDAAwD,CAAC;AAE/E,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;AAE9C,uDAAuD;AACvD,eAAO,MAAM,aAAa,2CAE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eAAe,YAAa;IACvC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC;CACzC,KAAG,OAA8F,CAAC;;;;;;AAEnG,wFAAwF;AACxF,qBAAa,aAAc,SAAQ,kBAMlC;CAAG;AAEJ,sGAAsG;AACtG,eAAO,MAAM,oBAAoB,UACxB,QAAQ,YACL,aAAa,CAAC,OAAO,CAAC,KAC/B,MAAM,CAAC,MAAM,CAAC,aAAa,CAsB7B,CAAC"}
|
package/dist/attempt/attempt.js
CHANGED
|
@@ -15,6 +15,8 @@ import { AttemptStart } from "./start.js";
|
|
|
15
15
|
export const AttemptId = Schema.NonEmptyString.pipe(Schema.brand("AttemptId"));
|
|
16
16
|
/** The 1-based position of the Attempt in its Step. */
|
|
17
17
|
export const AttemptNumber = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)).pipe(Schema.brand("AttemptNumber"));
|
|
18
|
+
/** The total attempt cap for automatic retries, including the first try. */
|
|
19
|
+
export const MAX_AUTO_ATTEMPTS = AttemptNumber.make(3);
|
|
18
20
|
/** The task text for the agent: the interpolated loop prompt or the operator's edit-and-retry text. */
|
|
19
21
|
export const AttemptTask = Schema.String.check(Schema.isPattern(/\S/u, { message: "Expected non-blank task text" })).pipe(Schema.brand("AttemptTask"));
|
|
20
22
|
/**
|
|
@@ -145,4 +147,32 @@ export class AttemptWindows extends Schema.Class("AttemptWindows")({
|
|
|
145
147
|
* `maxAutoAttempts`, which counts the first try (ADR 0002).
|
|
146
148
|
*/
|
|
147
149
|
export const shouldAutoRetry = (options) => isAutoRetryableFailure(options.failure) && options.number < options.maxAutoAttempts;
|
|
150
|
+
/** The next attempt after a provider capacity refusal, with its earliest start time. */
|
|
151
|
+
export class ProviderRetry extends Schema.Class("ProviderRetry")(closedStruct({
|
|
152
|
+
nextAttempt: AttemptNumber.check(Schema.isGreaterThanOrEqualTo(2)),
|
|
153
|
+
retryAt: Schema.DateTimeUtcFromString,
|
|
154
|
+
message: Schema.NonEmptyString,
|
|
155
|
+
})) {
|
|
156
|
+
}
|
|
157
|
+
/** Returns a pending capacity retry from persisted state, including after an orchestrator restart. */
|
|
158
|
+
export const pendingProviderRetry = (state, attempts) => {
|
|
159
|
+
if (state._tag !== "Running")
|
|
160
|
+
return Option.none();
|
|
161
|
+
const last = attempts.at(-1);
|
|
162
|
+
if (last === undefined ||
|
|
163
|
+
last.number >= MAX_AUTO_ATTEMPTS ||
|
|
164
|
+
Option.isNone(last.outcome) ||
|
|
165
|
+
Option.isNone(last.endedAt))
|
|
166
|
+
return Option.none();
|
|
167
|
+
const outcome = last.outcome.value;
|
|
168
|
+
if (outcome._tag !== "Failed" || outcome.failure._tag !== "ProviderCapacityFailure")
|
|
169
|
+
return Option.none();
|
|
170
|
+
return Option.some(new ProviderRetry({
|
|
171
|
+
nextAttempt: AttemptNumber.make(last.number + 1),
|
|
172
|
+
retryAt: DateTime.add(last.endedAt.value, {
|
|
173
|
+
minutes: last.number === 1 ? 2 : 5,
|
|
174
|
+
}),
|
|
175
|
+
message: outcome.failure.message,
|
|
176
|
+
}));
|
|
177
|
+
};
|
|
148
178
|
//# sourceMappingURL=attempt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attempt.js","sourceRoot":"","sources":["../../src/attempt/attempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
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E,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChD,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YACxC,OAAO,EAAE,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACnC,CAAC;QACF,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO;KACjC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -60,7 +60,7 @@ declare const Final_base: Schema.Class<Final, Schema.TaggedStruct<"Final", {
|
|
|
60
60
|
export declare class Final extends Final_base {
|
|
61
61
|
}
|
|
62
62
|
declare const Failed_base: Schema.Class<Failed, Schema.TaggedStruct<"Failed", {
|
|
63
|
-
readonly failure: Schema.Union<readonly [typeof import("./failure.ts").GitHubPushFailure, typeof import("./failure.ts").InfraFailure, typeof import("./failure.ts").DefectFailure, typeof import("./failure.ts").AgentFailure, typeof import("./failure.ts").BlockedFailure, typeof import("./failure.ts").QuestionFailure, typeof import("./failure.ts").RunawayFailure, typeof import("./failure.ts").ChildSessionBudgetFailure]>;
|
|
63
|
+
readonly failure: Schema.Union<readonly [typeof import("./failure.ts").GitHubPushFailure, typeof import("./failure.ts").InfraFailure, typeof import("./failure.ts").ProviderCapacityFailure, typeof import("./failure.ts").DefectFailure, typeof import("./failure.ts").AgentFailure, typeof import("./failure.ts").BlockedFailure, typeof import("./failure.ts").QuestionFailure, typeof import("./failure.ts").RunawayFailure, typeof import("./failure.ts").ChildSessionBudgetFailure]>;
|
|
64
64
|
}>, {}>;
|
|
65
65
|
export declare class Failed extends Failed_base {
|
|
66
66
|
}
|
|
@@ -13,7 +13,7 @@ declare const InfraFailure_base: Schema.Class<InfraFailure, Schema.TaggedStruct<
|
|
|
13
13
|
}>, import("effect/Cause").YieldableError>;
|
|
14
14
|
/**
|
|
15
15
|
* An infrastructure failure outside the agent, such as an unreachable Worker or failed checkout.
|
|
16
|
-
*
|
|
16
|
+
* The engine retries it automatically, up to the attempt cap.
|
|
17
17
|
*/
|
|
18
18
|
export declare class InfraFailure extends InfraFailure_base {
|
|
19
19
|
}
|
|
@@ -24,6 +24,12 @@ declare const DefectFailure_base: Schema.Class<DefectFailure, Schema.TaggedStruc
|
|
|
24
24
|
/** A programmer defect caught at the durable execution boundary; not retried automatically. */
|
|
25
25
|
export declare class DefectFailure extends DefectFailure_base {
|
|
26
26
|
}
|
|
27
|
+
declare const ProviderCapacityFailure_base: Schema.Class<ProviderCapacityFailure, Schema.TaggedStruct<"ProviderCapacityFailure", {
|
|
28
|
+
readonly message: Schema.NonEmptyString;
|
|
29
|
+
}>, import("effect/Cause").YieldableError>;
|
|
30
|
+
/** A temporary refusal because the model provider has no capacity. */
|
|
31
|
+
export declare class ProviderCapacityFailure extends ProviderCapacityFailure_base {
|
|
32
|
+
}
|
|
27
33
|
declare const AgentFailure_base: Schema.Class<AgentFailure, Schema.TaggedStruct<"AgentFailure", {
|
|
28
34
|
readonly message: Schema.String;
|
|
29
35
|
}>, import("effect/Cause").YieldableError>;
|
|
@@ -65,9 +71,9 @@ declare const ChildSessionBudgetFailure_base: Schema.Class<ChildSessionBudgetFai
|
|
|
65
71
|
/** A parent request for more child sessions than `maxChildren`; not retried automatically. */
|
|
66
72
|
export declare class ChildSessionBudgetFailure extends ChildSessionBudgetFailure_base {
|
|
67
73
|
}
|
|
68
|
-
export declare const AttemptFailure: Schema.Union<readonly [typeof GitHubPushFailure, typeof InfraFailure, typeof DefectFailure, typeof AgentFailure, typeof BlockedFailure, typeof QuestionFailure, typeof RunawayFailure, typeof ChildSessionBudgetFailure]>;
|
|
74
|
+
export declare const AttemptFailure: Schema.Union<readonly [typeof GitHubPushFailure, typeof InfraFailure, typeof ProviderCapacityFailure, typeof DefectFailure, typeof AgentFailure, typeof BlockedFailure, typeof QuestionFailure, typeof RunawayFailure, typeof ChildSessionBudgetFailure]>;
|
|
69
75
|
export type AttemptFailure = typeof AttemptFailure.Type;
|
|
70
|
-
/** Returns whether
|
|
71
|
-
export declare const isAutoRetryableFailure: <I>(input: I) => input is I & InfraFailure;
|
|
76
|
+
/** Returns whether infrastructure or provider capacity permits an automatic retry; the attempt cap also applies. */
|
|
77
|
+
export declare const isAutoRetryableFailure: <I>(input: I) => input is I & (InfraFailure | ProviderCapacityFailure);
|
|
72
78
|
export {};
|
|
73
79
|
//# sourceMappingURL=failure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failure.d.ts","sourceRoot":"","sources":["../../src/attempt/failure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;AAIhC,2FAA2F;AAC3F,qBAAa,iBAAkB,SAAQ,sBAMrC;CAAG;;;;;AAEL;;;GAGG;AACH,qBAAa,YAAa,SAAQ,iBAMjC;CAAG;;;;;AAEJ,+FAA+F;AAC/F,qBAAa,aAAc,SAAQ,kBAEmC;CAAG;;;;AAEzE,uEAAuE;AACvE,qBAAa,YAAa,SAAQ,iBAKjC;CAAG;;;;AAEJ;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,mBAIlC;CAAG;;;;AAEL;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,oBAInC;CAAG;AAEL,iDAAiD;AACjD,eAAO,MAAM,cAAc,oDAA4C,CAAC;AACxE,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;;;;AAExD,8GAA8G;AAC9G,qBAAa,cAAe,SAAQ,mBAIlC;CAAG;;;;;AAEL,8FAA8F;AAC9F,qBAAa,yBAA0B,SAAQ,8BAK7C;CAAG;AAEL,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"failure.d.ts","sourceRoot":"","sources":["../../src/attempt/failure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;AAIhC,2FAA2F;AAC3F,qBAAa,iBAAkB,SAAQ,sBAMrC;CAAG;;;;;AAEL;;;GAGG;AACH,qBAAa,YAAa,SAAQ,iBAMjC;CAAG;;;;;AAEJ,+FAA+F;AAC/F,qBAAa,aAAc,SAAQ,kBAEmC;CAAG;;;;AAEzE,sEAAsE;AACtE,qBAAa,uBAAwB,SAAQ,4BAEmB;CAAG;;;;AAEnE,uEAAuE;AACvE,qBAAa,YAAa,SAAQ,iBAKjC;CAAG;;;;AAEJ;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,mBAIlC;CAAG;;;;AAEL;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,oBAInC;CAAG;AAEL,iDAAiD;AACjD,eAAO,MAAM,cAAc,oDAA4C,CAAC;AACxE,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;;;;AAExD,8GAA8G;AAC9G,qBAAa,cAAe,SAAQ,mBAIlC;CAAG;;;;;AAEL,8FAA8F;AAC9F,qBAAa,yBAA0B,SAAQ,8BAK7C;CAAG;AAEL,eAAO,MAAM,cAAc,2PAUzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAExD,oHAAoH;AACpH,eAAO,MAAM,sBAAsB,wEAElC,CAAC"}
|
package/dist/attempt/failure.js
CHANGED
|
@@ -10,7 +10,7 @@ export class GitHubPushFailure extends Schema.TaggedError("AttemptFailure/GitHub
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* An infrastructure failure outside the agent, such as an unreachable Worker or failed checkout.
|
|
13
|
-
*
|
|
13
|
+
* The engine retries it automatically, up to the attempt cap.
|
|
14
14
|
*/
|
|
15
15
|
export class InfraFailure extends Schema.TaggedError("AttemptFailure/InfraFailure")("InfraFailure", {
|
|
16
16
|
message: Schema.String,
|
|
@@ -20,6 +20,9 @@ export class InfraFailure extends Schema.TaggedError("AttemptFailure/InfraFailur
|
|
|
20
20
|
/** A programmer defect caught at the durable execution boundary; not retried automatically. */
|
|
21
21
|
export class DefectFailure extends Schema.TaggedError("AttemptFailure/DefectFailure")("DefectFailure", { message: Schema.String, cause: Schema.Defect() }) {
|
|
22
22
|
}
|
|
23
|
+
/** A temporary refusal because the model provider has no capacity. */
|
|
24
|
+
export class ProviderCapacityFailure extends Schema.TaggedError("AttemptFailure/ProviderCapacityFailure")("ProviderCapacityFailure", { message: Schema.NonEmptyString }) {
|
|
25
|
+
}
|
|
23
26
|
/** A task failure reported by the agent; not retried automatically. */
|
|
24
27
|
export class AgentFailure extends Schema.TaggedError("AttemptFailure/AgentFailure")("AgentFailure", {
|
|
25
28
|
message: Schema.String,
|
|
@@ -58,6 +61,7 @@ export class ChildSessionBudgetFailure extends Schema.TaggedError("AttemptFailur
|
|
|
58
61
|
export const AttemptFailure = Schema.Union([
|
|
59
62
|
GitHubPushFailure,
|
|
60
63
|
InfraFailure,
|
|
64
|
+
ProviderCapacityFailure,
|
|
61
65
|
DefectFailure,
|
|
62
66
|
AgentFailure,
|
|
63
67
|
BlockedFailure,
|
|
@@ -65,6 +69,6 @@ export const AttemptFailure = Schema.Union([
|
|
|
65
69
|
RunawayFailure,
|
|
66
70
|
ChildSessionBudgetFailure,
|
|
67
71
|
]);
|
|
68
|
-
/** Returns whether
|
|
69
|
-
export const isAutoRetryableFailure = Schema.is(InfraFailure);
|
|
72
|
+
/** Returns whether infrastructure or provider capacity permits an automatic retry; the attempt cap also applies. */
|
|
73
|
+
export const isAutoRetryableFailure = Schema.is(Schema.Union([InfraFailure, ProviderCapacityFailure]));
|
|
70
74
|
//# sourceMappingURL=failure.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failure.js","sourceRoot":"","sources":["../../src/attempt/failure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,cA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EAAE,iBAAiB;CACrC,CAAC;CAAG;AAEL,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC;IACzC,iBAAiB;IACjB,YAAY;IACZ,uBAAuB;IACvB,aAAa;IACb,YAAY;IACZ,cAAc;IACd,eAAe;IACf,cAAc;IACd,yBAAyB;CAC1B,CAAC,CAAC;AAGH,oHAAoH;AACpH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,EAAE,CAC7C,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAC,CACtD,CAAC"}
|
|
@@ -4,7 +4,7 @@ declare const AttemptSucceeded_base: Schema.Class<AttemptSucceeded, Schema.Tagge
|
|
|
4
4
|
export declare class AttemptSucceeded extends AttemptSucceeded_base {
|
|
5
5
|
}
|
|
6
6
|
declare const AttemptFailed_base: Schema.Class<AttemptFailed, Schema.TaggedStruct<"Failed", {
|
|
7
|
-
readonly failure: Schema.Union<readonly [typeof import("./failure.ts").GitHubPushFailure, typeof import("./failure.ts").InfraFailure, typeof import("./failure.ts").DefectFailure, typeof import("./failure.ts").AgentFailure, typeof import("./failure.ts").BlockedFailure, typeof import("./failure.ts").QuestionFailure, typeof import("./failure.ts").RunawayFailure, typeof import("./failure.ts").ChildSessionBudgetFailure]>;
|
|
7
|
+
readonly failure: Schema.Union<readonly [typeof import("./failure.ts").GitHubPushFailure, typeof import("./failure.ts").InfraFailure, typeof import("./failure.ts").ProviderCapacityFailure, typeof import("./failure.ts").DefectFailure, typeof import("./failure.ts").AgentFailure, typeof import("./failure.ts").BlockedFailure, typeof import("./failure.ts").QuestionFailure, typeof import("./failure.ts").RunawayFailure, typeof import("./failure.ts").ChildSessionBudgetFailure]>;
|
|
8
8
|
}>, {}>;
|
|
9
9
|
export declare class AttemptFailed extends AttemptFailed_base {
|
|
10
10
|
}
|
package/dist/attempt/start.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ declare const StartedByInfraRetry_base: Schema.Class<StartedByInfraRetry, Schema
|
|
|
22
22
|
/** An automatic retry after the previous Attempt's `InfraFailure` (ADR 0002). */
|
|
23
23
|
export declare class StartedByInfraRetry extends StartedByInfraRetry_base {
|
|
24
24
|
}
|
|
25
|
+
declare const StartedByProviderRetry_base: Schema.Class<StartedByProviderRetry, Schema.TaggedStruct<"ProviderRetry", {}>, {}>;
|
|
26
|
+
/** An automatic retry after a provider capacity refusal and its backoff. */
|
|
27
|
+
export declare class StartedByProviderRetry extends StartedByProviderRetry_base {
|
|
28
|
+
}
|
|
25
29
|
declare const StartedAfterRestart_base: Schema.Class<StartedAfterRestart, Schema.TaggedStruct<"AfterRestart", {}>, {}>;
|
|
26
30
|
/** A start after an orchestrator restart interrupted the previous Attempt without a reattach. */
|
|
27
31
|
export declare class StartedAfterRestart extends StartedAfterRestart_base {
|
|
@@ -29,7 +33,7 @@ export declare class StartedAfterRestart extends StartedAfterRestart_base {
|
|
|
29
33
|
export declare const OperatorRetryStart: Schema.Union<readonly [typeof StartedByRetry, typeof StartedByEditAndRetry]>;
|
|
30
34
|
export type OperatorRetryStart = typeof OperatorRetryStart.Type;
|
|
31
35
|
/** The reason an Attempt started; a reattached Attempt keeps its original reason. */
|
|
32
|
-
export declare const AttemptStart: Schema.Union<readonly [typeof StartedByEvent, typeof StartedByRetry, typeof StartedByEditAndRetry, typeof StartedByInfraRetry, typeof StartedAfterRestart]>;
|
|
36
|
+
export declare const AttemptStart: Schema.Union<readonly [typeof StartedByEvent, typeof StartedByRetry, typeof StartedByEditAndRetry, typeof StartedByInfraRetry, typeof StartedByProviderRetry, typeof StartedAfterRestart]>;
|
|
33
37
|
export type AttemptStart = typeof AttemptStart.Type;
|
|
34
38
|
export {};
|
|
35
39
|
//# sourceMappingURL=start.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/attempt/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM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ry extends Schema.TaggedClass("AttemptStart/Edit
|
|
|
15
15
|
/** An automatic retry after the previous Attempt's `InfraFailure` (ADR 0002). */
|
|
16
16
|
export class StartedByInfraRetry extends Schema.TaggedClass("AttemptStart/InfraRetry")("InfraRetry", {}) {
|
|
17
17
|
}
|
|
18
|
+
/** An automatic retry after a provider capacity refusal and its backoff. */
|
|
19
|
+
export class StartedByProviderRetry extends Schema.TaggedClass("AttemptStart/ProviderRetry")("ProviderRetry", {}) {
|
|
20
|
+
}
|
|
18
21
|
/** A start after an orchestrator restart interrupted the previous Attempt without a reattach. */
|
|
19
22
|
export class StartedAfterRestart extends Schema.TaggedClass("AttemptStart/AfterRestart")("AfterRestart", {}) {
|
|
20
23
|
}
|
|
@@ -25,6 +28,7 @@ export const AttemptStart = Schema.Union([
|
|
|
25
28
|
StartedByRetry,
|
|
26
29
|
StartedByEditAndRetry,
|
|
27
30
|
StartedByInfraRetry,
|
|
31
|
+
StartedByProviderRetry,
|
|
28
32
|
StartedAfterRestart,
|
|
29
33
|
]);
|
|
30
34
|
//# sourceMappingURL=start.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/attempt/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,oEAAoE;AACpE,MAAM,OAAO,cAAe,SAAQ,MAAM,CAAC,WAAW,CAAiB,oBAAoB,CAAC,CAC1F,OAAO,EACP,EAAE,CACH;CAAG;AAEJ,wGAAwG;AACxG,MAAM,OAAO,cAAe,SAAQ,MAAM,CAAC,WAAW,CAAiB,oBAAoB,CAAC,CAC1F,eAAe,EACf,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,CACrD;CAAG;AAEJ;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,MAAM,CAAC,W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AQ,EAAE,MAAM,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC;CAAG;AAE1E,iFAAiF;AACjF,MAAM,OAAO,mBAAoB,SAAQ,MAAM,CAAC,WAAW,CACzD,yBAAyB,CAC1B,CAAC,YAAY,EAAE,EAAE,CAAC;CAAG;AAEtB,4EAA4E;AAC5E,MAAM,OAAO,sBAAuB,SAAQ,MAAM,CAAC,WAAW,CAC5D,4BAA4B,CAC7B,CAAC,eAAe,EAAE,EAAE,CAAC;CAAG;AAEzB,iGAAiG;AACjG,MAAM,OAAO,mBAAoB,SAAQ,MAAM,CAAC,WAAW,CACzD,2BAA2B,CAC5B,CAAC,cAAc,EAAE,EAAE,CAAC;CAAG;AAExB,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;AAGxF,qFAAqF;AACrF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC;IACvC,cAAc;IACd,cAAc;IACd,qBAAqB;IACrB,mBAAmB;IACnB,sBAAsB;IACtB,mBAAmB;CACpB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usine/core",
|
|
3
|
-
"version": "0.5.1-next.
|
|
3
|
+
"version": "0.5.1-next.273.g2ca5ae8",
|
|
4
4
|
"description": "Domain model for usine: Event → Run → Step → Attempt, branded ids, the run state machine, and the typed attempt-failure taxonomy.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|