Repository navigation
COBOL translator: INSERT ... FOR n ROWS [ATOMIC] with host-variable tables, proven on Db2 (Part of #4269) - #7109
Conversation
…he forge (Part of #4269) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…e Db2 proof (Part of #4269) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
|
PR #7109 @ 4362ed7: 2 failed check(s) == ground-truth (failure) -- real == ground-truth part 1/2 (failure) -- real |
…), fixes the ReDoS offender (Part of #4269) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (602c637) is not the one a maintainer labelled |
|
No description provided. |
|
PR #7109 @ 602c637: 7 failed check(s) == crucible (failure) -- real == ground-truth (failure) -- infra == ground-truth part ${{ matrix.shard }} (cancelled) -- infra == ground-truth-warm (cancelled) -- infra == measure (shard ${{ matrix.shard }}/${{ matrix.total }}) (cancelled) -- infra == publish (cancelled) -- infra == publish-history (cancelled) -- infra |
|
No description provided. |
1 similar comment
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
PR #7109 @ 0fd26f3: 2 failed check(s) == full-suite (failure) -- real == full-suite part 2/2 (failure) -- main |
|
No description provided. |
|
No description provided. |
Part of #4269.
What
INSERT INTO t (cols) VALUES (:A1 [:I1], ...) FOR n ROWS [ATOMIC]over host-variable tables (OCCURS), n a literal or a numeric host variable, now translates and is proven on Db2.det/sql.py): emitsDetSql.insertRows(...); the generated repository method stays the single-row INSERT (the forge strips the clause).DetSql.insertRows, ruleRT-SQL-INSERT-ROWS): loops elements 1..n, SQLERRD(3) = rows inserted; a first-row failure gives Db2's SQLCODE.ggsql.ctakes anM[:n]statement-table tail and executes the prepared INSERT once a row;equivalence_sql.pyprecompiles the form.NOT ATOMIC CONTINUE ON SQLEXCEPTIONand aFOR n ROWSnot at the end stay refused by name.Proof
test_insdemo_det_port_proves_on_db2_against_the_hand_trace(EQUIVALENCE_E2E=1, run locally): literal and host-variable n, a NULL through an indicator, a first-row duplicate key (-803, 0 rows), the count read back;proventrue and stdout equals the hand trace. Fast unit tests cover the translation and every refusal. No golden-master change (no burned estate uses the form).Changed from the plan
die(), portUnsupportedOperationException).File-cap exception: translator, runtime, forge, oracle C and oracle precompiler are one atomic change; any subset leaves the port or the oracle unable to run the form, so no 5-file slice is self-contained.
Class / Sibling gaps
Multi-row SQL forms: rowset FETCH FOR n ROWS (done, #7093); INSERT FOR n ROWS ATOMIC (this PR); NOT ATOMIC CONTINUE ON SQLEXCEPTION (refused); ATOMIC undo after row 1 (refused at run time); rowset FETCH STARTING AT / orientation (refused); host-variable arrays in positioned UPDATE/DELETE (refused); SENSITIVE/DYNAMIC scroll and scroll WITH HOLD (refused).
Gates
ruff format clean;
audit_check.pyall clear (ruff baseline regenerated for edited lines only);pr_gates --fastpassed excepttest_equivalence_e2e_planwhich failed on a stale base and passes after merging main; time ratchet PASS;test_cobolrt_rulespass.det_port check: 82 SQL ports listDetSql.java+42 lines only (the new method), no service code changed; CI's equivalence shards re-prove them.Lessons for agents
ggsql.ccannot be compiled locally (nosqlcli1.h): only the Docker Db2 proof compiles it, so run the proof before trusting the C edit.DISPLAYstring is easy to misalign by a space: build it from the samef"{tag:<8}{code:>10}{rows:>10}"format.ruff formatwraps a long trailing comment into parens; S608 flags an f-string holdingINSERT ... VALUES: build such messages with+=.🤖 Generated with Claude Code
Checklist: partial [c:022d6a2a] -- Q4 entry updated for the forms this PR adds; remaining forms still open