Skip to content

COBOL record_data: a level-77 item is nested under the 01 group above it #4359

Closed

Description

@squid-protocol

Problem

mainframe_boundary._cobol_records nests a level-77 item under the group still open above it. A 77 is a noncontiguous elementary item and never subordinate to anything, but the level stack only pops entries with level >= 77. The 77 therefore gets a parent_ordinal, and the item above it becomes its parent, even across a section header.

Examples on main (golden record_layout.json, 366 rows with Level 77 and a non-null Parent Ordinal):

Why it matters

GalaxyIR walks the tree to lay records out. A 77 hung under an 01 is placed inside that record's storage instead of standing as its own record. It also inherits the parent's group USAGE NATIONAL / DISPLAY-1.

Acceptance criteria

  • A level-77 entry is always a root (parent_ordinal None), and nothing nests under it except its 88s.
  • The answer key's _data_items agrees.
  • Regression test with a 77 after an open 01 group, in the same section and across a section header.

Found while: #4245

🤖 Generated with Claude Code

Activity

  1. added a commit that references this issue on Oct 4, 2026
    bc7f727
  2. added a commit that references this issue on Oct 5, 2026
  3. added
    scope:core
    era:2
    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

    era:2scope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions