Repository navigation
Mainframe fact channel: units of work and error handling, + TD trigger starts (#3453) - #3464
Merged
Merged
Conversation
…r starts (#3453) Commit / rollback points and error handlers only fed risk-signal counts; the engine could not say where a unit of work ends or which condition goes to which handler. New channel uow_handler_data (core/uow_handlers.py), one row per: - COMMIT / ROLLBACK: EXEC CICS SYNCPOINT [ROLLBACK], EXEC SQL COMMIT / ROLLBACK [WORK | TO SAVEPOINT]; - HANDLE CONDITION / HANDLE AID pairs (condition or key -> handler paragraph, or DEFAULT when named bare), IGNORE CONDITION, HANDLE ABEND (LABEL / PROGRAM / CANCEL / RESET), PUSH / POP HANDLE; - explicit EXEC CICS ABEND with its ABCODE (VALUE-resolved) and NODUMP/CANCEL; - RESP_CHECK: every RESP-coded (or NOHANDLE -> EIBRESP) command with the DFHRESP(...) conditions tested on that field before it is set again, the next paragraph header, or 8000 chars; NULL = the result is never tested. galaxy_ir: EngineUowHandler / EngineFile.uow_handlers and - units_of_work(): commit / rollback points with their owning paragraph; - error_handlers(): handlers with owning paragraph and handler_found (the LABEL is a paragraph of the program); - unchecked_responses(): RESP-coded commands never tested; - tdq_trigger_starts() (add-on): WRITEQ TD to a CSD TDQUEUE carrying TRIGGERLEVEL + TRANSID -> the transaction CICS starts when it fills -> its program. No pinned corpus defines one; unit-tested. Corpora: CBSA 3 commit / 16 rollback points, 9 handlers, 14 of 157 RESP results untested; CardDemo 14 / 2, 11 handlers, 41 of 96 untested (mostly RECEIVE / SEND MAP). Every handler label resolves to a paragraph. Ground truth: independent readers in cobol_answer_key.py (add-uow): its own EXEC CICS / SQL reading, Area A header detection and RESP window, and a TD trigger join over its own CSD / WRITEQ / transaction reads. New scored fields "units of work and handlers" (uow_validated) and "TD trigger starts" (tdq_triggers_validated), drafted. Engine matches the key exactly: CBSA 245/245, CardDemo 128/128. Golden masters re-blessed: one new Units Of Work And Handlers block per COBOL file with any; nothing else moved. dead_key_audit: LABEL / RESP / ABCODE allowlisted (parsed EXEC CICS option words, like CHANNEL). Long regexes built from named pieces so the X-Ray entropy scan stays clean. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
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.
Closes #3453. Part of #3445.
What
New fact channel
uow_handler_data(core/uow_handlers.py). One row per:EXEC CICS SYNCPOINT [ROLLBACK]andEXEC SQL COMMIT / ROLLBACK [WORK | TO SAVEPOINT].HANDLE CONDITIONandHANDLE AIDpairs: condition or key → handler paragraph, orDEFAULTwhen the condition is named with no handler;IGNORE CONDITION;HANDLE ABEND: LABEL / PROGRAM / CANCEL / RESET;PUSH/POP HANDLE.EXEC CICS ABEND: its ABCODE (resolved through VALUE), plus NODUMP / CANCEL.RESP_CHECK: every command coded withRESP(v)(orNOHANDLE, which leaves the result inEIBRESP), together with theDFHRESP(...)conditions tested on that field. The window ends when the field is set again, at the next paragraph header, or after 8000 characters. An empty result means the outcome is never tested.New joins in
galaxy_ir:units_of_work(): commit and rollback points with the paragraph that owns them.error_handlers(): each handler with its owning paragraph andhandler_found(the label is a real paragraph of the program).unchecked_responses(): RESP-coded commands whose result is never tested.tdq_trigger_starts(): aWRITEQ TDto a CSD TDQUEUE that carriesTRIGGERLEVEL+TRANSID→ the transaction CICS starts once the queue fills → that transaction's program. This async start used to be hidden. No pinned corpus defines one, so it's covered by unit tests only.What the corpora show
RETURN,INQUIRE)RECEIVE/SEND MAP)Every handler label resolves to a paragraph.
Ground truth
cobol_answer_key.py add-uow. They have their own EXEC CICS/SQL reading, their own Area A header detection and RESP window, and a TD-trigger join over the key's own CSD, WRITEQ and transaction reads.units of work and handlersandTD trigger starts, both drafted.Checks
Units Of Work And Handlersblock per COBOL file that has any; nothing else moved.LABEL,RESPandABCODEare allowlisted as parsed CICS option words, likeCHANNEL.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g