Skip to content

Add a contributing guide, mostly about the corpus tests - #350

Merged
RyanDFIR merged 1 commit into
mainfrom
add-contributing-guide
Sep 7, 2026
Merged

Add a contributing guide, mostly about the corpus tests#350
RyanDFIR merged 1 commit into
mainfrom
add-contributing-guide

Conversation

@RyanDFIR

@RyanDFIR RyanDFIR commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Nothing in the repo tells a contributor that a second test suite exists, that it needs several gigabytes of browser profiles that are not committed here, or that the corpus is published openly and takes no token to fetch. Two recent pull requests moved the magnet.ctf_2018 baseline without touching it, which is what that gap looks like from the outside.

CONTRIBUTING.md covers setup, the split between the unit suite and the corpus suite, where the corpus lives and how to point the tests at one root or all six, and what to do when a change moves a baseline. It repeats the rule from generate_baselines.py: regenerate deliberately and say what moved, never to turn a build green. It also says that skipping the corpus is fine as long as the pull request says so, since nobody is going to pull 6 GB for a one line fix.

The part worth writing down is the skip. A green pytest tests/ says nothing about the corpus tests, because without HINDSIGHT_TEST_CORPUS they never ran.

README gets a link to it under Feature Requests.

I checked the instructions rather than only writing them: the download URL returns 200, the quoted skip message is what the suite actually prints, and HINDSIGHT_TEST_CORPUS_ROOTS=magnet.ctf_2018 selects the one root and finishes in about five seconds.

One bullet in the pull request section is a preference rather than existing policy, the one about keeping descriptions in plain prose. Drop it if you would rather not put that in writing.

Nothing told a contributor that a second test suite exists, that it needs several
gigabytes of browser profiles this repository does not carry, or that the corpus
is published openly and needs no token to fetch. Two recent pull requests moved a
baseline without touching it, which is what that gap looks like from the outside.

Covers setup, the split between the unit suite and the corpus suite, where the
corpus lives and how to point the tests at one or all of its roots, and what to do
when a change moves a baseline: regenerate it deliberately and say what moved, or
work out why it moved if you cannot explain it. Also says plainly that skipping the
corpus is fine as long as the pull request says so.

The skipping behaviour is the part worth writing down. A green `pytest tests/` says
nothing about the corpus tests, because without HINDSIGHT_TEST_CORPUS they do not
run at all.
@RyanDFIR
RyanDFIR merged commit 3ccfb65 into main Sep 7, 2026
18 checks passed
@RyanDFIR
RyanDFIR deleted the add-contributing-guide branch September 7, 2026 20:39
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