Repository navigation
fix(pr-management-code-review): guard against a bot-only green rollup - #1299
Merged
Merged
Conversation
The CI precheck in prerequisites.md treats `statusCheckRollup.state == SUCCESS` as green and puts APPROVE on the table. That state is not evidence CI ran. The rollup aggregates only completed check-runs, and fast bot checks (Mergeable, WIP, DCO, boring-cyborg) succeed unconditionally, so a PR whose real workflows are held in `action_required` awaiting first-time-contributor approval reports SUCCESS while nothing has been built, linted or tested. The precheck's `EXPECTED` branch, which exists for exactly this case, never fires, because the state is not EXPECTED. pr-management-triage already knows this: its Real-CI guard is mandatory before any row classifies a PR as `passing`, and states the same rollup behaviour. code-review had no equivalent. Observed on four PRs in one review pass against a large adopting project; each presented as green with no real CI run, and a small diff ranked them high in the queue. Adds a Real-CI guard to the precheck, cross-referencing triage's, and extends Golden rule 8 so a PR whose real CI never ran is as ineligible for APPROVE as one that fails. Also records that such a PR belongs below every PR with a real run when ordering a queue, and that the reviewer should say CI is unverified rather than predict its outcome. Generated-by: Claude Opus 5
potiuk
force-pushed
the
fix-code-review-real-ci-guard
branch
from
September 20, 2026 22:58
15aa634 to
3a890eb
Compare
4 tasks done
potiuk
added a commit
that referenced
this pull request
Sep 20, 2026
…1302) check-doc-sync validates, among other things, each eval family's case and suite counts in tools/skill-evals/evals/<family>/README.md and the family line in tools/skill-evals/README.md. Its files: gate did not include that tree, so adding or removing an eval case could not fire the check that guards its count. The gate covered the SKILL.md files but not the eval READMEs, which is why this survives a normal dev loop: editing a skill and its evals in one change runs the hook while the counts are still consistent, and the follow-up run that touches only eval files skips it. CI runs --all-files and fails instead. Observed on #1299: a run scoped to the newly added eval fixture skipped the hook locally, and CI reported "family 'pr-management-code-review' says 117 cases across 27 suites, disk has 118 across 27". Adds tools/skill-evals/.* to the gate. Verified by introducing a count mismatch and running prek against only tools/skill-evals/README.md: the hook now fires and reports the drift, where before it was not selected. Preferred over always_run: true, which would fix it as well but adds ~6s to every prek invocation, and no hook in this config currently uses it. Generated-by: Claude Opus 5
12 of 21 tasks
potiuk
added a commit
that referenced
this pull request
Sep 21, 2026
Three defects, found while doctoring a sandbox where `podman` worked by hand but not through the gateway. Backend discovery trusted `podman machine inspect` for the socket path. That command renders the path from the *caller's* TMPDIR, not the machine's, so a hook, agent, or launchd service whose TMPDIR differs is told a path that does not exist and discovery reports no backend at all. Only the basename is stable, so the finders now return candidate lists and `discover` takes the first that exists, with the per-user temp directory from `getconf DARWIN_USER_TEMP_DIR` as the second podman candidate. `_docker_socket` gets the same shape: the context result and the `~/.docker` fallback are now both candidates rather than either/or. `CONTAINER_HOST` / `DOCKER_HOST` were committed in the baseline with a project-relative `unix://./…` value. That can never have worked: a `unix://` URL's authority is parsed as a host component, so `unix://./x` dials `/.//x`, `unix://x` dials `/x/`, and `unix:x` dials `//`. Only `unix:///abs/path` connects, and an absolute path is per-machine, so both variables move out of the committed baseline and join the `allowUnixSockets` pair in the gitignored `.claude/settings.local.json`. The spec had recorded this as a resolved open question in favour of the relative form, concluded from URL parsing rather than a connection; it now records what actually happens. The TMPDIR troubleshooting entry prescribed `env.TMPDIR` in project settings to get a per-project scratch directory. Claude Code sets TMPDIR itself when it builds the sandbox and that assignment wins, so the setting is accepted and silently does nothing. The entry now says so, and the doctor's probe 4 reports a shared session root as a pass instead of sending the operator after a fix that cannot work. Probe 3 gains an explicit check for a non-absolute value, because stripping `unix://` leaves a relative path that stats fine and hides the real cause. Also fixes an unrelated blocker found on the way: the touch overlay polled `lsof -U -n` before the O(1) `signing_in_flight` check, and on a loaded host that enumeration outlasts the signature it is meant to observe, so the overlay never appeared and its test failed one run in three. Asking the cheap question first keeps `lsof` out of the hot loop on the wrapped path entirely. Specs are synced to main: the two pr-management-code-review fixes (#1299, #1300) are recorded in the family contract, the GitHub Copilot harness from #1287 gets copilot-runtime.md, and .last-sync moves to the current tip. Generated-by: Claude Opus 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pr-management-code-review's CI precheck treatsstatusCheckRollup.state == SUCCESSas green and putsAPPROVEon the table. That state is not evidence CI ran: the rollup aggregates only completed check-runs, and fast bot checks (Mergeable,WIP,DCO,boring-cyborg) succeed unconditionally — so a PR whose real workflows are held inaction_requiredawaiting first-time-contributor approval reportsSUCCESSwhile nothing has been built, linted or tested.EXPECTEDbranch exists for exactly this case but never fires, because the state is notEXPECTED.pr-management-triagealready knows this. Its Real-CI guard is mandatory before any row classifies a PR aspassing, and documents the same rollup behaviour.code-reviewhad no equivalent.Found by running a review pass over ~30 provider PRs in a large adopting project. Four PRs presented as green with no real CI run, and because each had a small diff they ranked high in the queue — the worst possible ordering, since a change nothing has verified is not a cheap review.
Type of change
plugins/magpie-pr-management/skills/code-review/) — eval fixture added belowTest plan
prek run --files <changed>passes, includingskill-and-tool-validateand the token-count check (docs/mode-economics.mdregenerated viauv run --project tools/skill-token-count skill-token-count --write)review-disposition/case-6-bot-only-rollup: a PR withrollup == SUCCESSwhose only contexts areMergeableandWIP, and whose diff reads as correct, must come outCOMMENTrather thanAPPROVE. The suite'ssystem-prompt.mdis updated to carry the guard, so the case fails without this change.review-dispositioncase count 5 → 6 and suite total 117 → 118 updated in the eval READMERFC-AI-0004 compliance
Prose and eval fixture authored with AI assistance;
Generated-by:trailer on the commit, noCo-Authored-By:.