Skip to content

check-selftest сверяет восстановленный файл с копией, из которой его восстановил - #304

Merged
gHashTag merged 1 commit into
feat/queen-supervisorfrom
queen-1266
Sep 4, 2026
Merged

gHashTag merged 1 commit into
feat/queen-supervisorfrom
queen-1266

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 4, 2026

Copy link
Copy Markdown
Owner

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.

…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.
@gHashTag
gHashTag merged commit 5e128a8 into feat/queen-supervisor Sep 4, 2026
@gHashTag
gHashTag deleted the queen-1266 branch October 8, 2026 18:15
@gHashTag
gHashTag restored the queen-1266 branch October 8, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant