Skip to content

Aperture: a small source member with a few stray NUL bytes is excluded as binary #4351

Closed

Description

@squid-protocol

Problem

Gate 3.1's NUL-density test in gitgalaxy/core/aperture.py (nuls * 1000 > len(content)) rejects short members. A 250-byte member with 2 NUL bytes is over 1 per 1000, so the whole member is recorded as "Blocked (Binary Format Detected)" and disappears from every fact channel. Stray NULs are common in members transferred from a mainframe (#3534 / ledger D016).

Evidence

estate/apps/NORD/pli/NULREST.pli at estate-crucible v0.3.0: a 7-line PL/I member with two NULs at the end of its first comment is blocked. Horror H-0037.

Impact

The member vanishes from the scan silently: its units, calls and copybooks are missing, and nothing reports a parse problem. Any short member is at risk.

Acceptance criteria

  • A member that decodes as text and holds only a handful of NULs (e.g. ≤ 4) stays source, whatever its size. Genuine binaries are still blocked.
  • Regression test with a short member plus 1-2 NULs, and a real binary.

Related: #3534 (D016).

Found by estate-crucible v0.3.0 phase 2 (#4317, #3988): planted in squid-protocol/estate-crucible, scored by tests/tools/estate_crucible.py on main (scorecard in #4347). The horror flips to pass when this is fixed.

Activity

  1. added
    bug
    core-engine
    legacy-modernization
    on Oct 4, 2026
  2. added
    scope:sweep
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-enginelegacy-modernizationpriority: mediumscope:sweep

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions