@feigi/fleet-ctl 3.24.4 → 3.24.5

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.24.4",
3
+ "version": "3.24.5",
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": {
@@ -55,7 +55,10 @@
55
55
  // counted ruling holding anything but `yes` or `no` in either column, one
56
56
  // blank included, is refused rather than read as a pass. So is a non-blank
57
57
  // ruling row of such a ticket whose `run_date` is not `YYYY-MM-DD`: it cannot
58
- // be placed against the Pull, and dropping it would uncount the ticket.
58
+ // be placed against the Pull, and dropping it would uncount the ticket. So is
59
+ // an admissible Pull at X whose `run_date` is not `YYYY-MM-DD`: it cannot be
60
+ // placed against the day X's definition was added, and dropping it would
61
+ // uncount its ruling.
59
62
  // X is to be withdrawn once it has at least STOP.verdicts verdicts and
60
63
  // floor failures ÷ verdicts is at least STOP.failRate.
61
64
  //
@@ -68,7 +71,7 @@ import { isCLI } from "./is-cli.mjs";
68
71
  import { CELL, POLICY_CELL } from "./ledger-grammar.mjs";
69
72
  import { formatTsv as formatMemberTsv, parseTsv as parseMemberTsv } from "./member-outcomes.mjs";
70
73
  import { parseFeatures } from "./pr-cost.mjs";
71
- import { rulingFor, rulingsByTicket } from "./tier-outcomes.mjs";
74
+ import { DATE, rulingFor, rulingsByTicket } from "./tier-outcomes.mjs";
72
75
 
73
76
  const NAME = "cell-readout";
74
77
  export const GATE = Object.freeze({ comparisons: 10, runDates: 5 });
@@ -168,8 +171,9 @@ export function readout({ features, members }) {
168
171
  * rule withdraws the cell. `verdicts` are parsed tier-outcomes.tsv rows.
169
172
  * Throws on a counted ruling whose `closed_own_ticket` or `minted_false_claim`
170
173
  * is not `yes` or `no`, on a non-blank ruling row of a Pulled ticket whose
171
- * `run_date` is not `YYYY-MM-DD`, and on a member-outcomes session+agent
172
- * repeated with different fields.
174
+ * `run_date` is not `YYYY-MM-DD`, on an admissible Pull at a cell named in
175
+ * `added` whose `run_date` is not `YYYY-MM-DD`, and on a member-outcomes
176
+ * session+agent repeated with different fields.
173
177
  */
174
178
  export function stoppingRule({ features, members, verdicts, added }) {
175
179
  const byKey = indexMembers(members);
@@ -178,7 +182,9 @@ export function stoppingRule({ features, members, verdicts, added }) {
178
182
  const charged = new Map(Object.keys(added).filter((c) => c !== POLICY_CELL).map((c) => [c, new Map()]));
179
183
  for (const p of features) {
180
184
  const pulls = charged.get(p.chosen_cell);
181
- if (!pulls || p.run_date < added[p.chosen_cell] || !admissibleMember(p, byKey)) continue;
185
+ if (!pulls || !admissibleMember(p, byKey)) continue;
186
+ if (!DATE.test(p.run_date)) throw new Error(`ticket #${p.ticket} (Pull ${p.agent} at ${p.chosen_cell}): run_date is '${p.run_date}', expected YYYY-MM-DD`);
187
+ if (p.run_date < added[p.chosen_cell]) continue;
182
188
  pulls.set(p.ticket, p);
183
189
  }
184
190
  return [...charged].sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)).map(([cell, pulls]) => {