Repository navigation
Reject distributed compute-only refinements - #1024
Conversation
tend-agent
left a comment
There was a problem hiding this comment.
Both edits do what the description says, and the whole-change clause catches the eleven-job shape in #1023 cleanly. One gap: the review-runs bullet now defers its remedy decision to Gate 3, and Gate 3 didn't get the clause.
plugins/tend-ci-runner/shared/review-gates.md — symlinked into both review-runs and review-reviewers — still enumerates waste-class remedies per item: "A waste-class failure supports only a fix that is itself nearly free: a cadence value, a deleted step, a one-line condition, machinery removed." Its existing qualifier, "judge by what the fix leaves behind ... not its line count", is aimed at one dense line, not at the same line repeated across eleven jobs. Gate 3 does link back to Weighing a Fix, but as "the reasoning behind this gate" rather than as an added constraint.
That's the site that matters here, because the observed failure wasn't a failure to load the policy — per the description the PRQL agent had loaded it and still read each per-job timeout as an allowed knob. Gate 3 is the text a session re-reads while classifying, and it still reads per-item. So a review-runs session flagging near-timeout jobs across eleven workflows can follow the new "a remedy that passes Gate 3" pointer, land on that list, and reach the same conclusion this PR is written to reject.
One clause on that Gate 3 sentence closes it in one place, since the file is symlinked into both skills. Happy to push it if you'd like.
tend-agent
left a comment
There was a problem hiding this comment.
Gate 3 now defers to Weighing a Fix as a constraint rather than as background reasoning, and both review-runs and review-reviewers open by loading /tend-ci-runner:running-in-ci, so the pointer resolves for every reader of the symlinked file. That closes the gap from the last review.
One thing the rewrite dropped: Gate 3's own list was the only place in the plugin that named machinery removed as an allowed waste-class remedy, and the Remedy bullet it now delegates to never carried it — so after this PR the phrase is gone from plugins/tend-ci-runner/ entirely. That's the remedy class the project most prefers (CLAUDE.md's "Prefer deleting a mechanism over refining it", and Gate 2's Removal / simplification row taking the lowest evidence bar), and "a deleted step" reads as a workflow-YAML step rather than as removing a mechanism — which is the shape a review-runs waste finding usually takes, since its subject is guidance rather than build config. Restoring it on the delegated line covers both readers at once. Non-blocking; suggestion inline.
…#1027) `review-runs` Step 4 cross-checks outcomes with `issues/comments` and `pulls/comments`, neither of which returns a review **body** — `pulls/comments` carries inline review comments only. A maintainer `CHANGES_REQUESTED` whose correction is written in the body therefore returns *nothing* from both calls, and the run writes "no maintainer corrections" with corrections sitting in the window. Step 4's three queries — dispositions, thread comments, and the missing review bodies — now live in `plugins/tend-ci-runner/scripts/review-runs-corrections.sh`, with `generator/tests/test_review_runs_corrections.py` pinning the window edges. The skill is a one-line invocation, net −20 lines. Extraction also closes the fail-open class the prose kept patching: an unset anchor compares less than every timestamp and `--author ""` applies no author filter, so the script exits 2 on a missing anchor or login rather than reporting an empty window that reads as an all-clear. Verified against live API data (details below), and the script run against both this repo and `max-sixty/leaf`. <details><summary>Verification</summary> **Review bodies are absent from `pulls/comments`.** Review `4988584496` on #1024 (`COMMENTED`, non-empty body, submitted inside the window) has no representation in the repo-wide review-comments endpoint — not by review id, not by body text: ``` $ gh api --paginate "repos/max-sixty/tend/pulls/comments?since=$SINCE&per_page=100" > /tmp/pc.json $ jq 'length' /tmp/pc.json 35 $ jq '[.[] | select(.pull_request_review_id == 4988584496)] | length' /tmp/pc.json 0 $ jq --arg b "${BODY:0:60}" '[.[] | select(.body | contains($b))] | length' /tmp/pc.json 0 ``` Every entry the endpoint does return carries a `path` — inline comments, each belonging to a review record. **The script returns the missed reviews.** Pointed at `max-sixty/leaf` over the window in #1026 (where both prescribed queries returned zero non-bot entries), the `reviews` key carries the two `CHANGES_REQUESTED` rows this PR exists to catch. On this repo over an 18h window it returns 1 disposition, 2 non-bot comments, 0 bodied non-bot reviews, in 4.3s. **`(.body | length) > 0` is load-bearing.** Empty-bodied review containers from a human exist on this repo today — e.g. review `4988620443` (`max-sixty`, #1024) and `4987925324` (`max-sixty`, #1022), both `COMMENTED` with no body. GitHub creates one per standalone inline reply, so without the filter every thread where anyone replied inline reports a correction with no text in it. **`updated:` takes a full timestamp.** An earlier revision truncated `$SINCE` to a date on the claim that the qualifier accepts no time component. It does. On this repo with `SINCE=2026-08-20T07:59:59Z`: full `Z` form returns 9 PRs, the `+00:00` form 9, date-only 10, unqualified `gh pr list` 200. The extra PR the date-only form admits is #1018, updated `2026-08-20T01:28:24Z` — before the cutoff — so the time component is honoured at sub-day granularity rather than silently truncated. The sibling recipe in `review-reviewers` (`--search "updated:>$WINDOW_START"`) already passes the full timestamp. **Two deltas from the recipe proposed in the issue:** `--paginate` with `per_page=100` on the reviews call (reviews page at 30 oldest-first, so the unpaginated call drops the newest — exactly where a window's reviews are), and the `submitted_at` filter inside the loop, since `updated:` windows the PR rather than the review. **Tests.** 12 cases over a fake `gh` running the script's real filters: missing anchor and unresolvable login both exit 2 before any API call; open PRs excluded from dispositions (`closedAt` null); bot entries excluded from all three lists; `--paginate` asserted on both comment endpoints; an older comment edited into the window reported with both timestamps; the empty-bodied container excluded; a pre-window review on an in-window PR excluded. `review-reviewers` — flagged in the issue as possibly sharing the blind spot — does not: it already calls `pulls/{n}/reviews` per PR in both its bot-output census and its acceptance check. `uv run pytest` (581 passed) and `uvx pre-commit run --files …` both pass. </details> --- Closes #1026 — automated triage --------- Co-authored-by: tend-agent <[email protected]>
The agent behind PRQL/prql#6215 had loaded the compute-only policy, but treated each per-job timeout as an allowed "simple knob"; its self-review then added two more. Define that exception across the whole change: one existing knob in one place. Repeated settings now count as a configuration scheme in the runtime guidance and shared review gate, while review-runs no longer recommends an override without applying Gate 3.
Verified with
pre-commit run --files plugins/tend-ci-runner/skills/running-in-ci/SKILL.md plugins/tend-ci-runner/skills/review-runs/SKILL.md plugins/tend-ci-runner/shared/review-gates.mdandgit diff --check.