Repository navigation
✨ Reviewer preflight: repo rules, dependency advisories and release age, subtle-defect guidance - #19075
Conversation
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
Mutation testing42 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
…ge, subtle-defect guidance (#19069) Adds review.preflight (per-repo override repos.<repo>.review_preflight): the hive lists the repo's own rule documents and operator-defined rules for the reviewer, optionally checks added or bumped dependencies against OSV and package registries across ten ecosystems with offline degradation, cache, severity thresholds and an expiring ignore list, and the correctness review now checks outdated messages and sentinel-in-aggregate bugs. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…ver (#19069) Signed-off-by: Andrew Anderson <andy@clubanderson.com>
….preflight (#19069) Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…d limits to clear the package coverage floor (#19069) Signed-off-by: Andrew Anderson <andy@clubanderson.com>
1cf629a to
9b626ce
Compare
|
New changes are detected. LGTM label has been removed. |
What this adds
A general, configurable reviewer preflight for every hive, repository and language: facts the hive gathers before the reviewer reads the diff, so a review can rest on the repo's own rules and on advisory ids instead of on a hunch. Config lives under
review.preflight, with per-repo overrides atrepos.<repo>.review_preflight.rule_doc_paths,rule_doc_exclude), the byte budget is deterministic (rule_doc_budget_bytes), and the reviewer must name the document and rule it applied. Operators can also define short namedruleswith a severity that the reviewer enforces.min_release_age_days, default 14) become evidence with advisory ids. Unsupported manifests, withheld patches, SHA-pinned or floating action refs and over-limit dependencies are reported as "not checked", never skipped silently. Adding an ecosystem is a table entry plus a test.offline(orHIVE_REVIEW_PREFLIGHT_OFFLINE=true) giving an explicit "could not check: offline", internal mirror URLs, in-memory cache with TTL, per-request timeout, 429/5xx degrade per check with the reason, upstream proxy honored, no credentials sent, only package name, ecosystem and version. The docs state exactly what leaves the hive.block_severitymaps advisory severity to verdict impact,severity_floorhides low noise, andignoreaccepts a known advisory with a required reason and an optional expiry (an expired entry stops suppressing and says so). Third-party text never reaches the prompt, only ids, versions, dates and paths.Decision for the operator: egress default
Dependency checks are off by default because they contact third-party services (OSV and package registries) about repositories that may be private: the services see the hive's egress IP and the dependency names of reviewed PRs. Rule discovery uses only the GitHub API the hive already calls, so it is on by default. Turning dependency checks on is
review.preflight.dependencies: true(or per repo).Motivating evidence
@MikeSpreitzer compared several review tools on one of his PRs. The hive covered the duplicated word, an outdated comment and the PR description accuracy, and missed: repo rule documents, vulnerability databases, dependency release age, outdated failure messages and a sentinel/min bug; the red dots on other tools are why every check here requires evidence. The full table is in #19069.
Not in this PR (listed in #19069): general web search for dependency vulnerabilities, a deterministic outdated-message hint, transitive resolution, container image scanning, release age for Actions and images, Settings dialog controls (allowlisted in the parity file, #19069).
Tests and docs
Table-driven parser tests for 17 manifest cases across all ecosystems, registry age lookups, OSV and registry fakes via httptest, offline and env-offline degradation, outage not read as clean, cache reuse, ignore list with expiry, severity floor and block threshold, rule-doc budget determinism, per-repo override precedence, config validation, prompt wiring. Docs: "Review preflight" in
src/docs/review-swarm.md,src/hive.yaml.example, changelog fragment. No local build or test was run (repo rule); CI is the gate.Fixes #19069
🤖 Generated with Claude Code