Skip to content

Pin and record the GnuCOBOL oracle (#4309) - #4313

Merged
squid-protocol merged 1 commit into
mainfrom
fix/4309-pin-gnucobol-oracle
Oct 4, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/4309-pin-gnucobol-oracle

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #4309. Prerequisite for #4048: every evidence record's oracle fingerprint comes from here.

What changed

  • tests/equivalence/gnucobol.Dockerfile is pinned.
    • Base image: 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.
    • gnucobol3 and libcob4 are pinned to 3.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.
    • The build fails unless cobc --version prints cobc (GnuCOBOL) 3.1.2.0.
    • The image carries the three pinned values as org.gitgalaxy.oracle.* labels.
  • tests/tools/equivalence_oracle.py (new) fingerprints the image a run uses: image id, labels, cobc --version and the installed gnucobol3. It compares that fingerprint with the pin, which it reads from the Dockerfile's ARG defaults, so the pin lives in one place.
  • Every proof report records the fingerprint under oracle, with matches_pin and mismatches. This covers equivalence.py run for batch, CALL and CICS cases, cics_crucible.py results.json, and its --report-dir proof.
    • A --reuse run takes over the earlier run's oracle, because the COBOL outputs it compares against are the earlier run's.
  • A mismatch warns locally and stops the run when GITGALAXY_ORACLE_STRICT=1 is set. Typical causes are an image built before the pin, a --build-arg override, or a stale Db2 image.
  • cics-crucible.yml:
    • sets strict mode;
    • adds a "Check the oracle against its pin" step after the image build;
    • adds the Dockerfile and the oracle module to the path filters.
    • The weekly schedule now also catches Debian dropping the pinned package: the pinned build then fails loudly, instead of quietly taking a newer GnuCOBOL.
  • gnucobol-db2.Dockerfile still builds FROM gitgalaxy-gnucobol:3, so it inherits the pin and the labels. It gets a comment on rebuilding it after the oracle moves.
  • oracle_assumptions.md has a new section, "The oracle is pinned and recorded".

Verified locally

  • The pinned image builds. Its fingerprint matches the pin.
  • The old local image (unlabelled, built before the pin) is reported as a mismatch, and refused under --strict.
  • End-to-end runs under GITGALAXY_ORACLE_STRICT=1, JDK 17, all still proven, each recording matches_pin: true:
    • carddemo-dateutil (CALL), 17/17
    • carddemo-intcalc (batch, with fault runs), 20 runs
    • carddemo-cardview (CICS), 21 scenarios
  • tests/cobol_mainframe/test_equivalence_oracle.py: 11 pure tests, plus one Docker test gated on EQUIVALENCE_E2E. The crucible and equivalence unit suites pass.
  • ruff_audit.py --ci (ruff 0.16.0), mypy_audit.py --ci and dead_key_audit.py --ci are clean.

Not done here: trial.HARNESS_PATHS is 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

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
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 4, 2026 15:07
@squid-protocol
squid-protocol merged commit 570ea9b into main Oct 4, 2026
30 checks passed
@squid-protocol
squid-protocol deleted the fix/4309-pin-gnucobol-oracle branch October 4, 2026 15:07
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.

Equivalence oracle: the GnuCOBOL version every proof compares against is neither pinned nor recorded

1 participant