Repository navigation
Proofs 5x faster: Db2 database pool, active databases, batched CLP, per-estate cache - #4180
Merged
Merged
Conversation
…s held active, batched CLP calls, per-estate cache - equivalence_db2: a pool of databases in the one Db2 instance (GGDB, GGDB1 ..; GITGALAXY_DB2_POOL, default 4), one case a database for its whole run (a lock file each; GGDB keeps the lock path older checkouts take). Every schema-qualified name in either side's SQL stays as written; databases share no catalog, rows or identity counters. A pool database is created as GGDB is (code set, territory, collation, page size). - Each database is held active: an inactive one is activated by every connect (~1.1 s) -- which most of a Db2 case's time went to (each reset, dump and task transaction connects). - Catalog metadata read once a run in one query; a run's reset and dumps one CLP call each (~1.1 s a call). - equivalence_cache: the corpus scan and the corpus refactor every case starts from, built once per key (corpus commit and state, every engine file, GITGALAXY_* env) and restored with recorded paths rewritten; a binary file holding a path falls back to a fresh refactor. Det sweep 45 min -> 8.5 min, 48/50 proven as expected, every case's coverage line identical (705 scenarios). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
Contributor
This was referenced Oct 2, 2026
Merged
squid-protocol
added a commit
that referenced
this pull request
Oct 3, 2026
…1 (model-written, unedited, proven) (#4187) Ports only, split from #4168; the loop fixes are #4186. Each is the porting loop's answer on attempt 1 (claude-sonnet-5-5, no tools, ticket prompt only), unedited, with provenance.json. Re-proven on main after #4178/#4180: cbsa-updacc 10 scenarios, 7/7 paragraphs, 5/6 branches genapp-lgicdb01 12 scenarios, 3/4 paragraphs, 4/12 branches genapp-lgapvs01 8 scenarios, 2/3 paragraphs, 5/9 branches Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Proofs run about 5x faster. The comparison itself is unchanged: every proven case's report, coverage line and Db2 dump bytes are identical to
main's.Where the time went (measured)
ACTIVATE DATABASE, 2–3 ms.GnuCOBOL was never the bottleneck: about 7% of a case.
What changed
GITGALAXY_DB2_POOL, default 4). Each case holds one database for its whole run, with a lock file per database. GGDB keeps the lock path older checkouts take, so a checkout without this change still never shares a database.CARDDEMO.TRANSACTION_TYPE,IBMUSER.ACCOUNT,GENASA1.*), and several cases share each schema. A schema per case would mean rewriting both sides' SQL. A database per case leaves every name as written, and databases share no catalog, rows or identity counters.db cfgagainst GGDB shows only self-tunedAUTOMATICmemory sizes, lock-list sizing and logging (GGDB archives its logs, the pool databases use circular logging). None of those changes what a query returns.activate, once a process).create()uses one call for the drops plus the 32K table space, and one for the DDL.equivalence_cache.pybuilds the corpus scan (CICS file facts) and the corpus refactor (the input to every generated project, det_port's estate included) once per key:git status --porcelain, every engine file's bytes, the Python version and theGITGALAXY_*environment.GITGALAXY_EQUIV_CACHE=offturns it off.The Java-side CICS test template is unchanged. With the database active its connects cost ~2 ms, so changing it would only add risk.
Before / after (same machine)
main)--faults allproof_sweep.py --det-only)--jobs 2)--jobs 4), 8 min 27 s (--jobs 6)* measured after I had activated GGDB by hand, so
main's usual times are higher.The 130–231 s spread is the same case run more than once; my first run competed with another agent's Db2 work.
--jobs 6gains nothing over--jobs 4, so 4 (the pool size) is the setting to use.Correctness gate
KNOWN_UNPROVENcases the only ones not proven. All 50 cases' verdicts and coverage lines match themainsweep's: 705 scenarios before, 705 after.report.jsonidentical old vs new, paths aside, for carddemo-acctupdate, cbsa-inqacc, genapp-lgicdb01, genapp-lgdpdb01 and carddemo-cobtupdt. Raw dump files are byte-identical (lgdpdb01: 146 files; cobtupdt: 13).tests/cobol_mainframe/test_equivalence_speed.py(9 tests: pool selection, connection strings, one catalog read, dump splitting, cache restore equals fresh, binary-path fallback, cache key, off). The existing harness tests pass: 155 passed, 8 skipped.tests/ruff_audit.py --ci: no new findings.Docs: the
det-portSKILL.md environment and command timings, anddet_port_design.md's Db2 section.🤖 Generated with Claude Code
https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