[Bug] CICS CSD `DEFINE _PGMLIST` startup programs (`_PGMPH`) are not roots
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start in packages/core/src/repowise/core/ingestion/cobol/csd.py, reading read_csd and defined_programs, then inspect _add_mainframe_edges and the related cases in tests/unit/ingestion/test_mainframe_edges.py. Add coverage showing that both _PGMPH names in the supplied _PGMLIST become roots while existing PROGRAM and TRANSACTION behavior stays intact. The issue is done when that test passes.
Written by the indexing model from the issue text.
Description
Summary
A Micro Focus CSD _PGMLIST lists PLT startup programs with _PGMPH(prog,n). The reader only understands PROGRAM and a TRANSACTION's PROGRAM(), so those programs get no root edge and stay isolated. Seen in RocketSoftwareCOBOLandMainframe/BankDemo (BANKDEMO_AL2.csd: UBNKPLT1, UBNKPLT2).
packages/core/src/repowise/core/ingestion/cobol/csd.py:27
r"^\s*(?P<command>[A-Z]+)\s+(?P<resource>[A-Z]+)\s*\(\s*(?P<name>[^()\s]+)\s*\)(?P<rest>.*)"
Mechanism
[A-Z]+does not match_PGMLIST(leading underscore), soread_csdyields no definition for it.defined_programs(:95) returns onlyPROGRAMnames and transaction programs;framework_edges/mainframe.py:105turns each into a root edge.- Precedent:
_PROGRAM_ATTR(:31) reads thePROGRAMattribute of a transaction.
Repro
DEFINE _PGMLIST(PI) GROUP(G)
_PGMPH(UBNKPLT1,1) _PGMPH(UBNKPLT2,2)
plus UBNKPLT1.cbl and UBNKPLT2.cbl, run through _add_mainframe_edges as in tests/unit/ingestion/test_mainframe_edges.py:
edges: []
roots: []
DEFINE PROGRAM(UBNKPLT1) GROUP(G) instead gives edges: [('csd/R.csd', 'cbl/UBNKPLT1.cbl')], roots: ['cbl/UBNKPLT1.cbl'].
Impact
Startup programs look unreferenced, so they show as dead code and have no entry point.
Done looks like
_PGMPH(NAME,n)names inside a_PGMLISTdefinition count indefined_programs.- Must not change:
PROGRAM/TRANSACTIONhandling and the symbolsparse_csd_fileemits; other_-prefixed attributes stay ignored. - Good first issue: one pattern and one case in
csd.py. - A CSD whose only resource is
_PGMLISTalso hits the empty-definitions crash inparse_csd_file(separate issue); keep this one to the edges.
Tests
tests/unit/ingestion/test_mainframe_edges.py: the CSD above roots both programs.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 756
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 797
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from repowise-dev/repowise
-
[Bug] Elixir `.formatter.exs`, `.credo.exs`, `config/*.exs` and `priv/**/*.exs` are reported as unreachable filesPossibly taken @ZYZ666-RGB claimed this 1 day ago. Openbug good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#6296 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Coverage stack detection omits Swift, Dart, and Scala, falling through to UNKNOWN in evidence setupPossibly taken @RishabhIIITD claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
repowise-dev/repowise#5838 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] PR-mined decisions store the decision sentence again as their rationalePossibly taken @suyashgitt claimed this 11 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#5702 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] COBOL listing directives EJECT, SKIP1/SKIP2/SKIP3 and TITLE fail to parse and drop the rest of the filePossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
repowise-dev/repowise#4474 ·
Maintainers usually reply within 1 day
-
`repowise uninstall` prints a configured database URL with a backslash on WindowsMay be free again A pull request for this issue was closed without being merged. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
repowise-dev/repowise#4347 · 2 comments ·
Maintainers usually reply within 1 day
All issues in repowise-dev/repowise
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
kornia/kornia-rs#1416 · 1 comment ·
Maintainers usually reply within 2 days
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/ai-inequality#64 ·
Maintainers usually reply within 1 day
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day