Skip to content

review + fleet-wide: ci-log-auditor's 'add' rationale misdescribes gh --paginate's array merge, plus ~15 sites omitting per_page=100 #2246

Closed

Description

@kyle-sexton

#2238 covers ci-log-auditor.md:22 (a missing per_page=100). This is a different defect in the same file — the prose, not the command — and a repo-wide sweep of the same conformance gap #2238 reports at one site.

Part 1 — the add rationale misdescribes what gh actually does

plugins/review/agents/ci-log-auditor.md:65 (mirrored in plugins/review/CHANGELOG.md:20):

Concatenated pages are arrays, so they are combined with add, not by reaching through a wrapper

Measured (gh api --paginate, per_page=10, jq -s 'length'):

array endpoint   (issues/<n>/comments)         -> 1 document
object endpoint  (commits/<sha>/check-runs)    -> 3 documents

gh --paginate merges top-level array responses into a single document; it emits one document per page only for object-envelope responses. So on the /annotations endpoint there is exactly one array, and add is unwrapping a 1-element slurp rather than concatenating pages.

The published command is correct — jq -s '... add | length' yields the right count, verified against output.annotations_count. Only the explanation is wrong. Worth fixing because it is a mechanism claim in a file whose whole subject is being factually right about pagination, and because a reader who believes it will mispredict the shape on the next endpoint.

Part 2 — repo-wide sweep of --paginate without per_page=100

#2238 reports this at one site; it holds at roughly fifteen runnable command sites across four plugins. Stated honestly: --paginate alone is complete — it fetches every page regardless — so these are not truncation defects. They are non-conformant with rule 1 as skills/pull-request/reference/readiness.md:55 publishes it (--paginate with per_page=100), and they cost 3.3x the requests.

Sites on main (c1b4c629), excluding prose mentions, single-resource GETs, and mutations:

file line
plugins/review/agents/ci-log-auditor.md 22 (already #2238 / #2239)
plugins/source-control/skills/pull-request/reference/merge.md 14, 15, 16
plugins/source-control/skills/pull-request/SKILL.md 166, 167, 168 (C1/C2/C3)
plugins/source-control/skills/pull-request/reference/monitor.md 195
plugins/source-control/scripts/fetch-all-pr-comments.sh 141
plugins/source-control/skills/babysit-loop/reference/telemetry-upsert.md 39
plugins/source-control/skills/babysit-prs/scripts/babysit_gh.py 441
plugins/source-control/skills/babysit-prs/scripts/request_review.py 186
plugins/claude-ops/skills/lanes/scripts/restart-consumer.sh 774
plugins/claude-ops/skills/lanes/scripts/telemetry-upsert.sh 344
plugins/work-items/skills/attend-queue/SKILL.md 136
plugins/work-items/skills/work-loop/reference/telemetry-upsert.md 43
plugins/work-items/tools/work-item-tracker/adapters/github/common.sh 189
plugins/work-items/tools/work-item-tracker/adapters/github/reclaim.sh 46, 50

merge.md:14-16 and SKILL.md:166-168 are worth a callout: they read the same three endpoints that #2163 changed elsewhere in the same skill, and SKILL.md's are 11-17 lines above lines #2163 did give ?per_page=100.

Verify each line before editing — main moves continuously and #2239 is already in flight against the first row.

Activity

  1. added
    needs-triage
    on Aug 11, 2026
  2. kyle-sexton commented on Aug 11, 2026

    @kyle-sexton
    MemberAuthor

    Part 2's first row is already closed — re-swept against current main (33f0df5)

    #2239 merged at 2026-08-11T23:36:52Z, after this issue was filed. Verified on current main:

    plugins/review/agents/ci-log-auditor.md:22
      gh api --paginate ".../actions/runs/<run-id>/jobs?per_page=100" --jq '...'
    

    per_page=100 is present, and the site no longer appears in the sweep. That row is discharged — do not re-fix it. #2238 is likewise closed by #2239.

    Part 1 still stands, unchanged. ci-log-auditor.md:65 still reads "Concatenated pages are arrays, so they are combined with add, not by reaching through a wrapper", which misdescribes the mechanism — gh --paginate merges top-level array responses into a single document (measured: array endpoint → 1 document, object endpoint → 3), so add unwraps a one-element slurp rather than concatenating pages. #2239 fixed the command on line 22 and did not touch this prose.

    Re-swept Part 2 list, current as of 33f0df5

    Runnable REST command sites still carrying --paginate without per_page=100:

    file line
    plugins/source-control/skills/pull-request/reference/merge.md 14, 15, 16
    plugins/source-control/skills/pull-request/SKILL.md 166, 167, 168 (C1/C2/C3)
    plugins/source-control/skills/pull-request/reference/monitor.md 195
    plugins/source-control/scripts/fetch-all-pr-comments.sh 141
    plugins/source-control/skills/babysit-loop/reference/telemetry-upsert.md 39
    plugins/source-control/skills/babysit-prs/scripts/babysit_gh.py 441
    plugins/source-control/skills/babysit-prs/scripts/request_review.py 186
    plugins/claude-ops/skills/lanes/scripts/restart-consumer.sh 774
    plugins/claude-ops/skills/lanes/scripts/telemetry-upsert.sh 344
    plugins/work-items/skills/attend-queue/SKILL.md 136
    plugins/work-items/skills/work-loop/reference/telemetry-upsert.md 43
    plugins/work-items/tools/work-item-tracker/adapters/github/common.sh 189
    plugins/work-items/tools/work-item-tracker/adapters/github/reclaim.sh 46, 50

    18 sites, down from the original list once ci-log-auditor.md:22 is removed.

    Correctly excluded on re-check, so nobody re-adds them:

    • reference/review-discipline.md:227 and :237 — continuation lines; the actual commands on the surrounding lines do carry per_page=100.
    • claude-ops/skills/morning-brief/scripts/morning-brief.sh:508 and work-item-tracker/adapters/github/README.md:205 — gh api graphql --paginate, which is cursor-paginated with first: 100 in the query. per_page does not apply.
    • Test fixtures (morning-brief.test.sh:109, fetch-annotations.test.sh:139, lease-coordination.test.sh:47), CHANGELOG prose, and prompts/loops/loop-lane-prompts.md:190.

    Unchanged from the original filing: --paginate alone fetches every page, so none of these is a truncation defect. They are non-conformant with rule 1 as skills/pull-request/reference/readiness.md:55 publishes it, and cost 3.3x the requests. Verify each line before editing — main moves continuously.

  3. kyle-sexton commented on Aug 12, 2026

    @kyle-sexton
    MemberAuthor

    Fully resolved on main — no residual work for a new PR.

    Part 1 (ci-log-auditor add rationale): Fixed in #2263 — plugins/review/agents/ci-log-auditor.md now correctly describes that gh --paginate merges array-shaped pages into one document (so jq -s + add unwraps rather than concatenates on /annotations).

    Part 2 (--paginate without per_page=100): Fixed across the fleet in #2262 (source-control) and #2263 (review, work-items, claude-ops). Verified on current main: every runnable REST list read in the issue's sweep table now carries per_page=100; babysit_gh.py / request_review.py already had it in the endpoint URL.

    Closing as complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions