@feigi/fleet-ctl 3.144.3 → 3.145.0

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.
@@ -2711,8 +2711,12 @@ function recordFiled(id, subject) {
2711
2711
  // fix-pr-M=applied:<head> origin's refs/heads/<branch> is <head>, fetched
2712
2712
  // by verify-sha.sh; the Check-step record (below)
2713
2713
  // holds for <head>
2714
- // fix-pr-M=no-op origin's refs/heads/<branch> is the head PR M's
2715
- // latest reviewed= names, as the tick folds it
2714
+ // fix-pr-M=no-op origin's refs/heads/<branch> is PR M's fleet
2715
+ // head, as the tick folds it: the head of the
2716
+ // applied:<head> the fix-applier with the
2717
+ // greatest retry suffix landed since PR M's
2718
+ // latest reviewed=, else the head that reviewed=
2719
+ // names
2716
2720
  // finisher-pr-M=labelled PR M's labels carry ready-to-merge, and so does
2717
2721
  // the report's labelsReadBack
2718
2722
  // finisher-pr-M=halted:<c> cause is in the halted:<cause> vocabulary and
@@ -2912,13 +2916,21 @@ async function runSettleFromReport() {
2912
2916
  if (!(e instanceof LedgerError)) throw e;
2913
2917
  die(`${where}: ${e.message} — fleet-tick.mjs refuses this ledger, so PR #${live.number}'s latest reviewed= cannot be read off it; nothing written`);
2914
2918
  }
2915
- const reviewed = fold.reviewed.find((r) => r.pr === live.number)?.head ?? null;
2916
- if (reviewed === null) {
2919
+ // An earlier fix-applier's push moved the branch past the head the latest
2920
+ // review names, so the head required is the fold's `fleetHead`, which
2921
+ // is that review's head until an `applied:` lands after it. The fold
2922
+ // writes it lowercase, so only origin's head needs lowercasing.
2923
+ const review = fold.reviewed.find((r) => r.pr === live.number);
2924
+ if (review === undefined) {
2917
2925
  check(`PR #${live.number}'s row names a reviewed= head`, false);
2918
2926
  } else {
2919
2927
  const head = remoteHead(report.branch);
2920
- check(`origin refs/heads/${report.branch} is ${reviewed}, the head PR #${live.number}'s latest reviewed= names`,
2921
- head !== null && head.toLowerCase().startsWith(reviewed.toLowerCase()));
2928
+ const required = review.fleetHead;
2929
+ const why = required === review.head
2930
+ ? `the head PR #${live.number}'s latest reviewed= names`
2931
+ : `the head PR #${live.number}'s latest applied: names, landed since its latest reviewed= ${review.head}`;
2932
+ check(`origin refs/heads/${report.branch} is ${required}, ${why}`,
2933
+ head !== null && head.toLowerCase().startsWith(required));
2922
2934
  }
2923
2935
  } else {
2924
2936
  outcome = "failed";