@feigi/fleet-ctl 3.71.9 → 3.71.11
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/package.json
CHANGED
package/scripts/board-gather.mjs
CHANGED
|
@@ -990,7 +990,7 @@ export async function gather({ ledgerFile, prevFile, stateFile = null, scriptDir
|
|
|
990
990
|
// here because it reads the process table, and only when the mark is
|
|
991
991
|
// stalled, so a healthy board reads none. computeBoard() words it.
|
|
992
992
|
const now = Date.now();
|
|
993
|
-
const stallOwnerOf = isStalled(assessBeat({ beat, ticked, acted, controller, now })) ? stallOwner(
|
|
993
|
+
const stallOwnerOf = isStalled(assessBeat({ beat, ticked, acted, controller, now })) ? stallOwner(controller, NAME) : null;
|
|
994
994
|
return { ledger, issues, prs, merged, ci, prev, repo, repoUrl, workspace, port, spend, beat, ticked, acted, controller, stallOwner: stallOwnerOf, poolOk,
|
|
995
995
|
poolCapped, prsCapped,
|
|
996
996
|
now, interval };
|
|
@@ -411,7 +411,11 @@ esac
|
|
|
411
411
|
# such as `git -C`, does not stop it: whether that option moves where the
|
|
412
412
|
# program resolves a pattern is the program's to say, so a Recipe must quote a
|
|
413
413
|
# pattern that a program resolves under its own directory option, as in
|
|
414
|
-
# `git -C web ls-files -- '*.test.ts'`.
|
|
414
|
+
# `git -C web ls-files -- '*.test.ts'`. An unquoted pattern under a program's
|
|
415
|
+
# own directory option is still judged from <repo>, so a Recipe proven while a
|
|
416
|
+
# file of the same name was tracked both at the root and under the option's
|
|
417
|
+
# directory is still accepted after the one under the directory goes away,
|
|
418
|
+
# though the program then finds nothing there. A word right after an option
|
|
415
419
|
# written without `=`, with no operator between them, is accepted unless it
|
|
416
420
|
# has a `/` or a `.`: it may be that option's value, which names no path. A
|
|
417
421
|
# pattern under a path git ignores names generated output, such as a build
|
package/scripts/fleet-state.mjs
CHANGED
|
@@ -537,35 +537,18 @@ function mins(ms) {
|
|
|
537
537
|
}
|
|
538
538
|
|
|
539
539
|
// Whose stall a reader sees, off the controller record — the mark says only
|
|
540
|
-
// that the beat stopped, never whether the run did.
|
|
541
|
-
//
|
|
542
|
-
//
|
|
543
|
-
//
|
|
544
|
-
// that wrote the record: rotate replaced the record after that run's last
|
|
545
|
-
// beat, tick and ledger write. When every mark is that old, the record names
|
|
546
|
-
// a controller that has left no mark yet, so judging it would call every
|
|
547
|
-
// previous run alive. That stall reads the verdict rotate reached on the
|
|
548
|
-
// record it replaced, `prior`: dead is a controller gone whose claims this run
|
|
549
|
-
// resumes, ancestor is this same session's earlier run and so alive, none is
|
|
550
|
-
// unknown. A mark written since the record — any later beat, tick or ledger
|
|
551
|
-
// write — is the recorded controller's own, so the record itself is judged,
|
|
552
|
-
// through proc.mjs: dead or a reused pid is gone and the NEXT run resumes;
|
|
553
|
-
// alive, or an ancestor of the reader, is alive. A record with no `at` cannot
|
|
554
|
-
// place the mark and is judged too.
|
|
540
|
+
// that the beat stopped, never whether the run did. The record is judged
|
|
541
|
+
// through proc.mjs: dead or a reused pid is gone and the next run resumes;
|
|
542
|
+
// alive, or an ancestor of the reader, is alive and named by pid. No record:
|
|
543
|
+
// unknown, and the report keeps the wording it had before there was one.
|
|
555
544
|
//
|
|
556
545
|
// `judge` is replaceable for the same reason proc.mjs's process source is: a
|
|
557
546
|
// reader under a live omp session would otherwise find that session. A
|
|
558
547
|
// process table that cannot be read leaves the stall unattributed, said on
|
|
559
548
|
// stderr, rather than calling a controller nobody could judge dead or alive.
|
|
560
549
|
export const NO_OWNER = Object.freeze({ kind: "none" });
|
|
561
|
-
export function stallOwner(
|
|
550
|
+
export function stallOwner(controller, name, judge = judgeRecord) {
|
|
562
551
|
if (!controller) return NO_OWNER;
|
|
563
|
-
const before = (mark) => thisRun(mark, controller) === null;
|
|
564
|
-
if (controller.at !== null && before(beat) && before(ticked) && before(acted)) {
|
|
565
|
-
if (controller.prior === "dead") return { kind: "gone", resumes: "this run" };
|
|
566
|
-
if (controller.prior === "ancestor") return { kind: "alive", pid: null };
|
|
567
|
-
return NO_OWNER;
|
|
568
|
-
}
|
|
569
552
|
let verdict;
|
|
570
553
|
try {
|
|
571
554
|
verdict = judge(controller);
|
|
@@ -574,7 +557,7 @@ export function stallOwner({ controller, beat = null, ticked = null, acted = nul
|
|
|
574
557
|
console.error(`${name}: WARNING ${e.message} — the recorded controller pid ${controller.pid} cannot be judged, so the stall report names no controller`);
|
|
575
558
|
return NO_OWNER;
|
|
576
559
|
}
|
|
577
|
-
if (verdict === "dead") return { kind: "gone"
|
|
560
|
+
if (verdict === "dead") return { kind: "gone" };
|
|
578
561
|
if (verdict === "alive" || verdict === "ancestor") return { kind: "alive", pid: controller.pid };
|
|
579
562
|
return NO_OWNER;
|
|
580
563
|
}
|
|
@@ -619,10 +602,10 @@ export function stallReport(verdict, { claimed, supply, owner = NO_OWNER } = {})
|
|
|
619
602
|
? `stopped deliberately — recorded reason: ${verdict.reason}`
|
|
620
603
|
: verdict.beatless ? "no beat, tick or ledger write since, and no recorded reason" : "the beat stopped without a recorded reason";
|
|
621
604
|
const head = owner.kind === "alive"
|
|
622
|
-
? `heartbeat not beating, controller alive (
|
|
605
|
+
? `heartbeat not beating, controller alive (pid ${owner.pid})`
|
|
623
606
|
: owner.kind === "gone" ? "heartbeat STALLED, controller gone" : "heartbeat STALLED";
|
|
624
607
|
const tail = owner.kind === "gone"
|
|
625
|
-
?
|
|
608
|
+
? "; the next run resumes its claims without a PR, and its open PRs return through the fold-in"
|
|
626
609
|
: "";
|
|
627
610
|
const seen = verdict.beatless
|
|
628
611
|
? `no beat this run, last ${MARK_NAMES[verdict.mark]} ${when(verdict.at)}`
|
package/scripts/fleet-tick.mjs
CHANGED
|
@@ -1987,7 +1987,7 @@ function main() {
|
|
|
1987
1987
|
if (!priorState.degraded) writeState(path, NAME, priorState, { ticked: { at: tickedAt } });
|
|
1988
1988
|
if (isReported(verdict)) {
|
|
1989
1989
|
console.log(stallReport(verdict, isStalled(verdict)
|
|
1990
|
-
? { claimed: claimed(), supply: current.scanned, owner: stallOwner(priorState, NAME) }
|
|
1990
|
+
? { claimed: claimed(), supply: current.scanned, owner: stallOwner(priorState.controller, NAME) }
|
|
1991
1991
|
: {}));
|
|
1992
1992
|
}
|
|
1993
1993
|
|
package/skills/run-team/SKILL.md
CHANGED
|
@@ -1438,10 +1438,10 @@ record:
|
|
|
1438
1438
|
Its claims without a PR come back through the next run's phase 0
|
|
1439
1439
|
stranded-claim step (references/phase-0.md, "Resume the claims a dead run
|
|
1440
1440
|
left without a PR"), and its open PRs through the fold-in.
|
|
1441
|
-
- `heartbeat not beating, controller alive (pid N)
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1441
|
+
- `heartbeat not beating, controller alive (pid N)` — a controller that
|
|
1442
|
+
stopped beating and kept going. Nothing died, so nothing is resumed; when
|
|
1443
|
+
that controller is you, the fix is to tick on every wake and beat when there
|
|
1444
|
+
is nothing to do.
|
|
1445
1445
|
- `heartbeat STALLED` alone — no record says whether that controller lives.
|
|
1446
1446
|
The line is detection only.
|
|
1447
1447
|
|