Skip to content

Name RECFM=V exports (RDW / BDW+RDW) in source_text and the census preflight (Part of #8412) - #8562

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261117T1051Z
Nov 17, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261117T1051Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

Detect RECFM=V exports (members whose records carry a 4-byte RDW length prefix, or whose blocks carry a BDW and records an RDW) by structure, and make the census preflight count and name them. Today the aperture drops such a file as a generic binary_payload (the descriptor words hold NULs) and nothing says why.

Design: refuse by name, no decode. source_text.rdw_framing(data) returns "rdw", "bdw+rdw" or None. The lengths must chain to the end of the file (3+ records; BDW is tried first because a block descriptor looks like one long record), and two zero bytes after every length cannot occur in plain text. The code page of the records stays the estate's to declare. cics_census.py preflight gets an eighth check, gap_prevalence.rdw_files (a count, no names), the same shape as the archive check from #8419. No engine scan path changes, so no golden moves.

Class / Sibling gaps

Class: a variable-length (RECFM=V / VB) host export in any code page. Members:

Member Status
RDW records, EBCDIC (cp037, cp1047, cp500) detected, named (test)
RDW records, ASCII / cp1252 detected, named (test)
BDW + RDW blocked (VB), one or many blocks detected, named (test)
Long export cut at the 64 KB sample, RDW and BDW detected (test)
Zero-data records (RDW length 4) chain (test)
False-positive guard: ASCII text, UTF-16, FB80 EBCDIC, NEL EBCDIC, all-bytes binary, zeros, empty, short, broken chain, only two records not named (test)
Decoding an RDW export into records Sibling gap: needs the estate's code page and a record-to-line rule; the aperture would also have to admit the file. Not here: different mechanism.
Engine-side report line for an RDW file the scan drops (like UNDECLARED EBCDIC) Sibling gap: the aperture works on decoded text, so the name has to be given at the dropping gate; touches parsing and goldens.
Spanned records (RDW segment-control bits, records over 32 KB) Sibling gap: the second RDW pair bytes are non-zero, so these are not matched; no fixture in any burned estate.

Remaining slices

  1. Decode path for RDW exports (source_text.py, aperture admit, test): after the estate declares a code page.
  2. Aperture refusal reason naming RECFM=V on the dropped file, with a golden check.

Checklist: partial [c:8e893dfa] -- detected and named in the census preflight; the engine scan still drops the file as a generic binary and nothing decodes it (slices above).

Tests

tests/core_engine/test_rdw_framing_8412.py (new, whole class above) and one case in tests/tools/test_cics_preflight.py: 65 passed with the sibling #8412 EBCDIC tests.

Doc-refs fixes: none.

🤖 Generated with Claude Code

…ure, count in the census preflight (Part of #8412)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 17, 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 17, 2026 11:02
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 17, 2026 11:03
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Nov 17, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

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