@feigi/fleet-ctl 3.154.6 → 3.154.7
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/ledger.mjs
CHANGED
|
@@ -2755,13 +2755,15 @@ function recordFiled(id, subject) {
|
|
|
2755
2755
|
// from it, and an outcome that asserts a git or GitHub state has that state
|
|
2756
2756
|
// checked before anything is written:
|
|
2757
2757
|
//
|
|
2758
|
-
// impl-N=PR#M
|
|
2758
|
+
// impl-N=PR#M the report's branch is implementer/N-impl-N; PR M
|
|
2759
2759
|
// reads OPEN and its closingIssuesReferences in its
|
|
2760
2760
|
// own repository name N; no other closing
|
|
2761
2761
|
// reference there is a ticket another claim holds,
|
|
2762
2762
|
// its issue carrying in-progress; its head branch
|
|
2763
|
-
// is implementer/N-impl-N
|
|
2764
|
-
//
|
|
2763
|
+
// is implementer/N-impl-N. Last, and only when
|
|
2764
|
+
// every other check passed: verify-sha.sh <branch>
|
|
2765
|
+
// <head> exits 0, and the Check-step record
|
|
2766
|
+
// (below) holds for <head>
|
|
2765
2767
|
// impl-N=bailed bailCause is not null; the receipt names it.
|
|
2766
2768
|
// report-schema.mjs already refuses a bail that
|
|
2767
2769
|
// names a pr or a head
|
|
@@ -2941,9 +2943,15 @@ async function runSettleFromReport() {
|
|
|
2941
2943
|
if (report.pr === null) invalid('$.pr: null is not a PR number, with outcome "pr"');
|
|
2942
2944
|
if (report.head === null) invalid('$.head: null, with outcome "pr"');
|
|
2943
2945
|
outcome = `PR#${report.pr}`;
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2946
|
+
// The claim's branch comes from the ticket: the Pull claims with member
|
|
2947
|
+
// impl-N, so its branch is implementer/N-impl-N, and close-out releases
|
|
2948
|
+
// impl-N. Never from the settling member's name or its report — a
|
|
2949
|
+
// replacement impl-N-x holds the same claim as impl-N — and the report's
|
|
2950
|
+
// `branch` must name it: the head verified below is then the head of the
|
|
2951
|
+
// branch the PR is checked to be on. This check reads nothing, so a report
|
|
2952
|
+
// naming another branch is refused whatever origin holds.
|
|
2953
|
+
const claimBranch = `implementer/${live.number}-impl-${live.number}`;
|
|
2954
|
+
check(`the report's branch is ${claimBranch} (report: ${report.branch})`, report.branch === claimBranch);
|
|
2947
2955
|
const { view: pr, numbers } = prViewClosing(report.pr, "state,closingIssuesReferences,url,headRefName");
|
|
2948
2956
|
check(`PR #${report.pr} reads OPEN`, pr.state === "OPEN");
|
|
2949
2957
|
check(`PR #${report.pr} closes #${live.number}`, numbers.includes(live.number));
|
|
@@ -2956,12 +2964,15 @@ async function runSettleFromReport() {
|
|
|
2956
2964
|
const held = claimedElsewhere(numbers, [live.number], issueLabels);
|
|
2957
2965
|
check(`PR #${report.pr} closes no ticket another claim holds (in-progress: ${held.length === 0 ? "none" : held.map((n) => `#${n}`).join(", ")})`, held.length === 0);
|
|
2958
2966
|
}
|
|
2959
|
-
// The claim's branch comes from the ticket: the Pull claims with member
|
|
2960
|
-
// impl-N, so its branch is implementer/N-impl-N, and close-out releases
|
|
2961
|
-
// impl-N. Never from the settling member's name or its report: a
|
|
2962
|
-
// replacement impl-N-x holds the same claim as impl-N.
|
|
2963
|
-
const claimBranch = `implementer/${live.number}-impl-${live.number}`;
|
|
2964
2967
|
check(`PR #${report.pr}'s head is ${claimBranch} (GitHub: ${pr.headRefName})`, pr.headRefName === claimBranch);
|
|
2968
|
+
// git is read last, and only once every check above has passed: a
|
|
2969
|
+
// branch origin lacks, or a PR that is closed with its branch gone, is
|
|
2970
|
+
// a refusal of the claim, never a verify-sha.sh that could not look.
|
|
2971
|
+
if (checks.every((c) => c.ok)) {
|
|
2972
|
+
const sha = verifyShaOf(claimBranch, report.head);
|
|
2973
|
+
check(`verify-sha.sh ${claimBranch} ${report.head} exits 0`, sha.status === 0);
|
|
2974
|
+
recipeGate(report.head);
|
|
2975
|
+
}
|
|
2965
2976
|
} else if (report.outcome === "blocked") {
|
|
2966
2977
|
outcome = "blocked";
|
|
2967
2978
|
} else {
|
|
@@ -13,9 +13,10 @@ literal outcome
|
|
|
13
13
|
---
|
|
14
14
|
Implement ticket <N>. You are ALREADY in worktree `<abs-path>`, whose PR branch is
|
|
15
15
|
`<branch>`: commit on it and open your PR from it, even when the ticket below names
|
|
16
|
-
another branch; the settle refuses a PR from any other branch
|
|
17
|
-
one, say in the PR body that you used `<branch>`. Label names
|
|
18
|
-
the Label map gives the string to type; a member never derives
|
|
16
|
+
another branch; the settle refuses a PR from any other branch, and a report that names
|
|
17
|
+
one. If the ticket names one, say in the PR body that you used `<branch>`. Label names
|
|
18
|
+
in this file are roles; the Label map gives the string to type; a member never derives
|
|
19
|
+
the map. Close no ticket
|
|
19
20
|
another claim holds — one whose issue carries the in-progress label — even when the
|
|
20
21
|
ticket below asks for one PR with it: write `Refs #M` instead; the settle refuses a PR
|
|
21
22
|
that closes one. Your scratch directory is `<scratch>/impl-<N>/`; outside the worktree,
|
|
@@ -72,7 +73,7 @@ maintainer.
|
|
|
72
73
|
|
|
73
74
|
Your report is a file, `<scratch>/reports/<your name>.json`, `<your name>` the
|
|
74
75
|
`impl-<N>[-x]` you were dispatched as, in the shape
|
|
75
|
-
`~/.omp/plugins/node_modules/@feigi/fleet-ctl/scripts/fleet-run report-schema.mjs print impl` prints
|
|
76
|
+
`~/.omp/plugins/node_modules/@feigi/fleet-ctl/scripts/fleet-run report-schema.mjs print impl` prints, with `branch` `<branch>`. Write it before
|
|
76
77
|
your final message, and send nothing until
|
|
77
78
|
`~/.omp/plugins/node_modules/@feigi/fleet-ctl/scripts/fleet-run report-schema.mjs validate impl <scratch>/reports/<your name>.json`
|
|
78
79
|
answers `valid`. Your final message is then one line,
|