Skip to content

COBOL units on DSF: ENVIRONMENT paragraphs, numeric names, forge headers (#3533) - #3548

Merged
squid-protocol merged 1 commit into
mainfrom
fix/dsf-cobol-units-3533
Sep 25, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/dsf-cobol-units-3533

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Engine (cobol func_start):

  • SPECIAL-NAMES, I-O-CONTROL and REPOSITORY join the ENVIRONMENT DIVISION
    header shield: they were read as procedure units (navikt/DSF FRMERK; and
    18 SPECIAL-NAMES + 6 I-O-CONTROL phantom units across the crucible).
  • An all-digit procedure name (DSF R001BYDL 0000. / 9999.) is a unit --
    at most 5 digits, so a 6/8-digit sequence field before a lone period
    (CardDemo 045100 .) never is; a numeric VALUE continuation is dropped by
    the existing cobol_sentence_start filter.

Forge:

  • PROCEDURE DIVISION. (any blanks) is the header: new
    split_procedure_division() in the graveyard finder, used by the scorer's
    forge view; the DAG architect, schema forge and microservice slicer
    normalise the spacing the same way. DSF PLUKKFR/PLUKKFRN had no units.
  • A header with its first statement on the same line (B. DISPLAY ...,
    DSF FO04D1X1) opens the unit, the statement its first body line.
  • A conditional phrase (READ ... AT END GO TO X., INVALID KEY, SIZE ERROR,
    OVERFLOW, EXCEPTION) is conditional unless its END- verb closes it -- the
    key's CICS coverage: PL/I parity -- CICS call sites, handlers / UOW, data moves #3491 rule, now in the forge (else PLUKKFR's loop read dead).

Ledger: all 30 dsf_cobol_unit_extraction entries resolved (cause pruned);
R001BYDL's numeric units now surface the deliberate by-name divergence (0000
is the entry, 1000 only GO TOs itself) -> engine_dead_is_unreferenced_by_name.
Refraction: DSF full unexplained 18 -> 0. Golden masters: only the 24
phantom ENVIRONMENT units removed. Tri-comparison: cobol's validated
ctags-header class 4096 -> 4120 (ctags keeps reading those headers).

Closes #3533

Verification

  • New cases: cobol func_start (0000. / 9999. valid; SPECIAL-NAMES., 045100 ., 01680012. invalid); forge test for spacing, inline header, AT END.
  • Ledger clean (6 corpora); refraction --ci OK; golden masters PASS; ruff_audit --ci, mypy clean; full suite 11402 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g

… forge headers (#3533)

Engine (cobol func_start):
- SPECIAL-NAMES, I-O-CONTROL and REPOSITORY join the ENVIRONMENT DIVISION
  header shield: they were read as procedure units (navikt/DSF FRMERK; and
  18 SPECIAL-NAMES + 6 I-O-CONTROL phantom units across the crucible).
- An all-digit procedure name (DSF R001BYDL `0000.` / `9999.`) is a unit --
  at most 5 digits, so a 6/8-digit sequence field before a lone period
  (CardDemo `045100 .`) never is; a numeric VALUE continuation is dropped by
  the existing cobol_sentence_start filter.

Forge:
- `PROCEDURE        DIVISION.` (any blanks) is the header: new
  split_procedure_division() in the graveyard finder, used by the scorer's
  forge view; the DAG architect, schema forge and microservice slicer
  normalise the spacing the same way. DSF PLUKKFR/PLUKKFRN had no units.
- A header with its first statement on the same line (`B.  DISPLAY ...`,
  DSF FO04D1X1) opens the unit, the statement its first body line.
- A conditional phrase (READ ... AT END GO TO X., INVALID KEY, SIZE ERROR,
  OVERFLOW, EXCEPTION) is conditional unless its END- verb closes it -- the
  key's #3491 rule, now in the forge (else PLUKKFR's loop read dead).

Ledger: all 30 dsf_cobol_unit_extraction entries resolved (cause pruned);
R001BYDL's numeric units now surface the deliberate by-name divergence (0000
is the entry, 1000 only GO TOs itself) -> engine_dead_is_unreferenced_by_name.
Refraction: DSF full unexplained 18 -> 0. Golden masters: only the 24
phantom ENVIRONMENT units removed. Tri-comparison: cobol's validated
ctags-header class 4096 -> 4120 (ctags keeps reading those headers).

Closes #3533

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 84381f8 into main Sep 25, 2026
36 checks passed
@squid-protocol
squid-protocol deleted the fix/dsf-cobol-units-3533 branch September 25, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

COBOL units on DSF's GML programs: SPECIAL-NAMES read as a unit, all-digit paragraph names missed, forge loses paragraphs

1 participant