Repository navigation
COBOL: engine-vs-translator fact cross-check as a CI gate, with fact ownership (#4273) - #4456
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
Contributor
This was referenced Oct 5, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
…s check) (#4273) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
…rtup failure) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
squid-protocol
marked this pull request as ready for review
October 5, 2026 14:58
This was referenced Oct 5, 2026
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.
For #4273 (its acceptance criteria are all covered; close it on merge if the reviewer agrees).
What
The engine (scanner) and the det translator each derive the same COBOL facts. This PR compares them program by program and channel by channel, records which side owns each fact, and gates CI on any disagreement nobody has explained.
tests/tools/referees/translator_adapter.py: the translator's own parse as areferee-facts/1document. Every value comes from the structuresdetbuilds when it translates (expandedLines,layout.Items,stmt.Paragraphs). It re-parses nothing and does not touchdet/. USAGE "as written" is read by wrappinglayout._inherit_usageinside the tool.tests/tools/fact_crosscheck.py:run/check/update/assign. It covers 7 keyed corpora (128 sources), 54 det-port case programs (using each case's copy_dirs), 112 keyed copybooks and estate-crucible at its pin (40 programs). 17 channels: units, unit_extents, edges, calls, copybooks, copy_resolution, data_items, pic, usage, occurs, redefines, value, layouts, offsets, moves, cics_commands, cics_files. Each side is also scored against the answer keys.tests/cobol_mainframe/fact_crosscheck_ledger.json: 824 known disagreements under 14 causes. Each cause names the side that is wrong (engine / translator / definitional) and an issue.docs/language_status/fact_ownership.md: the ownership table, with the numbers..github/workflows/fact-crosscheck.yml: the gate. It follows estate-crucible.yml's pattern (engine and translator paths,!**/*.md, cancel-in-progress for PRs,timeout-minutes: 12) and installs.[translator]. Without tree-sitter-language-pack the tool exits non-zero; it never skips.field_testing.json: D045 / D046 for the two engine defects (mainframe-ground-truth protocol); report regenerated.Agreement (engine vs translator; each vs keys, P / R)
Adjudication (each pattern checked against the source and the keys, ≥3 samples)
DFHVALUEvs its number, numeric VALUE spelling,VALUE ALL, GO TO to its own paragraph (#3327 follow-up: COBOL GO TO is not a call (contract C4) -- needs a decision #3362), vendor copybooks not shipped.Ownership (summary)
Evidence
fact_crosscheck.py checkafter merging origin/main (0440595ee, which includes det: model EXEC CICS READ ... INTO LENGTH (#4436) #4453 READ LENGTH): 0 new, 0 ledger problems. 82 s cold (8 scans) on this box, ~6 s once scanned. tree-sitter-language-pack 1.20.0 and 1.21.0 (what CI installs) give identical results.pr_gates.py --fast: 5/5 pass.test_fact_crosscheck.py: 22 pass (the toy-program test runs, not skipped).Prior work reused
The 2026-10-03 experiment scripts (
agent-scratch-2026-10-03/xcheck/xcheck.py): the (file, line, level) join of translator records to engine entries plus_copy_extensionforoffsets, the operand canonicalisation formoves, and the CVDA / POINTER findings. The old worktreexcheck-4273(branchfeat/4273-fact-crosscheck-gate) had no commits beyond main and no uncommitted files, so nothing came from it; it was left untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz