@feigi/fleet-ctl 3.137.0 → 3.137.1

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.137.0",
3
+ "version": "3.137.1",
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": {
@@ -2080,7 +2080,7 @@ function checkReaders(where) {
2080
2080
  // field has the type that field has. Anything else was not what was asked
2081
2081
  // for, so it could not look.
2082
2082
  const isString = (v) => typeof v === "string";
2083
- const prFieldOk = { state: isString, labels: Array.isArray, closingIssuesReferences: Array.isArray, url: isString };
2083
+ const prFieldOk = { state: isString, labels: Array.isArray, closingIssuesReferences: Array.isArray, url: isString, headRefName: isString };
2084
2084
  const prView = (pr, fields) => {
2085
2085
  const what = `gh pr view ${pr} --json ${fields}`;
2086
2086
  const { r, v } = lookJson(what, ["pr", "view", String(pr), "--json", fields]);
@@ -2683,7 +2683,8 @@ function recordFiled(id, subject) {
2683
2683
  //
2684
2684
  // impl-N=PR#M verify-sha.sh <branch> <head> exits 0; PR M
2685
2685
  // reads OPEN and its closingIssuesReferences in its
2686
- // own repository name N;
2686
+ // own repository name N; its head branch is
2687
+ // implementer/N-impl-N;
2687
2688
  // the Check-step record (below) holds for <head>
2688
2689
  // impl-N=bailed bailCause is not null; the receipt names it.
2689
2690
  // report-schema.mjs already refuses a bail that
@@ -2860,9 +2861,15 @@ async function runSettleFromReport() {
2860
2861
  const sha = verifyShaOf(report.branch, report.head);
2861
2862
  check(`verify-sha.sh ${report.branch} ${report.head} exits 0`, sha.status === 0);
2862
2863
  recipeGate(report.head);
2863
- const { view: pr, numbers } = prViewClosing(report.pr, "state,closingIssuesReferences,url");
2864
+ const { view: pr, numbers } = prViewClosing(report.pr, "state,closingIssuesReferences,url,headRefName");
2864
2865
  check(`PR #${report.pr} reads OPEN`, pr.state === "OPEN");
2865
2866
  check(`PR #${report.pr} closes #${live.number}`, numbers.includes(live.number));
2867
+ // The claim's branch comes from the ticket: the Pull claims with member
2868
+ // impl-N, so its branch is implementer/N-impl-N, and close-out releases
2869
+ // impl-N. Never from the settling member's name or its report: a
2870
+ // replacement impl-N-x holds the same claim as impl-N.
2871
+ const claimBranch = `implementer/${live.number}-impl-${live.number}`;
2872
+ check(`PR #${report.pr}'s head is ${claimBranch} (GitHub: ${pr.headRefName})`, pr.headRefName === claimBranch);
2866
2873
  } else if (report.outcome === "blocked") {
2867
2874
  outcome = "blocked";
2868
2875
  } else {
@@ -113,6 +113,8 @@ Closes #N"
113
113
  gh pr edit --add-label <patch|minor|major> # own command, own exit status
114
114
  ```
115
115
 
116
+ Push and open the PR from the branch you claimed in step 5, whatever branch the ticket names: release and reap find a claim only through its own branch.
117
+
116
118
  `recipe-check.mjs` runs the Recipe's Check step, then `<test command>` — the
117
119
  Recipe's Test entrypoint, as you were handed it, which runs through the suite
118
120
  slot already — against the staged tree, and records both results beside your
@@ -12,8 +12,11 @@ literal that path
12
12
  literal outcome
13
13
  ---
14
14
  Implement ticket <N>. You are ALREADY in worktree `<abs-path>`, whose PR branch is
15
- `<branch>`. Your scratch directory is `<scratch>/impl-<N>/`; outside the worktree,
16
- write nowhere else but your report file below.
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. If the ticket names
17
+ one, say in the PR body that you used `<branch>`. Your scratch directory is
18
+ `<scratch>/impl-<N>/`; outside the worktree, write nowhere else but your report file
19
+ below.
17
20
 
18
21
  The ticket, pasted verbatim from the controller's own read — its title, the
19
22
  `## Agent Brief` comment or the issue body, whichever carries the brief, and its