lastlight-core 0.23.4 → 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.
Files changed (42) hide show
  1. package/config/default.yaml +16 -0
  2. package/dist/admin/routes.d.ts +29 -0
  3. package/dist/admin/routes.js +136 -0
  4. package/dist/admin/routes.js.map +1 -1
  5. package/dist/config/config.d.ts +23 -0
  6. package/dist/config/config.js +25 -0
  7. package/dist/config/config.js.map +1 -1
  8. package/dist/cron/dependabot-discovery.d.ts +43 -4
  9. package/dist/cron/dependabot-discovery.js +47 -7
  10. package/dist/cron/dependabot-discovery.js.map +1 -1
  11. package/dist/engine/dispatcher.d.ts +5 -1
  12. package/dist/engine/dispatcher.js +88 -8
  13. package/dist/engine/dispatcher.js.map +1 -1
  14. package/dist/engine/fix-markers.d.ts +27 -0
  15. package/dist/engine/fix-markers.js +31 -0
  16. package/dist/engine/fix-markers.js.map +1 -1
  17. package/dist/engine/github/github.d.ts +1 -1
  18. package/dist/engine/github/github.js +1 -1
  19. package/dist/engine/pr-decisions.d.ts +71 -8
  20. package/dist/engine/pr-decisions.js +121 -24
  21. package/dist/engine/pr-decisions.js.map +1 -1
  22. package/dist/engine/pr-escalation.d.ts +112 -18
  23. package/dist/engine/pr-escalation.js +204 -31
  24. package/dist/engine/pr-escalation.js.map +1 -1
  25. package/dist/engine/pr-state.d.ts +152 -15
  26. package/dist/engine/pr-state.js +351 -94
  27. package/dist/engine/pr-state.js.map +1 -1
  28. package/dist/engine/router.js +116 -4
  29. package/dist/engine/router.js.map +1 -1
  30. package/dist/index.js +12 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/sandbox/index.js +41 -1
  33. package/dist/sandbox/index.js.map +1 -1
  34. package/dist/sandbox/k8s/init-clone.d.ts +7 -4
  35. package/dist/sandbox/k8s/init-clone.js +35 -5
  36. package/dist/sandbox/k8s/init-clone.js.map +1 -1
  37. package/dist/workflows/simple.d.ts +24 -1
  38. package/dist/workflows/simple.js +39 -7
  39. package/dist/workflows/simple.js.map +1 -1
  40. package/package.json +3 -3
  41. package/workflows/prompts/dependabot-ci-fix.md +16 -6
  42. package/workflows/prompts/dependabot-pr-merge.md +16 -9
@@ -21,10 +21,21 @@
21
21
  */
22
22
  import { PR_FIX_SHAPED_WORKFLOWS } from "../workflows/target-policy.js";
23
23
  import { prScopedWorkflows } from "../workflows/pr-scope.js";
24
- import { REQUIRES_HUMAN_LABEL } from "../cron/dependabot-discovery.js";
25
24
  import { readHarvestedMarkers } from "./fix-harvest.js";
