Repository navigation
Accept source-built CBMC versions in the schema-validation test - #5198
Merged
feliperodri merged 2 commits intoNov 20, 2026
Merged
Conversation
The check on `tools.cbmc` added in model-checking#4941 requires CBMC's release format, `6.11.0 (cbmc-6.11.0)`. A CBMC built from a shallow checkout without tags reports its git revision instead, e.g. `6.11.0 (8fcda333)`, which is what the nightly CBMC-latest job builds, so json-handler/schema-validation has failed in that job every night since 2026-10-22. Kani records the `cbmc --version` output verbatim; only the test assumed the format. Accept a hex revision (optionally `-dirty`) as well as the release format. Signed-off-by: Felipe Monteiro <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The test-only CBMC version-format update has no active review issues.
No open issues 🎉
What changed in this PR
Updates Kani’s JSON export schema-validation test to accept source-built CBMC version strings used by the nightly CBMC Latest workflow. Production behavior is unchanged.
Changes:
- Accept hexadecimal revisions with an optional
-dirtysuffix while retaining support for release versions. - Clarify release and source-build version formats in comments.
| File | Description |
|---|---|
tests/json-handler/schema-validation/test.sh |
Broadens the CBMC version check and documents the accepted formats. |
Review effort: Balanced
feliperodri
enabled auto-merge
November 19, 2026 05:40
rajath-mk
reviewed
Nov 19, 2026
rajath-mk
approved these changes
Nov 19, 2026
Signed-off-by: Felipe R. Monteiro <[email protected]>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 20, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 20, 2026
Merged
via the queue into
model-checking:main
with commit Nov 20, 2026
98c3cd8
32 of 33 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The nightly CBMC Latest workflow has failed every night since 2026-10-22. This PR fixes the first of its two failures.
json-handler/schema-validationchecks thattools.cbmcin the--export-jsonoutput matches\d+\.\d+\.\d+ \(cbmc-(added in #4941). That only matches release builds (6.11.0 (cbmc-6.11.0)). The nightly job builds CBMC from a shallowactions/checkoutwith no tags, socbmc --versionreports the bare git revision (6.11.0 (8fcda333)), and the check fails. Kani records the--versionoutput verbatim; only the test assumed the format. The check now also accepts a hex revision (optionally-dirty).The second failure is unrelated to this PR: since 2026-11-06, ~20
expected/loop-contracttests fail because of diffblue/cbmc#9185 ("only variables declared inside a loop are loop locals"). Kani declares every MIR local at function entry, so loop-body temporaries in loops with an explicitloop_modifiesclause are now checked against the clause (Check that var_N is assignable). That needs a Kani change and will come in a separate PR. Becausekani-regression.shstops at the first failing suite, the loop-contract failure has hidden this one since 2026-11-06.Testing
Ran
tests/json-handler/schema-validation/test.sh:cbmcwrapper that reports6.11.0 (8fcda333)(the CI format): fails before this change, passes after;By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.