You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f8defeb
Browse filesBrowse the repository at this point in the historyBrowse files
A damaged file is judged in every format, and no longer claims its label (#227)
* The structural checker refuses broken archives instead of stopping on them
An archive whose first bytes are zeroed passed the ZIP check, because it read
the end records and never followed them to the local headers. It now walks the
central directory and checks that every entry leads to a local header with the
same name, with its data before the directory. Office packages go through the
same walk first, so bytes after their end record are refused too.
A PNG cut inside its last checksum, a PNG that is only its signature and an
Office part that cannot be read stopped the check with an exception. Each is
now a refusal with its reason. An exception left anywhere is reported as a
fault in the checker and never counted as a refusal of the file.
A verdict is raised rather than printed, so one process can judge many files:
strict.py --batch reads one request per line, and oracle.StrictBatch hands it
a list. Two guards hold this: real files from this tool, broken nine ways,
must be refused for the right reason, and planted checks that fall over must
be answered as a crash.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Every damage is judged in every format, with the checker as the witness
A damage is offered for a format only when a judge refuses the result. That
was a sweep taken once, over seven formats in the test suite. A guard now
writes, through the real engine, a healthy and a damaged file for every
format and every registered damage, at its defaults and with each parameter
at both ends, at the smallest size the pair can be given and at 20 kB, and
judges them all in one run of the structural checker. A damaged file that is
accepted is red, and so is a checker that falls over instead of answering. A
format with no structural check is red too, because the offer would reach it
by default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* A damaged file no longer claims its label
The label is written by the generator and the damage comes after it, so it
can overwrite it: zeroing the head of a text file took the label with it while
the manifest still said label_embedded: true. A damaged file now says false,
at the top of its entry and in its properties, with a label_not_guaranteed
note saying why. A guard holds this for every format, beside a healthy file
that does claim its label. The witness guard now writes its files with the
label, as both surfaces do by default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* The witness checker runs under its caller's context, and the changelog says what a user notices
StrictBatch takes the caller's context, so a guard that is stopped stops the
checker with it. The changelog lists the one change a user of the tool sees:
a damaged file no longer claims to carry its label.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Three more ways the structural checker stopped on broken bytes are refusals
Random damage to healthy files of every format found three: a cross reference
offset that is not a number stopped the PDF check, a label heading never
closed stopped the HTML check, and an Office part packed with a compression
method nobody knows stopped the package check. Each is now refused with its
reason, and the guard of broken bytes holds all three.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* A request the checker cannot act on is one error, and a stopped caller stops the checker
The batch mode stopped altogether on a line of JSON nested past what the
decoder goes, and on a path holding a NUL. Each is now answered ERROR in its
place, and the requests after it are still answered. Two guards hold the
answers a batch gives to what it cannot act on, and that a caller whose
context is stopped stops the checker. The sentence about a batch whose answers
do not match its questions no longer writes file(s).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments