Repository navigation
Commit c16c00f
fix(pm): fleet-roster and mailbox-open page their reads in the script, not through gh --paginate --slurp (#26006)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D6hfpTrgtTBiyXscg9Lfr1f)_
Fixes #25962
Clause-②: no
Metadata-protocol: none
## What
`scripts/pm/fleet-roster.mjs` and `scripts/pm/mailbox-open.mjs` read
lists through `gh api --paginate --slurp`, which the built-in gh of
cloud sessions refuses. The fleet roster (#25462) could not be
regenerated from a cloud seat.
- New `scripts/pm/gh-pages.mjs`: `readAllPages(path)` forces
`per_page=100`, walks `page=1, 2, …` with plain `gh api <path>` until a
short page, and returns an error (never a partial list) on a failed
page, a non-list page, or more than 50 full pages. No `Link` header, the
same rule as `board-snapshot.mjs`.
- Both scripts import it; `ghJson()` keeps its call shape, so no caller
changes.
- Each `--self-test` gains the battery "paging: a three-page read
through the loop equals the slurped array" (4 cases: 100+100+37 rows
equal the slurped array flattened; the pages asked and kept query keys;
an exact multiple stops after one empty page; a failed or non-list page
is an error). Battery floor 7 → 8 in both.
No change to what the roster shows or its columns. No relay change.
Publishes nothing, so `skip-changeset`.
## Evidence
- `node scripts/pm/fleet-roster.mjs --self-test` → 73 cases in 8
batteries pass; `node scripts/pm/mailbox-open.mjs --self-test` → 44
cases in 8 batteries pass.
- With a fake `gh` first on PATH that refuses `--paginate` and `--slurp`
and forwards everything else to the real CLI: the base commit exits 3
(`gh: --paginate is not supported…`), this branch exits 0 and its
`--json` rows (22) equal the base commit's rows read with the real gh.
- `readAllPages` on `/repos/objectstack-ai/objectstack/pulls?state=open`
under the fake gh: 20 rows, the same count as `gh api --paginate
--slurp`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Lv8mtVfg8BPpU5Zkh3xGj8
Co-authored-by: Claude <noreply@anthropic.com>1 parent 88531fa commit c16c00f
3 files changed
Lines changed: 109 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
392 | | - | |
| 393 | + | |
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
| 397 | + | |
404 | 398 | | |
405 | 399 | | |
406 | 400 | | |
| |||
528 | 522 | | |
529 | 523 | | |
530 | 524 | | |
| 525 | + | |
531 | 526 | | |
532 | | - | |
| 527 | + | |
533 | 528 | | |
534 | 529 | | |
535 | 530 | | |
| |||
652 | 647 | | |
653 | 648 | | |
654 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
655 | 667 | | |
656 | 668 | | |
657 | 669 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
235 | | - | |
| 236 | + | |
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 240 | + | |
247 | 241 | | |
248 | 242 | | |
249 | 243 | | |
| |||
371 | 365 | | |
372 | 366 | | |
373 | 367 | | |
| 368 | + | |
374 | 369 | | |
375 | | - | |
| 370 | + | |
376 | 371 | | |
377 | 372 | | |
378 | 373 | | |
| |||
443 | 438 | | |
444 | 439 | | |
445 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
446 | 458 | | |
447 | 459 | | |
448 | 460 | | |
| |||
0 commit comments