Repository navigation
Conversation
RFC 0015 says an earlier --export-json file is replaced by an INCOMPLETE marker when verification begins, so a killed run cannot leave an older COMPLETE document that looks current. Kani now builds the run context once after harness selection, writes the marker atomically, and then replaces it with the terminal document from the same context. A failed marker write stops the run before any harness is verified. The new json-handler/incomplete-marker test blocks a fake cbmc, then kills the driver (the marker stays) or releases it (the terminal document keeps the marker's fields), and checks a bad export path and a rejected harness filter.
This branch has not been deployed
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.
Resolves #4983. Part of #942 (RFC 0015, #4727). Follows #4941.
Description
RFC 0015 says an earlier
--export-jsonfile is replaced by anINCOMPLETEmarker when verificationbegins. Without it, a run that is killed during verification leaves the earlier
COMPLETEdocument inplace, and that document looks current (see the
#4941 review).
marker with the same atomic write as the final document. After verification, the final document
from the same context replaces it, so
started_atand the other shared fields are equal in both.run_state: "INCOMPLETE", and nooutcome,wall_time_s,summaryorharnesses.harness selection (a filter that matches nothing) leaves an earlier file in place.
wall_time_snow also covers the tool version probes and the marker write. The build is still notincluded.
This implements the marker that the RFC proposes. The RFC's open question "marker or delete-up-front"
is unchanged; the flag stays unstable. The docs and the RFC text are updated to match.
Readers of the export should treat a
run_stateother thanCOMPLETEas incomplete evidence. For example,kani-mcp in #5059 deletes any earlier export before a run and reports a timeout only when no export exists.
With this change, a run that stops after the marker write leaves an
INCOMPLETEexport, so the existence ofthe file alone does not show that verification finished.
Testing
document from one context have equal shared fields.
tests/json-handler/incomplete-markerruns the real driver with a fakecbmcthat waits for arelease file. Killing the driver leaves the marker; releasing it gives a final document with the
marker's
started_at; a bad export path and a rejected--harnessfilter stop the run beforeCBMC verification starts.
written before harness selection, a marker write error ignored,
summary: nullin the marker, anda recomputed
started_at.cargo clippyandcargo fmt --checkpass at 1b6fefa.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.