26
- import { ATTEMPT_FREE_CLASSES, boundAttemptLines, renderAttemptLine, } from "./fix-markers.js";
27
- import { boundNotes, coerceNotes, markNotesStale } from "./pr-notes.js";
25
+ import { ATTEMPT_FREE_CLASSES, boundAttemptLines, renderAttemptLine, renderInterventionLine, } from "./fix-markers.js";
26
+ import { boundNotes, coerceNotes, markNotesStale, sanitizeNoteText, } from "./pr-notes.js";
27
+ import { REQUIRES_HUMAN_LABEL } from "../cron/dependabot-discovery.js";
28
+ /**
29
+ * The phase a STANDALONE retry record terminates on — `recordIntervention`'s row
30
+ * (`./pr-escalation.ts`, which re-exports this as its public name).
31
+ *
32
+ * Defined HERE, at the reading end, because the value is load-bearing on this
33
+ * side: {@link applyDerivedState} has to recognise the row to keep it out of
34
+ * {@link PrState.assessedHeadShaByWorkflow}. Importing it from
35
+ * `./pr-escalation.ts` would close a module cycle (that module already imports
36
+ * this one), so the definition lives on the side with no outbound edge.
37
+ */
38
+ export const INTERVENTION_PHASE = "retry-requested";
28
39
  /**
29
40
  * Every PR-scoped workflow — the span of the run lock (09 → S4).
30
41
  *
@@ -82,7 +93,7 @@ export async function resolvePrState(owner, repo, prNumber, deps) {
82
93
  attempt: 1,
83
94
  flakyDeferrals: 0,
84
95
  escalatedAtSha: null,
85
- escalatedBy: null,
96
+ intervention: null,
86
97
  forkNoticedAtSha: null,
87
98
  priorAttempts: [],
88
99
  notes: [],
@@ -201,6 +212,21 @@ export function applyDerivedState(state, deps) {
201
212
  const succeeded = deps.db.runs.latestSucceededForTriggers(prScoped, triggerId);
202
213
  state.assessedHeadShaByWorkflow = {};
203
214
  for (const [name, run] of Object.entries(succeeded)) {
215
+ // A `retry-requested` row is not evidence of assessment — it is the record
216
+ // of a dispatch that DID NOT HAPPEN (`recordIntervention`, written when a
217
+ // retry is re-armed and then skipped for an unrelated reason such as
218
+ // `upstream-broken`). It is stamped `succeeded` at the current head like
219
+ // every other ledger row, so counting it here made the one row that exists
220
+ // to preserve a maintainer's ask the thing that swallowed it: the next cold
221
+ // resolve read "we already handled this SHA" and refused the retry with the
222
+ // budgets sitting freshly armed.
223
+ //
224
+ // Skipping it drops the workflow's entry rather than falling back to an
225
+ // older row, which is the conservative direction for this field: worst case
226
+ // we re-assess a head, and the un-assess below has to be able to override a
227
+ // real run at this head anyway.
228
+ if (run.currentPhase === INTERVENTION_PHASE)
229
+ continue;
204
230
  const sha = priorPrState(run.context)?.headSha;
205
231
  if (typeof sha === "string" && sha)
206
232
  state.assessedHeadShaByWorkflow[name] = sha;
@@ -215,13 +241,22 @@ export function applyDerivedState(state, deps) {
215
241
  // just the fix family, because it is keyed on the PR (10-pr-memory.md). Two
216
242
  // things read it: the journal (a `pr-review` between two fix attempts carries
217
243
  // the accumulation forward and may have added to it) and the escalation
218
- // record, which has to answer "have we ever touched this PR at all" and would
219
- // get the wrong answer from the fix family alone. Falls back to the
220
- // fix-family row when there is no wider one.
244
+ // record, because `escalatePr` records under whichever workflow was
245
+ // dispatching — which may be `dependabot-pr-merge` or `pr-review`, neither of
246
+ // which the fix family would find. Falls back to the fix-family row when there
247
+ // is no wider one.
221
248
  const priorAny = deps.db.runs.latestForTrigger(prScoped, triggerId) ?? prior;
222
249
  const priorAnyState = priorPrState(priorAny?.context);
223
- applyEscalationRecord(state, priorState, priorAny, priorAnyState);
224
- state.notes = deriveNotes(state, priorAny, priorAnyState);
250
+ applyEscalationRecord(state, priorState, priorAnyState);
251
+ // The RETRY direction of human intent (03-retry-intervention.md). Resolved
252
+ // BEFORE everything below, because `retried` is one of the two things that
253
+ // make a problem fresh — and it may clear {@link PrState.escalatedAtSha},
254
+ // which `applyEscalationRecord` has just carried forward.
255
+ const retried = applyIntervention(state, priorState, priorAnyState, deps);
256
+ state.notes = deriveNotes(state, priorAny, priorAnyState, retried);
257
+ // …and an ask still waiting for a run takes the head back off the
258
+ // `already-assessed` dedup, for as many ticks as that takes.
259
+ unassessForPendingRetry(state, succeeded);
225
260
  // The fork-PR notice's dedup, carried forward off the WIDEST prior row for
226
261
  // the same reason the escalation record is: `noticeForkPr` records under
227
262
  // whichever workflow was dispatching. Never invalidated by a push — see the
@@ -231,10 +266,11 @@ export function applyDerivedState(state, deps) {
231
266
  (typeof priorAnyState?.forkNoticedAtSha === "string" ? priorAnyState.forkNoticedAtSha : null);
232
267
  // The cost WINDOW, on the same boundary the attempt counter uses. `sameProblem`
233
268
  // is the whole definition: while it holds we carry the prior run's baseline,
234
- // and when someone else pushes we re-stamp it to the lifetime total so the
235
- // fresh problem starts at zero — which is exactly what makes a maintainer's
236
- // push re-arm the budget the way it already re-armed the attempt counter.
237
- const freshProblem = !sameProblem(state, priorState);
269
+ // and when it breaks we re-stamp it to the lifetime total so the fresh problem
270
+ // starts at zero — which is exactly what makes a maintainer's push, or a
271
+ // recorded RETRY, re-arm the budget the way it re-arms the attempt counter.
272
+ // One predicate, both budgets: re-arming only the counter is #256.
273
+ const freshProblem = !sameProblem(state, priorState, retried);
238
274
  const priorBaseline = typeof priorState?.costBaselineUsd === "number" ? priorState.costBaselineUsd : 0;
239
275
  state.costBaselineUsd = freshProblem ? lifetimeCostUsd : priorBaseline;
240
276
  // `max(0, …)` for the one case that can go negative: a run row written before
@@ -242,77 +278,209 @@ export function applyDerivedState(state, deps) {
242
278
  // 0 and gets its full lifetime spend — correct — while a later re-stamp can
243
279
  // only ever move the baseline forward.
244
280
  state.cumulativeCostUsd = Math.max(0, lifetimeCostUsd - state.costBaselineUsd);
245
- const history = deriveAttemptHistory(state, priorState, priorMarkers, prior ? didSpendAttempt(prior, deps) : false);
281
+ const history = deriveAttemptHistory(state, priorState, priorMarkers, prior ? didSpendAttempt(prior, deps) : false, retried);
246
282
  state.attempt = history.attempt;
247
283
  state.priorAttempts = history.priorAttempts;
248
284
  state.flakyDeferrals = history.flakyDeferrals;
249
285
  state.priorDiagnosisClass = history.priorDiagnosisClass;
250
286
  }
251
287
  /**
252
- * Whose `requires-human` is this, and at which head did we put it there?
253
- *
254
- * The two fields resolve together because they are one answer, and splitting
255
- * them is how they come to contradict each other.
256
- *
257
- * `requires-human` is a NOTIFICATION (09 → S1). The STATE is "**we** escalated
258
- * at head SHA X", because that is the only form a later push can invalidate —
259
- * which is what distinguishes a bot escalation (cleared by the next human push,
260
- * with no label to remove by hand) from a maintainer applying the label to mean
261
- * "bot, stay out" (a permanent override we must honour).
262
- *
263
- * `escalatedAtSha` is written by `./pr-escalation.ts` and by nothing else — but
264
- * `escalatePr` is not the only way OUR label reaches a pull request, and the two
265
- * other routes leave it on with no SHA behind it:
266
- *
267
- * 1. **The agent applies it mid-run.** The packaged prompts instruct it to —
268
- * `prompts/dependabot-ci-fix.md` when it cannot land the PR, and
269
- * `prompts/dependabot-pr-merge.md` for a FUNCTIONAL bump, by design.
270
- * `context.prState` is written at DISPATCH, before any phase runs, and is
271
- * never rewritten, so however correct that label is, the run persists no
272
- * escalation record.
273
- * 2. **The row predates this module.** Every PR already carrying the label at
274
- * upgrade has run rows with no `prState` at all.
275
- *
276
- * Under a bare `escalatedAtSha ? "us" : "human"` test both read as a
277
- * MAINTAINER's permanent hold: the bot mistaking its own label for a "stay
278
- * out", which is the exact one-way door 09 → S1 set out to remove — and case 2
279
- * does it to every already-labelled PR at once, on upgrade.
280
- *
281
- * So the discriminator is not the SHA but **whether any run of ours has ever
282
- * touched this PR**. A label on a PR no run of ours has ever seen can only be a
283
- * maintainer's; that is the hard permanent override, and it is preserved
284
- * exactly. A label on a PR we have worked is ours. Misreading in this direction
285
- * costs at most further dispatches on a PR already bounded by
286
- * `fix.maxAttempts` and `fix.maxCostUsd`; misreading it the other way is
287
- * permanent and needs a human to un-stick each PR by hand.
288
- *
289
- * When we conclude `"us"` with no recorded SHA, the prior run's head stands in
290
- * for it — that IS the head we were at when the label landed. Without it
291
- * `resolveFixDisposition`'s "same problem" test would compare against null, so
292
- * a bot that had just said "a human must look at this" would keep re-attempting
293
- * until the budget ran out, and `dependabot-pr-merge` would re-label and
294
- * re-comment a functional bump on every event.
288
+ * Drop the fix family's "already assessed at this head" entries while a retry
289
+ * asked AT THIS HEAD is still waiting to be served.
290
+ *
291
+ * Without this the `already-assessed` skip eats every retry that did not arrive
292
+ * as an explicit `@bot` request (the label and API surfaces): our own escalation
293
+ * row — and the attempt that exhausted the budget before it — both record
294
+ * `succeeded` at this head, so the dedup reads "we already handled this SHA" and
295
+ * the retry becomes a no-op with the budgets sitting freshly armed. A push
296
+ * clears the same guard by changing the SHA; a retry has to say it.
297
+ *
298
+ * **The ask survives the tick it arrived on**, which is the part that is easy to
299
+ * get wrong and was wrong: this used to fire only when the intervention was NEW
300
+ * to this dispatch, so a retry recorded on one tick and dispatched on a later
301
+ * one — exactly what `recordIntervention`'s standalone row exists for, and what
302
+ * the comment and label surfaces produce whenever the gate then skips for an
303
+ * unrelated reason — was un-assessed on the tick that could not use it and
304
+ * re-assessed on the tick that could. Hence the predicate is "has a run SERVED
305
+ * this ask", not "did this ask arrive just now".
306
+ *
307
+ * A run has served it when the row claiming the head carries the same
308
+ * {@link interventionKey} on its own snapshot: `dispatchWorkflow` persists the
309
+ * resolved snapshot on `context.prState`, so a run dispatched by the retry
310
+ * carries it and a run that finished before the ask does not. That is what
311
+ * bounds the whole clause — one extra window per ask, not a dedup switched off
312
+ * for the life of the pull request — and it is why the `retry-requested` row
313
+ * itself must be kept out of `assessedHeadShaByWorkflow` above: it carries the
314
+ * record forward, so it would read as having served an ask it was written to
315
+ * defer.
295
316
  */
296
- function applyEscalationRecord(state, prior, priorAny, priorAnyState) {
297
- // Carried forward off the prior run's context, so the stateful guard costs no
298
- // new storage, no extra API call and no label mutation (09 → S1). Read from
299
- // the fix family first and the wider PR-scoped row second: `escalatePr` records
300
- // under whichever workflow was dispatching, which may be `dependabot-pr-merge`
301
- // or `pr-review`.
302
- const recorded = prior?.escalatedAtSha ?? priorAnyState?.escalatedAtSha ?? null;
303
- state.escalatedAtSha = recorded;
304
- if (!state.labels.includes(REQUIRES_HUMAN_LABEL)) {
305
- state.escalatedBy = null;
317
+ function unassessForPendingRetry(state, succeeded) {
318
+ const ask = state.intervention;
319
+ if (!ask || !state.headSha || ask.atSha !== state.headSha)
306
320
  return;
321
+ const asked = interventionKey(ask);
322
+ for (const name of PR_FIX_SHAPED_WORKFLOWS) {
323
+ if (state.assessedHeadShaByWorkflow[name] !== state.headSha)
324
+ continue;
325
+ const seen = interventionKey(coerceIntervention(priorPrState(succeeded[name]?.context)?.intervention));
326
+ if (seen !== asked)
327
+ delete state.assessedHeadShaByWorkflow[name];
307
328
  }
308
- if (!priorAny) {
309
- // No run of ours has ever touched this PR, so nobody but a maintainer can
310
- // have applied the label. The one case the whole distinction exists for.
311
- state.escalatedBy = "human";
312
- return;
329
+ }
330
+ /**
331
+ * Resolve {@link PrState.intervention}, and answer the one question the rest of
332
+ * the derivation needs: **has a human asked for another try since the prior run
333
+ * saw one?**
334
+ *
335
+ * Three inputs, in order of authority:
336
+ *
337
+ * 1. An intervention handed in with this event ({@link PrStateDeps.intervention})
338
+ * — the comment and API surfaces.
339
+ * 2. The LABEL surface, detected rather than delivered. No webhook is needed:
340
+ * "we escalated at this head, the head has not moved, and our
341
+ * `requires-human` is gone" can only be a human having taken it off. It is
342
+ * trivially detectable only because 02-hold-label.md demoted the label to a
343
+ * pure notification — its absence is now pure evidence with no competing
344
+ * meaning.
345
+ * 3. Whatever the prior run already carried, folded forward exactly as
346
+ * {@link PrState.escalatedAtSha} and {@link PrState.forkNoticedAtSha} are.
347
+ *
348
+ * The answer is computed against the FIX-FAMILY prior specifically, not against
349
+ * whatever the record was folded off: an intervention first recorded on a
350
+ * `pr-review` run's snapshot has not yet re-armed the fix family's counter, and
351
+ * comparing against the wider row would silently swallow it.
352
+ *
353
+ * **A retry consumes the escalation.** Clearing `escalatedAtSha` is how the
354
+ * re-arm becomes visible to the pure decision functions, which see only the
355
+ * snapshot — and it is what bounds the whole mechanism: the next escalation
356
+ * writes a fresh `escalatedAtSha` at the same head, the intervention is by then
357
+ * the one the prior run already saw, and the `escalated:` skip binds again. No
358
+ * ping-pong, and no second budget to keep in step (locked decision 9's
359
+ * unbounded-retries property is bounded by the escalation, not by a counter).
360
+ */
361
+ function applyIntervention(state, prior, priorAny, deps) {
362
+ const carried = coerceIntervention(prior?.intervention) ?? coerceIntervention(priorAny?.intervention);
363
+ state.intervention = newIntervention(state, carried, deps) ?? carried;
364
+ const seen = interventionKey(coerceIntervention(prior?.intervention));
365
+ const retried = !!state.intervention && interventionKey(state.intervention) !== seen;
366
+ if (retried)
367
+ state.escalatedAtSha = null;
368
+ return retried;
369
+ }
370
+ /**
371
+ * The identity of one ask — "is this the same retry the prior run already
372
+ * consumed, or a new one?".
373
+ *
374
+ * The timestamp alone is not enough, and the reason is a real one rather than a
375
+ * theoretical one: `at` has millisecond resolution, so two asks that land in the
376
+ * same millisecond read as one and the second silently re-arms nothing. The
377
+ * whole tuple is what a human actually varied — when, how, who, and why — and
378
+ * two asks identical on all four are the same ask for every purpose this has.
379
+ *
380
+ * Shared with `recordIntervention` (`./pr-escalation.ts`), so the row-writing
381
+ * side and the folding side cannot disagree about what "already recorded" means.
382
+ */
383
+ export function interventionKey(intervention) {
384
+ if (!intervention)
385
+ return null;
386
+ const { at, via, by, note } = intervention;
387
+ return `${at}${via}${by ?? ""}${note ?? ""}`;
388
+ }
389
+ /**
390
+ * A retry recorded by THIS dispatch, or null when there is nothing new.
391
+ *
392
+ * Refuses without a head SHA, for the same reason `escalatePr` does: the SHA is
393
+ * the record's idempotency key, and one keyed to `""` would match nothing and
394
+ * re-arm forever.
395
+ */
396
+ function newIntervention(state, carried, deps) {
397
+ if (!state.headSha)
398
+ return null;
399
+ const req = deps.intervention;
400
+ if (req && (req.via === "comment" || req.via === "label" || req.via === "api")) {
401
+ // The note is FREE TEXT a maintainer typed, so it goes through the journal's
402
+ // own sanitizer before it is stored — flattened to one line, control
403
+ // characters stripped, and rejected outright if it carries `class=` or a
404
+ // marker tag. That is what lets it be replayed into a later prompt (as the
405
+ // journal's seam line, and as a `PrNote`) without being able to forge a
406
+ // token the parser reads.
407
+ const note = sanitizeNoteText(typeof req.note === "string" ? req.note : "");
408
+ return {
409
+ at: new Date().toISOString(),
410
+ atSha: state.headSha,
411
+ via: req.via,
412
+ ...(typeof req.by === "string" && req.by ? { by: req.by.slice(0, 100) } : {}),
413
+ ...(note ? { note } : {}),
414
+ };
313
415
  }
314
- state.escalatedBy = "us";
315
- state.escalatedAtSha = recorded ?? priorAnyState?.headSha ?? null;
416
+ // Surface 2 — `requires-human` came off by hand.
417
+ //
418
+ // Two guards beyond the obvious one. The labels have to be REAL: a failed
419
+ // `getPullRequest` degrades them to `[]`, which would read as "the label is
420
+ // gone" on every event we could not read. And a retry already recorded at
421
+ // this head is not re-detected — that is what makes the record once-only
422
+ // here, since a skip writes no run row for a second detection to read back.
423
+ //
424
+ // The known imprecision: a `requires-human` write that 403'd is
425
+ // indistinguishable from one a human removed, so an escalation whose label
426
+ // never landed earns ONE extra window at that head. Bounded (the guard below
427
+ // stops it repeating at the same head) and deliberately erring toward the
428
+ // human, since the alternative is a PR we stopped on with nothing on it
429
+ // saying so.
430
+ if (state.escalatedAtSha &&
431
+ state.escalatedAtSha === state.headSha &&
432
+ !state.labels.includes(REQUIRES_HUMAN_LABEL) &&
433
+ !state.readErrors.some((e) => e.startsWith("getPullRequest")) &&
434
+ !(carried && carried.atSha === state.headSha)) {
435
+ return { at: new Date().toISOString(), atSha: state.headSha, via: "label" };
436
+ }
437
+ return null;
438
+ }
439
+ /** Read a persisted intervention back, tolerating every shape a JSON column can hold. */
440
+ function coerceIntervention(raw) {
441
+ if (!raw || typeof raw !== "object")
442
+ return null;
443
+ const r = raw;
444
+ const via = typeof r.via === "string" ? r.via : "";
445
+ if (via !== "comment" && via !== "label" && via !== "api")
446
+ return null;
447
+ if (typeof r.at !== "string" || !r.at)
448
+ return null;
449
+ // Re-sanitized on the way IN as well as out, exactly as `coerceNotes` is: a
450
+ // row written by an older build must not carry a note past today's rules.
451
+ const note = sanitizeNoteText(typeof r.note === "string" ? r.note : "");
452
+ return {
453
+ at: r.at,
454
+ atSha: typeof r.atSha === "string" ? r.atSha : "",
455
+ via,
456
+ ...(typeof r.by === "string" && r.by ? { by: r.by } : {}),
457
+ ...(note ? { note } : {}),
458
+ };
459
+ }
460
+ /**
461
+ * At which head did one of OUR runs escalate this PR?
462
+ *
463
+ * One field, one read, no inference. It used to be two fields — this one and an
464
+ * `escalatedBy: "us" | "human" | null` derived from whether `requires-human` was
465
+ * present AND whether any run of ours had ever touched the PR — which made the
466
+ * LABEL a state in practice, exactly what 09 → S1 said it must not be. The
467
+ * inference was also only ever right on a PR the bot had never worked: on any
468
+ * other, a maintainer's hand-applied `requires-human` read as the bot's own
469
+ * escalation and was cleared by the next person's push.
470
+ *
471
+ * Deleting it is the fix (02-hold-label.md). The hold a maintainer actually
472
+ * wants is now its own label, checked at the dispatch gate as a live
473
+ * precondition; `requires-human` keeps being APPLIED — by `escalatePr` and by
474
+ * the agent per the dependabot prompts — and is read by nothing.
475
+ *
476
+ * What is left is carried forward off the prior run's context, so the stateful
477
+ * guard costs no new storage, no extra API call and no label mutation (09 → S1).
478
+ * Read from the fix family first and the wider PR-scoped row second:
479
+ * `escalatePr` records under whichever workflow was dispatching, which may be
480
+ * `dependabot-pr-merge` or `pr-review`.
481
+ */
482
+ function applyEscalationRecord(state, prior, priorAnyState) {
483
+ state.escalatedAtSha = prior?.escalatedAtSha ?? priorAnyState?.escalatedAtSha ?? null;
316
484
  }
317
485
  /**
318
486
  * Fold the PR's journal forward: what the prior run carried, plus what its own
@@ -331,12 +499,41 @@ function applyEscalationRecord(state, prior, priorAny, priorAnyState) {
331
499
  *
332
500
  * Both sources are re-sanitized on the way through (`coerceNotes`), so a row
333
501
  * written by an older build cannot carry a note past today's rejection rules.
502
+ *
503
+ * THE STALENESS BOUNDARY IS {@link headMoved}, NOT {@link sameProblem}. Those
504
+ * used to be the same predicate and are not any more: a RETRY makes the problem
505
+ * fresh for the two budgets without anything about the pull request having
506
+ * changed, so marking the journal stale on one would be a claim about the head
507
+ * that is simply untrue — the head is the same commit it was a minute ago. The
508
+ * doc comment above is the test: *"a claim about the old head is not evidence
509
+ * about the new one"* only bites when there IS a new head.
510
+ *
511
+ * A maintainer's own reason for the retry is appended here as a note, so it
512
+ * reaches the next attempt's prompt through the one channel that is already
513
+ * bounded and fenced. Like every other note it informs and cannot authorise.
334
514
  */
335
- function deriveNotes(state, priorRun, prior) {
515
+ function deriveNotes(state, priorRun, prior, retried) {
336
516
  const carried = coerceNotes(prior?.notes);
337
517
  const harvested = coerceNotes(priorRun ? readHarvestedMarkers(priorRun)?.notes : null);
338
518
  const merged = boundNotes([...carried, ...harvested]);
339
- return sameProblem(state, prior) ? merged : markNotesStale(merged);
519
+ const folded = headMoved(state, prior) ? markNotesStale(merged) : merged;
520
+ const note = retried ? state.intervention?.note : undefined;
521
+ if (!note)
522
+ return folded;
523
+ return boundNotes([
524
+ ...folded,
525
+ {
526
+ at: state.intervention.at,
527
+ // No run wrote it, so there is no run id to attribute it to; the
528
+ // provenance that matters is that a HUMAN asked, which the two fields
529
+ // below say. `renderNoteLine` drops empty parts.
530
+ runId: "",
531
+ workflow: "retry",
532
+ phase: state.intervention.via,
533
+ kind: "finding",
534
+ text: note,
535
+ },
536
+ ]);
340
537
  }
341
538
  /**
342
539
  * Fold one finished run into the PR's retry history.
@@ -351,8 +548,32 @@ function deriveNotes(state, priorRun, prior) {
351
548
  *
352
549
  * So a FRESH PROBLEM clears all three at once. Everything else appends the
353
550
  * prior run's rendered line and advances (or does not advance) the counter.
551
+ *
552
+ * ## The one asymmetry: the journal survives a retry
553
+ *
554
+ * Locked decision 8 (03-retry-intervention.md). Two ways to reach a fresh
555
+ * problem, and they are NOT the same fresh problem:
556
+ *
557
+ * | | `attempt` | cost baseline | `priorAttempts` | `flakyDeferrals` | `priorDiagnosisClass` |
558
+ * |-----------------------|-----------|---------------|------------------------|------------------|-----------------------|
559
+ * | push (non-bot head) | 1 | re-stamped | **wiped** | 0 | null |
560
+ * | retry | 1 | re-stamped | **carried + seam line**| 0 | null |
561
+ *
562
+ * A push changed the code, so prior findings may be stale. A retry changed
563
+ * nothing but patience — and discarding `priorAttempts` there sends attempt 1
564
+ * of the new window straight down attempt 1 of the old window's road. On the
565
+ * PR that produced this plan the journal held the one useful fact: that the
566
+ * diagnosis had already concluded CI was green at the current head.
567
+ *
568
+ * `flakyDeferrals` resets on BOTH. A human intervening is a statement that the
569
+ * flaky-versus-real inference should start over, and they have better evidence
570
+ * than the counter does.
571
+ *
572
+ * The seam line is not decoration. Without it the journal renders `attempt 1`,
573
+ * `attempt 2`, and then a run that also calls itself attempt 1, with nothing
574
+ * saying where the boundary is.
354
575
  */
355
- function deriveAttemptHistory(state, prior, priorMarkers, priorSpent) {
576
+ function deriveAttemptHistory(state, prior, priorMarkers, priorSpent, retried) {
356
577
  const fresh = {
357
578
  attempt: 1,
358
579
  priorAttempts: [],
@@ -363,17 +584,33 @@ function deriveAttemptHistory(state, prior, priorMarkers, priorSpent) {
363
584
  // No prior run of the family at all.
364
585
  if (priorAttempt === 0)
365
586
  return fresh;
366
- // Someone else's push — a maintainer, a Dependabot rebase, a Renovate
367
- // recreate. The world moved, so the counter, the journal, the deferral count
368
- // and the last verdict are all about a problem that no longer exists.
369
- if (!sameProblem(state, prior))
370
- return fresh;
371
587
  const carried = Array.isArray(prior?.priorAttempts)
372
588
  ? prior.priorAttempts.filter((l) => typeof l === "string")
373
589
  : [];
374
590
  // A run that produced no marker leaves no line, exactly as it consumes no
375
591
  // attempt: there is nothing for the next attempt to learn from a crash.
376
592
  const line = renderAttemptLine(priorAttempt, priorMarkers);
593
+ // Someone else's push — a maintainer, a Dependabot rebase, a Renovate
594
+ // recreate. The world moved, so the counter, the journal, the deferral count
595
+ // and the last verdict are all about a problem that no longer exists.
596
+ //
597
+ // Checked BEFORE the retry branch, so a maintainer who pushes AND asks in the
598
+ // same breath gets the push's semantics: the code changed, which is the
599
+ // stronger statement about whether the journal still describes anything.
600
+ if (headMoved(state, prior))
601
+ return fresh;
602
+ // A retry. Same head, same code — so the journal is carried and a seam line
603
+ // marks where the old window ended.
604
+ if (retried) {
605
+ return {
606
+ ...fresh,
607
+ priorAttempts: boundAttemptLines([
608
+ ...carried,
609
+ ...(line ? [line] : []),
610
+ renderInterventionLine(state.intervention?.note),
611
+ ]),
612
+ };
613
+ }
377
614
  const priorAttempts = boundAttemptLines(line ? [...carried, line] : carried);
378
615
  const priorFlaky = typeof prior?.flakyDeferrals === "number" ? prior.flakyDeferrals : 0;
379
616
  // CONSECUTIVE, which is the whole point of the cap: three `flaky` verdicts in
@@ -395,23 +632,41 @@ function deriveAttemptHistory(state, prior, priorMarkers, priorSpent) {
395
632
  priorDiagnosisClass: priorMarkers?.diagnosis?.class ?? null,
396
633
  };
397
634
  }
635
+ /**
636
+ * Did SOMEONE ELSE push? The world-moved half of {@link sameProblem}.
637
+ *
638
+ * False when the head is unchanged (we made no progress — covers `no-change`
639
+ * and `gave-up`) and when WE authored the new head (our fix landed and CI is
640
+ * still red). Split out because the journal's staleness marking needs exactly
641
+ * this and not the whole predicate: a retry makes the problem fresh without the
642
+ * head having moved, and a note about a commit that is still the head is not
643
+ * stale. See {@link deriveNotes}.
644
+ */
645
+ function headMoved(state, prior) {
646
+ const priorHead = typeof prior?.headSha === "string" ? prior.headSha : "";
647
+ const headChanged = !!state.headSha && !!priorHead && state.headSha !== priorHead;
648
+ return headChanged && !state.headIsOurs;
649
+ }
398
650
  /**
399
651
  * Is the live head the same PROBLEM the prior run worked on?
400
652
  *
401
- * True when the head is unchanged (we made no progress — covers `no-change`
402
- * and `gave-up`) or when WE authored the new head (our fix landed and CI is
403
- * still red). False only when someone else pushed.
653
+ * False in exactly two cases, and they are the two ways a human intervenes:
654
+ * somebody else pushed ({@link headMoved}), or somebody asked us to try again
655
+ * ({@link PrState.intervention}). **A retry does exactly what a push does** —
656
+ * locked decision 7 — so it is one predicate rather than a second budget shape,
657
+ * which is how the old six-sites-disagreeing situation started.
404
658
  *
405
659
  * THE boundary of a problem, and read in two places on purpose: the attempt
406
660
  * counter and {@link PrState.costBaselineUsd}. Those two are the pair of
407
- * budgets `fix.maxAttempts` and `fix.maxCostUsd` bound, so a maintainer's push
408
- * has to re-arm both or neither — re-arming only the counter is what let
409
- * `budget-exhausted` re-comment on every push (#256).
661
+ * budgets `fix.maxAttempts` and `fix.maxCostUsd` bound, so an intervention has
662
+ * to re-arm both or neither — re-arming only the counter is what let
663
+ * `budget-exhausted` re-comment on every push (#256), and it is exactly what
664
+ * clearing the escalation guard from an `@bot` comment used to do.
410
665
  */
411
- function sameProblem(state, prior) {
412
- const priorHead = typeof prior?.headSha === "string" ? prior.headSha : "";
413
- const headChanged = !!state.headSha && !!priorHead && state.headSha !== priorHead;
414
- return !(headChanged && !state.headIsOurs);
666
+ function sameProblem(state, prior, retried) {
667
+ if (retried)
668
+ return false;
669
+ return !headMoved(state, prior);
415
670
  }
416
671
  /**
417
672
  * §S1's attempt table, in code.
@@ -431,8 +686,10 @@ function nextAttempt(state, prior, priorSpent) {
431
686
  return 1;
432
687
  // Someone else's push. The world moved: fresh problem, fresh counter. This is
433
688
  // what stops an exhausted human PR being permanently un-fixable for the life
434
- // of the PR.
435
- if (!sameProblem(state, prior))
689
+ // of the PR. (The RETRY half of "fresh problem" never reaches here —
690
+ // `deriveAttemptHistory` returns its own table row above — so this reads the
691
+ // head alone.)
692
+ if (headMoved(state, prior))
436
693
  return 1;
437
694
  // Same head (we made no progress — covers `no-change` and `gave-up`), or a
438
695
  // head WE authored on top of it (our fix landed, CI is still red). Same
@@ -1 +1 @@
1
- {"version":3,"file":"pr-state.js","sourceRoot":"","sources":["../../src/engine/pr-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAA4B,MAAM,kBAAkB,CAAC;AAClF,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,GAElB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAe,MAAM,eAAe,CAAC;AAoPrF;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,qEAAqE;AACrE,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,QAAgB;IACxD,OAAO,GAAG,IAAI,IAAI,QAAQ,EAAE,CAAC;AAC/B,CAAC;AAuBD,iDAAiD;AACjD,SAAS,OAAO,CAAC,IAAiB;IAChC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACnE,OAAO,IAAI,IAAI,SAAS,CAAC;AAC3B,CAAC;AASD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAa,EACb,IAAY,EACZ,QAAgB,EAChB,IAAiB;IAEjB,MAAM,IAAI,GAAG,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC;IAChC,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,GAAY,EAAE,EAAE;QAC1C,MAAM,GAAG,GAA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