Skip to content

Ground a claim about a closed PR in its diff, and scope a bounded read to what it read - #1379

Merged
max-sixty merged 2 commits into
mainfrom
fix/issue-1378
Sep 22, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix/issue-1378

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

/tend-ci-runner:ground-claims names the shape where a session reads the wrong commit for a past run, but nothing named its sibling for a past pull request. A PR's body, comments, and reviews record what was discussed; only its diff records what was proposed, and on a PR closed unmerged the two routinely diverge — the thread is exactly where the author explains what they chose not to do. A session that reads gh pr view <n> --json body,comments,reviews and stops there states what the PR's code proposed from its prose. /tend-ci-runner:open-pr's Fetch the prior rejection before re-deriving a fix actively sends sessions to read closed PRs, and its recipe fetched only the thread.

The second gap is in the layer that should catch the first. The truncation example (head -120) sat inside An exhaustiveness claim needs a method that could have found a counterexample, whose trigger is publishing "all", "every", "none". A bounded read that underwrites a single specific claim never trips that trigger, so a | head -N that stopped short of the hunk deciding the claim exits 0 and reports back as a check that passed — turning unverified into verified without any exhaustiveness word being published.

Changes

  • ground-claims — new entry: a claim about what a past PR proposed is read from its diff, placed beside the past-run sibling it mirrors.
  • ground-claims — new entry: a bounded read verifies only the part it read, stated for a truncated document as much as a truncated result set, and for a single claim as much as an exhaustiveness claim. The head -120 clause moves out of the exhaustiveness entry so truncation has one home rather than two partial ones.
  • open-pr — the prior-rejection recipe now reads gh pr diff <n> alongside the thread. That section's own closing question — whether a PR was closed on the code or on the approach — can't be answered from the discussion alone.

Verification

Re-checked the reporter's case directly rather than from the issue body: numbagg/numbagg#758 is closed, and its diff clamps the two variances (var_a = max(asum_sq * count_reciprocal - avg_a**2, 0.0), same for var_b) while adding no clip to the correlation output — so a comment describing it as having proposed bounding move_corr was wrong, which numbagg/numbagg#825 corrected on merge. The deciding hunk sits past line 150 of that diff, which is how a truncated read of it came back clean.

uv run pytest generator/tests/test_repo_pins.py (46 passed) and uv tool run pre-commit run --all-files (all 12 hooks) pass on this branch.

This is bundled text, so it reaches every consumer on the next release; a maintainer decides whether these are the right two rules and whether the open-pr recipe line belongs in the same change.

Closes #1378 — automated triage

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two gaps in the new entries, both in the commands the rules themselves prescribe.

gh pr diff <n> needs -R <owner>/<repo> for a PR in another repository. A bare number resolves against the current checkout, so a session grounding a claim about another repo's PR #758 silently reads this repo's #758 and gets a well-formed diff of an unrelated change — the failure shape the entry exists to stop, arriving through the command it recommends. The run-commit entry above it spells out repos/{owner}/{repo}/... for the same reason. Cross-repo claims are reachable from here: the weekly harness release-note pass, dependency-bot PRs, and anything under /tend-ci-runner:act-in-other-repos.

The bounded-read entry names only the bounds you ask for. head, tail, and --limit are explicit, but the same truncation arrives unasked — a long gh pr diff or log crosses the size where the harness saves the output to a file and shows a preview, the mechanism the --limit entry directly above already describes. As written, "run gh pr diff <n>" can satisfy the new rule while still reading a fraction of the diff. The suggestion names that bound alongside the others, and captures the fetch before grepping so a failed one cannot read as an absent symbol — the hazard the git show / grep -c paragraph in the same section warns about.

Both are mechanics. The design question the description raises — whether these are the right two rules, and whether the open-pr recipe line belongs in the same change — is unaffected and still a maintainer call.

… harness applies

A bare `gh pr diff <n>` resolves against the current checkout, so a claim
about another repository's PR silently reads this repository's PR of the same
number. Name `-R <owner>/<repo>`.

The bounded-read entry listed only bounds the session asks for; a long read
saved to a file and previewed truncates the same way. Capture the fetch before
grepping too, so a failed one can't read as an absent symbol.

Rewrap the exhaustiveness paragraph left long by the previous commit.
@max-sixty
max-sixty merged commit a2c2f60 into main Sep 22, 2026
11 checks passed
@max-sixty
max-sixty deleted the fix/issue-1378 branch September 22, 2026 17:07
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.

ground-claims: a claim about what a closed PR proposed is read from its prose, not its diff — and a truncated diff read reports as verified

2 participants