fix(artifacts): keep cpio checksum evidence and bound xar TOC elements (#1082)

Record-and-continue used to catch integrity exceptions and keep only the
message, so directory, symlink, special-node, and zero-size link CRC
failures dropped the declared and observed sums. One checksum check now
returns that observation for every member kind.

A TOC within the byte cap can still contain millions of elements. Count
elements before building the DOM and fail with a tagged limit.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
morluto
2026-10-08 22:41:42 +08:00
committed by GitHub
co-authored by Cursor Agent
parent 23578197cc
commit 6dda47c98c
5 changed files with 183 additions and 87 deletions
@@ -154,7 +154,9 @@ it("preserves recovered directory CRC mismatches through graph materialization",
),
).toMatchObject({
hash_status: "mismatched",
limitations: ["cpio CRC disagrees with content: dir"],
limitations: [
"Declared decoded cpio-byte-sum 00000001 disagrees with observed 00000000.",
],
});
expect(
inventory.occurrences.find(