@nanobpm/nano-workforce 0.186.0 → 0.186.2

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.
@@ -8,7 +8,10 @@
8
8
  // • ready → attempt-merge
9
9
  // • conflict → rebase arm
10
10
  // • blocked → CI-fix arm
11
- // • draft / waiting (still computing) → not-landable escalation (gw-mergeable default)
11
+ // • waiting (GitHub still computing) → bounded re-poll (`wait-mergeable-repoll`), NOT a terminal
12
+ // escalation (#774); it only escalates once the shared `mergeStallMax` budget is exhausted
13
+ // • draft → not-landable escalation
14
+ // • unclassified/default → auto-rebase (`gw-rebase`, the `gw-mergeable` default arm)
12
15
  // The timer only guarantees the remediation machinery is ENTERED when the poller is dead; every
13
16
  // downstream arm is the same one the live poller feeds. A bounded `mergeStallRounds` counter
14
17
  // (incremented by this task's output mapping, capped by `mergeStallMax`) stops the probe from
@@ -23,9 +26,10 @@ type In = WorkerInputs["pr.merge-stall-probe"];
23
26
 
24
27
  interface Out extends Record<string, unknown> {
25
28
  // Mirrors the poller's `merge-ready {mergeState}` payload so the existing `gw-mergeable` FEEL
26
- // routes it. `waiting` (GitHub still computing / no verdict) is surfaced verbatim; gw-mergeable
27
- // has no `waiting` arm, so it falls to the not-landable default and escalates — the correct
28
- // backstop when the poller is dead and 30 minutes on GitHub still cannot settle the PR.
29
+ // routes it. `waiting` (GitHub still computing / no verdict) is surfaced verbatim; `gw-mergeable`
30
+ // routes it to a bounded re-poll (`wait-mergeable-repoll`, #774) re-probing until the verdict
31
+ // settles or the shared `mergeStallMax` budget is exhausted, at which point it escalates to a
32
+ // human. This backstops a dead poller without wedging a PR GitHub is merely slow to settle.
29
33
  mergeState: string;
30
34
  failingChecks: number;
31
35
  failingChecksList: string;
@@ -39,8 +43,8 @@ const handler: AppJobHandler<In, Out> = async (job, app) => {
39
43
  // protocol so the protocol-aware backstop (#392) gates a red DECLARED-required check even when
40
44
  // GitHub reports UNSTABLE. Any transport hiccup is treated as "still waiting" — never a spurious
41
45
  // ready/conflict verdict — so a bad read is surfaced as `waiting`, which `gw-mergeable` routes to
42
- // its not-landable default (human escalation), erring toward a human rather than misrouting the
43
- // token to a wrong remediation arm.
46
+ // a bounded re-poll (#774) rather than misrouting the token to a wrong remediation arm; a
47
+ // genuinely stuck verdict still escalates once the `mergeStallMax` budget is exhausted.
44
48
  const st = await fetchPrState(repo, prNumber, token).catch(() => null);
45
49
  if (st === null) {
46
50
  return { mergeState: "waiting", failingChecks: 0, failingChecksList: "" };