Skip to content

Add Copilot instructions for PR review - #7

Merged
kandrosov merged 1 commit into
cms-flaf:mainfrom
kandrosov:copilot-review-instructions
Aug 28, 2026
Merged

Add Copilot instructions for PR review#7
kandrosov merged 1 commit into
cms-flaf:mainfrom
kandrosov:copilot-review-instructions

Conversation

@kandrosov

Copy link
Copy Markdown
Contributor

Why

This repository had no copilot-instructions.md, so Copilot reviewed its PRs with no idea what
this code is for or what goes wrong in it.

The file added here is written for PR review, not onboarding — the five existing files in the
ecosystem were generated by Copilot's repository-onboarding feature in November 2025, and are
being rewritten in the same way (cms-flaf/FLAF#310 and its companions): what a useful comment
looks like here, the invariants worth checking with the failure signature each produces, the rule
that documentation ships in the same PR, and — deliberately — what not to comment on, since
noise is an automated reviewer's main cost.

Framework-wide rules are not duplicated; the file points at FLAF/.github/copilot-instructions.md
for them.

Testing

Documentation only — no code change. Every path, filename and directory referenced was verified to
exist in the current tree, and the facts table is dated so the next reader knows how much to trust
it.

What it says

PlotKit is the one repository in the ecosystem that is an ordinary installable Python package with
unit tests that run anywhere — no CVMFS, no grid proxy, no CMSSW. So "we cannot test this"
does not apply, and asking for a test alongside a change to spec.py, config.py,
histogram.py, rootcompat.py or a plotter is a legitimate review comment. That is stated
explicitly.

The rest is what a screenshot would not reveal:

  • Backend parity — a feature added to the matplotlib/mplhep path but not the ROOT/cmsstyle one
    produces plots that differ by backend, silently, because both succeed.
  • Specs are a contract — PlotKit is consumed by FLAF transparently, so renaming a key or
    changing a default breaks three analyses; silent default changes surface months later in a plot
    that looks subtly different.
  • ROOT is optionalrootcompat.py exists so the package works without it; a module-scope
    ROOT import breaks the pure-matplotlib install.
  • Correctness a plot hides: dropped overflow/underflow, bin edges assumed uniform, ratio error
    propagation, normalisation applied twice, a stack ordered by dictionary iteration.

@kandrosov
kandrosov merged commit d5c35ae into cms-flaf:main Aug 28, 2026
3 checks passed
@kandrosov
kandrosov deleted the copilot-review-instructions branch August 28, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant