Repository navigation
check-selftest сверяет восстановленный файл с копией, из которой его восстановил - #304
Merged
Merged
Conversation
…er holds (Trinity-S-AI-DNA/trios#1266) The old exit-trap check summed the file it had JUST restored from the backup and compared it to a sum taken from that same backup: a copy always equals the thing it was copied from, so the check could not fail - it proved cp ran, not that nobody had written to the file mid-run. Same hole make mutants had, closed there in b4d1946. The restore is now one function, restore_one, of three arguments: victim, backup and mutated_sha. Every mutation records the sum of the state it is about to write (from the composed temp bytes, never read back off disk) into mutated_sha; before any cp the live file is compared to THAT sum. On mismatch the function prints [REFUSED] with both the victim and the backup path, restores nothing, and returns 1 - the file is left as the second writer left it and the backup is kept as the only way back. A failed cp is treated the same way, so the backup is never deleted over a file the recipe no longer controls. claim_* still guards the mutation path; its refusal tag is [REFUSED] now too, matching what it does. Driven by extracting restore_one verbatim from this recipe (tabs and dollar-dollar undone) and running it with sh on files in a mktemp directory: the second-writer arm ends [REFUSED] with exit 1 and the victim still byte-for-byte the second writer's write; the clean arm ends exit 0 with the victim's sha256sum identical before and after the arm. The worker image has no make, so the recipe itself was not run; instead the whole de-maked recipe passes sh -n, and the make-dollars and recipe-backticks gate logics were run against the file and report no violations.
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.
Work the Queen accepted on , closed as Trinity-S-AI-DNA/trios#1266, and never merged.\n\nMeasured 2026-09-04: 174 branches on the remote and FIVE contained in . The other 169 all carry a real diff. A closed issue whose code is not in the branch is a false statement about the repository, and the loop had been making 169 of them.\n\nMerges cleanly against the current base, checked with before this PR was opened.