Skip to content

Add version support for verifier specs - #4

Merged
Yiannis128 merged 5 commits into
masterfrom
spec-version-support
Jul 22, 2026
Merged

Add version support for verifier specs#4
Yiannis128 merged 5 commits into
masterfrom
spec-version-support

Conversation

@Yiannis128

Copy link
Copy Markdown
Collaborator

Each spec now declares which verifier versions it supports. formal_lib/version.py adds Version (dotted numeric, compared numerically, trailing zeros normalized so 6.7.0 equals 6.7) and VersionRange (inclusive bounds, a None bound means unbounded on that side). IssueRegexSpec gains a versions list holding exact versions and/or ranges, defaulting to a single unbounded range meaning all versions.

SPECS changes shape from dict[str, IssueRegexSpec] to dict[str, list[IssueRegexSpec]] so one backend name can hold one spec per supported version range, listed newest first. This is a breaking change for any code that indexed SPECS directly. The new resolve_spec(backend, output) picks within a backend by trying each spec's detect pattern and falling back to the first listed, and the CLI uses it for --backend.

hatch run check-specs runs the new conflict checker: within one backend no two specs may support the same version, since backend resolution could no longer tell which spec owns output from that version. The -v flag also lists every spec and the versions it supports. The hatch script definition needs an explicit {args} placeholder in pyproject.toml, otherwise hatch silently swallows flags like -v.

The regression suite understands version categories: a directory component named v6.7.0-v6.10.0, v6.7.0-, -v6.10.0, or exact v6.7.1 constrains the samples beneath it to specs whose versions overlap that range, samples outside a version directory run against every spec of their backend, and a guard test fails if a constrained sample overlaps no spec so samples cannot silently drop out of the suite. The test now parses in-process with IssueSpecOutputParser instead of a subprocess so the version directory, not detect, decides which spec runs, which also cut the suite from about 7s to under a second. Existing samples moved into categories proven by each log's own version banner: cbmc/v6.7.1, kani/v0.67.0, esbmc/v8.1.0 and esbmc/v8.2.0, pytest/v8.4.2. Clang logs carry no version banner and stay unconstrained.

CI runs check-specs -v as a spec-conflicts job in the reusable test workflow, so it gates PRs, pushes to master, and releases. CLAUDE.md and the README document the versioning workflow.

@Yiannis128
Yiannis128 merged commit 185a244 into master Jul 22, 2026
4 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 22, 2026
@Yiannis128
Yiannis128 deleted the spec-version-support branch July 22, 2026 13:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant