Skip to content

fix: raise session-start's PR limit above gh's own default, and restore the truncation caveat - #242

Merged
topij merged 1 commit into
mainfrom
fix/session-start-pr-list-limit
Aug 2, 2026
Merged

fix: raise session-start's PR limit above gh's own default, and restore the truncation caveat#242
topij merged 1 commit into
mainfrom
fix/session-start-pr-list-limit

Conversation

@topij

@topij topij commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Closes #237.

The bug

The shipped gather ran:

gh pr list --state open --json … --limit 20

That is below the default it was presumably meant to control:

$ gh pr list --help
  -L, --limit int   Maximum number of items to fetch (default 30)
$ gh --version
  gh version 2.96.0 (2026-07-02)

So the explicit flag made the sweep narrower than passing nothing at all.

The fix, in two separable parts

The number is now 100, matching the ancestor this workflow was generalized out
of.

The caveat matters more, because it survives any choice of number: gh pr list
reports nothing when it truncates, so a full page has to be treated as truncated
and re-run higher. That sentence existed in the ancestor and was lost in the
extraction.

Why it is not cosmetic: this list is the entire input to the 🔴 bucket's PR
items. A PR past the cutoff is not under-reported, it is invisible — and the ones
above it render as though they were all of them, which is a briefing that is
confidently wrong rather than visibly incomplete.

The What it reads row now points at the gather instead of naming a bare
gh pr list.

The survey half — the part that made this more than a one-line edit

#237 asked for the four shared workflow docs to be diffed against the cs-toolkit
adapters they were generalized out of, "even if the result is 'nothing else'".
Done. This was the only substantive drop.

workflow result
session-start this, plus one whole missing step — already shipped as #238
parallel clean. Stale-premise pre-flight survived intact (parallel.md:89); the lane-contract preamble moved to parallel-headless.md rather than being dropped
pr-watch kit is ahead of its ancestor — it gained the draft-bit-flags section, a fuller --mark-seen contract, and the gh-less REST fallback in Notes
wrap-up clean. Every ancestor step has a counterpart except docs/user/dashboard-snapshot.md, which is project-specific and correctly absent

One correction to that survey, recorded rather than buried

A probe for gh pr ready returned zero hits in the kit's wrap-up and looked
like a second drop. It is not one. The kit says "mark the PR ready … and run the
watch-and-fix loop (pr-watch)"
at wrap-up.md:141 — generalized deliberately,
because vcs.forge is configurable and a literal gh command would be wrong for a
GitLab adopter.

The probe was too literal. Reporting its zero as a finding would have been exactly
the failure this repo keeps logging — a check that never reached its subject,
returning the answer that looked like a result.

Verification

claim how
gh pr list defaults to 30 gh pr list --help on gh 2.96.0, quoted above rather than recalled
suite green make test → 721 passed
manifest fresh python scripts/kit_doctor.py → 32 unchanged, 0 differ, 0 missing

What this does not establish: as with #238, this is prose an agent executes
and no test in this repo runs it. The make test green means the regenerated
manifest is consistent and nothing else broke — it says nothing about whether the
guidance is right.

Summary by CodeRabbit

  • Documentation
    • Improved session-start guidance for retrieving complete pull request results.
    • Added instructions to detect potentially truncated results and rerun searches with a higher limit.
    • Clarified how omitted pull requests affect prioritization and automation attribution.
  • Chores
    • Updated the kit manifest to reflect the documentation changes.

…re the truncation caveat

The shipped gather ran `gh pr list … --limit 20`. That is BELOW the default it
was presumably meant to control: `gh pr list --help` on gh 2.96.0 reads
`-L, --limit int  Maximum number of items to fetch (default 30)`. So the explicit
flag made the sweep narrower than passing nothing at all.

Two separable losses, and the second survives any choice of number. The limit is
now 100, and the caveat the ancestor carried is back: `gh pr list` reports nothing
when it truncates, so a full page must be treated as truncated and re-run higher.
This list is the entire input to the Now bucket's PR items, so a PR past the
cutoff is not under-reported — it is invisible, while the ones above it render as
though they were all of them. The "What it reads" row now points at the gather for
that rather than naming a bare command.

THE SURVEY HALF OF #237, which is the part that made this more than a one-line
edit. Each of the four shared workflow docs was compared against the cs-toolkit
adapter it was generalized out of, looking for operational detail lost in the
extraction. Result: this was the only one.

- session-start — the other gap was an entire step, already shipped as #238.
- parallel — the Stale-premise pre-flight survived generalization intact
  (kit parallel.md:89), as did the lane-contract preamble, which moved to
  parallel-headless.md rather than being dropped.
- pr-watch — the kit is AHEAD of its ancestor: it gained the draft-bit flags
  section, a fuller `--mark-seen` contract, and the gh-less REST fallback in Notes.
- wrap-up — every ancestor step has a counterpart except
  `docs/user/dashboard-snapshot.md`, which is project-specific and correctly
  absent.

One correction to that survey rather than a finding: a probe for `gh pr ready`
returned zero hits in the kit's wrap-up and looked like a drop. It is not — the
kit says "mark the PR ready … and run the watch-and-fix loop (`pr-watch`)"
(wrap-up.md:141), generalized because `vcs.forge` is configurable. The probe was
too literal, and reporting its zero as a finding would have been the failure this
repo keeps logging: a check that never reached its subject.

VERIFIED: `gh pr list --help` on gh 2.96.0 for the default-30 claim, quoted above
rather than recalled; `make test` 721 passed; `python scripts/kit_doctor.py` 32
unchanged, 0 differ, 0 missing.
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 55ce091e-7b74-499c-aa90-a0af39c035ef

📥 Commits

Reviewing files that changed from the base of the PR and between b5b9547 and 9d35d45.

📒 Files selected for processing (2)
  • docs/agentic-dev-kit/workflows/session-start.md
  • kit-manifest.json

📝 Walkthrough

Walkthrough

The session-start workflow now queries up to 100 open pull requests, detects potentially truncated results, and explains the effect on 🔴 prioritization. The manifest records the updated workflow hash.

Changes

Session-start PR gathering

Layer / File(s) Summary
Open PR query and manifest update
docs/agentic-dev-kit/workflows/session-start.md, kit-manifest.json
The workflow uses --limit 100, re-runs the query when 100 results may indicate truncation, documents the effect on 🔴 PR candidates, and updates the recorded SHA-256 hash.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two primary changes: increasing the PR limit and restoring truncation guidance.
Linked Issues check ✅ Passed The changes satisfy #237 by setting the limit to 100, restoring truncation guidance, updating the gather reference, and recording ancestor comparisons.
Out of Scope Changes check ✅ Passed The changes remain within #237 scope and include only the required workflow updates and manifest hash change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@topij
topij merged commit e49ddf3 into main Aug 2, 2026
3 checks passed
@topij
topij deleted the fix/session-start-pr-list-limit branch August 2, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

session-start ships gh pr list --limit 20 and lost the truncation caveat its ancestor carried

1 participant