Skip to content

det translator: mid-record SYNC slack refused in layout check mode (sibling of #5694) #6926

Open

Description

@squid-protocol

Sibling of #5694 (gap named in #6117's "Sibling gaps"), part of #5649.

What

In check mode (det/engine_layout.py, the default) the translator lays a record out twice: from the engine's layout (which models SYNCHRONIZED slack, #4266) and from its own det/layout.py (which models none). A SYNC binary item inside a record, after an odd-length run of fields, gets one byte of slack from the engine and none from the translator, so the program is refused whole with LayoutDisagrees.

#6117 pinned this as intended behaviour and left translator-side SYNC modelling as a frontier gap because no burned program has a mid-record SYNC item (all burned SYNC items are level-01, with no slack). This issue records the first program that hits it.

Evidence (counts only)

Census survey, 2026-10-28, main 4e739d9, translation only (cics_census.py survey over the 9 census clones, no burned or local corpora):

  • 1 of 40 census programs is refused whole by this, and it is the only gap class that program has (only gap 1, non-burned 1).
  • The difference is pure slack: every elementary item before the SYNC item agrees in offset and size; from the SYNC item's group on, the engine is 1 byte further on (engine @74, translator @73), and the record is 1 byte longer.
  • It is the only LayoutDisagrees in the census; the burned estates have none.

Synthetic shape (made-up names):

       01  REC.
           05  A          PIC X(73).
           05  GRP.
               10  N      PIC S9(4) COMP-5 SYNC.
               10  B      PIC X(10).

Engine: GRP / N at 74 (halfword boundary). Translator: 73. Check mode refuses REC.

Two ways to close it

  1. Model SYNC slack in det/layout.py (halfword / fullword / doubleword per USAGE, POINTER at the storage's width, C9), so check mode agrees. Before modelling, confirm from IBM's Enterprise COBOL documentation whether intra-record slack bytes belong to the group holding the SYNC item or sit before it. The engine currently starts the group after the slack, so its length excludes them. If IBM says otherwise, that is an engine fix and lands first (spec before code, no guessed semantics).
  2. Finish Translator consumes engine record layouts (fact_ownership.md follow-up): POINTER width as a parameter, shared stand-in copybooks, retire the duplicate layout computation #5649 step 3 / 4: retire the translator's own computation after its one-release check window. Engine mode already takes the engine's slack offsets (Pin SYNC alignment between the engine's layouts and the translator (Part of #5694) #6117 test), so the program would translate without a translator change.

Option 2 is the planned end state. Option 1 is only worth doing if check mode stays longer.

Acceptance

Scope: frontier (no burned program needs it; focus lock applies).

🤖 Generated with Claude Code

Activity

  1. added
    enhancement
    scope:frontier
    legacy-modernization
    priority: low
    on Oct 28, 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

    enhancementlegacy-modernizationpriority: lowscope:frontier

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions