@looply/core 0.5.39 → 0.5.48

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.
Files changed (48) hide show
  1. package/dist/canary.d.ts +180 -0
  2. package/dist/canary.d.ts.map +1 -0
  3. package/dist/canary.js +281 -0
  4. package/dist/canary.js.map +1 -0
  5. package/dist/environment.d.ts.map +1 -1
  6. package/dist/environment.js +10 -5
  7. package/dist/environment.js.map +1 -1
  8. package/dist/feature-settings.d.ts +49 -1
  9. package/dist/feature-settings.d.ts.map +1 -1
  10. package/dist/feature-settings.js +51 -7
  11. package/dist/feature-settings.js.map +1 -1
  12. package/dist/goal-parts.d.ts +62 -0
  13. package/dist/goal-parts.d.ts.map +1 -0
  14. package/dist/goal-parts.js +139 -0
  15. package/dist/goal-parts.js.map +1 -0
  16. package/dist/goal.d.ts +6 -1
  17. package/dist/goal.d.ts.map +1 -1
  18. package/dist/goal.js +1 -0
  19. package/dist/goal.js.map +1 -1
  20. package/dist/index.d.ts +4 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +4 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/provider-accounts.d.ts +11 -1
  25. package/dist/provider-accounts.d.ts.map +1 -1
  26. package/dist/provider-accounts.js +24 -4
  27. package/dist/provider-accounts.js.map +1 -1
  28. package/dist/pursuit-end.d.ts +1 -1
  29. package/dist/pursuit-end.d.ts.map +1 -1
  30. package/dist/pursuit-end.js +5 -0
  31. package/dist/pursuit-end.js.map +1 -1
  32. package/dist/release-version.d.ts +31 -0
  33. package/dist/release-version.d.ts.map +1 -0
  34. package/dist/release-version.js +53 -0
  35. package/dist/release-version.js.map +1 -0
  36. package/dist/schedule.d.ts +8 -0
  37. package/dist/schedule.d.ts.map +1 -1
  38. package/dist/schedule.js +7 -2
  39. package/dist/schedule.js.map +1 -1
  40. package/dist/stall.d.ts +23 -0
  41. package/dist/stall.d.ts.map +1 -1
  42. package/dist/stall.js +25 -0
  43. package/dist/stall.js.map +1 -1
  44. package/dist/watchdog.d.ts +73 -0
  45. package/dist/watchdog.d.ts.map +1 -0
  46. package/dist/watchdog.js +102 -0
  47. package/dist/watchdog.js.map +1 -0
  48. package/package.json +1 -1
@@ -0,0 +1,180 @@
1
+ /**
2
+ * THE PIPELINE CANARY: LOOPLY PROVES ITS OWN PIPELINE BEFORE A REAL TICKET DOES.
3
+ *
4
+ * ─────────────────────────────────────────────────────────────────────────────
5
+ * 🔴 WHAT THIS EXISTS FOR (0.5.43, 2026-10-23). Goals were met and never delivered, and the first
6
+ * to find out was a real ticket — hours later, through a person reading logs. Every stage of the
7
+ * pipeline had unit tests; none of them was the pipeline.
8
+ *
9
+ * So once a day per PC, and once after every Looply version change, a tiny synthetic goal runs the
10
+ * WHOLE path on a throwaway repository (`looply-canary`): the server makes the goal and its grant,
11
+ * the daemon plans it, runs a round, runs the gates, judges the goal, delivers it (pull request,
12
+ * then merge per the repository's mode), and — when the repository has an environment — sees the
13
+ * deploy. The expected result is known in advance (one line in `CANARY.md`), so "passed" is a
14
+ * fact read from the delivered commit, not a model's word. Each stage's outcome goes into the
15
+ * feature report AutoRyn reads, and AutoRyn alerts once, naming the stage, when one fails.
16
+ *
17
+ * Cheap by construction: the smallest model at the lowest effort (the repository's own
18
+ * config.yaml), one one-line change, one gate that is a ten-line script, at most two Starts.
19
+ * Never a real project: the server refuses unless the project's repository is named
20
+ * `looply-canary…`, and the PC refuses unless its checkout carries the canary marker.
21
+ *
22
+ * Pure: names, the goal's words, the stage judgement and the lenient reader both sides use.
23
+ * ─────────────────────────────────────────────────────────────────────────────
24
+ */
25
+ /** The stages, in the order the pipeline reaches them. */
26
+ export declare const CANARY_STAGES: readonly ["start", "plan", "round", "gates", "goal_check", "delivery", "result", "deploy", "cleanup"];
27
+ export type CanaryStage = (typeof CANARY_STAGES)[number];
28
+ /** What each stage proves, for a person reading the card. */
29
+ export declare const CANARY_STAGE_SAID: Readonly<Record<CanaryStage, string>>;
30
+ export declare const CANARY_STAGE_STATES: readonly ["passed", "failed", "pending", "skipped"];
31
+ export type CanaryStageState = (typeof CANARY_STAGE_STATES)[number];
32
+ export declare const CANARY_STATES: readonly ["running", "passed", "failed"];
33
+ export type CanaryState = (typeof CANARY_STATES)[number];
34
+ /** Why a run started: the day's run, or the first run on a new Looply version. */
35
+ export declare const CANARY_TRIGGERS: readonly ["daily", "version"];
36
+ export type CanaryTrigger = (typeof CANARY_TRIGGERS)[number];
37
+ export interface CanaryStageResult {
38
+ readonly stage: CanaryStage;
39
+ readonly state: CanaryStageState;
40
+ /** One sentence: what was seen. */
41
+ readonly detail: string | null;
42
+ /** ISO. When the stage was last judged to have passed or failed. */
43
+ readonly at: string | null;
44
+ }
45
+ /** One canary run, as the card shows it. */
46
+ export interface CanaryReport {
47
+ readonly runId: string;
48
+ readonly state: CanaryState;
49
+ readonly trigger: CanaryTrigger;
50
+ readonly looplyVersion: string;
51
+ /** ISO. */
52
+ readonly startedAt: string;
53
+ /** ISO, once it passed or failed. */
54
+ readonly endedAt: string | null;
55
+ readonly goalId: string | null;
56
+ readonly stages: readonly CanaryStageResult[];
57
+ /** The first stage that failed, when it failed. */
58
+ readonly failedStage: CanaryStage | null;
59
+ /** The one line a person reads: passed, or which stage failed and why. */
60
+ readonly said: string;
61
+ /** ISO. When a run last passed on this PC (this one or an earlier one), or null. */
62
+ readonly lastPassedAt: string | null;
63
+ }
64
+ /** The repository a canary runs on is named this, or this followed by `-<something>`. */
65
+ export declare const CANARY_REPO_NAME: RegExp;
66
+ /** The file the canary goal changes, at the repository's root. */
67
+ export declare const CANARY_FILE = "CANARY.md";
68
+ /** The first line of `CANARY.md` in a canary repository: the PC's marker that this checkout is one. */
69
+ export declare const CANARY_MARKER = "# Looply canary";
70
+ /** A run that has not passed or failed after this long has failed at the stage it was waiting on. */
71
+ export declare const CANARY_DEADLINE_MS: number;
72
+ /** The day's run. */
73
+ export declare const CANARY_EVERY_MS: number;
74
+ /** Starts a canary grant gets: one try and one retry, never the eight a ticket gets. */
75
+ export declare const CANARY_MAX_STARTS = 2;
76
+ /** Canary goals one project may be given in a day, whatever the machine asks (a daily run, a few versions). */
77
+ export declare const CANARY_PER_DAY = 4;
78
+ /** The line the canary goal must write, and nothing else. */
79
+ export declare function canaryLine(runId: string): string;
80
+ /**
81
+ * The goal's words. Written by the SERVER from the run id alone, so a machine can ask for a canary
82
+ * but never choose what the canary goal does.
83
+ */
84
+ export declare function canaryGoalText(runId: string): string;
85
+ /** The run id a canary goal's client reference stands for (both sides derive it the same way). */
86
+ export declare function canaryRunIdOf(clientRef: string): string;
87
+ /** Does this `CANARY.md` content carry exactly the expected change? */
88
+ export declare function canaryContentOk(content: string, runId: string): {
89
+ ok: true;
90
+ } | {
91
+ ok: false;
92
+ because: string;
93
+ };
94
+ /** The part of the server's goal evidence the canary reads (`GET …/goals/:goalId/evidence`). */
95
+ export interface CanaryEvidence {
96
+ goal: {
97
+ id: string;
98
+ version: number;
99
+ state: string;
100
+ };
101
+ versions: Array<{
102
+ goalVersion: number;
103
+ pursuits: Array<{
104
+ state: string;
105
+ reason: string | null;
106
+ endCode: string | null;
107
+ }>;
108
+ runs: Array<{
109
+ runId: string;
110
+ branch: string;
111
+ endedAt: string | null;
112
+ stopReason: string | null;
113
+ rounds: Array<{
114
+ outcome: string | null;
115
+ sha: string | null;
116
+ gate: {
117
+ verdict: string;
118
+ } | null;
119
+ }>;
120
+ }>;
121
+ }>;
122
+ branchDelivery: {
123
+ state: string;
124
+ branch: string;
125
+ base: string | null;
126
+ pullRequestUrl: string | null;
127
+ mode: string;
128
+ note: string | null;
129
+ mergeSha?: string | null;
130
+ environments?: Array<{
131
+ name: string;
132
+ state: string;
133
+ detail: string | null;
134
+ }>;
135
+ } | null;
136
+ hold: {
137
+ code?: string;
138
+ reason?: string;
139
+ } | null;
140
+ }
141
+ /** What the PC found itself, beside the evidence: the delivered file, and the clean-up. */
142
+ export interface CanaryLocalFacts {
143
+ /** The expected change, read from the delivered commit; null when not read yet. */
144
+ result: {
145
+ ok: true;
146
+ where: string;
147
+ } | {
148
+ ok: false;
149
+ because: string;
150
+ } | null;
151
+ /** The clean-up of the canary's branch / pull request; null when not done yet. */
152
+ cleanup: {
153
+ ok: true;
154
+ detail: string;
155
+ } | {
156
+ ok: false;
157
+ because: string;
158
+ } | null;
159
+ }
160
+ /**
161
+ * Each stage's state from what the server and the PC saw. Pure. A stage passes only when every
162
+ * stage before it passed; the first stage that cannot pass any more is `failed`, with why.
163
+ * `timedOut`: the run's deadline passed — the first stage still pending fails.
164
+ */
165
+ export declare function judgeCanary(input: {
166
+ evidence: CanaryEvidence | null;
167
+ local: CanaryLocalFacts;
168
+ now: string;
169
+ timedOut: boolean;
170
+ prior?: readonly CanaryStageResult[];
171
+ }): CanaryStageResult[];
172
+ /** The run's state from its stages: failed at the first failed stage, passed when nothing is pending. */
173
+ export declare function canaryOutcome(stages: readonly CanaryStageResult[]): {
174
+ state: CanaryState;
175
+ failedStage: CanaryStage | null;
176
+ said: string;
177
+ };
178
+ /** A report as a machine sent it, cleaned; null when it is not one. Never refuses the rest of a feature report. */
179
+ export declare function cleanCanaryReport(x: unknown): CanaryReport | null;
180
+ //# sourceMappingURL=canary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canary.d.ts","sourceRoot":"","sources":["../src/canary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,aAAa,uGAAwG,CAAC;AACnI,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,6DAA6D;AAC7D,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAUnE,CAAC;AAEF,eAAO,MAAM,mBAAmB,qDAAsD,CAAC;AACvF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CA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AAA;KAAE,GAAG;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAC/E;AAYD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,KAAK,EAAE,gBAAgB,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACtC,GAAG,iBAAiB,EAAE,CAwGtB;AAED,yGAAyG;AACzG,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,GAAG;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAQzI;AASD,mHAAmH;AACnH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CA6BjE"}
package/dist/canary.js ADDED
@@ -0,0 +1,281 @@
1
+ "use strict";
2
+ /**
3
+ * THE PIPELINE CANARY: LOOPLY PROVES ITS OWN PIPELINE BEFORE A REAL TICKET DOES.
4
+ *
5
+ * ─────────────────────────────────────────────────────────────────────────────
6
+ * 🔴 WHAT THIS EXISTS FOR (0.5.43, 2026-10-23). Goals were met and never delivered, and the first
7
+ * to find out was a real ticket — hours later, through a person reading logs. Every stage of the
8
+ * pipeline had unit tests; none of them was the pipeline.
9
+ *
10
+ * So once a day per PC, and once after every Looply version change, a tiny synthetic goal runs the
11
+ * WHOLE path on a throwaway repository (`looply-canary`): the server makes the goal and its grant,
12
+ * the daemon plans it, runs a round, runs the gates, judges the goal, delivers it (pull request,
13
+ * then merge per the repository's mode), and — when the repository has an environment — sees the
14
+ * deploy. The expected result is known in advance (one line in `CANARY.md`), so "passed" is a
15
+ * fact read from the delivered commit, not a model's word. Each stage's outcome goes into the
16
+ * feature report AutoRyn reads, and AutoRyn alerts once, naming the stage, when one fails.
17
+ *
18
+ * Cheap by construction: the smallest model at the lowest effort (the repository's own
19
+ * config.yaml), one one-line change, one gate that is a ten-line script, at most two Starts.
20
+ * Never a real project: the server refuses unless the project's repository is named
21
+ * `looply-canary…`, and the PC refuses unless its checkout carries the canary marker.
22
+ *
23
+ * Pure: names, the goal's words, the stage judgement and the lenient reader both sides use.
24
+ * ─────────────────────────────────────────────────────────────────────────────
25
+ */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.CANARY_PER_DAY = exports.CANARY_MAX_STARTS = exports.CANARY_EVERY_MS = exports.CANARY_DEADLINE_MS = exports.CANARY_MARKER = exports.CANARY_FILE = exports.CANARY_REPO_NAME = exports.CANARY_TRIGGERS = exports.CANARY_STATES = exports.CANARY_STAGE_STATES = exports.CANARY_STAGE_SAID = exports.CANARY_STAGES = void 0;
28
+ exports.canaryLine = canaryLine;
29
+ exports.canaryGoalText = canaryGoalText;
30
+ exports.canaryRunIdOf = canaryRunIdOf;
31
+ exports.canaryContentOk = canaryContentOk;
32
+ exports.judgeCanary = judgeCanary;
33
+ exports.canaryOutcome = canaryOutcome;
34
+ exports.cleanCanaryReport = cleanCanaryReport;
35
+ /** The stages, in the order the pipeline reaches them. */
36
+ exports.CANARY_STAGES = ['start', 'plan', 'round', 'gates', 'goal_check', 'delivery', 'result', 'deploy', 'cleanup'];
37
+ /** What each stage proves, for a person reading the card. */
38
+ exports.CANARY_STAGE_SAID = {
39
+ start: 'the server made the canary goal and its grant, and this PC took it',
40
+ plan: 'the goal was planned and a run started',
41
+ round: 'a round ran',
42
+ gates: "the canary's checks ran green",
43
+ goal_check: 'the goal check said the goal was met',
44
+ delivery: 'the change was delivered as the repository\'s mode says (pull request, merge)',
45
+ result: 'the delivered commit has exactly the expected change',
46
+ deploy: 'each environment shows the merged commit',
47
+ cleanup: "the canary's branch and pull request were cleaned up",
48
+ };
49
+ exports.CANARY_STAGE_STATES = ['passed', 'failed', 'pending', 'skipped'];
50
+ exports.CANARY_STATES = ['running', 'passed', 'failed'];
51
+ /** Why a run started: the day's run, or the first run on a new Looply version. */
52
+ exports.CANARY_TRIGGERS = ['daily', 'version'];
53
+ /** The repository a canary runs on is named this, or this followed by `-<something>`. */
54
+ exports.CANARY_REPO_NAME = /^looply-canary(?:-[a-z0-9][a-z0-9-]{0,40})?$/i;
55
+ /** The file the canary goal changes, at the repository's root. */
56
+ exports.CANARY_FILE = 'CANARY.md';
57
+ /** The first line of `CANARY.md` in a canary repository: the PC's marker that this checkout is one. */
58
+ exports.CANARY_MARKER = '# Looply canary';
59
+ /** A run that has not passed or failed after this long has failed at the stage it was waiting on. */
60
+ exports.CANARY_DEADLINE_MS = 4 * 60 * 60_000;
61
+ /** The day's run. */
62
+ exports.CANARY_EVERY_MS = 24 * 60 * 60_000;
63
+ /** Starts a canary grant gets: one try and one retry, never the eight a ticket gets. */
64
+ exports.CANARY_MAX_STARTS = 2;
65
+ /** Canary goals one project may be given in a day, whatever the machine asks (a daily run, a few versions). */
66
+ exports.CANARY_PER_DAY = 4;
67
+ const RUN_ID = /^[a-z0-9]{8,24}$/;
68
+ /** The line the canary goal must write, and nothing else. */
69
+ function canaryLine(runId) {
70
+ return `canary-run: ${runId}`;
71
+ }
72
+ /**
73
+ * The goal's words. Written by the SERVER from the run id alone, so a machine can ask for a canary
74
+ * but never choose what the canary goal does.
75
+ */
76
+ function canaryGoalText(runId) {
77
+ if (!RUN_ID.test(runId))
78
+ throw new Error('a canary run id is 8 to 24 lowercase letters and digits');
79
+ return [
80
+ `Looply pipeline canary ${runId}.`,
81
+ `In ${exports.CANARY_FILE} at the repository root, replace the line that starts with "canary-run:" with exactly this line: ${canaryLine(runId)}`,
82
+ `Keep the first line (${exports.CANARY_MARKER}) and every other line as they are. Change no other file.`,
83
+ `Done when ${exports.CANARY_FILE} contains the line "${canaryLine(runId)}" once and the repository's checks pass.`,
84
+ ].join('\n');
85
+ }
86
+ /** The run id a canary goal's client reference stands for (both sides derive it the same way). */
87
+ function canaryRunIdOf(clientRef) {
88
+ // FNV-1a, twice, with different seeds: 16 hex characters, stable everywhere, no crypto import (core is pure).
89
+ const h = (seed) => {
90
+ let x = seed >>> 0;
91
+ for (let i = 0; i < clientRef.length; i++) {
92
+ x ^= clientRef.charCodeAt(i);
93
+ x = Math.imul(x, 0x01000193) >>> 0;
94
+ }
95
+ return x.toString(16).padStart(8, '0');
96
+ };
97
+ return `${h(0x811c9dc5)}${h(0x2b992ddf)}`;
98
+ }
99
+ /** Does this `CANARY.md` content carry exactly the expected change? */
100
+ function canaryContentOk(content, runId) {
101
+ const lines = content.replace(/\r\n/g, '\n').split('\n');
102
+ if ((lines[0] ?? '').trim() !== exports.CANARY_MARKER)
103
+ return { ok: false, because: `the first line of ${exports.CANARY_FILE} is no longer "${exports.CANARY_MARKER}"` };
104
+ const runs = lines.filter((l) => l.trim().startsWith('canary-run:'));
105
+ if (runs.length !== 1)
106
+ return { ok: false, because: `${exports.CANARY_FILE} has ${runs.length} "canary-run:" lines; one was expected` };
107
+ if (runs[0].trim() !== canaryLine(runId))
108
+ return { ok: false, because: `${exports.CANARY_FILE} says "${runs[0].trim().slice(0, 80)}", not "${canaryLine(runId)}"` };
109
+ return { ok: true };
110
+ }
111
+ /** Pursuit states that end a grant without the goal met. */
112
+ const ENDED_UNMET = new Set(['human_required', 'budget_exhausted', 'cancelled', 'superseded', 'abandoned']);
113
+ /** Delivery states that mean it did not and will not get there without a person. */
114
+ const DELIVERY_FAILED = new Set(['checks-failed', 'not-pushed', 'blocked', 'deploy-failed']);
115
+ const one = (s, max = 300) => {
116
+ const t = s.replace(/\s+/g, ' ').trim();
117
+ return t.length > max ? `${t.slice(0, max - 1)}…` : t;
118
+ };
119
+ /**
120
+ * Each stage's state from what the server and the PC saw. Pure. A stage passes only when every
121
+ * stage before it passed; the first stage that cannot pass any more is `failed`, with why.
122
+ * `timedOut`: the run's deadline passed — the first stage still pending fails.
123
+ */
124
+ function judgeCanary(input) {
125
+ const ev = input.evidence;
126
+ const at = (stage) => input.prior?.find((p) => p.stage === stage && p.state !== 'pending')?.at ?? input.now;
127
+ const v = ev?.versions.find((x) => x.goalVersion === ev.goal.version) ?? ev?.versions[0] ?? null;
128
+ const pursuit = v?.pursuits[0] ?? null;
129
+ const runs = v?.runs ?? [];
130
+ const rounds = runs.flatMap((r) => r.rounds);
131
+ const ended = pursuit !== null && ENDED_UNMET.has(pursuit.state);
132
+ const why = pursuit === null ? '' : one(`${pursuit.state}${pursuit.endCode ? ` (${pursuit.endCode})` : ''}${pursuit.reason ? `: ${pursuit.reason}` : ''}`, 240);
133
+ const hold = ev?.hold ? one(`held${ev.hold.code ? ` (${ev.hold.code})` : ''}${ev.hold.reason ? `: ${ev.hold.reason}` : ''}`, 200) : null;
134
+ const bd = ev?.branchDelivery ?? null;
135
+ const mergeModes = new Set(['merge', 'test', 'deploy']);
136
+ const verdicts = {
137
+ start: () => (ev === null ? { state: 'pending', detail: 'waiting for the goal evidence' } : pursuit === null ? { state: 'pending', detail: 'no grant seen yet' } : { state: 'passed', detail: `goal ${ev.goal.id} with a grant` }),
138
+ plan: () => runs.length > 0
139
+ ? { state: 'passed', detail: `run ${runs[0].runId} started` }
140
+ : ended
141
+ ? { state: 'failed', detail: `no run started; the grant ended ${why}` }
142
+ : { state: 'pending', detail: hold ?? 'no run has started yet' },
143
+ round: () => rounds.some((r) => r.outcome !== null)
144
+ ? { state: 'passed', detail: `${rounds.length} round(s); the last ended ${rounds[rounds.length - 1].outcome ?? 'running'}` }
145
+ : ended || (runs.length > 0 && runs.every((r) => r.endedAt !== null))
146
+ ? { state: 'failed', detail: `no round ended; ${ended ? `the grant ended ${why}` : `the run stopped: ${runs[runs.length - 1].stopReason ?? 'no reason given'}`}` }
147
+ : { state: 'pending', detail: hold ?? 'the first round is running' },
148
+ gates: () => {
149
+ if (rounds.some((r) => r.gate?.verdict === 'green'))
150
+ return { state: 'passed', detail: 'a round\'s checks were green' };
151
+ const last = [...rounds].reverse().find((r) => r.gate !== null);
152
+ return ended
153
+ ? { state: 'failed', detail: `no round's checks went green${last ? ` (last: ${last.gate.verdict})` : ''}; the grant ended ${why}` }
154
+ : { state: 'pending', detail: last ? `the last checks were ${last.gate.verdict}; another round may fix it` : 'the checks have not run yet' };
155
+ },
156
+ goal_check: () => pursuit?.state === 'satisfied'
157
+ ? { state: 'passed', detail: `the goal was met${pursuit.endCode ? ` (${pursuit.endCode})` : ''}` }
158
+ : ended
159
+ ? { state: 'failed', detail: `the goal was not met: ${why}` }
160
+ : { state: 'pending', detail: 'the goal has not been judged met yet' },
161
+ delivery: () => {
162
+ if (bd === null)
163
+ return { state: 'pending', detail: 'nothing delivered yet' };
164
+ const wanted = mergeModes.has(bd.mode) ? 'merged' : bd.mode === 'pr' ? 'a pull request' : bd.mode;
165
+ if (bd.mode === 'off')
166
+ return { state: 'failed', detail: 'the canary repository\'s delivery is off, so nothing can be delivered: set deliver.mode in its .looply/config.yaml' };
167
+ if (DELIVERY_FAILED.has(bd.state))
168
+ return { state: 'failed', detail: one(`${bd.state}${bd.note ? `: ${bd.note}` : ''}`) };
169
+ const done = mergeModes.has(bd.mode) ? bd.state === 'merged' || bd.state === 'deployed' : bd.state !== 'pushed' && bd.pullRequestUrl !== null;
170
+ return done
171
+ ? { state: 'passed', detail: one(`${bd.state} (${bd.mode})${bd.pullRequestUrl ? `: ${bd.pullRequestUrl}` : ''}`) }
172
+ : { state: 'pending', detail: one(`${bd.state}; waiting until ${wanted}${bd.note ? ` — ${bd.note}` : ''}`) };
173
+ },
174
+ result: () => input.local.result === null
175
+ ? { state: 'pending', detail: 'the delivered commit has not been read yet' }
176
+ : input.local.result.ok
177
+ ? { state: 'passed', detail: `${exports.CANARY_FILE} has the expected line on ${input.local.result.where}` }
178
+ : { state: 'failed', detail: one(input.local.result.because) },
179
+ deploy: () => {
180
+ const envs = bd?.environments ?? [];
181
+ if (bd !== null && envs.length === 0)
182
+ return { state: 'skipped', detail: 'the canary repository has no environment to deploy' };
183
+ if (envs.some((e) => e.state === 'failed')) {
184
+ const f = envs.find((e) => e.state === 'failed');
185
+ return { state: 'failed', detail: one(`${f.name}: ${f.detail ?? 'failed'}`) };
186
+ }
187
+ if (envs.length > 0 && envs.every((e) => e.state === 'deployed'))
188
+ return { state: 'passed', detail: envs.map((e) => e.name).join(', ') + ' deployed' };
189
+ return { state: 'pending', detail: envs.length ? one(envs.map((e) => `${e.name}: ${e.state}`).join('; ')) : 'not delivered yet' };
190
+ },
191
+ cleanup: () => input.local.cleanup === null
192
+ ? { state: 'pending', detail: 'not cleaned up yet' }
193
+ : input.local.cleanup.ok
194
+ ? { state: 'passed', detail: one(input.local.cleanup.detail) }
195
+ : { state: 'failed', detail: one(input.local.cleanup.because) },
196
+ };
197
+ const out = [];
198
+ let blocked = null;
199
+ for (const stage of exports.CANARY_STAGES) {
200
+ if (blocked !== null) {
201
+ // Clean-up still runs after a failure (it is judged on its own).
202
+ if (stage === 'cleanup') {
203
+ const j = verdicts.cleanup();
204
+ out.push({ stage, state: j.state === 'pending' ? 'pending' : j.state, detail: j.detail, at: j.state === 'pending' ? null : at(stage) });
205
+ }
206
+ else
207
+ out.push({ stage, state: 'skipped', detail: `not reached: ${blocked} failed`, at: null });
208
+ continue;
209
+ }
210
+ let j = verdicts[stage]();
211
+ if (j.state === 'pending' && input.timedOut && stage !== 'cleanup') {
212
+ j = { state: 'failed', detail: one(`did not happen within ${Math.round(exports.CANARY_DEADLINE_MS / 3_600_000)} h — ${j.detail ?? ''}`) };
213
+ }
214
+ out.push({ stage, state: j.state, detail: j.detail, at: j.state === 'pending' ? null : at(stage) });
215
+ if (j.state === 'failed')
216
+ blocked = stage;
217
+ else if (j.state === 'pending') {
218
+ // Later stages are pending too (cleanup is judged by itself).
219
+ for (const rest of exports.CANARY_STAGES.slice(exports.CANARY_STAGES.indexOf(stage) + 1)) {
220
+ if (rest === 'cleanup') {
221
+ const c = verdicts.cleanup();
222
+ out.push({ stage: rest, state: c.state === 'failed' ? 'failed' : 'pending', detail: c.state === 'pending' ? null : c.detail, at: c.state === 'pending' ? null : at(rest) });
223
+ }
224
+ else
225
+ out.push({ stage: rest, state: 'pending', detail: null, at: null });
226
+ }
227
+ break;
228
+ }
229
+ }
230
+ return out;
231
+ }
232
+ /** The run's state from its stages: failed at the first failed stage, passed when nothing is pending. */
233
+ function canaryOutcome(stages) {
234
+ const failed = stages.find((s) => s.state === 'failed');
235
+ if (failed !== undefined) {
236
+ return { state: 'failed', failedStage: failed.stage, said: one(`the pipeline canary failed at "${failed.stage}" (${exports.CANARY_STAGE_SAID[failed.stage]} — did not happen): ${failed.detail ?? 'no detail'}`) };
237
+ }
238
+ const pending = stages.find((s) => s.state === 'pending');
239
+ if (pending !== undefined)
240
+ return { state: 'running', failedStage: null, said: one(`the pipeline canary is at "${pending.stage}"${pending.detail ? `: ${pending.detail}` : ''}`) };
241
+ return { state: 'passed', failedStage: null, said: 'the pipeline canary passed every stage' };
242
+ }
243
+ /* ───────────────────────────── the lenient reader ───────────────────────────── */
244
+ const isObj = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
245
+ const text = (v, max = 300) => (typeof v === 'string' && v.trim() !== '' ? one(v, max) : null);
246
+ const iso = (v) => (typeof v === 'string' && v.length <= 40 && !Number.isNaN(Date.parse(v)) ? v : null);
247
+ const of = (v, all) => (typeof v === 'string' && all.includes(v) ? v : null);
248
+ /** A report as a machine sent it, cleaned; null when it is not one. Never refuses the rest of a feature report. */
249
+ function cleanCanaryReport(x) {
250
+ if (!isObj(x))
251
+ return null;
252
+ const runId = typeof x['runId'] === 'string' && RUN_ID.test(x['runId']) ? x['runId'] : null;
253
+ const state = of(x['state'], exports.CANARY_STATES);
254
+ const trigger = of(x['trigger'], exports.CANARY_TRIGGERS) ?? 'daily';
255
+ const startedAt = iso(x['startedAt']);
256
+ if (runId === null || state === null || startedAt === null)
257
+ return null;
258
+ const stages = (Array.isArray(x['stages']) ? x['stages'] : [])
259
+ .filter(isObj)
260
+ .flatMap((s) => {
261
+ const stage = of(s['stage'], exports.CANARY_STAGES);
262
+ const st = of(s['state'], exports.CANARY_STAGE_STATES);
263
+ return stage === null || st === null ? [] : [{ stage, state: st, detail: text(s['detail']), at: iso(s['at']) }];
264
+ })
265
+ .slice(0, exports.CANARY_STAGES.length);
266
+ const goalId = typeof x['goalId'] === 'string' && /^gol_[A-Za-z0-9]{6,40}$/.test(x['goalId']) ? x['goalId'] : null;
267
+ return {
268
+ runId,
269
+ state,
270
+ trigger,
271
+ looplyVersion: text(x['looplyVersion'], 40) ?? 'unknown',
272
+ startedAt,
273
+ endedAt: iso(x['endedAt']),
274
+ goalId,
275
+ stages,
276
+ failedStage: of(x['failedStage'], exports.CANARY_STAGES),
277
+ said: text(x['said']) ?? '',
278
+ lastPassedAt: iso(x['lastPassedAt']),
279
+ };
280
+ }
281
+ //# sourceMappingURL=canary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canary.js","sourceRoot":"","sources":["../src/canary.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AA4EH,gCAEC;AAMD,wCAQC;AAGD,sCAWC;AAGD,0CAOC;AAgDD,kCA8GC;AAGD,sCAQC;AAUD,8CA6BC;AAlUD,0DAA0D;AAC7C,QAAA,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAGnI,6DAA6D;AAChD,QAAA,iBAAiB,GAA0C;IACtE,KAAK,EAAE,oEAAoE;IAC3E,IAAI,EAAE,wCAAwC;IAC9C,KAAK,EAAE,aAAa;IACpB,KAAK,EAAE,+BAA+B;IACtC,UAAU,EAAE,sCAAsC;IAClD,QAAQ,EAAE,+EAA+E;IACzF,MAAM,EAAE,sDAAsD;IAC9D,MAAM,EAAE,0CAA0C;IAClD,OAAO,EAA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,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAkBjH"}
@@ -64,17 +64,22 @@ function isEnvironmentCode(x) {
64
64
  */
65
65
  const SIGNATURES = [
66
66
  ['planner_timeout', /\b(compiler|planner|compilation|goal check|evaluator|evaluation|verify pass)\b[^.\n]{0,60}\btimed out\b|\btimed out\b[^.\n]{0,40}\b(compil|plan|evaluat)/i],
67
- ['provider_limit', /\b(usage limit|rate limit|rate-limited|429 Too Many Requests|limit will reset|overloaded_error)\b/i],
68
- ['provider_unavailable', /\b(claude code (is )?(not installed|not found|missing|outdated)|not (signed|logged) in|provider (is )?not ready|authentication_error|invalid api key)\b/i],
67
+ // `provider_no_account` (RBB-B-220, 2026-10-22): every account this work may use rests or is kept from it — a usage
68
+ // limit in all but name, and the hold waits on the accounts' standing (`environment-hold.ts`), not a fixed half hour.
69
+ ['provider_limit', /\b(usage limit|rate limit|rate-limited|429 Too Many Requests|limit will reset|overloaded_error|provider_no_account|no AI account on this machine)\b/i],
70
+ ['provider_unavailable', /\b(claude code (is )?(not installed|not found|missing|outdated)|not (signed|logged) in|provider (is )?not ready|authentication_error|invalid api key|provider_(unauthenticated|not_ready|not_installed|missing|outdated|unavailable)|no provider (runtime|executable))\b/i],
69
71
  ['config_missing', /\b(cannot|could not|can't|unable to) (read|find|open|load)\b[^.\n]{0,60}\bconfig(\.ya?ml)?\b|\bconfig\.ya?ml\b[^.\n]{0,40}\b(ENOENT|not found|missing|no such file)/i],
70
72
  ['disk_full', /\b(ENOSPC|no space left on device|not enough (free )?(disk )?space|disk is full|below the free[- ]space floor|minFreeGb)\b/i],
71
- ['sandbox_denied', /\b(EPERM|EACCES|operation not permitted|Access is denied|permission denied|AppContainer)\b/i],
73
+ ['sandbox_denied', /\b(EPERM|EACCES|operation not permitted|Access is denied|permission denied|AppContainer|untrusted execution was unavailable|the agent did not run: no contained toolchain)\b/i],
72
74
  ['tool_missing', /\b(spawn \S+ ENOENT|is not recognized as an internal or external command|command not found|dependencies could not be installed|exited (with code )?(9009|127)\b|No such file or directory[^.\n]{0,40}\b(node|npm|npx|git|pnpm|yarn)\b)/i],
73
75
  ['gate_crashed', /\bcould not run (its|their) gate\b|\bgate blocked: step\b|\bthe environment is unavailable, not the change\b/i],
74
- ['checkout_failed', /\b(could not (make|prepare|provision|create) (a |the )?(checkout|workspace|worktree)|provision(ing)? failed|worktree add failed)\b/i],
76
+ ['checkout_failed', /\b(could not (make|prepare|provision|create) (a |the )?(checkout|workspace|worktree)|provision(ing)? failed|worktree add failed|local changes to the following files would be overwritten)\b/i],
75
77
  // "the compiler failed" (LOO-B-4): the plan never came back, so nothing about the work was learned — weather, retried
76
78
  // after a short wait, never a spent Start. A cause the AI tool named (a usage limit, signed out) matches above first.
77
- ['spawn_failed', /\b(failed to spawn|spawn(ed)? failed|could not (start|launch) the run|never began|compiler failed|EBUSY|EMFILE|ENFILE)\b/i],
79
+ // "the agent did not run: …" is Looply's own prefix for an agent that never started (`model-transport.ts`,
80
+ // `agent-contained.ts`), and "the server did not answer" its words for its server being away: nothing was asked of
81
+ // the work, let alone learned. Last, so a named cause above wins.
82
+ ['spawn_failed', /\b(failed to spawn|spawn(ed)? failed|could not (start|launch) the run|never began|compiler failed|EBUSY|EMFILE|ENFILE|the agent did not run|the (Looply )?server did not answer|could not reach the (Looply )?server)\b/i],
78
83
  ];
79
84
  /**
80
85
  * Which environment failure a sentence or an output tail describes, or null when it is not
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAoDA,8CAEC;AAyBD,kDAIC;AAcD,8CAKC;AAGD,kDA2BC;AAMD,wDAEC;AAiBD,0CAIC;AAmBD,4CAkBC;AAtMD,mCAAsE;AAEtE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEU,QAAA,iBAAiB,GAAG;IAC/B,wFAAwF;IACxF,gBAAgB;IAChB,0FAA0F;IAC1F,gBAAgB;IAChB,yEAAyE;IACzE,cAAc;IAC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