Repository navigation
feat(#3120): refraction pipeline reads the engine master DB (opt-in IR source + explained differential) - #3207
Merged
Merged
Conversation
…R source + differential) cobol-refractor gains --galaxy-db PATH / --scan. The program list, PROGRAM-ID, COPY edges and paragraph inventory come from the engine's <repo>_galaxy_master.db via the new gitgalaxy/tools/cobol_to_cobol/galaxy_ir.py. The IR gains metadata.ir_source, analysis.copy_dependencies and analysis.engine_units, and the audit report gains a mainframe-language inventory. Dead code, dataset lineage, data items and CICS/DB2 flags stay on the forge tools. The differential shows the DB does not carry them yet: - edge_data has COPY/INCLUDE edges only - usage_status is a by-name test that flags entry points tests/tools/refraction_differential.py runs the old parsers against the DB. docs/refraction_engine_differential.md explains every delta on zopeneditor-sample and CBSA. Engine and forge defects are filed as #3197-#3206. Without the flag, output is identical to main. With it, the generated JCL and schemas are byte-identical on CBSA. Part of #3120. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
…slashes) full-suite-matrix (windows-latest) failed 4 test_galaxy_ir tests: the engine records OS-native file_path separators, so 'src\PAYROLL.cbl' never matched a POSIX lookup. Normalize on load; the new test rewrites a DB copy to backslashes so this is covered on every OS (verified it fails without the fix). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This was referenced Sep 19, 2026
squid-protocol
added a commit
that referenced
this pull request
Sep 20, 2026
`full-suite-gate.yml` triggered on `pull_request: types: [labeled]` and a `v*` tag only. That cut the queue from 23-65 minutes of identical per-label runs, but it also means the matrix runs once, against the SHA that carried the label: a commit pushed afterwards never goes through it. #3207's Windows fix merged that way. Adds `workflow_dispatch` with a `full_matrix` boolean. A plain manual run gets the same trimmed grid a label gives (four Pythons on ubuntu, floor+ceiling on Windows and macOS); `-f full_matrix=true` gets the untrimmed 12-way grid a tag gets. `github.event_name` already selected the grid, so the matrix job needed one extra condition, not a new branch. Keeping the re-run manual is the point: the issue's alternative, also firing on `synchronize` for an already-labelled PR, hands back the queue cost the label-only rule bought. Documented in CLAUDE.md as its own section, with the `gh workflow run` and `gh run list` invocations, and the cobol-modernization skill's gotcha updated to point at it instead of "remove and re-add a label". Closes #3209. Co-authored-by: Joe Esquibel <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3120 (Phase 1 of #3122). This does not close #3120: the differential it asked for shows the DB can't yet replace the dead-code x-ray or dataset lineage.
What changes
gitgalaxy/tools/cobol_to_cobol/galaxy_ir.py(new): reads a<repo>_galaxy_master.dbread-only, using the latest snapshot. It exposes per-file PROGRAM-IDs (class_data), units (function_data), resolved COPY/INCLUDE edges (edge_data), subsystem hit counts, and a mainframe-language inventory.scan_to_db()runsgalaxyscope --db-onlyand returns the DB path.cobol-refractor --galaxy-db PATH | --scan: with either flag, the program list, PROGRAM-ID, COPY dependencies and paragraph inventory come from the engine.metadata.ir_source,analysis.copy_dependenciesandanalysis.engine_units.[5] ENGINE INVENTORY: every mainframe-family language, with non-COBOL units shown as detected, not yet migratable and hlasm as wrap-or-retire.usage_statusis carried as data and never fed to dead-code masking.cobol-to-java: no code change. It inherits the new IR fields (docstring note only).The differential (#3120's "transition risk" requirement)
tests/tools/refraction_differential.pycompares the old parsers with the DB, field by field.docs/refraction_engine_differential.mdattributes every delta on IBM/zopeneditor-sample and cicsdev/cics-banking-sample-application-cbsa to a cause, checked against source. Headlines:.cblprograms). The engine drops ambiguous targets (#3199)END-IF./GOBACK.. DB:usage_statusflags entry points (000-MAIN,PREMIERE SECTION), is case-sensitive, and letsX-EXITcount as a reference (#3198)Filed from this run: engine #3197–#3202, forge #3203–#3206.
Verification
pytest tests/cobol_mainframe: 54 passed. That includes the newtest_galaxy_ir.py, which is backed by a realgalaxyscopescan of a program + copybook + JCL fixture. Also run as plainpytestfrom an unrelated directory (CI invocation style).main's controller vs this branch without a flag: IR dumps and report identical, compared order-insensitively. The dumps serialise Python sets, whose order already varies run to run.--galaxy-db: the JCL and schemas are byte-identical, and the IR differs only by the three added fields.cobol-to-javagenerates from both DB-mode clean rooms with zero failures.--scanend to end on zopeneditor: the inventory reproduces the issue's counts (cobol 70 / jcl 25 / rexx 4 / hlasm 1; pli 8 vs the issue's 7).tests/tools/audit_check.py: ruff / mypy / dead-key / ast-accuracy all clear. Two new ruff findings got justifiednoqas: S608 on the constant column list, and S603 on thesys.executablesubprocess.🤖 Generated with Claude Code