Skip to content

Refractor and port tickets read EBCDIC sources without the declared encoding #3909

Closed

Description

@squid-protocol

cobol_refractor_controller.py:281 and build_ticket (cobol_to_java_port_tickets.py) call read_source(filepath) with no declared=. A raw EBCDIC estate scanned with --source-encoding cp277 falls back to cp1252 in these two steps: the refractor sees 1 line, so its dead-code analysis runs on garbage. Port tickets lose the rounding facts, the CBL INTDATE rule and the source listing. The scan itself reads the page correctly, so the declaration has to reach these reads (galaxy_ir / the clean-room metadata carry it). 36 refractor + 36 ticket cells.

Found by the Cultural Gauntlet (#3834 part 1, PR #3907); the failing cells are ledgered in tests/cultural_gauntlet/baseline.txt — a fix removes them (python tests/tools/cultural_gauntlet.py --full --update-baseline).

🤖 Generated with Claude Code

Activity

  1. added
    bugUnintended behavior or logic failure in the engine
    legacy-modernizationCOBOL refractor, dead-code extraction, and JCL forging
    data-integrityIssues relating to RAM state or SQLite database fidelity
    priority: highCore feature broken, but workarounds exist
    on Sep 27, 2026
  2. added a commit that references this issue on Sep 27, 2026
  3. added a commit that references this issue on Sep 27, 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

    bugUnintended behavior or logic failure in the enginedata-integrityIssues relating to RAM state or SQLite database fidelitylegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds existstatus: pending-releaseMerged to main, awaiting PyPI version bump

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions