@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.
- package/CHANGELOG.md +12 -0
- package/SPEC.md +14 -3
- package/app/contracts.ts +8 -1
- package/app/deliveryHuman.test.ts +123 -0
- package/app/deliveryHuman.ts +29 -0
- package/app/mergeLoopBehaviour.test.ts +90 -0
- package/app/mergeableWait.test.ts +42 -1
- package/app/mergeableWait.ts +23 -0
- package/app/pollUserTasks.test.ts +56 -0
- package/app/service.ts +28 -3
- package/package.json +1 -1
- package/resources/forms/delivery-human-generic.form +3 -32
- package/resources/processes/merge-loop.bpmn +291 -235
- package/workers/merge-stall-probe/worker.ts +10 -6
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
// • ready → attempt-merge
|
|
9
9
|
// • conflict → rebase arm
|
|
10
10
|
// • blocked → CI-fix arm
|
|
11
|
-
// •
|
|
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
|
-
//
|
|
28
|
-
//
|
|
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
|
-
//
|
|
43
|
-
//
|
|
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: "" };
|