Skip to content

Estate compile/runtime options as one input: options files, one resolver, evidence fingerprint (Part of #4704, slice 1) - #4719

Merged
squid-protocol merged 4 commits into
mainfrom
feat/4704-estate-options
Oct 8, 2026
Merged

squid-protocol merged 4 commits into
mainfrom
feat/4704-estate-options

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4704 (slice 1). Policy: #4702 ("IBM is the reference; GnuCOBOL is the instrument").

What

  1. Estate options files: tests/equivalence/estate_options/<corpus>.json (beside the cases, one per corpus in corpora.json, so a case's corpus finds its file). Compiler product / version / installation defaults, default PARM plus per-program PARM, LE runtime options, Db2 precompile / bind / format / CCSID, CICS region / program / translator options. Every value is {value, source, note}: source is <corpus path>:<line> (found; a test reads that line at the corpus pin and checks the quoted text) or assumed: IBM default | owner decision | not stated in the corpus. tests/cobol_mainframe/test_estate_options.py validates the schema. .gitignore gets a ! exception.
  2. Populated for the six burned estates from what the corpora contain (found / assumed values): CBSA 19 / 19, CardDemo 59 / 19 (the per-program PARM lists repeat the proc's line), GenApp 15 / 18, mortgage 9 / 20, zecs 3 / 16, async credit-card 0 / 23 (no build inputs shipped). mortgage-mpmt's compiler block stays in its case.json (touching it would stale the record) and overrides the estate's compiler; the estate file carries the same IGY.V6R1M0 fact.
  3. One resolver: gitgalaxy.core.estate_options.effective_options(case) + compiler_options.effective_with_defaults. Precedence, IBM's order (Enterprise COBOL Programming Guide, "Compiler options": PROCESS/CBL override the PARM, which overrides the installation defaults): installation defaults < estate PARM (per-program PARM replaces the default) < the case's compiler_options < the program's CBL/PROCESS cards; anything unnamed is IBM's default. equivalence_common.compile_options / numproc / compiler_version, det.program.trunc_std / numproc_pfd, and det_port.py / equivalence_java.py (the options handed to the translator) all read it. No other reader of NUMPROC/TRUNC remains (ARITH is not read by the det translator today).
  4. Evidence: options is in INPUTS and BLOCKING. It hashes the resolved options (no provenance, so a changed note is not a changed option; the program's own cards are source, fixed by the corpus pin). A record from before the input stays current while the estate file changes no option cobc acts on (semantic_sha256 vs the same computed without the estate file); it changes to stale when one does. New records store the input; no existing record needed a re-prove or a rewrite (all 45 are unchanged on options; their harness/generator staleness is the existing scheduled-job kind).

Finding (declared difference)

CBSA's build PARM is TRUNC(OPT) (etc/install/base/buildjcl/CICS.jcl:7); GnuCOBOL has no TRUNC(OPT), so the proof runs TRUNC(STD) for CBSA programs without their own TRUNC(STD) card (CUSTCTRL, DELACC, INQACC among the cases). The file records value: OPT with applied_value: STD + applied_note, and EffectiveOptions.deviations() lists it. Follow-up: #4706.

Proof of no behaviour change

  • cobc flags, numproc, blanked-source hash, trunc_std, numproc_pfd for all 79 cases: identical before (origin/main) and after (cmp of the JSON dumps).
  • det_port.py check --base-ref origin/main: 79/79 ports unchanged.
  • test_equivalence*.py, test_det_translate.py, test_evidence.py, test_numproc.py, new tests: pass (517 passed, 11 skipped, + new). pr_gates.py --ratchets: 7 pass. pr_gates.py --fast: gauntlet / audits / secrets / xray pass; lint's only NEW finding was fixed (the FYI "no longer flagged" entries are not from this PR).

New test asserts per case that the oracle's flags and the det port resolve the same effective options.

Follow-ups

#4706 (compiler option table: ZONEDATA/INVDATA, CODEPAGE, SSRANGE/NUMCHECK, OPTIMIZE, TRUNC(OPT), ARITH(EXTEND)), #4707 (LE / Db2 / CICS option table), #4708 (evidence report shows options per program; after #4705), #4709 (estate-intake checklist).

🤖 Generated with Claude Code

https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D

squid-protocol and others added 2 commits October 8, 2026 18:20
…er, evidence fingerprint (Part of #4704)

Slice 1. tests/equivalence/estate_options/<corpus>.json holds an estate's compiler
product/version, installation defaults, compile-step PARM (per-program overrides), LE, Db2
and CICS options, every value with provenance (file:line or "assumed: ..."), for the six
burned estates. gitgalaxy.core.estate_options.effective_options is the one resolver
(installation defaults < PARM < case compiler_options < CBL/PROCESS cards); the oracle's
cobc flag builder, det trunc_std / numproc_pfd and det_port route through it with the same
flags and ports. "options" joins the evidence fingerprint as a BLOCKING input; records from
before it stay current while no option cobc acts on changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
@squid-protocol squid-protocol added enhancement New feature, sensor, or structural signature testing Unit, integration, and E2E pipeline verification legacy-modernization COBOL refractor, dead-code extraction, and JCL forging labels Oct 8, 2026
…the dead-key audit reads) (Part of #4704)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

…ce-read ratchet) (Part of #4704)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
@squid-protocol
squid-protocol marked this pull request as ready for review October 8, 2026 23:28
@squid-protocol
squid-protocol merged commit d3b7440 into main Oct 8, 2026
39 checks passed
@squid-protocol
squid-protocol deleted the feat/4704-estate-options branch October 8, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, sensor, or structural signature legacy-modernization COBOL refractor, dead-code extraction, and JCL forging testing Unit, integration, and E2E pipeline verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant