@feigi/fleet-ctl 3.29.6 → 3.29.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/cell-readout.mjs
CHANGED
|
@@ -182,9 +182,9 @@ export function readout({ features, members }) {
|
|
|
182
182
|
* before the ruling, and only when that Pull is
|
|
183
183
|
* countable: admissible, at a cell named in `added` other than the policy
|
|
184
184
|
* cell, and dated on or after the day that cell's definition was added.
|
|
185
|
-
* Throws on
|
|
186
|
-
* `closed_own_ticket` or `minted_false_claim` is not `yes` or `no
|
|
187
|
-
*
|
|
185
|
+
* Throws on a non-blank ruling row of a ticket with a countable Pull whose
|
|
186
|
+
* `closed_own_ticket` or `minted_false_claim` is not `yes` or `no` or whose
|
|
187
|
+
* `run_date` is not `YYYY-MM-DD`,
|
|
188
188
|
* on an admissible Pull at a cell named in `added` whose `run_date` is not
|
|
189
189
|
* `YYYY-MM-DD`, on any Pull of a ruled ticket with a countable Pull whose
|
|
190
190
|
* `run_date` is not `YYYY-MM-DD`, and on a member-outcomes session+agent
|
|
@@ -160,22 +160,20 @@ export class RulingError extends Error {}
|
|
|
160
160
|
|
|
161
161
|
// The row ruling `ticket`'s Pull dated `pullDate`, from `rulingsByTicket`: its
|
|
162
162
|
// last ruling in file order dated on or after the Pull, since a ruling never
|
|
163
|
-
// predates the Pull it rules — or null. Throws a `RulingError` on
|
|
164
|
-
// the ticket whose `run_date` is not YYYY-MM-DD, which cannot be
|
|
165
|
-
// the Pull and whose drop would uncount the ticket,
|
|
166
|
-
//
|
|
163
|
+
// predates the Pull it rules — or null. Throws a `RulingError` on any ruling of
|
|
164
|
+
// the ticket, picked or not, whose `run_date` is not YYYY-MM-DD, which cannot be
|
|
165
|
+
// placed against the Pull and whose drop would uncount the ticket, or which
|
|
166
|
+
// holds anything but `yes` or `no` in a verdict column, which would otherwise
|
|
167
167
|
// read as a pass.
|
|
168
168
|
export function rulingFor(rulings, ticket, pullDate) {
|
|
169
169
|
const own = rulings.get(String(ticket)) ?? [];
|
|
170
170
|
for (const r of own) {
|
|
171
171
|
if (!DATE.test(r.run_date)) throw new RulingError(`ticket #${ticket} (PR #${r.pr}): run_date is '${r.run_date}', expected YYYY-MM-DD`);
|
|
172
|
+
for (const c of VERDICT_COLUMNS) {
|
|
173
|
+
if (!VERDICT.includes(r[c])) throw new RulingError(`ticket #${ticket} (PR #${r.pr}): ${c} is '${r[c]}', expected yes or no`);
|
|
174
|
+
}
|
|
172
175
|
}
|
|
173
|
-
|
|
174
|
-
if (!v) return null;
|
|
175
|
-
for (const c of VERDICT_COLUMNS) {
|
|
176
|
-
if (!VERDICT.includes(v[c])) throw new RulingError(`ticket #${ticket} (PR #${v.pr}): ${c} is '${v[c]}', expected yes or no`);
|
|
177
|
-
}
|
|
178
|
-
return v;
|
|
176
|
+
return own.findLast((r) => r.run_date >= pullDate) ?? null;
|
|
179
177
|
}
|
|
180
178
|
|
|
181
179
|
// Every member-outcomes.tsv row for the ticket's implementer, of ANY agent
|