- MCP
- blame on this site's /mcp
- CLI
- abso blame client/src/ci-answers.ts --version 28 --json
- JSON
- /christopher/abso-core/blame/client/src/ci-answers.ts?version=28&format=json
89 linesFirst import 99% · review 1%Last change review in version 28,
89 lines from 2 changes in 2 versions.
init0Start the project1// What the server answers about its checks (#39): CI's state, one version's job, and the merge queue.
3/** One publish waiting in the merge queue (#39). */
4export interface QueueItem {
5 readonly id: number;
6 readonly agent: string;
7 readonly message: string;
8 readonly time: number;
9 readonly changes: number;
10 /** In the batch being checked now. */
11 readonly checking: boolean;
12}
13/** The last round of the merge queue: what landed, what was pulled, or why nothing moved. */
14export type QueueRound =
15 | { readonly kind: "idle" }
16 | {
17 readonly kind: "landed";
18 readonly versions: readonly { readonly id: number; readonly version: number }[];
19 readonly checks: number;
20 }
21 | {
22 readonly kind: "pulled";
23 readonly versions: readonly { readonly id: number; readonly version: number }[];
24 readonly pulled: readonly number[];
25 readonly output?: string;
26 readonly checks: number;
27 }
28 | { readonly kind: "held"; readonly checks: number; readonly output?: string }
29 | { readonly kind: "paused"; readonly reason: string; readonly checks: number };
30/** The merge queue now (#39): `GET /queue`, and status's `queue` while anything waits or it's paused. */
31export interface QueueState {
32 readonly items: readonly QueueItem[];
33 /** A round is running. */
34 readonly checking: boolean;
35 /** The box failed twice: nothing moves until the next try (ISO times). */
36 readonly paused: { readonly reason: string; readonly since: string; readonly nextTry: string } | null;
37 readonly last: (QueueRound & { readonly at: string }) | null;
38}
39/** CI's state for the project (#39): status's `ci`, and `GET /ci` without a version. */
40export interface CiStatus {
41 /** The newest version whose own job passed with a build, and its /latest link. */
42 readonly latest: { readonly version: number; readonly url?: string } | null;
43 readonly checked: { readonly version: number; readonly result: CiResult } | null;
44 readonly running: {
45 readonly version: number /** ISO time. */;
46 readonly since: string;
47 readonly bisect?: boolean;
48 } | null;
49 /** Set while shared fails: the first failing version (agent and message null while bisecting, or when it never passed). */
50 readonly red: {
51 readonly version: number;
52 readonly agent: string | null;
53 readonly message: string | null;
54 readonly lastGood: number | null;
55 readonly bisecting?: boolean;
56 } | null;
57 /** How many versions shared is ahead of `latest`. */
58 readonly behind: number | null;
59 readonly waiting?: { readonly reason: string /** ISO time. */; readonly until: string };
60 /** The newest job didn't run (nothing to run, the box failed twice): versions from..version weren't checked and aren't queued. */
61 readonly skipped?: {
62 readonly version: number;
63 readonly from: number;
64 readonly reason: string /** ISO time. */;
65 readonly at: string;
66 } | null;
67}
68/** A job's result; `none` when it never ran (a box failure twice, or nothing to run). */
69export type CiResult = "pass" | "fail" | "none";
70/** A shared version's mark in the log. */
71export type CiMark = "pass" | "fail" | "running" | "waiting" | "not checked";
72/** One version's job (#39): `GET /ci?version=N`. A version without its own job has only a result. */
73export interface CiJob {
74 readonly version: number;
75 readonly result: CiResult | "running" | "waiting" | "not checked";
review28Client: abso.json is the project file (avcs.json still read; a new project gets abso.json unless it has either); new folders get .abso when no installed mod is older than 0.2.0; both mods are 0.2.0 (abso 253, 224)Compare76 /** The failing step: setup, build, check, abso.json or box. */
78 readonly exit?: number | null;
79 readonly seconds?: number;
80 readonly cold?: boolean;
81 /** The oldest version the job stood in for. */
82 readonly from?: number;
83 readonly bisect?: boolean;
84 readonly built?: boolean;
85 /** The job's last 4 KB. */
86 readonly output?: string;
87 /** ISO time. */
88 readonly at?: string;
89}