@usine/core 0.5.1-next.261.g9ea42f2 → 0.5.1-next.262.g0f4d653

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 CHANGED
@@ -14,7 +14,7 @@ Domain model for [usine](https://github.com/basaltbytes/usine): event, run, step
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
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` |
16
16
  | `@usine/core/attempt/outcome` | `AttemptSucceeded`, `AttemptFailed`, `AttemptCanceled`, `AttemptOutcome` |
17
- | `@usine/core/attempt/failure` | `InfraFailure`, `DefectFailure`, `AgentFailure`, `RunawayFailure`, `ChildSessionBudgetFailure`, `AttemptFailure`, `isAutoRetryableFailure` |
17
+ | `@usine/core/attempt/failure` | `GitHubPushFailure`, `InfraFailure`, `DefectFailure`, `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
19
  | `@usine/core/attempt/start` | Why an attempt started: `StartedByEvent`, `StartedByRetry`, `StartedByEditAndRetry` (with the operator login), `StartedByInfraRetry`, `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`). |
@@ -41,6 +41,8 @@ Each attempt records its child `BrainSpec`, its effective Pi parent model, why i
41
41
 
42
42
  Only infra failures 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
+ `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
+
44
46
  `Attempt.failureResolution` records when an operator marked its failure resolved and the configured operator login, if any. It stays with that attempt across later retries. Older resolutions without a recorded time have `None`.
45
47
 
46
48
  ## Attempt windows
@@ -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").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").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
  }
@@ -1,4 +1,12 @@
1
1
  import { Schema } from "effect";
2
+ declare const GitHubPushFailure_base: Schema.Class<GitHubPushFailure, Schema.TaggedStruct<"GitHubPushFailure", {
3
+ readonly repository: Schema.brand<Schema.String, "RepositoryName">;
4
+ readonly ref: Schema.NonEmptyString;
5
+ readonly message: Schema.String;
6
+ }>, import("effect/Cause").YieldableError>;
7
+ /** A push refused with HTTP 403 for the attempt's single-repository installation token. */
8
+ export declare class GitHubPushFailure extends GitHubPushFailure_base {
9
+ }
2
10
  declare const InfraFailure_base: Schema.Class<InfraFailure, Schema.TaggedStruct<"InfraFailure", {
3
11
  readonly message: Schema.String;
4
12
  readonly cause: Schema.Defect;
@@ -57,7 +65,7 @@ declare const ChildSessionBudgetFailure_base: Schema.Class<ChildSessionBudgetFai
57
65
  /** A parent request for more child sessions than `maxChildren`; not retried automatically. */
58
66
  export declare class ChildSessionBudgetFailure extends ChildSessionBudgetFailure_base {
59
67
  }
60
- export declare const AttemptFailure: Schema.Union<readonly [typeof InfraFailure, typeof DefectFailure, typeof AgentFailure, typeof BlockedFailure, typeof QuestionFailure, typeof RunawayFailure, typeof ChildSessionBudgetFailure]>;
68
+ export declare const AttemptFailure: Schema.Union<readonly [typeof GitHubPushFailure, typeof InfraFailure, typeof DefectFailure, typeof AgentFailure, typeof BlockedFailure, typeof QuestionFailure, typeof RunawayFailure, typeof ChildSessionBudgetFailure]>;
61
69
  export type AttemptFailure = typeof AttemptFailure.Type;
62
70
  /** Returns whether the failure is an `InfraFailure`; `shouldAutoRetry` also applies the attempt cap. */
63
71
  export declare const isAutoRetryableFailure: <I>(input: I) => input is I & InfraFailure;
@@ -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;;;;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ACxE,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,2NASzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAExD,wGAAwG;AACxG,eAAO,MAAM,sBAAsB,4CAA0B,CAAC"}
@@ -1,5 +1,13 @@
1
1
  import { Schema } from "effect";
2
2
  import { ChildSessionBudget, ChildSessionCount } from "../agent/session.js";
3
+ import { RepositoryName } from "../repository.js";
4
+ /** A push refused with HTTP 403 for the attempt's single-repository installation token. */
5
+ export class GitHubPushFailure extends Schema.TaggedError("AttemptFailure/GitHubPushFailure")("GitHubPushFailure", {
6
+ repository: RepositoryName,
7
+ ref: Schema.NonEmptyString,
8
+ message: Schema.String,
9
+ }) {
10
+ }
3
11
  /**
4
12
  * An infrastructure failure outside the agent, such as an unreachable Worker or failed checkout.
5
13
  * It's the only failure the engine retries automatically, up to the attempt cap.
@@ -48,6 +56,7 @@ export class ChildSessionBudgetFailure extends Schema.TaggedError("AttemptFailur
48
56
  }) {
49
57
  }
50
58
  export const AttemptFailure = Schema.Union([
59
+ GitHubPushFailure,
51
60
  InfraFailure,
52
61
  DefectFailure,
53
62
  AgentFailure,
@@ -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;AAE5E;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,WAAW,CAAe,6BAA6B,CAAC,CAC/F,cAAc,EACd;IACE,OAAO,EAAE,MAAM,CAAC,MA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CAAG;AAEJ;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,MAAM,CAAC,WAAW,CACpD,+BAA+B,CAChC,CAAC,gBAAgB,EAAE;IAClB,OAAO,EAAE,MAAM,CAAC,cAAc;CAC/B,CAAC;CAAG;AAEL;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,WAAW,CACrD,gCAAgC,CACjC,CAAC,iBAAiB,EAAE;IACnB,QAAQ,EAAE,MAAM,CAAC,cAAc;CAChC,CAAC;CAAG;AAEL,iDAAiD;AACjD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGxE,8GAA8G;AAC9G,MAAM,OAAO,cAAe,SAAQ,MAAM,CAAC,WAAW,CACpD,+BAA+B,CAChC,CAAC,gBAAgB,EAAE;IAClB,OAAO,EAAE,cAAc;CACxB,CAAC;CAAG;AAEL,8FAA8F;AAC9F,MAAM,OAAO,yBAA0B,SAAQ,MAAM,CAAC,WAAW,CAC/D,0CAA0C,CAC3C,CAAC,2BAA2B,EAAE;IAC7B,WAAW,EAAE,kBAAkB;IAC/B,iBAAiB,EAAE,iBAAiB;CACrC,CAAC;CAAG;AAEL,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC;IACzC,iBAAiB;IACjB,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,cAAc;IACd,eAAe;IACf,cAAc;IACd,yBAAyB;CAC1B,CAAC,CAAC;AAGH,wGAAwG;AACxG,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,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").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").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
  }
@@ -1,4 +1,5 @@
1
- import { type Effect, type Option, Schema } from "effect";
1
+ import { Effect, Option, Schema } from "effect";
2
+ import { GitHubPushFailure } from "./failure.ts";
2
3
  import type { LoopPermissions } from "../loop.ts";
3
4
  import { type RepositoryName } from "../repository.ts";
4
5
  import type { RunId } from "../run/run.ts";
@@ -33,6 +34,8 @@ declare const SalvageRetained_base: Schema.Class<SalvageRetained, Schema.TaggedS
33
34
  readonly path: Schema.NonEmptyString;
34
35
  readonly commit: Schema.OptionFromNullOr<Schema.brand<Schema.String, "CommitSha">>;
35
36
  readonly message: Schema.String;
37
+ /** A push refusal that also fails the attempt; absent on older salvage records. */
38
+ readonly pushFailure: Schema.withConstructorDefault<Schema.withDecodingDefaultKey<Schema.OptionFromNullOr<typeof GitHubPushFailure>, never>>;
36
39
  }>, {}>;
37
40
  /** A failed salvage that left the workspace at `path` on the Worker. `commit` is `None` if inspection failed. */
38
41
  export declare class SalvageRetained extends SalvageRetained_base {
@@ -1 +1 @@
1
- {"version":3,"file":"salvage.d.ts","sourceRoot":"","sources":["../../src/attempt/salvage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,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,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAChF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;CACpD"}
@@ -1,4 +1,5 @@
1
- import { Schema } from "effect";
1
+ import { Effect, Option, Schema } from "effect";
2
+ import { GitHubPushFailure } from "./failure.js";
2
3
  import { CommitSha, safeSegment } from "../repository.js";
3
4
  /** The remote branch `usine/salvage/<run>/<attempt>` with an Attempt's unfinished work. */
4
5
  export const SalvageRef = Schema.NonEmptyString.pipe(Schema.brand("SalvageRef"));
@@ -26,6 +27,8 @@ export class SalvageRetained extends Schema.TaggedClass("AttemptSalvage/Retained
26
27
  path: Schema.NonEmptyString,
27
28
  commit: Schema.OptionFromNullOr(CommitSha),
28
29
  message: Schema.String,
30
+ /** A push refusal that also fails the attempt; absent on older salvage records. */
31
+ pushFailure: Schema.OptionFromNullOr(GitHubPushFailure).pipe(Schema.withDecodingDefaultKey(Effect.succeed(null)), Schema.withConstructorDefault(Effect.succeed(Option.none()))),
29
32
  }) {
30
33
  }
31
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"salvage.js","sourceRoot":"","sources":["../../src/attempt/salvage.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAuB,MAAM,kBAAkB,CAAC;AAM/E,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AAGjF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAY,EAAE,MAAqB,EAAc,EAAE,CAC/E,UAAU,CAAC,IAAI,CAAC,iBAAiB,WAAW,CAAC,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC;AAEnE,kFAAkF;AAClF,MAAM,OAAO,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AChF;CACF,CACF;CAAG;AAEJ;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,WAAW,CAAkB,yBAAyB,CAAC,CACjG,UAAU,EACV;IACE,IAAI,EAAE,MAAM,CAAC,cAAc;IAC3B,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM;CACvB,CACF;CAAG;AAEJ,0EAA0E;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC;IACzC,aAAa;IACb,mBAAmB;IACnB,eAAe;IACf,eAAe;CAChB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usine/core",
3
- "version": "0.5.1-next.261.g9ea42f2",
3
+ "version": "0.5.1-next.262.g0f4d653",
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": {