Skip to content

chore: add Copilot PR review instructions#489

Merged
SgtPooki merged 2 commits into
mainfrom
chore/copilot-review-instructions
Apr 30, 2026
Merged

chore: add Copilot PR review instructions#489
SgtPooki merged 2 commits into
mainfrom
chore/copilot-review-instructions

Conversation

@SgtPooki
Copy link
Copy Markdown
Collaborator

Summary

Adds .github/copilot-instructions.md to guide GitHub Copilot's PR review toward high-signal, dealbot-specific feedback and away from CI-duplicate noise.

Process

What's encoded

  • Context: monorepo layout, Postgres = source of truth, ClickHouse cluster/schema/migrations owned by external team — review CH-touching code for dealbot impact (payload shape, producer correctness, ops regressions); skip CH schema/retention/ops design suggestions.
  • Core invariants:
    • at most one job per SP per check type per network at a time
    • jobs fail only on execution failure, not on negative check results
    • scheduling, cleanup, active-provider filtering, and queue execution agree on the same SP set and network
    • network-aware code carries the same network invariants across inserts, queries, conflict keys, filters, and tests
  • Blocker / Important priorities aligned to observed high-value themes.
  • Do Not Comment On list to suppress noise already covered by CI (Biome, build, typecheck, test, Docker, conventional-commit PR titles).

Final size: 3890 / 4000 bytes (~110 byte headroom).

Notes for reviewers

Test plan

  • Confirm file is under 4000 bytes (wc -c .github/copilot-instructions.md)
  • After merge, observe Copilot review behavior on the next 5–10 PRs
  • Track whether CI-duplicate noise drops and whether ClickHouse generic-SQL false positives stop appearing
  • Iterate (add path-specific .github/instructions/*.instructions.md overlays only if repeated patterns emerge)

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.
Copilot AI review requested due to automatic review settings April 28, 2026 14:17
@FilOzzy FilOzzy added this to FOC Apr 28, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Apr 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
@SgtPooki SgtPooki self-assigned this Apr 28, 2026
@SgtPooki SgtPooki moved this from 📌 Triage to ⌨️ In Progress in FOC Apr 28, 2026
- 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.
Copy link
Copy Markdown
Contributor

@rvagg rvagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, will be interesting to see if this makes a noticeable difference

@github-project-automation github-project-automation Bot moved this from ⌨️ In Progress to ✔️ Approved by reviewer in FOC Apr 29, 2026
@SgtPooki SgtPooki merged commit 667ea2e into main Apr 30, 2026
7 checks passed
@SgtPooki SgtPooki deleted the chore/copilot-review-instructions branch April 30, 2026 12:32
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

4 participants