Repository navigation
Open
Description
Problem
Random fuzzing rarely reaches the code a change touches, so most real correctness checking is done with hand-written targeted query grids. Examples: 26 node(bbox) queries at six past dates for #104, 96 changed: queries for #98, a 400-query grid over the four user filters for #42, and 18 newer-at-a-past-date queries for #87 and #97. These grids are written for one PR, run, and lost. The next change to the same code writes them again.
Separately, every change is validated in full twice: once on its branch, and again after it's cherry-picked onto all-changes. The second run mostly repeats the first.
Proposal
Commit the grids
- Add
bench/grids/<topic>.qlfiles (one query per line, or blocks separated by a marker), plus a runner such asbench/grid.py --a A/bin --b B/bin --db DB bench/grids/*.ql. It runs each query on both builds and compares outputs the wayfuzz.pydoes: build-identifying lines ignored, error messages part of the outcome, timeouts reported separately. - Recover the existing grids from the PR descriptions and from session scratch files where they still exist. Start with the four above.
- Grids for the history database must not embed values from the licensed extract (user ids, user names, changeset ids). Use placeholders such as
{{UID}}, filled at run time from--varsascompare.pydoes for h5/h6. Object ids and coordinates are fine to commit only if they come from the public extract. - Each grid file starts with a comment naming the code paths it targets, the database it needs (plain, area or history), and the PRs it came from.
Update CLAUDE.md (a separate small PR on this fork's master)
- Grids are part of a PR: a PR that adds a targeted check commits its grid to
bench/grids/onbench-tools(or extends an existing one) and names it in the PR's Testing section. - Lighter checks on
all-changes: when a change's cherry-pick applies cleanly and touches no function that another commit already onall-changestouches, run the relevant grids plus a few hundred fuzz queries there instead of a full fuzz. Otherwise, run the full fuzz as now. - Stress and mutation switches stay out of PR branches: keep them in a fork-only commit applied in the stress worktree, or behind a compile-time macro used in one source file. Never read environment variables or add test hooks in code meant for upstream.
Related
- Property tests for geometry pre-checks against the exact tests they skip #89 (property tests of geometry pre-checks, being repurposed for synthetic history databases) and fuzz.py: generate near-degenerate poly: polygons from real way segments #90 (near-degenerate
poly:infuzz.py) add to these grids as they land.
Done when
bench/grid.pyand at least the four grids above are committed, and pass onall-changesagainstupstream/master.- The CLAUDE.md PR is open.
bench/README.mddocuments the runner, the file format and the placeholder rule.
Generated by Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity