Skip to content

CICS coverage: skeleton-completeness report + ingestion checklist (#3498, #3499) - #3505

Merged
squid-protocol merged 1 commit into
mainfrom
feat/completeness-3498
Sep 24, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
feat/completeness-3498

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Part of epic #3489.

What it does

GalaxyIR.completeness() measures how much of a scanned estate's mainframe skeleton resolved, channel by channel:

channel resolved means gaps
program calls CALL / LINK / XCTL / EXEC PGM reaches a program in the repo missing program, dynamic target, non-COBOL program not linked
copybooks COPY member answered by a copybook or a generated symbolic map (#3490) missing copybook
transactions a CICS program is reached by a transaction or by LINK / XCTL / START, and the CSD's programs exist CICS program no transaction reaches, transaction to a missing program
screens SEND / RECEIVE MAP has its BMS source missing BMS source, dynamic map name
data flows a data move's operands resolve to storage (#3452) unresolved operand
IMS PSBs a DL/I program's PSB is defined (#3477) DL/I program with no PSB
batch entry a batch main program is run by a JCL step batch program no JCL step runs
  • system counts names that IBM or the runtime supplies, so they are not gaps: IDCAMS, IEFBR14, CEE3ABD, DFHAID, EIB fields.
  • missing_inputs turns the gaps into what to ask the estate owner for, with counts and up to five examples.
  • Engine limits (dynamic targets, dynamic map names, programs in assembler or PL/I that calls don't yet link to) count as gaps but map to no input.
  • score is the mean of the channel ratios: a coarse summary. The channels are the real answer.

tools/cobol_to_cobol/completeness_report.py renders the report as Markdown or JSON from a master DB:
python -m gitgalaxy.tools.cobol_to_cobol.completeness_report <master.db> [--md out.md] [--json out.json].

docs/mainframe_ingestion_checklist.md (#3499) covers the CSD, the web / API layer, copybook libraries, vendor copybooks, BMS sources, PSB/DBD, JCL/PROCs, application programs and the scheduler export. For each it gives what it unlocks, how to extract it (DFHCSDUP LIST, PROCLIB unloads, LISTLOAD, CA-7 LJOB …), and the completeness signal that shows it's missing.

Pinned corpora

score notable gaps
CardDemo 83% 16 missing programs (e.g. COBDATFT) + 11 CSD transactions to programs not shipped; 6 batch programs with no JCL
CBSA 80% 4 CICS programs reached only by its z/OS Connect API (ACCTCTRL, CUSTCTRL, …); 3 CSD transactions to missing programs; a MAP/MAPSET name mismatch (BNK1CCS)
zOpenEditor 89% ASAM1 / PSAM1 exist, but in assembler / PL/I, which calls don't link to yet (#3491 / #3495); COPY REPLACING operands

The numbers are pinned per channel in test_pinned_corpus_completeness, which runs locally when the corpora are fetched. Any change is either an engine improvement (re-pin) or a regression.

Scope

The report is an IR / CLI view. Showing it in the scan's audit report and LLM brief needs the scan to load the IR after writing the DB, which is a follow-up, now tracked as #3506. The checklist item "shown in the audit report and the LLM brief" is therefore not done in this PR.

Checks

  • Tests: a synthetic estate covering every gap type and the system classification, the Markdown rendering, and the pinned corpora.
  • Golden masters are unchanged, and the ruff, mypy and dead-key audits are clean.
  • Full suite: 11285 passed.

Closes #3498
Closes #3499

🤖 Generated with Claude Code

https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g

, #3499)

GalaxyIR.completeness() measures how much of a scanned estate's mainframe
skeleton resolved, per channel -- program calls, copybooks, transactions
(CICS programs a transaction / LINK / XCTL / START reaches, CSD programs
present), screens, data flows, IMS PSBs, batch entry (batch main programs a
JCL step runs) -- and splits the rest into `system` (IBM / runtime names:
IDCAMS, CEE3ABD, DFHAID, EIB fields -- not gaps) and named gaps. Gaps map to
`missing_inputs`: what to ask the estate owner for, with counts and
examples; engine limits (dynamic targets, dynamic map names, programs in
assembler / PL/I calls do not link to) are gaps with no input.

tools/cobol_to_cobol/completeness_report.py renders it (Markdown / JSON)
from a master DB. docs/mainframe_ingestion_checklist.md lists each input:
what it unlocks, how to extract it, the signal that shows it is missing.

Pinned corpus numbers (a test): CardDemo 83%, CBSA 80%, zOpenEditor 89%.
CBSA's gaps are real: four programs only its z/OS Connect API LINKs, three
CSD transactions to programs it does not ship, a MAP/MAPSET name mismatch.

Closes #3498
Closes #3499

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 5560bce into main Sep 24, 2026
30 checks passed
@squid-protocol
squid-protocol deleted the feat/completeness-3498 branch September 24, 2026 17:18
squid-protocol pushed a commit that referenced this pull request Sep 25, 2026
…nnotations

`def main(argv: list[str] | None = None)` is evaluated at import on Python
3.9, raising TypeError in tests/cobol_mainframe/test_completeness.py and
test_tool_regex_redos.py on every 3.9 matrix cell (since #3505; the matrix
only runs on labelled PRs, so main never exercised it). tests/cobol_mainframe
on Python 3.9.23: 481 passed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YAtpBfGGyBGGovitSVaM5Q
squid-protocol added a commit that referenced this pull request Sep 25, 2026
… their class (#3377) (#3637)

* fix(ruby): calls without parentheses, `?`/`!` names, and methods owned by their class (#3377)

calls_out used CALLS_OUT_C_STYLE (`name(`), which found a third of Ruby's
calls: idiomatic Ruby writes `obj.to_s`, `xs.each do`, `puts x`, and method
names end in `?`/`!`. The new CALLS_OUT_RUBY takes a name when it follows a
receiver dot (`obj.name`, `obj&.name`, a leading-dot chain, `Mod::name`), is
followed by `(`, ends in `?`/`!` (a local variable never does), or opens a
statement as a command with an argument (`puts x`, `command! "brew"`) -- never
a bare word, which Ruby cannot tell from a local variable without a symbol
table. Keywords, modifiers (`value if cond`), ternaries, `!=`/`=~` and
`name?:` hash labels are excluded; ReDoS-tested. detector.py runs it like the
C-style family (qualifiers, #3360 header check) via
QUALIFIED_CALLS_OUT_PATTERNS.

call_graph_accuracy ruby (vs tree-sitter): recall 34.4% -> 92.9%, precision
91.5% -> 92.7%. 41 of the 71 misses left are `class`/`require`/`raise`, which
the contract ignores. Baseline regenerated (it also ratchets javascript, php
and typescript gains already on main).

Paren-less capture exposed a resolver false edge: brew.rb's bare `puts`
resolved `unique` to AbstractDownloadStrategy's private `def puts`. Root
cause: no Ruby method was ever attached to its class. The class-scope search
looked for a `{`, found the first hash literal or block, and ended the class
there (208 of 283 crucible methods classless, 38 agreeing with tree-sitter's
enclosing class). Ruby now uses the indentation scoping Python uses -- a
class ends at its `end` -- and 245 agree, 0 classless; the rest are naming
(`ActiveStorage::Blob` vs `Blob`, `class << self`). The false `puts` edges and
an old false `fetch` edge (brew.rb's `options.fetch`) are gone.

Golden masters: shell/brew/download_strategy.rb Popularity Rank / Direct
Downstream 1 -> 0, plus the network_macro and systemic_bottlenecks ripple and
Composition Fit.

Closes #3377.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YAtpBfGGyBGGovitSVaM5Q

* fix(py39): completeness_report's `list[str] | None` needs postponed annotations

`def main(argv: list[str] | None = None)` is evaluated at import on Python
3.9, raising TypeError in tests/cobol_mainframe/test_completeness.py and
test_tool_regex_redos.py on every 3.9 matrix cell (since #3505; the matrix
only runs on labelled PRs, so main never exercised it). tests/cobol_mainframe
on Python 3.9.23: 481 passed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YAtpBfGGyBGGovitSVaM5Q

* fix(windows): `/` paths in cross_verify's answer matching and the signal-contract render

Two Windows-only failures in the Full Suite Gate matrix, present on main
since each landed (the matrix only runs on labelled PRs):

- tests/tools/cross_verify.py `_rel` stripped a `/`-joined root, but on
  Windows `str(Path("/repo"))` is `\repo` and answer paths are `\repo\B.cbl`,
  so no task-B/C/D/E answer ever matched its key (3 test_cross_verify tests).
  Both sides are now compared with `/`.
- tests/signal_contract_audit.py rendered doc links with `Path('..') / doc`,
  i.e. `..\docs\x.md` on Windows, so the committed render always read stale.
  PurePosixPath keeps the link `/` on every OS; the Linux render is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YAtpBfGGyBGGovitSVaM5Q

---------

Co-authored-by: Claude <[email protected]>
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: estate ingestion checklist (what customers must hand over) CICS coverage: per-scan skeleton-completeness report

1 participant