chore: add Copilot PR review instructions#489
Merged
Conversation
Adds .github/copilot-instructions.md to guide GitHub Copilot's PR review behavior toward high-signal feedback and away from CI-duplicate noise. Process: - Reviewed Copilot's review-platform constraints (4000-char base-branch read, Comment-only review, no merge gating, no external link following) plus Google/Microsoft/OWASP/NIST review literature. - Analyzed 319 Copilot inline comments across the last 150 dealbot PRs to identify which areas Copilot reviews well (job-state consistency, test/fixture-contract drift, multi-network behavior, quoted SQL identifiers, redaction) versus where it overreaches (generic-SQL assumptions on ClickHouse code in PRs #438 and #485, low-priority frontend optimization comments). - Iterated through rounds of adversarial review (self-review against the evidence, then a second-opinion review by Codex) to tighten wording, fit the 4000-byte budget, and encode dealbot-specific invariants. Encoded: - Repository context: monorepo layout, Postgres = source of truth, ClickHouse cluster/schema/migrations owned by an external team (dealbot reviews payload correctness and operational impact, not schema/retention/ops design). - Core invariants: at most one job per SP per check type per network; jobs fail only on execution failure, not on negative check results; scheduling/cleanup/filtering/queue execution stay consistent across the same SP set and network. - Blocker/Important priorities aligned to observed high-value comment themes. - Do-Not-Comment list to suppress CI-duplicate noise (Biome, build, typecheck, test, Docker already enforced in CI). Final size: 3890/4000 bytes.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a repository-level .github/copilot-instructions.md file to steer GitHub Copilot’s PR review behavior toward dealbot-specific, high-signal correctness/invariant feedback and away from CI-duplicate noise.
Changes:
- Introduce a structured PR review rubric (goal, philosophy, priorities, invariants, “do not comment” list).
- Encode dealbot-specific guidance around job/check invariants, multi-network correctness, and provider filtering/blocklists.
- Define a suggested one-issue-per-comment output format for reviews.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Clarify ClickHouse ownership: DDL (clickhouse.schema.ts) and event payloads are owned in-repo and in-scope for review; only cluster ops/retention/infra tuning are externally owned. Earlier wording could have suppressed legitimate schema review (Copilot caught this). - Add Prometheus as a source of truth alongside Postgres, and discourage adding new persisted DB state without need. - Align Comment Format header with the Blocker/Important priority scheme instead of a free-form `Severity:` label. - Drop the generic performance Important bullet; not backed by the PR-comment evidence and frees bytes for the above. Final size: 3950/4000 bytes.
rvagg
approved these changes
Apr 29, 2026
Contributor
rvagg
left a comment
There was a problem hiding this comment.
nice, will be interesting to see if this makes a noticeable difference
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
Adds
.github/copilot-instructions.mdto guide GitHub Copilot's PR review toward high-signal, dealbot-specific feedback and away from CI-duplicate noise.Process
What's encoded
Final size: 3890 / 4000 bytes (~110 byte headroom).
Notes for reviewers
NULL NOT INsemantics: PR fix: landing page doesn't show blocked SPs #471Test plan
wc -c .github/copilot-instructions.md).github/instructions/*.instructions.mdoverlays only if repeated patterns emerge)