Skip to content

CICS coverage: file-I/O INTO / FROM as lineage edges (#3492) - #3502

Merged
squid-protocol merged 1 commit into
mainfrom
feat/io-moves-3492
Sep 24, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
feat/io-moves-3492

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of epic #3489.

Problem

Field lineage (#3452) stopped at a file's FD record. READ … INTO, WRITE … FROM and the related verbs move whole records between the FD buffer and working storage, but they produced no data-move row. So a field couldn't be traced from an input file into the program and back out to an output file.

What it does

  • Extraction (core/data_moves.py): new rows for

    • READ / RETURN … INTO t: source_kind file, the FD record → t. READ's NEXT / RECORD / KEY IS phrases are handled.
    • WRITE / REWRITE / RELEASE r FROM s: s → r.
    • ACCEPT t [FROM DATE YYYYMMDD | TIME | …]: source_kind special, and SYSIN when there's no FROM.
    • A READ without INTO, or a WRITE without FROM, moves no program data, so it gets no row.
  • Reader (GalaxyIR):

    • A READ's file resolves to its FD record.
    • An FD's 01 records share one storage key, since they overlay the same buffer.
    • The whole-record I/O verbs carry a field's offset through, just as a group MOVE does.

    Example (CardDemo CBTRN02C): the backward trace from DALYTRAN-AMT now reaches the DALYTRAN-FILE FD record through its READ … INTO. The forward trace ends at the FD records the program WRITEs / REWRITEs.

  • Unchanged: CICS / SQL / DL/I INTO and FROM areas were already lineage endpoints, because the area is program storage.

Ground truth

  • An independent key reader (add-io-moves) feeds a new section io_moves and a new scored field "file I/O moves": CardDemo 146/146, zOpenEditor 63/63. CBSA has no native file I/O.
  • "data moves" still compares only its original verbs, on both sides, so its sample_verified sign-off from Ground truth: IMS census + sampled data-move census (#3477, #3452) #3485 stands.
  • Blind census: a new full io suite in cross_verify_sections.py, asked of every COBOL source with a FILE SECTION, an ACCEPT, or keyed rows.
    • The round trip gave 0 disagreements.
    • 6 reviewer batches agreed on 209/209 facts with 0 disagreements. CBSA's 17-file recall batch came back empty, as keyed.
    • Result: cross_verified.

Checks

  • Golden masters: re-blessed. The only change is 118 added "Data Moves" rows per mode, all READ / WRITE / REWRITE / ACCEPT; verified additive by a diff against HEAD.
  • The ledger is clean, and the ruff and mypy audits are clean.
  • Full suite: 11274 passed.

Note: this is based on main without #3500 (symbolic maps), which was closed unmerged. The two touch different parts of galaxy_ir.

Closes #3492

🤖 Generated with Claude Code

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

Field lineage (#3452) stopped at a file's FD record: READ ... INTO,
WRITE ... FROM and friends moved whole records between the FD buffer and
working storage without a row. data_moves now records READ / RETURN INTO
(source_kind `file`: the FD record -> the area), WRITE / REWRITE / RELEASE
FROM (the area -> the record) and ACCEPT [FROM DATE ...] (source_kind
`special`). GalaxyIR resolves a READ's file to its FD record, gives an FD's
01 records one storage key (they share the buffer), and carries a field's
offset through these verbs as through a group MOVE -- so a field is traced
file -> working storage -> file. CICS / SQL / DL/I INTO / FROM areas were
already lineage endpoints (the area is program storage) and are unchanged.

Answer key: independent reader (add-io-moves), new section io_moves and
scored field "file I/O moves" (CardDemo 146/146, zOpenEditor 63/63; CBSA
has none); "data moves" keeps its original verbs on both sides, so its
sample_verified sign-off stands. Blind census (new `io` suite, full):
6 batches, 209/209 facts, 0 disagreements, CBSA's 17-file recall batch
empty as keyed -> cross_verified. Golden masters re-blessed: 118 added
Data Moves rows per mode, nothing else changed.

Closes #3492

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
@squid-protocol
squid-protocol merged commit 85581a3 into main Sep 24, 2026
31 checks passed
@squid-protocol
squid-protocol deleted the feat/io-moves-3492 branch September 24, 2026 16:12
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.

CICS coverage: implicit INTO / FROM data flows as lineage edges

1 participant