@feigi/fleet-ctl 3.30.24 → 3.30.26

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feigi/fleet-ctl",
3
- "version": "3.30.24",
3
+ "version": "3.30.26",
4
4
  "description": "Agent fleet: run-team controller, merge bot, PR reviewer, and the ticket pipeline they share",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/scripts/board.mjs CHANGED
@@ -1647,11 +1647,12 @@ function bindFailure(server, port) {
1647
1647
  // it. Linux refuses that bind outright; this check gives both the same answer.
1648
1648
  // Resolves in bindFailure()'s vocabulary so the loop reads one shape: null
1649
1649
  // when the connection is refused (nothing holds the port), an EADDRINUSE
1650
- // error when it connects or times out, and any other error as itself — a
1651
- // fault of its own, like EACCES on a bind. A timeout counts as held because
1652
- // a live holder whose accept backlog is full drops the SYN rather than
1653
- // refusing it. The window between this check and the bind is a race the
1654
- // loop accepts, like its others.
1650
+ // error when it connects or times out, and any other error as itself,
1651
+ // marked `heldCheck` — a fault of its own, like EACCES on a bind, which the
1652
+ // loop reports as this check's rather than the bind's, whatever code the
1653
+ // error carries. A timeout counts as held because a live holder whose accept
1654
+ // backlog is full drops the SYN rather than refusing it. The window between
1655
+ // this check and the bind is a race the loop accepts, like its others.
1655
1656
  function heldFailure(port) {
1656
1657
  return new Promise((resolve) => {
1657
1658
  const socket = connect({ host: COCKPIT_HOST, port });
@@ -1661,7 +1662,7 @@ function heldFailure(port) {
1661
1662
  };
1662
1663
  socket.setTimeout(PROBE_TIMEOUT_MS, held);
1663
1664
  socket.once("connect", held);
1664
- socket.once("error", (e) => resolve(e.code === "ECONNREFUSED" ? null : e));
1665
+ socket.once("error", (e) => resolve(e.code === "ECONNREFUSED" ? null : Object.assign(e, { heldCheck: true })));
1665
1666
  });
1666
1667
  }
1667
1668
 
@@ -1940,7 +1941,12 @@ export async function serve({ ledgerFile, port, interval, open, spendDir } = {})
1940
1941
  // on a privileged port, EADDRNOTAVAIL on an unusable address, a pre-bind
1941
1942
  // connect that fails with anything but ECONNREFUSED: those are faults of
1942
1943
  // their own, and scanning past them would bury each one under an
1943
- // exhausted-range message at the end that names the wrong problem.
1944
+ // exhausted-range message at the end that names the wrong problem. A bind
1945
+ // error dies with its own text; a held-check error dies naming the check,
1946
+ // which a raw connect message does not, and does so whatever code the
1947
+ // connect error carries: only a bare EADDRINUSE from the bind itself, or
1948
+ // the held signal heldFailure() resolves, means the port is taken.
1949
+ if (failure.heldCheck) die(`cannot check whether port ${candidate} is held: ${failure.message}`);
1944
1950
  if (failure.code !== "EADDRINUSE") die(failure.message);
1945
1951
  if (!scannable) die(`port ${candidate} in use — pass --port <n>`);
1946
1952
  const holder = await probeCockpitWorkspace(candidate);
@@ -76,7 +76,7 @@ gh label create in-progress --color FBCA04 --force # first time only
76
76
  gh issue edit <N> --add-label in-progress
77
77
  ```
78
78
 
79
- Infer branch/worktree convention from `git worktree list` / `git branch -r` — commonly `feat|fix|refactor/<N>-slug` and `.worktrees/<N>-slug`. Branch off fresh `origin/main`, run the Install step, run the Test entrypoint as the baseline — both the repo's **Recipe**, read from its Recipe cache: `~/.fleet/bin/fleet-run derive-testcmd.sh . install` and `… . test` print them. **No usable cache (either exits 1) → run the Recipe derivation step first:** dispatch a `task` member, agent `fleet-recipe-deriver`, its prompt naming the main checkout's absolute path as `<repo>` and a scratch directory of its own; it reads the repo, proves both commands in a throwaway worktree and writes the cache only on proof. `RECIPE NOT PROVEN` → stop and give the maintainer its reason; never pick a command yourself. Exit 3 is no verdict on the cache — the reader could not run a tool it needs — so fix that environment fault and re-run instead of deriving.
79
+ Infer branch/worktree convention from `git worktree list` / `git branch -r` — commonly `feat|fix|refactor/<N>-slug` and `.worktrees/<N>-slug`. Branch off fresh `origin/main`, run the Install step, run the Test entrypoint as the baseline — both the repo's **Recipe**, read from its Recipe cache: `~/.fleet/bin/fleet-run derive-testcmd.sh . install` and `… . test --at origin/main` print them. **No usable cache (either exits 1) → run the Recipe derivation step first:** dispatch a `task` member, agent `fleet-recipe-deriver`, its prompt naming the main checkout's absolute path as `<repo>` and a scratch directory of its own; it reads the repo, proves both commands in a throwaway worktree and writes the cache only on proof. `RECIPE NOT PROVEN` → stop and give the maintainer its reason; never pick a command yourself. Exit 3 is no verdict on the cache — the reader could not run a tool it needs — so fix that environment fault and re-run instead of deriving.
80
80
 
81
81
  Abandoned before PR opens → remove `in-progress`.
82
82
 
@@ -366,9 +366,12 @@ phase, or in any later one, asks the maintainer which tickets to take.
366
366
  review reads the Test entrypoint, all out of the **Recipe cache**
367
367
  (`.fleet/recipe.json` beside the common git dir); no script infers either
368
368
  command. Check it first: `~/.fleet/bin/fleet-run derive-testcmd.sh .
369
- install` and `~/.fleet/bin/fleet-run derive-testcmd.sh . test`. **Both exit
369
+ install` and `~/.fleet/bin/fleet-run derive-testcmd.sh . test --at
370
+ origin/main`. **Both exit
370
371
  0 → the cache is present and valid: use it as it stands and derive
371
- nothing.** Either exits 1 (a refusal about the cache) → derive it. Either
372
+ nothing.** Either exits 1 (a refusal about the cache) → derive it; a refusal
373
+ naming `--at` says `origin/main` does not resolve, which is no cache fault —
374
+ fetch it and check again, since deriving would not help. Either
372
375
  exits 3 → the reader could not run a tool it needs, so the cache's state is
373
376
  unknown: fix that environment fault and check again; deriving would not
374
377
  help. This step is yours: one derivation
@@ -389,7 +392,8 @@ phase, or in any later one, asks the maintainer which tickets to take.
389
392
  runner's own non-zero count, or a deliberate mutation of one test that
390
393
  turns the run red. Only a proof writes the cache, with `derivedAt` (the
391
394
  `origin/main` commit it ran against) and the proof itself. **`RECIPE
392
- PROVEN`** → re-run both `derive-testcmd.sh` reads; their output is the
395
+ PROVEN`** → re-run both reads above (`derive-testcmd.sh . install` and
396
+ `derive-testcmd.sh . test --at origin/main`); their output is the
393
397
  Recipe this run uses. **`RECIPE NOT PROVEN`** → stall, below.
394
398
 
395
399
  **Mid-run, a cache that stops running is re-derived once, then the run
@@ -797,7 +801,8 @@ read them off `git branch -r` or `git worktree list`: human branches on origin
797
801
  free text, so a pair copied from one claims under that shape at exit 0.
798
802
 
799
803
  **The Install step comes from the Recipe cache — never pass or infer one.** The
800
- claim reads it, and the Test entrypoint, through `derive-testcmd.sh`, runs the
804
+ claim reads it through `derive-testcmd.sh . install`, and the Test entrypoint
805
+ through `derive-testcmd.sh . test --at origin/main`, runs the
801
806
  Install step in the fresh worktree and refuses if it left any file changed: an
802
807
  install that rewrites the tree in a throwaway worktree corrupts it for everyone.
803
808
  No cache is phase 0's Recipe derivation step not having run; an invalid one is
@@ -824,7 +829,7 @@ unless the repository tracks its own, and a member told to run one
824
829
  stalls on a missing script (observed with a rebase-resolver in a
825
830
  prior-run worktree). There, tell the member the runner is absent and to
826
831
  run docker-free suites directly — the Recipe's Test entrypoint
827
- (`~/.fleet/bin/fleet-run derive-testcmd.sh <main checkout> test` prints
832
+ (`~/.fleet/bin/fleet-run derive-testcmd.sh <main checkout> test --at origin/main` prints
828
833
  it) only when it brings up no shared stack to collide on, else that
829
834
  repo's own stack-free command.
830
835
 
@@ -2241,7 +2246,7 @@ reads gates and never injects a fault.
2241
2246
 
2242
2247
  **Where `testCmd` comes from:** the repository's Test entrypoint, out of the
2243
2248
  Recipe cache phase 0's Recipe derivation step proved —
2244
- `~/.fleet/bin/fleet-run derive-testcmd.sh . test` prints it — and the one you
2249
+ `~/.fleet/bin/fleet-run derive-testcmd.sh . test --at origin/main` prints it — and the one you
2245
2250
  hand specialists per **Give specialists a stack-free test command** above. Pass
2246
2251
  the same string to the review, to the fix-applier, and to the finisher — whose
2247
2252
  duty-2 mutation