Repository navigation
Ground a claim about a closed PR in its diff, and scope a bounded read to what it read - #1379
Conversation
…a bounded read to what it read Closes #1378
tend-agent
left a comment
There was a problem hiding this comment.
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.
/tend-ci-runner:ground-claimsnames 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 readsgh pr view <n> --json body,comments,reviewsand 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 -Nthat 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. Thehead -120clause moves out of the exhaustiveness entry so truncation has one home rather than two partial ones.open-pr— the prior-rejection recipe now readsgh 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 forvar_b) while adding no clip to the correlation output — so a comment describing it as having proposed boundingmove_corrwas 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) anduv 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-prrecipe line belongs in the same change.Closes #1378 — automated triage