Skip to content

Fix #4242: record a quoted PROGRAM-ID (PROGRAM-ID. 'EPSCSMRD'.) - #4285

Open
squid-protocol wants to merge 1 commit into
mainfrom
fix/4242-quoted-program-id
Open

squid-protocol wants to merge 1 commit into
mainfrom
fix/4242-quoted-program-id

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Resolves #4242.

What was broken

The COBOL class_start rule (languages/cobol.py) requires \b right after the separator that follows PROGRAM-ID.. A quote is not a word character, so a program named by a literal, PROGRAM-ID. 'EPSCSMRD'. or "NAME", never matched. DBB epscsmrd.cbl has 13 quoted PROGRAM-IDs in column 9, and it recorded no class row.

Changes

  • class_start now allows an optional quote on each side of the name. The capture stays the bare name, and the \b guard still holds: ' is not in the sequence-area character class, so that prefix can't swallow it. The rule's comment block gains entry 4 explaining this.
  • Fixtures (test_cobol.py):
    • valid: single-quoted in Area B, double-quoted, quoted with IS INITIAL PROGRAM;
    • invalid: a commented-out quoted PROGRAM-ID, and PROGRAM-ID. inside a MOVE literal;
    • pathological: the quoted name on the next line.
  • Field testing: defect D041 (engine, program_id, round 7, found by the fix(answer-key): model multi-program sources (sibling / nested programs) (#4206) #4226 census). The report and fact_channel_confidence.json are regenerated; program_id's clean-round count resets, as it should.
  • Answer-key README: the multi-program paragraph no longer says the engine records no PROGRAM-ID for epscsmrd.cbl.

What moved, and why

  • Golden masters (31 differences per mode, scoped in full, not from the truncated crucible_check view): NIST CCVS85 PDC0001.cbl (Program-Id. 'P1'.) gains its class, and every other difference rolls up from that one file:

    • Entity Declarations 0 → 1;
    • its architectural-profile coordinates;
    • DNA hits +1 and the GPU / graph digests;
    • batch entry 287 → 288 (P1 is a batch program no JCL step runs) and its missing-inputs example;
    • the LLM brief.

    Nothing outside that file moved.

  • DBB completeness (test_completeness.py): transactions (2, 3) → (2, 4). EPSCSMRD is now a recognized CICS program, and no transaction in the repository reaches it. Re-pinned with a comment.

  • Full-corpus refraction differential (DBB): epscsmrd.cbl is compared for the first time, because before this fix the file had no program. That gives 33 unexplained deltas, blessed with a note:

    • 7 paragraph/old: the forge reads the sibling programs' IDENTIFICATION / DATA DIVISION headers as units of the first program;
    • 26 schema_column/db: the same names as this file's 26 forge_flat_schema record deltas.

    Both come from reading a multi-program source as one program, which is owned by COBOL forge/differential reads a multi-program source as one program, blocking EPSCSMRD onboarding #4243 (with COBOL engine and answer key read only the first program's DATA DIVISION in a multi-program source #4245 for the data divisions). Re-bless when that lands.

Verification

  • epscsmrd.cbl scanned alone: class_data has 13 rows (EPSCSMRD … EPSCSMRE); before, 0.
  • tests/cobol_mainframe + tests/cics_crucible + COBOL extraction (strict included), with every pinned corpus fetched: all pass after the re-pin and the bless (1631 passed before those two; the two DBB tests are the only ones that moved).
  • Ground-truth ledger: clean (epscsmrd.cbl is still in excluded_programs).
  • crucible_check.py --update --yes: both fixtures re-blessed, scoped as above.
  • ruff / mypy / dead-key / ast-accuracy audits: all clear. Format clean.

Not done

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

The COBOL class_start rule wanted a word boundary right after the paragraph's
separator; a quote is no word character, so a literal program name recorded
no class. IBM DBB epscsmrd.cbl (13 quoted PROGRAM-IDs, column 9) had no
class row at all.

- class_start takes an optional quote on each side of the name; the capture
  stays the bare name. Valid / invalid / next-line fixtures.
- epscsmrd.cbl now records all 13 PROGRAM-IDs.
- Golden masters: NIST CCVS85 PDC0001.cbl (`Program-Id. 'P1'.`) gains its
  class; everything else is the roll-up of that one file.
- DBB completeness re-pinned (transactions 2/3 -> 2/4: EPSCSMRD is a CICS
  program no transaction here reaches). The full-corpus refraction
  differential compares epscsmrd.cbl for the first time: 33 unexplained,
  blessed with a note -- the multi-program reading owned by #4243 / #4245.
- Field-testing defect D041; answer-key README updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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 engine: no PROGRAM-ID recorded for PROGRAM-ID. 'EPSCSMRD'. (quoted name, column 9)

1 participant