Repository navigation
Pin and record the GnuCOBOL oracle (#4309) - #4313
Merged
Merged
Conversation
gnucobol.Dockerfile pins the base by digest (debian:bookworm-slim@sha256:3783cc01...) and gnucobol3/libcob4 to 3.1.2-5+b1 (what bookworm ships today, and what the local oracle already ran: no change in oracle behaviour). The build asserts `cobc --version` = "cobc (GnuCOBOL) 3.1.2.0" and labels the image with the pin. tests/tools/equivalence_oracle.py fingerprints the image a run uses (id, labels, cobc --version, installed package) against the pin. Every proof report (equivalence.py batch/CALL/CICS, cics_crucible results and --report-dir proofs) records it under `oracle`; a mismatch warns, and stops the run under GITGALAXY_ORACLE_STRICT=1, which the CICS crucible workflow sets (plus an explicit check step after the image build). --reuse carries the earlier run's oracle. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
Contributor
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.
Fixes #4309. Prerequisite for #4048: every evidence record's oracle fingerprint comes from here.
What changed
tests/equivalence/gnucobol.Dockerfileis pinned.debian:bookworm-slim@sha256:3783cc01769c7b2b1b83a5c5ad96c815348e28ed7da68e2e3687004faa906251. This is the registry's current digest for the tag, and it is the base the existing local oracle image was built on.gnucobol3andlibcob4are pinned to3.1.2-5+b1. That is the version bookworm ships today, and it is the package already in the oracle image every proof so far ran on. The oracle's behaviour does not change.cobc --versionprintscobc (GnuCOBOL) 3.1.2.0.org.gitgalaxy.oracle.*labels.tests/tools/equivalence_oracle.py(new) fingerprints the image a run uses: image id, labels,cobc --versionand the installedgnucobol3. It compares that fingerprint with the pin, which it reads from the Dockerfile'sARGdefaults, so the pin lives in one place.oracle, withmatches_pinandmismatches. This coversequivalence.py runfor batch, CALL and CICS cases,cics_crucible.pyresults.json, and its--report-dirproof.--reuserun takes over the earlier run's oracle, because the COBOL outputs it compares against are the earlier run's.GITGALAXY_ORACLE_STRICT=1is set. Typical causes are an image built before the pin, a--build-argoverride, or a stale Db2 image.cics-crucible.yml:gnucobol-db2.Dockerfilestill buildsFROM gitgalaxy-gnucobol:3, so it inherits the pin and the labels. It gets a comment on rebuilding it after the oracle moves.oracle_assumptions.mdhas a new section, "The oracle is pinned and recorded".Verified locally
--strict.GITGALAXY_ORACLE_STRICT=1, JDK 17, all still proven, each recordingmatches_pin: true:tests/cobol_mainframe/test_equivalence_oracle.py: 11 pure tests, plus one Docker test gated onEQUIVALENCE_E2E. The crucible and equivalence unit suites pass.ruff_audit.py --ci(ruff 0.16.0),mypy_audit.py --cianddead_key_audit.py --ciare clean.Not done here:
trial.HARNESS_PATHSis left unchanged. That frozen-harness hash is a separate contract, and #4048's harness fingerprint will include the oracle module.🤖 Generated with Claude Code
https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo