looply-cli 0.5.43 → 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.
- package/dist/.src-hash +1 -1
- package/dist/autonomy-controller.d.ts.map +1 -1
- package/dist/autonomy-controller.js +6 -0
- package/dist/autonomy-controller.js.map +1 -1
- package/dist/autonomy-tick.d.ts.map +1 -1
- package/dist/autonomy-tick.js +20 -2
- package/dist/autonomy-tick.js.map +1 -1
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +4 -0
- package/dist/bin.js.map +1 -1
- package/dist/branch-delivery-wiring.d.ts +37 -1
- package/dist/branch-delivery-wiring.d.ts.map +1 -1
- package/dist/branch-delivery-wiring.js +87 -1
- package/dist/branch-delivery-wiring.js.map +1 -1
- package/dist/branch-delivery.d.ts +20 -0
- package/dist/branch-delivery.d.ts.map +1 -1
- package/dist/branch-delivery.js +78 -6
- package/dist/branch-delivery.js.map +1 -1
- package/dist/canary-cmd.d.ts +42 -0
- package/dist/canary-cmd.d.ts.map +1 -0
- package/dist/canary-cmd.js +242 -0
- package/dist/canary-cmd.js.map +1 -0
- package/dist/canary-wiring.d.ts +31 -0
- package/dist/canary-wiring.d.ts.map +1 -0
- package/dist/canary-wiring.js +139 -0
- package/dist/canary-wiring.js.map +1 -0
- package/dist/canary.d.ts +123 -0
- package/dist/canary.d.ts.map +1 -0
- package/dist/canary.js +259 -0
- package/dist/canary.js.map +1 -0
- package/dist/coordinator-state.d.ts.map +1 -1
- package/dist/coordinator-state.js +6 -4
- package/dist/coordinator-state.js.map +1 -1
- package/dist/daemon-cmd.d.ts.map +1 -1
- package/dist/daemon-cmd.js +27 -2
- package/dist/daemon-cmd.js.map +1 -1
- package/dist/deliver-cmd.d.ts +11 -0
- package/dist/deliver-cmd.d.ts.map +1 -1
- package/dist/deliver-cmd.js +23 -0
- package/dist/deliver-cmd.js.map +1 -1
- package/dist/environment-hold.d.ts +32 -1
- package/dist/environment-hold.d.ts.map +1 -1
- package/dist/environment-hold.js +52 -5
- package/dist/environment-hold.js.map +1 -1
- package/dist/feature-report.d.ts +4 -2
- package/dist/feature-report.d.ts.map +1 -1
- package/dist/feature-report.js +24 -6
- package/dist/feature-report.js.map +1 -1
- package/dist/git-driver.d.ts +5 -0
- package/dist/git-driver.d.ts.map +1 -1
- package/dist/git-driver.js +8 -0
- package/dist/git-driver.js.map +1 -1
- package/dist/goal-adaptive.d.ts +25 -1
- package/dist/goal-adaptive.d.ts.map +1 -1
- package/dist/goal-adaptive.js +42 -1
- package/dist/goal-adaptive.js.map +1 -1
- package/dist/goal-compile.d.ts.map +1 -1
- package/dist/goal-compile.js +13 -0
- package/dist/goal-compile.js.map +1 -1
- package/dist/goal-gap.d.ts +14 -3
- package/dist/goal-gap.d.ts.map +1 -1
- package/dist/goal-gap.js +46 -6
- package/dist/goal-gap.js.map +1 -1
- package/dist/grant-waiting-wiring.d.ts +3 -2
- package/dist/grant-waiting-wiring.d.ts.map +1 -1
- package/dist/grant-waiting-wiring.js +5 -4
- package/dist/grant-waiting-wiring.js.map +1 -1
- package/dist/machine-settings.d.ts +4 -0
- package/dist/machine-settings.d.ts.map +1 -1
- package/dist/machine-settings.js +15 -1
- package/dist/machine-settings.js.map +1 -1
- package/dist/outcome-audit.d.ts +150 -0
- package/dist/outcome-audit.d.ts.map +1 -0
- package/dist/outcome-audit.js +310 -0
- package/dist/outcome-audit.js.map +1 -0
- package/dist/parts-attribution.d.ts +38 -0
- package/dist/parts-attribution.d.ts.map +1 -0
- package/dist/parts-attribution.js +61 -0
- package/dist/parts-attribution.js.map +1 -0
- package/dist/project-terminal.d.ts +3 -1
- package/dist/project-terminal.d.ts.map +1 -1
- package/dist/project-terminal.js +37 -5
- package/dist/project-terminal.js.map +1 -1
- package/dist/pursuit-delivery.d.ts +5 -20
- package/dist/pursuit-delivery.d.ts.map +1 -1
- package/dist/pursuit-delivery.js +30 -2
- package/dist/pursuit-delivery.js.map +1 -1
- package/dist/pursuit-ending.d.ts.map +1 -1
- package/dist/pursuit-ending.js +10 -0
- package/dist/pursuit-ending.js.map +1 -1
- package/dist/run-cmd.d.ts.map +1 -1
- package/dist/run-cmd.js +47 -1
- package/dist/run-cmd.js.map +1 -1
- package/dist/run-refusal-marks.d.ts +8 -1
- package/dist/run-refusal-marks.d.ts.map +1 -1
- package/dist/run-refusal-marks.js +14 -1
- package/dist/run-refusal-marks.js.map +1 -1
- package/dist/server-client.d.ts +26 -1
- package/dist/server-client.d.ts.map +1 -1
- package/dist/server-client.js +24 -0
- package/dist/server-client.js.map +1 -1
- package/dist/setup-check.d.ts +6 -0
- package/dist/setup-check.d.ts.map +1 -1
- package/dist/setup-check.js +19 -7
- package/dist/setup-check.js.map +1 -1
- package/dist/watchdog-wiring.d.ts +116 -5
- package/dist/watchdog-wiring.d.ts.map +1 -1
- package/dist/watchdog-wiring.js +302 -4
- package/dist/watchdog-wiring.js.map +1 -1
- package/dist/watchdog.d.ts +20 -3
- package/dist/watchdog.d.ts.map +1 -1
- package/dist/watchdog.js +24 -4
- package/dist/watchdog.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outcome-audit.d.ts","sourceRoot":"","sources":["../src/outcome-audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,oBAAoB,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACpI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,yEAAyE;AACzE,eAAO,MAAM,WAAW;;;;CAId,CAAC;AAEX,sGAAsG;AACtG,eAAO,MAAM,eAAe,QAAc,C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,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC;IACzC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,+CAA+C;AAC/C,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAQD,sGAAsG;AACtG,wBAAgB,UAAU,CAAC,CAAC,EAAE,SAAS,GAAG,UAAU,CAgCnD;AAYD,oGAAoG;AACpG,wBAAsB,aAAa,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAmJnH"}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyAuditState = exports.DELIVERY_STUCK_AFTER_MS = exports.ZERO_ROUND_STREAK = exports.AUDIT_LOOKBACK_MS = exports.SETTLE_GRACE_MS = exports.AUDIT_CODES = void 0;
|
|
4
|
+
exports.readAuditState = readAuditState;
|
|
5
|
+
exports.startCause = startCause;
|
|
6
|
+
exports.auditOutcomes = auditOutcomes;
|
|
7
|
+
const core_1 = require("@looply/core");
|
|
8
|
+
const branch_delivery_1 = require("./branch-delivery");
|
|
9
|
+
/**
|
|
10
|
+
* LOOPLY CHECKS THAT WHAT IT REPORTED ACTUALLY HAPPENED.
|
|
11
|
+
*
|
|
12
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
13
|
+
* 🔴 WHAT THIS EXISTS FOR (2026-10-22). Every serious bug that day was a silent mismatch between
|
|
14
|
+
* what Looply SAID and what HAPPENED, and every one was found by a person reading logs:
|
|
15
|
+
*
|
|
16
|
+
* - four RobinBet goals settled "satisfied" and were never pushed, opened or merged (the settle
|
|
17
|
+
* looked for the delivered commit in Starts 1..8; those goals ended at Start 17-25);
|
|
18
|
+
* - goals "running" for hours whose Starts each ran 0 rounds (a dirty checkout, a plan whose
|
|
19
|
+
* items were all closed, a red base, a sandbox that crashed every rerun);
|
|
20
|
+
* - goals ended "budget exhausted" when every Start had gone on a machine fault, never the work;
|
|
21
|
+
* - deliveries left in one state for days ("merged, deploy not confirmed") with nothing moving them.
|
|
22
|
+
*
|
|
23
|
+
* The watchdog (`watchdog.ts`) repairs STUCK states. This is its other half: it checks the
|
|
24
|
+
* OUTCOMES, on the same 15-minute look, against four invariants:
|
|
25
|
+
*
|
|
26
|
+
* 1. SETTLED → DELIVERED. A goal settled satisfied has, 15 minutes after the settle reached the
|
|
27
|
+
* server, a delivery of the commit key 2 confirmed. When it does not, and the change has not
|
|
28
|
+
* landed some other way, and delivering it is STILL WANTED (the goal active at the grant's
|
|
29
|
+
* version, no later attempt at the ticket, not built on another goal's unmerged pull request,
|
|
30
|
+
* and the server agrees, read now), the commit is delivered as `looply deliver` does (`pr`;
|
|
31
|
+
* the next advance pass re-judges it under the component's mode), once per commit. Anything
|
|
32
|
+
* else is said once and left for a person.
|
|
33
|
+
* 2. STARTS DO WORK. Three or more Starts in a row of a live goal that ran no round are classified
|
|
34
|
+
* by their cause and said once, with the concrete fix.
|
|
35
|
+
* 3. A BUDGET SPENT ON THE MACHINE IS NOT THE GOAL'S. A goal ended "budget exhausted" whose Starts
|
|
36
|
+
* all ran no round (or were all voided) was never really tried: said once, so the owner can fix
|
|
37
|
+
* the cause and ask again. No machine-side path grants Starts — a person does, on the ticket.
|
|
38
|
+
* 4. DELIVERIES MOVE. An unfinished delivery in one state for six hours that no stall diagnosis
|
|
39
|
+
* already explains is said once, with its own note as the reason.
|
|
40
|
+
*
|
|
41
|
+
* Each one does NOTHING when healthy (no action, no log line), never acts twice on the same fact
|
|
42
|
+
* (the watchdog's `said` set and the `backfilled` record), never touches a person's folder (a
|
|
43
|
+
* delivery only pushes a branch, as the settle does), logs one line when it acts, and reports into
|
|
44
|
+
* the watchdog's report — which the feature report already carries to AutoRyn. Its entries use the
|
|
45
|
+
* watchdog's existing areas, with the codes below, so an AutoRyn that knows the watchdog shows them.
|
|
46
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
47
|
+
*/
|
|
48
|
+
/** The codes this auditor's entries carry (in `WatchdogAction.code`). */
|
|
49
|
+
exports.AUDIT_CODES = {
|
|
50
|
+
undelivered: 'settled-undelivered',
|
|
51
|
+
zeroRounds: 'zero-rounds',
|
|
52
|
+
budgetOnMachine: 'budget-on-machine',
|
|
53
|
+
};
|
|
54
|
+
/** A settle is delivered BEFORE it goes out; this is slack for a delivery still in its first push. */
|
|
55
|
+
exports.SETTLE_GRACE_MS = 15 * 60_000;
|
|
56
|
+
/** Settles older than this are history: a backfill then would open a stale pull request. */
|
|
57
|
+
exports.AUDIT_LOOKBACK_MS = 3 * 24 * 60 * 60_000;
|
|
58
|
+
/** How many Starts in a row with no round make a pattern worth saying. */
|
|
59
|
+
exports.ZERO_ROUND_STREAK = 3;
|
|
60
|
+
/** An unfinished delivery in one state this long, with no stall diagnosis, is said. */
|
|
61
|
+
exports.DELIVERY_STUCK_AFTER_MS = 6 * 60 * 60_000;
|
|
62
|
+
const emptyAuditState = () => ({ backfilled: {}, deliveries: {} });
|
|
63
|
+
exports.emptyAuditState = emptyAuditState;
|
|
64
|
+
function readAuditState(raw) {
|
|
65
|
+
const obj = (v) => (typeof v === 'object' && v !== null && !Array.isArray(v) ? v : {});
|
|
66
|
+
const r = obj(raw);
|
|
67
|
+
return { backfilled: obj(r['backfilled']), deliveries: obj(r['deliveries']) };
|
|
68
|
+
}
|
|
69
|
+
const DIRTY = /\b(uncommitted|dirty|not clean|local changes|left (?:its |the )?changes)\b/i;
|
|
70
|
+
const PLAN_CLOSED = /\b(queue is empty|no ready items|every item is closed|plan came back empty|\d+ closed|duplicate)\b/i;
|
|
71
|
+
const RED_BASE = /\b(red base|base (?:branch |checks? )?(?:is |are )?(?:red|failing)|fails? on the base|before any change)\b/i;
|
|
72
|
+
const SANDBOX = /\b(sandbox|quarantin\w*|container|EPERM|EACCES|access is denied)\b/i;
|
|
73
|
+
const TIMEOUT = /\b(timed out|took longer than its limit)\b/i;
|
|
74
|
+
/** Why a Start ran no round: its void code first (the fault the machine recorded), else its words. */
|
|
75
|
+
function startCause(s) {
|
|
76
|
+
const since = new Date(0).toISOString();
|
|
77
|
+
const fromCode = (code, reason) => {
|
|
78
|
+
const d = (0, core_1.diagnoseHold)({ code, reason }, since);
|
|
79
|
+
return { key: code, what: d.cause, fix: d.fix };
|
|
80
|
+
};
|
|
81
|
+
if (s.voided !== null)
|
|
82
|
+
return fromCode(s.voided.code, s.voided.reason);
|
|
83
|
+
const note = s.note ?? '';
|
|
84
|
+
if (DIRTY.test(note)) {
|
|
85
|
+
return {
|
|
86
|
+
key: 'dirty_checkout',
|
|
87
|
+
what: 'the checkout it runs in holds changes an earlier run left, so each run refuses before working',
|
|
88
|
+
fix: "Looply's watchdog sets aside a Looply checkout's leftovers by itself; if this is a person's folder, commit or stash its changes",
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
if (RED_BASE.test(note)) {
|
|
92
|
+
return {
|
|
93
|
+
key: 'red_base',
|
|
94
|
+
what: "the project's own checks fail on the base before any change, so no round can be judged",
|
|
95
|
+
fix: 'fix the failing checks on the base branch, or leave the failing tests out in AutoRyn (Gates), then retry the goal',
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
if (SANDBOX.test(note))
|
|
99
|
+
return fromCode('sandbox_denied', note);
|
|
100
|
+
if (TIMEOUT.test(note))
|
|
101
|
+
return fromCode('planner_timeout', note);
|
|
102
|
+
if (PLAN_CLOSED.test(note)) {
|
|
103
|
+
return {
|
|
104
|
+
key: 'plan_closed',
|
|
105
|
+
what: "its plan has nothing left to work on (every item is closed or a duplicate), yet the goal is not judged met",
|
|
106
|
+
fix: 'say on the ticket what is still missing, so Looply plans it again — or close the ticket if it is done',
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return { key: 'unknown', what: note === '' ? 'each run ended without saying why' : `each run ended saying: "${clip(note, 160)}"`, fix: "read the Start's run log on the PC (.looply/state/run-logs) and retry the goal" };
|
|
110
|
+
}
|
|
111
|
+
const clip = (s, n) => (s.length > n ? `${s.slice(0, n - 1)}…` : s);
|
|
112
|
+
const age = (ms) => (ms >= 2 * 3_600_000 ? `${Math.round(ms / 3_600_000)} h` : `${Math.max(1, Math.round(ms / 60_000))} min`);
|
|
113
|
+
/** The newest grant per goal: an older one of a reopened goal is superseded by what came after. */
|
|
114
|
+
function latestPerGoal(grants) {
|
|
115
|
+
const last = new Map();
|
|
116
|
+
for (const g of grants)
|
|
117
|
+
last.set(g.goalId, g);
|
|
118
|
+
return [...last.values()];
|
|
119
|
+
}
|
|
120
|
+
/** One look over the four invariants. Never throws for what it finds; returns the state to keep. */
|
|
121
|
+
async function auditOutcomes(deps, look, prior) {
|
|
122
|
+
// A record older than any settle still looked at can no longer stop a second delivery: let it go.
|
|
123
|
+
const kept = Object.entries(prior.backfilled).filter(([, b]) => look.now - Date.parse(b.at) <= 2 * exports.AUDIT_LOOKBACK_MS);
|
|
124
|
+
const state = { backfilled: Object.fromEntries(kept), deliveries: {} };
|
|
125
|
+
const grants = latestPerGoal(safe(() => deps.grants(), []));
|
|
126
|
+
const entries = safe(() => deps.deliveries(), []);
|
|
127
|
+
const byGoal = new Map(entries.map((e) => [e.goalId, e]));
|
|
128
|
+
const startsOf = new Map();
|
|
129
|
+
const starts = async (g) => {
|
|
130
|
+
const known = startsOf.get(g.controllerId);
|
|
131
|
+
if (known !== undefined)
|
|
132
|
+
return known;
|
|
133
|
+
const got = await deps.starts(g).catch(() => []);
|
|
134
|
+
startsOf.set(g.controllerId, got);
|
|
135
|
+
return got;
|
|
136
|
+
};
|
|
137
|
+
const recent = (iso) => iso !== undefined && !Number.isNaN(Date.parse(iso)) && look.now - Date.parse(iso) <= exports.AUDIT_LOOKBACK_MS;
|
|
138
|
+
// ── 1. a goal settled satisfied has a delivery ──
|
|
139
|
+
const mode = safe(() => deps.mode(), 'pr');
|
|
140
|
+
for (const g of grants) {
|
|
141
|
+
const split = g.endCode === 'sibling_change_needed';
|
|
142
|
+
if (mode === 'off' || (g.state !== 'satisfied' && !split))
|
|
143
|
+
continue;
|
|
144
|
+
/**
|
|
145
|
+
* 🔴 ONLY A WHOLE GOAL MET IS DELIVERED BY ITSELF. A satisfied grant that ended any other way — today none; tomorrow a
|
|
146
|
+
* bundle of tickets only partly met, whose delivery must carry its hold (`partsHeldBy`: pull request only, never
|
|
147
|
+
* merged automatically, the way a split goal's part is) — is left to the settle that knows its hold. `settledMark`
|
|
148
|
+
* matches `goal_satisfied` marks only, so nothing else can reach a backfill.
|
|
149
|
+
* TODO(batch-per-ticket): carry `partsHeldBy` into `backfill` like `split`, then allow its end code here.
|
|
150
|
+
*/
|
|
151
|
+
if (g.state === 'satisfied' && g.endCode !== undefined && g.endCode !== 'goal_met')
|
|
152
|
+
continue;
|
|
153
|
+
const s = await deps.settled(g).catch(() => null);
|
|
154
|
+
if (s === null)
|
|
155
|
+
continue;
|
|
156
|
+
const settledAt = Date.parse(s.at);
|
|
157
|
+
if (Number.isNaN(settledAt) || look.now - settledAt > exports.AUDIT_LOOKBACK_MS)
|
|
158
|
+
continue;
|
|
159
|
+
// The grace runs from the settle REACHING THE SERVER: the settle-time delivery goes out just before it, never raced.
|
|
160
|
+
const projected = g.projectedAt === undefined ? NaN : Date.parse(g.projectedAt);
|
|
161
|
+
if (Number.isNaN(projected) || look.now - projected < exports.SETTLE_GRACE_MS)
|
|
162
|
+
continue;
|
|
163
|
+
const sha = s.delivery.sha;
|
|
164
|
+
const e = byGoal.get(g.goalId);
|
|
165
|
+
// Delivered: this commit (as it is or as its rebuild), or a later delivery of the goal.
|
|
166
|
+
if (e !== undefined && (e.sha === sha || e.rebuiltFrom?.sha === sha || Date.parse(e.openedAt) >= settledAt))
|
|
167
|
+
continue;
|
|
168
|
+
if (state.backfilled[g.goalId]?.sha === sha)
|
|
169
|
+
continue;
|
|
170
|
+
// Landed some other way (a person, an earlier delivery, a squash merge): nothing is missing.
|
|
171
|
+
if ((await deps.landed(sha).catch(() => null)) !== false)
|
|
172
|
+
continue;
|
|
173
|
+
const want = await deps.stillWanted(g, sha).catch((err) => ({ wanted: false, because: err.message, retry: true, quiet: false }));
|
|
174
|
+
if (!want.wanted) {
|
|
175
|
+
// Not delivered by itself; said once, and asked again each look (it may become wanted: its base merged).
|
|
176
|
+
// A ticket a person closed on purpose (its goal abandoned) is nobody's to do: nothing is said.
|
|
177
|
+
if (!want.retry && want.quiet !== true && look.once(`audit|${exports.AUDIT_CODES.undelivered}|held|${g.goalId}|${sha}`)) {
|
|
178
|
+
look.act({
|
|
179
|
+
area: 'delivery',
|
|
180
|
+
outcome: 'alerted',
|
|
181
|
+
goalId: g.goalId,
|
|
182
|
+
code: exports.AUDIT_CODES.undelivered,
|
|
183
|
+
said: `settled as met ${age(look.now - settledAt)} ago, but its commit ${sha.slice(0, 12)} was never delivered, and Looply will not deliver it by itself: ${clip(want.because, 200)}`,
|
|
184
|
+
todo: `a person decides: deliver it by hand on this PC (looply deliver <its looply/run-… branch> --goal <branch>=${g.goalId}), or close the ticket`,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
const report = await deps.backfill(g.goalId, s.delivery, split).catch((err) => {
|
|
190
|
+
look.log(`watchdog: ${g.goalId}: delivering the settled commit failed — ${err.message}`);
|
|
191
|
+
return null;
|
|
192
|
+
});
|
|
193
|
+
state.backfilled[g.goalId] = { sha, at: look.at, state: report?.state ?? 'failed' };
|
|
194
|
+
const reached = report !== null && report.state !== 'not-pushed';
|
|
195
|
+
look.act({
|
|
196
|
+
area: 'delivery',
|
|
197
|
+
outcome: reached ? 'fixed' : 'alerted',
|
|
198
|
+
goalId: g.goalId,
|
|
199
|
+
code: exports.AUDIT_CODES.undelivered,
|
|
200
|
+
said: `settled as met ${age(look.now - settledAt)} ago, but its commit ${sha.slice(0, 12)} had never been delivered; delivered it now: ${report?.state ?? 'failed'}${report?.pullRequestUrl ? ` (${report.pullRequestUrl})` : ''}${!reached && report?.note ? ` — ${clip(report.note, 160)}` : ''}`,
|
|
201
|
+
todo: reached ? null : `deliver it by hand on this PC: looply deliver <its looply/run-… branch> --goal <branch>=${g.goalId} --yes`,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
// ── 2. a live goal's Starts run no round, again and again ──
|
|
205
|
+
for (const g of grants) {
|
|
206
|
+
if (g.state !== 'authorized')
|
|
207
|
+
continue;
|
|
208
|
+
const all = (await starts(g)).filter((s) => s.ended);
|
|
209
|
+
const streak = [];
|
|
210
|
+
for (let i = all.length - 1; i >= 0; i--) {
|
|
211
|
+
const s = all[i];
|
|
212
|
+
// A Start that ran rounds, or one whose rounds are unknown, ends the pattern: only a known 0 counts.
|
|
213
|
+
if (s.rounds !== 0)
|
|
214
|
+
break;
|
|
215
|
+
streak.unshift(s);
|
|
216
|
+
}
|
|
217
|
+
if (streak.length < exports.ZERO_ROUND_STREAK)
|
|
218
|
+
continue;
|
|
219
|
+
const cause = startCause(streak[streak.length - 1]);
|
|
220
|
+
if (!look.once(`audit|${exports.AUDIT_CODES.zeroRounds}|${g.goalId}|${cause.key}|${streak[0].ordinal}`))
|
|
221
|
+
continue;
|
|
222
|
+
const spent = streak.reduce((t, s) => t + (s.elapsedMs ?? 0), 0);
|
|
223
|
+
look.act({
|
|
224
|
+
area: 'wait',
|
|
225
|
+
outcome: 'alerted',
|
|
226
|
+
goalId: g.goalId,
|
|
227
|
+
code: exports.AUDIT_CODES.zeroRounds,
|
|
228
|
+
said: `its last ${streak.length} Starts (${streak[0].ordinal}–${streak[streak.length - 1].ordinal}${spent > 0 ? `, ${age(spent)} in all` : ''}) ran no round: ${cause.what}`,
|
|
229
|
+
todo: cause.fix,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
// ── 3. a budget spent on the machine, not on the goal ──
|
|
233
|
+
for (const g of grants) {
|
|
234
|
+
const machineEnd = g.endCode === 'machine_failing' || g.endCode === 'start_never_began';
|
|
235
|
+
if (g.state !== 'budget_exhausted' && !machineEnd)
|
|
236
|
+
continue;
|
|
237
|
+
if (!recent(g.projectedAt))
|
|
238
|
+
continue;
|
|
239
|
+
const ended = (await starts(g)).filter((s) => s.ended);
|
|
240
|
+
if (ended.length === 0)
|
|
241
|
+
continue;
|
|
242
|
+
const counted = ended.filter((s) => s.voided === null);
|
|
243
|
+
// Every Start that counted ran a KNOWN 0 rounds; unknown is no evidence of a fault.
|
|
244
|
+
if (!counted.every((s) => s.rounds === 0))
|
|
245
|
+
continue;
|
|
246
|
+
if (!look.once(`audit|${exports.AUDIT_CODES.budgetOnMachine}|${g.goalId}|${g.controllerId}`))
|
|
247
|
+
continue;
|
|
248
|
+
const causes = [...new Map(ended.map((s) => startCause(s)).map((c) => [c.key, c])).values()];
|
|
249
|
+
const voided = ended.length - counted.length;
|
|
250
|
+
look.act({
|
|
251
|
+
area: 'hold',
|
|
252
|
+
outcome: 'alerted',
|
|
253
|
+
goalId: g.goalId,
|
|
254
|
+
code: exports.AUDIT_CODES.budgetOnMachine,
|
|
255
|
+
said: `ended "${g.endCode ?? g.state}" after ${ended.length} Start(s)${voided > 0 ? ` (${voided} voided for machine faults)` : ''}, but none of them ran a round on the work — the goal was never really tried: ${causes.slice(0, 2).map((c) => c.what).join('; ')}`,
|
|
256
|
+
todo: `${causes[0].fix}; then ask Looply again on the ticket — Looply cannot grant itself more Starts`,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
// ── 4. an unfinished delivery that no pass moves ──
|
|
260
|
+
for (const e of entries) {
|
|
261
|
+
if (e.done === true)
|
|
262
|
+
continue;
|
|
263
|
+
const key = [e.state, e.sha, e.pullNumber ?? '', ...(e.environments ?? []).map((r) => `${r.name}:${r.state}`)].join('|');
|
|
264
|
+
const before = prior.deliveries[e.goalId];
|
|
265
|
+
const updated = Date.parse(e.updatedAt);
|
|
266
|
+
const since = before !== undefined && before.key === key ? before.since : new Date(Number.isNaN(updated) ? look.now : Math.min(updated, look.now)).toISOString();
|
|
267
|
+
state.deliveries[e.goalId] = { key, since };
|
|
268
|
+
const stood = look.now - Date.parse(since);
|
|
269
|
+
if (stood < exports.DELIVERY_STUCK_AFTER_MS)
|
|
270
|
+
continue;
|
|
271
|
+
// A wait the stall path diagnoses is said by the ticket and the watchdog already.
|
|
272
|
+
if ((0, branch_delivery_1.deliveryStall)(e, null, look.at).diagnosis !== null)
|
|
273
|
+
continue;
|
|
274
|
+
if (!look.once(`audit|delivery-stuck|${e.goalId}|${key}`))
|
|
275
|
+
continue;
|
|
276
|
+
look.act({
|
|
277
|
+
area: 'delivery',
|
|
278
|
+
outcome: 'alerted',
|
|
279
|
+
goalId: e.goalId,
|
|
280
|
+
code: e.state,
|
|
281
|
+
said: `its delivery has stood "${e.state}"${e.pullRequestUrl ? ` (${e.pullRequestUrl})` : ''} for ${age(stood)} with nothing moving it: ${e.note ? clip(e.note, 200) : 'no reason was recorded'}`,
|
|
282
|
+
todo: stuckTodo(e),
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
return state;
|
|
286
|
+
}
|
|
287
|
+
function stuckTodo(e) {
|
|
288
|
+
switch (e.state) {
|
|
289
|
+
case 'merged':
|
|
290
|
+
return "say how Looply can see it go live (the component's environments in AutoRyn: a Netlify site or a page that shows the commit), or set the deploy step to none";
|
|
291
|
+
case 'deploy-failed':
|
|
292
|
+
return 'look at the deploy log on this PC (.looply/state/run-logs); Looply re-checks a failed deploy by itself, and deploys again once its cause is fixed';
|
|
293
|
+
case 'waiting-checks':
|
|
294
|
+
return "the repository's CI never reported on the pull request: check its GitHub Actions, or set the required checks in AutoRyn";
|
|
295
|
+
case 'pr-open':
|
|
296
|
+
case 'pushed':
|
|
297
|
+
return 'review the pull request and merge or close it';
|
|
298
|
+
default:
|
|
299
|
+
return 'open the pull request and the ticket, and decide whether to merge, close or retry it';
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
function safe(f, fallback) {
|
|
303
|
+
try {
|
|
304
|
+
return f();
|
|
305
|
+
}
|
|
306
|
+
catch {
|
|
307
|
+
return fallback;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
//# sourceMappingURL=outcome-audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outcome-audit.js","sourceRoot":"","sources":["../src/outcome-audit.ts"],"names":[],"mappings":";;;AAyHA,wCAIC;AA0BD,gCAgCC;AAaD,sCAmJC;AAvVD,uCAAoI;AAEpI,uDAAsE;AAGtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,yEAAyE;AAC5D,QAAA,WAAW,GAAG;IACzB,WAAW,EAAE,qBAAqB;IAClC,UAAU,EAAE,aAAa;IACzB,eAAe,EAAE,mBAAmB;CAC5B,CAAC;AAEX,sGAAsG;AACzF,QAAA,eAAe,GAAG,EAAE,GAAG,MAAM,CAAC;AAC3C,4FAA4F;AAC/E,QAAA,iBAAiB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;AACtD,0EAA0E;AAC7D,QAAA,iBAAiB,GAAG,CAAC,CAAC;AACnC,uFAAuF;AAC1E,QAAA,uBAAuB,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;AA4DhD,MAAM,eAAe,GAAG,GAAe,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;AAAzE,QAAA,eAAe,mBAA0D;AAEtF,SAAgB,cAAc,CAAC,GAAY;IACzC,MAAM,GAAG,GAAG,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I,EAAE,2BAA2B,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,wBAAwB,EAAE;YACjM,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;SACnB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,SAAS,CAAC,CAAgB;IACjC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;QAChB,KAAK,QAAQ;YACX,OAAO,6JAA6J,CAAC;QACvK,KAAK,eAAe;YAClB,OAAO,mJAAmJ,CAAC;QAC7J,KAAK,gBAAgB;YACnB,OAAO,yHAAyH,CAAC;QACnI,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,+CAA+C,CAAC;QACzD;YACE,OAAO,sFAAsF,CAAC;IAClG,CAAC;AACH,CAAC;AAED,SAAS,IAAI,CAAI,CAAU,EAAE,QAAW;IACtC,IAAI,CAAC;QACH,OAAO,CAAC,EAAE,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Item } from '@looply/core';
|
|
2
|
+
import type { RoundRecord } from './round-records';
|
|
3
|
+
/**
|
|
4
|
+
* WHICH PLAN STEPS' WORK IS IN A PARTLY MET BUNDLE'S DELIVERY — every commit it adds, not just this plan's.
|
|
5
|
+
*
|
|
6
|
+
* Key 2's `delivered` is the CURRENT plan's committed items. A run continues its goal's checkout, and a rebuilt tree
|
|
7
|
+
* carries the goal's earlier commits too, so revision 1's "[RBB-B-225] avatar links" is still on the branch when
|
|
8
|
+
* revision 2 planned only "[RBB-B-224]" — and reading `delivered` alone would let that half-done work merge on its own.
|
|
9
|
+
*
|
|
10
|
+
* So the question is asked of the commits themselves: every commit the delivered commit adds on top of its base and
|
|
11
|
+
* the goals it declares it builds on (`commits`). Each must be a committed round (or a rebuilt copy of one,
|
|
12
|
+
* `goal-replay.ts`) whose item's title says whose it is. A commit no round made — a person's, another machine's,
|
|
13
|
+
* anything committed outside a round — cannot be attributed, and neither can a list git could not give: the answer
|
|
14
|
+
* is then null, and the caller holds the delivery on every open ticket.
|
|
15
|
+
*
|
|
16
|
+
* Items are matched by their rounds, not their goal: one released from the goal still carries its commit.
|
|
17
|
+
*/
|
|
18
|
+
export declare function keptPartTitles(input: {
|
|
19
|
+
items: readonly Pick<Item, 'id' | 'title'>[];
|
|
20
|
+
/** Key 2's own delivered item ids. */
|
|
21
|
+
delivered: readonly string[];
|
|
22
|
+
/** Every round record on this machine, or null when they could not be read. */
|
|
23
|
+
rounds: readonly RoundRecord[] | null;
|
|
24
|
+
/** The commits the delivered commit adds (`git rev-list head ^base ^dependencies`), or null when unknown. */
|
|
25
|
+
commits: readonly string[] | null;
|
|
26
|
+
/** A commit's rebuilt copies (`replayedAs`). */
|
|
27
|
+
aliases: (sha: string) => readonly string[];
|
|
28
|
+
}): string[] | null;
|
|
29
|
+
/**
|
|
30
|
+
* The base a partly met delivery is attributed against: origin's copy of `ref` (`refs/remotes/origin/<name>`) — a pull
|
|
31
|
+
* request merges into origin's base, so a commit only a local base has is still this branch's to attribute. `ref`
|
|
32
|
+
* itself when it already names a remote ref. Null when origin has no copy, or git cannot say: then nothing can be
|
|
33
|
+
* attributed, and the caller holds the delivery on every open ticket (fail closed — a local base may be ahead).
|
|
34
|
+
*/
|
|
35
|
+
export declare function originBaseOf(git: {
|
|
36
|
+
refExists(ref: string): Promise<boolean>;
|
|
37
|
+
}, ref: string): Promise<string | null>;
|
|
38
|
+
//# sourceMappingURL=parts-attribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts-attribution.d.ts","sourceRoot":"","sources":["../src/parts-attribution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE;IACpC,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC;IAC7C,sCAAsC;IACtC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,+EAA+E;IAC/E,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,IAAI,CAAC;IACtC,6GAA6G;IAC7G,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC,gDAAgD;IAChD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,MAAM,EAAE,CAAC;CAC7C,GAAG,MAAM,EAAE,GAAG,IAAI,CAsBlB;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE;IAAE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIzH"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.keptPartTitles = keptPartTitles;
|
|
4
|
+
exports.originBaseOf = originBaseOf;
|
|
5
|
+
/**
|
|
6
|
+
* WHICH PLAN STEPS' WORK IS IN A PARTLY MET BUNDLE'S DELIVERY — every commit it adds, not just this plan's.
|
|
7
|
+
*
|
|
8
|
+
* Key 2's `delivered` is the CURRENT plan's committed items. A run continues its goal's checkout, and a rebuilt tree
|
|
9
|
+
* carries the goal's earlier commits too, so revision 1's "[RBB-B-225] avatar links" is still on the branch when
|
|
10
|
+
* revision 2 planned only "[RBB-B-224]" — and reading `delivered` alone would let that half-done work merge on its own.
|
|
11
|
+
*
|
|
12
|
+
* So the question is asked of the commits themselves: every commit the delivered commit adds on top of its base and
|
|
13
|
+
* the goals it declares it builds on (`commits`). Each must be a committed round (or a rebuilt copy of one,
|
|
14
|
+
* `goal-replay.ts`) whose item's title says whose it is. A commit no round made — a person's, another machine's,
|
|
15
|
+
* anything committed outside a round — cannot be attributed, and neither can a list git could not give: the answer
|
|
16
|
+
* is then null, and the caller holds the delivery on every open ticket.
|
|
17
|
+
*
|
|
18
|
+
* Items are matched by their rounds, not their goal: one released from the goal still carries its commit.
|
|
19
|
+
*/
|
|
20
|
+
function keptPartTitles(input) {
|
|
21
|
+
if (input.rounds === null || input.commits === null)
|
|
22
|
+
return null;
|
|
23
|
+
const inBranch = new Set(input.commits);
|
|
24
|
+
const ownerOf = new Map(); // commit → item id
|
|
25
|
+
for (const r of input.rounds) {
|
|
26
|
+
if (r.outcome !== 'committed' || r.sha === undefined)
|
|
27
|
+
continue;
|
|
28
|
+
for (const sha of [r.sha, ...input.aliases(r.sha)])
|
|
29
|
+
if (!ownerOf.has(sha))
|
|
30
|
+
ownerOf.set(sha, r.itemId);
|
|
31
|
+
}
|
|
32
|
+
const kept = new Set(input.delivered);
|
|
33
|
+
for (const sha of inBranch) {
|
|
34
|
+
const item = ownerOf.get(sha);
|
|
35
|
+
if (item === undefined)
|
|
36
|
+
return null;
|
|
37
|
+
kept.add(item);
|
|
38
|
+
}
|
|
39
|
+
const titles = [];
|
|
40
|
+
for (const id of kept) {
|
|
41
|
+
const item = input.items.find((i) => i.id === id);
|
|
42
|
+
// An item this machine no longer has cannot say whose it is.
|
|
43
|
+
if (item === undefined)
|
|
44
|
+
return null;
|
|
45
|
+
titles.push(item.title);
|
|
46
|
+
}
|
|
47
|
+
return titles;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The base a partly met delivery is attributed against: origin's copy of `ref` (`refs/remotes/origin/<name>`) — a pull
|
|
51
|
+
* request merges into origin's base, so a commit only a local base has is still this branch's to attribute. `ref`
|
|
52
|
+
* itself when it already names a remote ref. Null when origin has no copy, or git cannot say: then nothing can be
|
|
53
|
+
* attributed, and the caller holds the delivery on every open ticket (fail closed — a local base may be ahead).
|
|
54
|
+
*/
|
|
55
|
+
async function originBaseOf(git, ref) {
|
|
56
|
+
if (ref.startsWith('refs/remotes/') || ref.startsWith('origin/'))
|
|
57
|
+
return ref;
|
|
58
|
+
const remote = `refs/remotes/origin/${ref.replace(/^refs\/heads\//, '')}`;
|
|
59
|
+
return (await git.refExists(remote).catch(() => false)) ? remote : null;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=parts-attribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts-attribution.js","sourceRoot":"","sources":["../src/parts-attribution.ts"],"names":[],"mappings":";;AAkBA,wCAgCC;AAQD,oCAIC;AA3DD;;;;;;;;;;;;;;GAcG;AACH,SAAgB,cAAc,CAAC,KAU9B;IACC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC,CAAC,mBAAmB;IAC9D,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QAC7B,IAAI,CAAC,CAAC,OAAO,KAAK,WAAW,IAAI,CAAC,CAAC,GAAG,KAAK,SAAS;YAAE,SAAS;QAC/D,KAAK,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAA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AAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1E,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type GoalAutonomyState, type PursuitEndCode } from '@looply/core';
|
|
2
2
|
import type { AutonomyProgress } from './autonomy-store';
|
|
3
3
|
import type { RunDelivery } from './run-refusal-marks';
|
|
4
|
-
import type
|
|
4
|
+
import { type ServerClient } from './server-client';
|
|
5
|
+
/** Why a split goal's part (RBB-B-209) opens for review and is never merged on its own. */
|
|
6
|
+
export declare const SPLIT_HOLD_MERGE = "the rest of this change is in another component's repository; merge them together, in the release order on the ticket";
|
|
5
7
|
/**
|
|
6
8
|
* TELL THE SERVER WHERE A PURSUIT CAME TO REST — AND WHY.
|
|
7
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-terminal.d.ts","sourceRoot":"","sources":["../src/project-terminal.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"project-terminal.d.ts","sourceRoot":"","sources":["../src/project-terminal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACjH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEjE,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,0HAA0H,CAAC;AAExJ;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,oBAAoB,CAAC,CAAC;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACnE;;;;OAIG;IACH,iHAAiH;IACjH,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5G,GAAG,CACF,KAAK,EAAE,gBAAgB,EACvB,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,cAAc,KAClB,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA4D9C"}
|
package/dist/project-terminal.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SPLIT_HOLD_MERGE = void 0;
|
|
3
4
|
exports.makeProjectTerminal = makeProjectTerminal;
|
|
4
5
|
const core_1 = require("@looply/core");
|
|
5
6
|
const grant_reconcile_1 = require("./grant-reconcile");
|
|
7
|
+
const server_client_1 = require("./server-client");
|
|
8
|
+
/** Why a split goal's part (RBB-B-209) opens for review and is never merged on its own. */
|
|
9
|
+
exports.SPLIT_HOLD_MERGE = "the rest of this change is in another component's repository; merge them together, in the release order on the ticket";
|
|
6
10
|
/**
|
|
7
11
|
* TELL THE SERVER WHERE A PURSUIT CAME TO REST — AND WHY.
|
|
8
12
|
*
|
|
@@ -30,20 +34,48 @@ function makeProjectTerminal(deps) {
|
|
|
30
34
|
// A split goal (RBB-B-209) delivers this repository's part too — for review only, never merged on its own: the
|
|
31
35
|
// other component's part has to ship with it, in the order the ending names.
|
|
32
36
|
const split = code === 'sibling_change_needed';
|
|
33
|
-
|
|
37
|
+
// A bundle met in part (core `goal-parts.ts`): the met tickets' work ships like a met goal's — the delivery names
|
|
38
|
+
// them, and only a delivery that does (key 2 held, parts readable) counts as one.
|
|
39
|
+
const partly = code === 'partly_met';
|
|
40
|
+
const found = settlable === 'satisfied' || split || partly ? await deps.deliveryFor(grant.controllerId) : null;
|
|
41
|
+
const delivery = partly && !(found?.parts ?? []).some((p) => p.met) ? null : found;
|
|
34
42
|
if (delivery !== null && deps.deliverBranch !== undefined) {
|
|
35
|
-
|
|
43
|
+
// 🔴 A bundle whose delivery carries (or may carry) an open ticket's work is opened for review and never
|
|
44
|
+
// merged on its own (core `partsHeldBy`): key 2 proves the gates, not that the blocked part is right.
|
|
45
|
+
// WHATEVER THE ENDING'S CODE: the delivery found is the newest delivering mark, which can be an earlier
|
|
46
|
+
// partly met Start's — its hold travels with it.
|
|
47
|
+
const held = delivery.partsHeldBy !== undefined && delivery.partsHeldBy.length > 0 ? delivery.partsHeldBy : null;
|
|
48
|
+
const hold = split
|
|
49
|
+
? { holdMerge: exports.SPLIT_HOLD_MERGE }
|
|
50
|
+
: held !== null
|
|
51
|
+
? { holdMerge: (0, core_1.partsHoldNote)(held) }
|
|
52
|
+
: undefined;
|
|
36
53
|
await deps.deliverBranch(grant.goalId, delivery, hold).catch(() => undefined);
|
|
37
54
|
}
|
|
38
55
|
const reason = (0, core_1.cleanPursuitEndReason)(because);
|
|
39
|
-
|
|
56
|
+
const settle = (withDelivery) => deps.client.settleGoalAutonomy(deps.projectId, grant.controllerId, {
|
|
40
57
|
version: mine.version,
|
|
41
58
|
state: settlable,
|
|
42
59
|
...(reason === '' ? {} : { reason }),
|
|
43
60
|
...(code === undefined ? {} : { endCode: code }),
|
|
44
|
-
// The server takes KEY 2's evidence
|
|
45
|
-
...(delivery === null || settlable !== 'satisfied' ? {} : { delivery }),
|
|
61
|
+
// The server takes KEY 2's evidence beside `satisfied`, and beside a bundle met in part (its parts).
|
|
62
|
+
...(delivery === null || !withDelivery || (settlable !== 'satisfied' && !partly) ? {} : { delivery }),
|
|
46
63
|
});
|
|
64
|
+
if (partly && delivery !== null) {
|
|
65
|
+
// A server older than parts refuses a delivery beside `human_required` (400, "delivery is accepted only …"):
|
|
66
|
+
// the ending still goes, without it — every ticket then keeps the question, and none is called done. Any
|
|
67
|
+
// other failure is the settle's own, reported and retried like every settle.
|
|
68
|
+
try {
|
|
69
|
+
await settle(true);
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
if (!(e instanceof server_client_1.ServerError && e.status === 400 && /delivery/i.test(e.message)))
|
|
73
|
+
throw e;
|
|
74
|
+
await settle(false);
|
|
75
|
+
}
|
|
76
|
+
return { ok: true };
|
|
77
|
+
}
|
|
78
|
+
await settle(true);
|
|
47
79
|
return { ok: true };
|
|
48
80
|
}
|
|
49
81
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-terminal.js","sourceRoot":"","sources":["../src/project-terminal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project-terminal.js","sourceRoot":"","sources":["../src/project-terminal.ts"],"names":[],"mappings":";;;AAoBA,kDA6EC;AAjGD,uCAAiH;AAEjH,uDAAmD;AAEnD,mDAAiE;AAEjE,2FAA2F;AAC9E,QAAA,gBAAgB,GAAG,uHAAuH,CAAC;AAExJ;;;;;;;;;;GAUG;AACH,SAAgB,mBAAmB,CAAC,IAYnC;IAMC,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC3C,MAAM,SAAS,GAAG,IAAA,gCAAc,EAAC,KAAK,CAAC,CAAC;QACxC,qEAAqE;QACrE,0DAA0D;QAC1D,IAAI,SAAS,KAAK,IAAI;YAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC;YACH,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAClF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,C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AAC,OAAO,CAAC,CAAC;wBAAE,MAAM,CAAC,CAAC;oBAC5F,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC;gBACtB,CAAC;gBACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;YACtB,CAAC;YACD,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;QACtB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAG,CAAW,CAAC,OAAO,EAAE,CAAC;QACtD,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
import type { RunDelivery, RunRefusalMark } from './run-refusal-marks';
|
|
2
|
+
export declare function deliveryForPursuit(find: (requestId: string) => RunRefusalMark | null, controllerId: string, maxOrdinal?: number): RunDelivery | null;
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* 🔴 READ AT SETTLE TIME, BESIDE THE DECISION, AND NOT THROUGH IT.
|
|
7
|
-
*
|
|
8
|
-
* The reducer that decides a pursuit is over (`autonomy-controller.ts`) is
|
|
9
|
-
* deliberately goal-blind and decision-only; threading a commit and a set of
|
|
10
|
-
* gate outcomes through it would give it facts it has no business holding. The
|
|
11
|
-
* facts already sit in the refusal marks, keyed by each Start's id, so the one
|
|
12
|
-
* place that SENDS the ending can look them up itself — the decision stays
|
|
13
|
-
* exactly where it was, and only the report gains its evidence.
|
|
14
|
-
*
|
|
15
|
-
* Every Start of a grant is `autonomyStartId(controllerId, n)` for n in
|
|
16
|
-
* 1..MAX_AUTONOMOUS_STARTS, so the search is bounded and exact. The newest
|
|
17
|
-
* `goal_satisfied` mark that carries a delivery wins: it is the refusal that
|
|
18
|
-
* ended the pursuit.
|
|
19
|
-
*
|
|
20
|
-
* Null is an honest answer — an older run wrote no delivery, or key 2 never
|
|
21
|
-
* answered — and the settle then goes out exactly as before.
|
|
4
|
+
* The `goal_satisfied` mark that ended a pursuit, with its delivery — the outcome auditor's view of
|
|
5
|
+
* the same search (`outcome-audit.ts`), which needs WHEN it was settled too. It always searches every
|
|
6
|
+
* ordinal a grant can reach, voided Starts included: a pursuit satisfied at Start 25 is still found.
|
|
22
7
|
*/
|
|
23
|
-
export declare function
|
|
8
|
+
export declare function settledMark(find: (requestId: string) => RunRefusalMark | null, controllerId: string, maxStarts: number): RunRefusalMark | null;
|
|
24
9
|
//# sourceMappingURL=pursuit-delivery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pursuit-delivery.d.ts","sourceRoot":"","sources":["../src/pursuit-delivery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"pursuit-delivery.d.ts","sourceRoot":"","sources":["../src/pursuit-delivery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAmCvE,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,cAAc,GAAG,IAAI,EAClD,YAAY,EAAE,MAAM,EACpB,UAAU,GAAE,MAAkD,GAC7D,WAAW,GAAG,IAAI,CAQpB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,cAAc,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAQ9I"}
|