Repository navigation
test(cocalc): adversarial checks for backup --restored-before, in CI - #16
Merged
Merged
Conversation
added 2 commits
November 1, 2026 09:52
…ative controls The baseline must reuse files (else the option did nothing), and the two out-of-contract scenarios must show the divergence the oracle exists to see.
Author
|
Merged at the exact approved head
Owner: |
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.
Adds
tests/cocalc/b6_adversary.pyand runs it in CoCalc CI. It checksbackup --restored-before TIME --parent IDadversarially.Oracle: restoring the new snapshot must give exactly the tree that was on disk when the backup ran. Each scenario prepares a restored tree, backs it up with the option and again without it (the control), then compares both restores with the disk.
--parent, and a killed restore that was not rerun.--restored-beforeis rejected;stale_nonempty_targetandwrong_parentmust show a divergence, which proves the oracle can see stale reuse;Local run against the published v0.11.4-cocalc.4 (x86_64 binary sha256
7d5c3020…4414): exit 0, no problems. In-contract scenarios reused 18–70 files with 0 divergent; the two out-of-contract cases each have 1 divergent file; the future TIME was rejected. With v0.11.4-cocalc.3 the script exits 2 ("binary has no --restored-before").