fix(pr-management): verify dependency findings - #1048
Conversation
A real maintainer review treated a direct lower bound as an installable failure even though a mandatory transitive dependency excluded every failing version. It also prescribed a bound change contrary to the adopter's release workflow. Dependency findings need proof against the resolved graph and local policy before they can block contributor work. Generated-by: Codex (GPT-5)
Avoid treating incomplete dependency metadata as proof that every supported resolution is compatible. Generated-by: Codex (GPT-5)
Preserve uncertainty when incomplete dependency metadata proves neither a failing nor a compatible supported resolution. Generated-by: Codex (GPT-5)
Prevent the version-compatibility evidence gate from being read as applying to unrelated dependency findings such as licensing. Generated-by: Codex (GPT-5)
Dependency compatibility findings need enforceable evidence, while remediation must remain grounded in each adopter repository instead of being inferred from compatibility alone. Generated-by: Codex (GPT-5)
Keep the top-level eval inventory aligned with the fifth dependency compatibility regression added to the code-review suite. Generated-by: Codex (GPT-5)
Keep the PR-management source of truth aligned with the evidence gate and adopter-specific remediation behavior enforced by the review skill. Generated-by: Codex (GPT-5)
Keep automated dependency-compatibility evaluations from failing when generators follow the documented JSON example. Generated-by: Codex (GPT-5)
Ensure the release-marker regression cannot pass when a model omits the required findings field entirely. Generated-by: Codex (GPT-5)
potiuk
left a comment
There was a problem hiding this comment.
LGTM — this fixes a real class of false positive, and the reasoning behind it is more careful than the diff size suggests.
The rule is right
The core insight is the one that matters: "A direct lower bound by itself is not a failing resolution when another mandatory path narrows the range." Flagging foo>=1.0 as incompatible with an API added in foo 2.0 is wrong if some other mandatory dependency already forces foo>=2.1 — the failing version is not resolvable, so the runtime failure being claimed cannot occur. Requiring a constraint ledger and one concrete supported-but-failing version turns an inference into a demonstration.
Three things I would call out as better than the minimum:
- The three-state classification. Adding
unknownalongside broken/compatible, and stating that partial metadata coverage yieldsunknownrather thancompatible, is the honest modelling. The tempting shortcut is "no failing resolution found, therefore compatible", and the text explicitly rejects it: absence proves compatibility only when coverage is exhaustive, and the reviewer has to record what makes it exhaustive. - Separating runtime findings from policy findings.
unknowncannot support a runtime-incompatibility claim but does not suppress a policy finding backed by the project's own rules. Those are genuinely different claims with different evidence bars, and conflating them is how a reviewer ends up asserting a crash that never happens in order to justify a bound they think should change anyway. - "Do not prescribe a direct version bump when the project's release process says contributors must not make one." Requiring the per-area
AGENTS.mdbe read before prescribing remediation, rather than importing a convention from another repository, is the part most likely to save a contributor from being told to do something their project forbids.
The evals match the rule
Five cases spanning the interesting axes — transitive lower bound, an installable incompatibility, a release marker that already satisfies the constraint, partial metadata producing a policy finding, and an environment marker.
The assertions are the part I checked hardest, because assertions on a findings list are easy to get subtly wrong:
- The
regexpredicates match literal JSON double quotes ("dependency_evidence"\s*:\s*"[^"]+") against a list-valued field. That works because the runner JSON-serialises non-string values before text predicates run (text = value if isinstance(value, str) else json.dumps(...)), so the double quotes are really there. Worth stating explicitly since astr()-based implementation would have produced single quotes and the pattern would silently never match. has_empty_findingsusesmax_length: 0, which takeslen()of the list rather than a string — the correct predicate for "no findings at all".has_complete_constraint_ledgeris ajudgepredicate with a rubric spelling out all three admissible conclusions. Mixing deterministic predicates for the mechanical parts with a judge for the semantic one is exactly the right split: the regexes prove the field exists and is shaped correctly, the judge decides whether the ledger actually reasons.
Shipping assertions.json and grading-schema.json alongside the fixtures also means these cases grade automatically rather than falling back to MANUAL — the trap documented in #1043 and hit again in #982 this week. Good to see a new suite land already correct.
step-config.json extracts ## Step 4 — Examine the diff live from review-flow.md, so the eval exercises the shipped text rather than a copy that can drift.
No findings.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Magpie handles maintainer review:
CONTRIBUTING.md § Opening a pull request.
Summary
AGENTS.mdand repository dependency/release policy before prescribing a remediation.A real review on apache/airflow#70160 showed the impact. The finding treated
common-compat1.8–1.11 as installable even though the mandatorycommon-sql>=1.32.0path requirescommon-compat>=1.12.0, then recommended replacing Airflow's# use next versionrelease marker with a direct bound change. The result was published as blocking after human confirmation, so dependency findings need an explicit evidence gate before they can block contributor work.Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)Test plan
prek run --all-filespassesuv run pytest/ruff check/mypypasses(
uv run --project tools/skill-evals skill-eval tools/skill-evals/evals/pr-management-code-review/rendered all 115 cases successfully)(the dependency-compatibility suite passes 5/5 against
claude -p)RFC-AI-0004 compliance
Linked issues
None. A deduplication search found no existing Magpie issue or PR for this defect.
Notes for reviewers
The Airflow link is evidence for the generic failure mode, not a project-specific rule in the skill. The production wording requires a complete constraint ledger and delegates remediation to the adopter's own
AGENTS.mdand dependency/release documentation.