Skip to content

Commit the targeted query grids, and lighten re-validation on all-changes #114

Open

Description

@cldellow

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>.ql files (one query per line, or blocks separated by a marker), plus a runner such as bench/grid.py --a A/bin --b B/bin --db DB bench/grids/*.ql. It runs each query on both builds and compares outputs the way fuzz.py does: 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 --vars as compare.py does 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/ on bench-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 on all-changes touches, 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

Done when

  • bench/grid.py and at least the four grids above are committed, and pass on all-changes against upstream/master.
  • The CLAUDE.md PR is open.
  • bench/README.md documents the runner, the file format and the placeholder rule.

Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions