Skip to content

Preflight: count archives by leading-byte signature, not only by name (Part of #8412) - #8675

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261119T1342Z
Nov 19, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261119T1342Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Part of #8412 (checklist item: Archived members).

Checklist: partial [c:289b607d] -- TERSE content sniff (no citable header signature, so TERSE is still counted by .terse / .trs name only) and unpacking (the issue says it can come later, as a separate line).

#8419 landed the name-based archive count, the authored zip fixture and the rule that an archive refuses the clone-defect label (rule 10). Its stated leftover was the signature sniff. This PR adds it: gap_prevalence.archive_files now also counts a file whose first 512 bytes match zip / gzip / bzip2 / xz / 7z / rar / tar (ustar at 257) / XMIT (the INMR01 control record) / IEBCOPY unload (COPYR1 id), so an archive renamed MEMBERS.dat no longer hides its members from the preflight finding. A file matched by name and by bytes counts once. Nothing is unpacked, no name is kept.

Files: tests/tools/gap_prevalence.py, tests/tools/cics_preflight.py (docstring only), tests/tools/test_gap_prevalence.py, tests/tools/test_cics_preflight.py.

Class / Sibling gaps

Class: archive containers that hide COPY members from the resolver and from the independent file search, so a missing-copybook gap must not be labelled a clone defect. Members: zip, tar, gzip, bzip2, xz, 7z, rar (name + signature: handled here); XMIT, IEBCOPY / PDS unload (name + signature: handled here); TERSE (name only: partial, the header is not pinned by a source we can cite, a TERSE file with another name is not counted).
Sibling gaps: unpacking members for the resolver (not here: separate mechanism, no burned estate ships an archive that hides a copybook, #8419); TERSE signature (needs a citable header); archives inside archives (never opened, so a nested one is counted once as its container). Other #8412 lines untouched.

Gates

pr_gates.py --fast: 8/9 pass; the affected gate shows 2 failures in files this PR does not touch or import: tests/tools/test_estate_size.py::test_the_record_matches_a_live_count_of_the_corpora (example-health-apis count differs from the record) and tests/cobol_mainframe/test_container_datatype_change_reach_5005.py::test_no_burned_put_names_a_data_type_but_char. Both read the local corpora checkouts; the same two tests fail identically on an unchanged origin/main (control run, 2 failed / 6 passed), so they are not this PR's. --ratchets not run (no golden, ledger or generated file is touched). The 79 tests reaching the changed files, including test_gap_prevalence.py and test_cics_preflight.py (244 tests), pass.

Lessons for agents

None.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 19, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 19, 2026 15:14
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 19, 2026 15:14
@squid-shepherd
squid-shepherd Bot merged commit 039883b into main Nov 19, 2026
62 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8412-20261119T1342Z branch November 19, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant