Repository navigation
Equivalence harness: Db2 rows generated from DDL, SQL outcomes and tables compared field by field (#4507) - #4577
Merged
Merged
Conversation
…s compared (#4507) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017BVJCCUMdjLJq1TAM3V34V
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017BVJCCUMdjLJq1TAM3V34V
Contributor
…4579) (#4507) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017BVJCCUMdjLJq1TAM3V34V
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017BVJCCUMdjLJq1TAM3V34V
squid-protocol
marked this pull request as ready for review
October 6, 2026 17:40
This was referenced Oct 17, 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.
Part of #4507 (child of #4515). What remains is at the end.
Design. A Db2 case's
"seed": "@generate"builds its rows from the tables' declarations, following the #3804 pattern. Its"compare_sql": truecompares what Db2 answered each side, statement by statement.(a) Rows generated from DDL / DCLGEN (
equivalence_db2.generate_rows)parse_tablesreads CREATE TABLE, a DCLGEN's DECLARE TABLE, PRIMARY KEY / UNIQUE / FOREIGN KEY (inline, table-level, ALTER), CREATE UNIQUE INDEX and identity columns. It is checked on CBSA, GenApp and CardDemo DDL.{"from": "SCHEMA.TABLE.COLUMN", "miss": 0.2, "turn": true}picks a key the table holds (an INSERT of it gives -803) or one it doesn't (+100, or -530 for a child INSERT).(b) Comparison, field by field
ggsql.clogs each statement to$GGSQL_OUTCOMES. The Java side'sEquivalenceDb2Configwraps its JDBC connections in proxies and logs the same. Both fold to (verb, SQLCODE, SQLSTATE, rows), with cursors folded into their query. -304, -305 and -811 come from the COBOL host variables, not from Db2, so they count as the row Db2 returned; the program's reaction to them is compared through its outputs. Wired for CICS and batch, opt-in, so no existing verdict moves.report.json/report.md(new SQL column, generated-row counts, feedback lines). Equivalence harness: self-report coverage, run status and actionable blockers as a generated .md page #4493 is not on main yet, so nothing reports through it.Proof:
cbsa-updacc-generated(CBSA UPDACC, CICS + Db2, the hand-written cbsa-updacc port)mutation_scores.json; that is a follow-up.S9(9) COMP, where Db2 and ggsql.c assign the fullword. Listed indet_sweep_baseline.jsonunder DetSql: SELECT INTO a binary (COMP) host variable gives -304 for an INTEGER beyond the PICTURE's digits; Db2 assigns the fullword #4579.Ratchets and checks
evidence.py proveafter merging main: cbsa-updacc, cbsa-inqacc, genapp-lgicdb01, genapp-lgupdb01. All proven.det_port.py run genapp-lgipdb01(cursors, through the new JDBC proxy): PROVED.pr_gates.py: 7/7 pass.--ratchets: 5 pass;portswas skipped because there is no cics-crucible checkout here.tests/cobol_mainframe/test_equivalence_db2_rows.py. The E2E test runs only withEQUIVALENCE_E2E=1and docker, and passed locally.Remaining for #4507
compare_sqlis wired but not proven end to end: the only batch Db2 case, cobtupdt, does not prove on main.mutation_scores.json.🤖 Generated with Claude Code
https://claude.ai/code/session_017BVJCCUMdjLJq1TAM3V34V