lastlight-core 0.23.3 → 0.23.5
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/config/default.yaml +16 -0
- package/dist/admin/routes.d.ts +29 -0
- package/dist/admin/routes.js +136 -0
- package/dist/admin/routes.js.map +1 -1
- package/dist/config/config.d.ts +23 -0
- package/dist/config/config.js +25 -0
- package/dist/config/config.js.map +1 -1
- package/dist/cron/dependabot-discovery.d.ts +43 -4
- package/dist/cron/dependabot-discovery.js +47 -7
- package/dist/cron/dependabot-discovery.js.map +1 -1
- package/dist/engine/dispatcher.d.ts +5 -1
- package/dist/engine/dispatcher.js +88 -8
- package/dist/engine/dispatcher.js.map +1 -1
- package/dist/engine/fix-harvest.d.ts +21 -2
- package/dist/engine/fix-harvest.js +25 -2
- package/dist/engine/fix-harvest.js.map +1 -1
- package/dist/engine/fix-markers.d.ts +27 -0
- package/dist/engine/fix-markers.js +31 -0
- package/dist/engine/fix-markers.js.map +1 -1
- package/dist/engine/github/github.d.ts +1 -1
- package/dist/engine/github/github.js +1 -1
- package/dist/engine/pr-decisions.d.ts +71 -8
- package/dist/engine/pr-decisions.js +121 -24
- package/dist/engine/pr-decisions.js.map +1 -1
- package/dist/engine/pr-escalation.d.ts +112 -18
- package/dist/engine/pr-escalation.js +204 -31
- package/dist/engine/pr-escalation.js.map +1 -1
- package/dist/engine/pr-state.d.ts +152 -15
- package/dist/engine/pr-state.js +351 -94
- package/dist/engine/pr-state.js.map +1 -1
- package/dist/engine/router.js +116 -4
- package/dist/engine/router.js.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/sandbox/index.js +41 -1
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/k8s/init-clone.d.ts +7 -4
- package/dist/sandbox/k8s/init-clone.js +35 -5
- package/dist/sandbox/k8s/init-clone.js.map +1 -1
- package/dist/workflows/simple.d.ts +24 -1
- package/dist/workflows/simple.js +39 -7
- package/dist/workflows/simple.js.map +1 -1
- package/package.json +3 -3
- package/skills/fixing/SKILL.md +7 -1
- package/workflows/dependabot-ci-fix.yaml +15 -1
- package/workflows/pr-fix.yaml +6 -1
- package/workflows/prompts/dependabot-ci-fix.md +16 -6
- package/workflows/prompts/dependabot-pr-merge.md +16 -9
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
*/
|
|
27
27
|
import { renderCiFailureReport } from "./github/github.js";
|
|
28
28
|
import { PR_FIX_SHAPED_WORKFLOWS } from "../workflows/target-policy.js";
|
|
29
|
+
import { HOLD_LABEL } from "../cron/dependabot-discovery.js";
|
|
29
30
|
import { ATTEMPT_FREE_CLASSES } from "./fix-markers.js";
|
|
30
31
|
import { renderPrNotes } from "./pr-notes.js";
|
|
31
32
|
import { PR_NOTES_FILE_NAME, VERIFY_SCRIPT_NAME } from "./fix-scratch.js";
|
|
@@ -92,6 +93,67 @@ function readDegradedDrop(decision, state, inputs) {
|
|
|
92
93
|
readDegraded: true,
|
|
93
94
|
};
|
|
94
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* "A maintainer told us to stay off this pull request" — the HOLD
|
|
98
|
+
* (02-hold-label.md, locked decisions 2–4).
|
|
99
|
+
*
|
|
100
|
+
* The ONE label the harness reads as a decision input, and the reason
|
|
101
|
+
* `requires-human` no longer is one. It is a LIVE PRECONDITION in the same
|
|
102
|
+
* sense `baseChecksState` is: present or absent right now, re-evaluated on every
|
|
103
|
+
* event, nothing persisted, nothing to migrate, and removing it resumes the bot
|
|
104
|
+
* with no record to clean up. That is also why it needs no `author_association`
|
|
105
|
+
* check — GitHub already requires triage permission to add or remove a label.
|
|
106
|
+
*
|
|
107
|
+
* It sits above EVERY other guard except {@link readDegradedDrop}, and the
|
|
108
|
+
* ordering is the whole design:
|
|
109
|
+
*
|
|
110
|
+
* - **above the run lock**, because the lock reports "come back later" and the
|
|
111
|
+
* hold reports "do not come back" — reporting the transient one would be true
|
|
112
|
+
* and useless;
|
|
113
|
+
* - **above the fork check**, because a fork notice explains a decision we did
|
|
114
|
+
* not take;
|
|
115
|
+
* - **above the budgets**, because they escalate — labelling `requires-human`
|
|
116
|
+
* and commenting on a PR a maintainer has explicitly told us to leave alone is
|
|
117
|
+
* the exact opposite of what the label asked for;
|
|
118
|
+
* - **below the degraded read**, because `labels: []` is what a failed
|
|
119
|
+
* `getPullRequest` degrades to, so on that path we do not know whether the
|
|
120
|
+
* hold is there. "We could not read the PR" outranks every reading of it.
|
|
121
|
+
*
|
|
122
|
+
* It also beats an EXPLICIT request (locked decision 4) — otherwise it is not a
|
|
123
|
+
* block. The reply that owes the human an explanation belongs to the route that
|
|
124
|
+
* has one, not here: see {@link Decision.onHold}.
|
|
125
|
+
*/
|
|
126
|
+
function holdDrop(decision, state, label, inputs) {
|
|
127
|
+
if (!label || !state.labels.includes(label))
|
|
128
|
+
return null;
|
|
129
|
+
return {
|
|
130
|
+
decision,
|
|
131
|
+
reason: `on-hold: \`${label}\` is applied to this pull request — a maintainer asked me to stay ` +
|
|
132
|
+
`off it, so nothing runs until the label is removed`,
|
|
133
|
+
inputs: { ...inputs, holdLabel: label },
|
|
134
|
+
onHold: { label },
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The one reply a hold ever produces — for a human who asked and lost.
|
|
139
|
+
*
|
|
140
|
+
* Locked decision 4: the hold beats an explicit request, and the bot says so
|
|
141
|
+
* once. A silently-ignored direct instruction is worse than a refused one, and
|
|
142
|
+
* the person is right there waiting; every OTHER hold skip says nothing at all.
|
|
143
|
+
*
|
|
144
|
+
* Pure, so the wording is table-testable, and SHARED by the two routes that have
|
|
145
|
+
* a human on the other end — the router's subject-level ignore (issue and PR
|
|
146
|
+
* comments) and the dispatcher's PR gate. One string, so a maintainer gets the
|
|
147
|
+
* same sentence wherever they asked.
|
|
148
|
+
*
|
|
149
|
+
* It names the label, because the label is the remedy: "I'm not acting" without
|
|
150
|
+
* "remove X" is a dead end, and the name is operator-configurable so it cannot
|
|
151
|
+
* be a literal in the prose.
|
|
152
|
+
*/
|
|
153
|
+
export function holdReply(label) {
|
|
154
|
+
return (`I'm staying off this one — it's labelled \`${label}\`, which tells me not to act on it. ` +
|
|
155
|
+
`Remove the label and ask me again and I'll pick it up.`);
|
|
156
|
+
}
|
|
95
157
|
function runLockDrop(decision, state, inputs) {
|
|
96
158
|
if (!state.runInFlight)
|
|
97
159
|
return null;
|
|
@@ -189,10 +251,14 @@ export function mayMerge(state, cfg) {
|
|
|
189
251
|
* precondition. The diagnosis class remains an explanation, never a dispatch
|
|
190
252
|
* input.
|
|
191
253
|
*
|
|
192
|
-
* **`requires-human` is a notification, not a state
|
|
193
|
-
* escalated at head SHA X", so the guard is
|
|
194
|
-
*
|
|
195
|
-
*
|
|
254
|
+
* **`requires-human` is a notification, not a state** — and now literally so.
|
|
255
|
+
* The state is "we escalated at head SHA X" (`escalatedAtSha`), so the guard is
|
|
256
|
+
* stateful rather than the label, and a maintainer's push re-arms the loop with
|
|
257
|
+
* nothing to remove by hand. The label itself is read NOWHERE: a human who wants
|
|
258
|
+
* the bot off a PR applies the HOLD label instead (see {@link holdDrop}), which
|
|
259
|
+
* is an instruction rather than a hold inferred from a label we also apply
|
|
260
|
+
* ourselves — an inference that only ever worked on a PR we had never touched
|
|
261
|
+
* (02-hold-label.md).
|
|
196
262
|
*
|
|
197
263
|
* Three of the skips are terminal for this problem and carry an
|
|
198
264
|
* {@link EscalationCase} so the caller labels and explains them on the PR
|
|
@@ -204,8 +270,14 @@ export function resolveFixDisposition(state, cfg, opts = {}) {
|
|
|
204
270
|
baseChecksState: state.baseChecksState,
|
|
205
271
|
checksState: state.checksState,
|
|
206
272
|
headSha: state.headSha,
|
|
207
|
-
escalatedBy: state.escalatedBy,
|
|
208
273
|
escalatedAtSha: state.escalatedAtSha,
|
|
274
|
+
// The retry direction of human intent. Read by NO branch below — a recorded
|
|
275
|
+
// retry has already done its work in `applyDerivedState` (the counter, the
|
|
276
|
+
// cost baseline and `escalatedAtSha` are all re-armed by the time this
|
|
277
|
+
// function runs) — but carried on `inputs` so the run detail panel can say
|
|
278
|
+
// WHO asked and why the budgets look freshly armed on a PR that has clearly
|
|
279
|
+
// been round this loop before.
|
|
280
|
+
intervention: state.intervention,
|
|
209
281
|
attempt: state.attempt,
|
|
210
282
|
maxAttempts: cfg.maxAttempts,
|
|
211
283
|
cumulativeCostUsd: state.cumulativeCostUsd,
|
|
@@ -247,14 +319,21 @@ export function resolveFixDisposition(state, cfg, opts = {}) {
|
|
|
247
319
|
inputs,
|
|
248
320
|
};
|
|
249
321
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
322
|
+
// OUR OWN escalation record — `escalatedAtSha !== null`, never the label.
|
|
323
|
+
// `requires-human` is a NOTIFICATION and is read by nothing (02-hold-label.md):
|
|
324
|
+
// a maintainer who wants us off a PR applies the HOLD label above, which is an
|
|
325
|
+
// instruction rather than something we infer from a label we also write
|
|
326
|
+
// ourselves. This branch is only ever about a run of OURS that stopped.
|
|
327
|
+
//
|
|
328
|
+
// A recorded RETRY consumes the record, so this branch simply does not fire
|
|
329
|
+
// after one — there is no `intervention` clause here on purpose
|
|
330
|
+
// (03-retry-intervention.md). `explicitRequest` still bypasses it, and that is
|
|
331
|
+
// now a much smaller carve-out than it was: it used to clear the guard and
|
|
332
|
+
// fall straight through into `budget-exhausted` below, which re-escalated and
|
|
333
|
+
// posted a duplicate comment. A retry moves the WINDOW rather than lifting the
|
|
334
|
+
// guard, and `escalatePr`'s own same-head dedup catches whatever gets here
|
|
335
|
+
// anyway.
|
|
336
|
+
if (state.escalatedAtSha !== null && !opts.explicitRequest) {
|
|
258
337
|
// We escalated. Still binding only while the head is the one we escalated
|
|
259
338
|
// at, or a commit WE authored on top of it — anyone else's push IS the
|
|
260
339
|
// human intervention we asked for, and re-arms both the counter and the
|
|
@@ -480,8 +559,10 @@ export function resolveReviewTrigger(state, cfg, opts = {}) {
|
|
|
480
559
|
* counter and cost cap are facts about the FIX FAMILY, and a PR whose fix
|
|
481
560
|
* attempts are exhausted must still be mergeable the moment CI goes green.
|
|
482
561
|
* What the two share is the pair of guards that are facts about the PULL
|
|
483
|
-
* REQUEST — "
|
|
484
|
-
* head" — so those are restated here rather than inherited.
|
|
562
|
+
* REQUEST — "we already escalated at this head" and "we already assessed this
|
|
563
|
+
* exact head" — so those are restated here rather than inherited. "A human told
|
|
564
|
+
* us to stay out" is no longer one of them: that is the HOLD, resolved once for
|
|
565
|
+
* every workflow in {@link resolveDispatchDisposition} above all three of these.
|
|
485
566
|
*
|
|
486
567
|
* Note what is deliberately NOT here: {@link mayMerge}. That predicate gates
|
|
487
568
|
* the ACTION (Phase 5's merge decision, inside the run, where the impact tier
|
|
@@ -498,7 +579,6 @@ export function resolveMergeDisposition(state, cfg, opts = {}) {
|
|
|
498
579
|
settledCheckCount: state.settledCheckCount,
|
|
499
580
|
requireSettledChecks: cfg.requireSettledChecks,
|
|
500
581
|
headSha: state.headSha,
|
|
501
|
-
escalatedBy: state.escalatedBy,
|
|
502
582
|
escalatedAtSha: state.escalatedAtSha,
|
|
503
583
|
runInFlight: state.runInFlight,
|
|
504
584
|
explicitRequest: !!opts.explicitRequest,
|
|
@@ -518,13 +598,6 @@ export function resolveMergeDisposition(state, cfg, opts = {}) {
|
|
|
518
598
|
const locked = runLockDrop("skip", state, inputs);
|
|
519
599
|
if (locked)
|
|
520
600
|
return locked;
|
|
521
|
-
if (state.escalatedBy === "human" && !opts.explicitRequest) {
|
|
522
|
-
return {
|
|
523
|
-
decision: "skip",
|
|
524
|
-
reason: "human-hold: requires-human was applied by a human, not by one of our runs — a permanent override",
|
|
525
|
-
inputs,
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
601
|
// Still binding only while the head is the one we escalated at. NOTE the
|
|
529
602
|
// missing `|| state.headIsOurs` that `resolveFixDisposition` carries: on the
|
|
530
603
|
// fix route our own commit on top of an escalation is another attempt at the
|
|
@@ -542,7 +615,7 @@ export function resolveMergeDisposition(state, cfg, opts = {}) {
|
|
|
542
615
|
// `already-assessed` guard underneath bounds it to ONE assessment per head
|
|
543
616
|
// SHA either way. That is the same bound every never-escalated PR already
|
|
544
617
|
// lives under.
|
|
545
|
-
if (state.
|
|
618
|
+
if (state.escalatedAtSha !== null && !opts.explicitRequest) {
|
|
546
619
|
if (state.headSha === state.escalatedAtSha) {
|
|
547
620
|
return {
|
|
548
621
|
decision: "skip",
|
|
@@ -594,8 +667,32 @@ export function resolveMergeDisposition(state, cfg, opts = {}) {
|
|
|
594
667
|
* lock covers — and a caller that reaches one of the dispositions directly
|
|
595
668
|
* (`pr-escalation.ts`'s tests, the evals harness) gets the same answer as one
|
|
596
669
|
* that comes through here. See {@link runLockDrop}.
|
|
670
|
+
*
|
|
671
|
+
* The HOLD is the one guard that lives HERE rather than inside the three, and
|
|
672
|
+
* for the mirror-image reason: it is not a verdict about a fix, a merge or a
|
|
673
|
+
* review, it is an instruction about the SUBJECT, so it must read identically
|
|
674
|
+
* whichever branch would have answered — including the `ungated` fallback, which
|
|
675
|
+
* is how a workflow nobody has classified yet still honours it. See
|
|
676
|
+
* {@link holdDrop} for why it sits above everything except the degraded read.
|
|
597
677
|
*/
|
|
598
678
|
export function resolveDispatchDisposition(workflowName, state, cfg, opts = {}) {
|
|
679
|
+
// The HOLD, above every other guard except the degraded read.
|
|
680
|
+
//
|
|
681
|
+
// The `readDegradedDrop` probe below is a QUESTION, not the answer: when the
|
|
682
|
+
// PR read failed we fall through untouched, so the per-workflow disposition
|
|
683
|
+
// produces the degraded drop itself — with its own `inputs` and, for
|
|
684
|
+
// `pr-review`, the `review` verdict the check-run placement needs. Deciding it
|
|
685
|
+
// twice here would flatten that.
|
|
686
|
+
const holdInputs = {
|
|
687
|
+
workflowName,
|
|
688
|
+
labels: state.labels,
|
|
689
|
+
explicitRequest: !!opts.explicitRequest,
|
|
690
|
+
};
|
|
691
|
+
if (!readDegradedDrop("skip", state, holdInputs)) {
|
|
692
|
+
const held = holdDrop("skip", state, cfg.holdLabel ?? HOLD_LABEL, holdInputs);
|
|
693
|
+
if (held)
|
|
694
|
+
return held;
|
|
695
|
+
}
|
|
599
696
|
if (PR_FIX_SHAPED_WORKFLOWS.has(workflowName)) {
|
|
600
697
|
return resolveFixDisposition(state, cfg.fix, opts);
|
|
601
698
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-decisions.js","sourceRoot":"","sources":["../../src/engine/pr-decisions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAmG1E,8EAA8E;AAC9E,mCAAmC;AACnC,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAS,gBAAgB,CAAI,QAAW,EAAE,KAAc,EAAE,MAA+B;IACvF,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC9E,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO;QACL,QAAQ;QACR,MAAM,EACJ,mDAAmD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B;YAC9F,gDAAgD;QAClD,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;QACzC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AAiB;QACzC,aAAa,EACX,GAAG,KAAK,SAAS,IAAI,KAAK,CAAC,cAAc,IAAI,GAAG,CAAC,iBAAiB;KACrE,CAAC;AACJ,CAAC"}
|
|
@@ -25,19 +25,18 @@
|
|
|
25
25
|
* `escalatedAtSha` is read by `applyDerivedState` off the PRIOR RUN'S persisted
|
|
26
26
|
* `context.prState`, via `latestForTrigger`. A dispatch-time skip returns
|
|
27
27
|
* `{ kind: "skipped" }` and writes no row. So an escalation that stayed a
|
|
28
|
-
* row-less skip would never persist `escalatedAtSha`,
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* out" and latch the PR dead: exactly the one-way door 09 → S1 set out to
|
|
33
|
-
* remove, reintroduced by the feature meant to remove it.
|
|
28
|
+
* row-less skip would never persist `escalatedAtSha`, the guard would never
|
|
29
|
+
* bind, and every subsequent event on the same dead PR would escalate again —
|
|
30
|
+
* re-applying the label and posting the comment once per event, which is the
|
|
31
|
+
* one behaviour worse than the silent skip this module replaced.
|
|
34
32
|
*
|
|
35
33
|
* That is also why the row is written BEFORE the label. Every ordering has a
|
|
36
34
|
* crash window; this one chooses the harmless side of it. Row-then-crash leaves
|
|
37
|
-
* an escalation record with no label — the guard
|
|
38
|
-
* the
|
|
39
|
-
* Label-then-crash would leave a label with no record
|
|
40
|
-
*
|
|
35
|
+
* an escalation record with no label — the guard still binds off the record, so
|
|
36
|
+
* the PR is quiet and the label lands on the next escalation.
|
|
37
|
+
* Label-then-crash would leave a label with no record: a `requires-human` on the
|
|
38
|
+
* PR that nothing in the code can see, so the next event escalates and comments
|
|
39
|
+
* all over again.
|
|
41
40
|
*
|
|
42
41
|
* The row is recorded **`succeeded`**, not `failed`: 09 → S1 reserves `failed`
|
|
43
42
|
* for MALFUNCTION, and correct-but-stopped outcomes record `succeeded`. The run
|
|
@@ -50,20 +49,34 @@
|
|
|
50
49
|
* Neither `postComment` nor `addLabels` de-duplicates, and no API scan is used
|
|
51
50
|
* to ask "did we already comment". The once-only property comes from the
|
|
52
51
|
* persisted record instead: the next dispatch at the same head reads
|
|
53
|
-
* `escalatedAtSha` back
|
|
54
|
-
* `
|
|
52
|
+
* `escalatedAtSha` back and takes the `escalated:` skip — which carries no
|
|
53
|
+
* `EscalationCase`, so nothing is applied.
|
|
55
54
|
* A maintainer's push makes it a fresh problem, the guard falls away, and the
|
|
56
55
|
* PR is dispatchable again with no label to remove by hand.
|
|
56
|
+
*
|
|
57
|
+
* That property is therefore **entirely dependent on the `escalated:` guard
|
|
58
|
+
* firing first**, and the guard is bypassable: an explicit `@bot` request skips
|
|
59
|
+
* it by design, and a recorded retry consumes the record outright
|
|
60
|
+
* (03-retry-intervention.md). Every bypass lands back here, so `escalatePr`
|
|
61
|
+
* additionally refuses outright when it has already escalated at this exact
|
|
62
|
+
* head. Re-recording would be harmless; re-commenting is #256.
|
|
57
63
|
*/
|
|
58
64
|
import type { StateDb } from "../state/db.js";
|
|
59
65
|
import type { GitHubClient } from "./github/github.js";
|
|
60
66
|
import type { FixConfig } from "../config/config.js";
|
|
61
67
|
import type { Decision, EscalationCase, FixDisposition } from "./pr-decisions.js";
|
|
62
|
-
import { type PrState } from "./pr-state.js";
|
|
68
|
+
import { INTERVENTION_PHASE, type PrIntervention, type PrState } from "./pr-state.js";
|
|
63
69
|
/** Collaborators {@link escalatePr} needs. `github` is null in chat-only mode. */
|
|
64
70
|
export interface EscalationDeps {
|
|
65
71
|
db: StateDb;
|
|
66
72
|
github: GitHubClient | null;
|
|
73
|
+
/**
|
|
74
|
+
* The HOLD label (`hold.label`) and `@<botName>`, for the escalation
|
|
75
|
+
* comment's list of exits. Optional so every existing construction still
|
|
76
|
+
* compiles; the packaged names are the fallback.
|
|
77
|
+
*/
|
|
78
|
+
holdLabel?: string;
|
|
79
|
+
botMention?: string;
|
|
67
80
|
}
|
|
68
81
|
/**
|
|
69
82
|
* The phase name the escalation row terminates on. Not a real phase — no
|
|
@@ -134,6 +147,13 @@ export interface ForkNoticeOutcome {
|
|
|
134
147
|
export declare function noticeForkPr(workflowName: string, state: PrState, deps: EscalationDeps): Promise<ForkNoticeOutcome | null>;
|
|
135
148
|
/** The fork-PR notice. Pure, so its wording is table-testable. */
|
|
136
149
|
export declare function renderForkNotice(state: PrState): string;
|
|
150
|
+
/** The operator-configurable names {@link renderEscalationComment} has to speak. */
|
|
151
|
+
export interface EscalationCommentVocab {
|
|
152
|
+
/** `hold.label` — the label a maintainer applies to keep us off entirely. */
|
|
153
|
+
holdLabel: string;
|
|
154
|
+
/** `@<botName>` — the handle the `retry` command is addressed to. */
|
|
155
|
+
botMention: string;
|
|
156
|
+
}
|
|
137
157
|
/**
|
|
138
158
|
* The escalation comment. Pure, so its wording is table-testable.
|
|
139
159
|
*
|
|
@@ -144,9 +164,83 @@ export declare function renderForkNotice(state: PrState): string;
|
|
|
144
164
|
* is re-derived here: the reason comes from the decision, so the log line, this
|
|
145
165
|
* comment and the admin detail panel are three renderings of ONE source.
|
|
146
166
|
*
|
|
147
|
-
* The closing
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
167
|
+
* ## The closing section is a contract
|
|
168
|
+
*
|
|
169
|
+
* It is the only place most people will ever learn how to un-stick the bot, so
|
|
170
|
+
* **every exit it names has to work and every exit that works has to be named.**
|
|
171
|
+
* It used to fail both halves. It promised *"you can also ask me directly in a
|
|
172
|
+
* comment to override"*, which the code refused — an explicit request cleared
|
|
173
|
+
* the escalation guard and then fell straight into the same budget gate, so the
|
|
174
|
+
* only thing asking achieved was a duplicate copy of this comment — and it did
|
|
175
|
+
* not mention the hold label at all, because it predated it.
|
|
176
|
+
*
|
|
177
|
+
* After 02-hold-label.md and 03-retry-intervention.md the true exits are four,
|
|
178
|
+
* and the split below is the useful one: three of them mean *"go again"* and
|
|
179
|
+
* re-arm both budgets identically (locked decision 7), and the fourth means the
|
|
180
|
+
* opposite. Listing the hold beside them is deliberate — a maintainer reading
|
|
181
|
+
* this is, roughly half the time, someone who wants the bot to stop rather than
|
|
182
|
+
* to try harder, and until now there was nothing here telling them how.
|
|
183
|
+
*/
|
|
184
|
+
export declare function renderEscalationComment(kase: EscalationCase, reason: string, state: PrState, fix: FixConfig, vocab: EscalationCommentVocab): string;
|
|
185
|
+
/**
|
|
186
|
+
* The phase name a standalone intervention row terminates on. Same non-phase
|
|
187
|
+
* convention as {@link ESCALATION_PHASE} and {@link FORK_NOTICE_PHASE} — with
|
|
188
|
+
* one difference that moves where it is declared: `pr-state.ts` has to
|
|
189
|
+
* RECOGNISE this row when it derives `assessedHeadShaByWorkflow`, so the
|
|
190
|
+
* constant is defined there (this module already imports that one, and the
|
|
191
|
+
* reverse edge would be a cycle) and re-exported here, which is where every
|
|
192
|
+
* caller expects to find it.
|
|
193
|
+
*/
|
|
194
|
+
export { INTERVENTION_PHASE };
|
|
195
|
+
/** What {@link recordIntervention} did, for the caller's log line and for tests. */
|
|
196
|
+
export interface InterventionOutcome {
|
|
197
|
+
runId: string;
|
|
198
|
+
via: PrIntervention["via"];
|
|
199
|
+
at: string;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Persist a retry that produced **no run**, so it is not silently lost.
|
|
203
|
+
*
|
|
204
|
+
* ## Where the record normally lives — and why this is the exception
|
|
205
|
+
*
|
|
206
|
+
* A retry that is immediately followed by a dispatch needs no row of its own:
|
|
207
|
+
* `dispatchWorkflow` persists the whole resolved snapshot on the run's
|
|
208
|
+
* `context.prState`, so the dispatched run itself carries the intervention and
|
|
209
|
+
* the next dispatch reads it back exactly as it reads `escalatedAtSha`. That is
|
|
210
|
+
* the common path and it is free.
|
|
211
|
+
*
|
|
212
|
+
* The exception is a retry the gate then skips for an unrelated reason — most
|
|
213
|
+
* usefully `upstream-broken`, where the base branch is red at the moment the
|
|
214
|
+
* maintainer asks. A skip returns `{ kind: "skipped" }` and writes NO row (09 →
|
|
215
|
+
* D1), so without this the ask evaporates: the base goes green an hour later,
|
|
216
|
+
* the PR is picked up, and the budget is still exhausted, so it escalates again
|
|
217
|
+
* and the maintainer's retry never happened.
|
|
218
|
+
*
|
|
219
|
+
* Same shape and same ordering as {@link escalatePr} — the record first, before
|
|
220
|
+
* any GitHub write — even though the crash window here is gentler (worst case a
|
|
221
|
+
* retry is lost and the maintainer asks again). Two mechanisms with the same
|
|
222
|
+
* shape and different orderings is how the next reader gets it wrong. There is
|
|
223
|
+
* no GitHub write at all today; the ordering is stated so that adding one later
|
|
224
|
+
* cannot get it backwards.
|
|
225
|
+
*
|
|
226
|
+
* ## The seam the admin API and the CLI use
|
|
227
|
+
*
|
|
228
|
+
* `lastlight pr retry <owner/repo#N>` is a thin client over an admin endpoint,
|
|
229
|
+
* and the endpoint is exactly this pair of calls:
|
|
230
|
+
*
|
|
231
|
+
* ```ts
|
|
232
|
+
* const state = await resolvePrState(owner, repo, prNumber, {
|
|
233
|
+
* github, db, botLogin,
|
|
234
|
+
* intervention: { via: "api", by: session.login, note: reason },
|
|
235
|
+
* });
|
|
236
|
+
* const outcome = await recordIntervention(workflowName, state, { db, github });
|
|
237
|
+
* ```
|
|
238
|
+
*
|
|
239
|
+
* `resolvePrState` stamps `at`/`atSha` and re-arms the snapshot; this persists
|
|
240
|
+
* it. The route may then dispatch immediately (in which case this row is
|
|
241
|
+
* redundant but harmless — the guard below makes the pair idempotent) or leave
|
|
242
|
+
* the next cron tick to pick the PR up.
|
|
243
|
+
*
|
|
244
|
+
* Never throws.
|
|
151
245
|
*/
|
|
152
|
-
export declare function
|
|
246
|
+
export declare function recordIntervention(workflowName: string, state: PrState, deps: EscalationDeps): Promise<InterventionOutcome | null>;
|