Repository navigation
Units of work and handlers -> @Transactional boundaries and exception mapping (#3621) - #3675
Merged
Merged
Conversation
… mapping (#3621) A CICS task is one unit of work: CICS commits at task end and backs out on an abend, which is @transactional method-boundary semantics. A new UowForge (cobol_to_java_uow_forge.py), registered in SkeletonForges, builds from the field-tested `units of work and handlers` channel. Each program's @service gains: - @transactional, for a CICS program or one with an explicit COMMIT / ROLLBACK; - commitPointL<line>(): an explicit SYNCPOINT / SQL COMMIT, documented as a transaction split point, never a faked commit; - rollbackL<line>(): SYNCPOINT ROLLBACK, throwing UnitOfWorkRollbackException; - abend<CODE>L<line>(): an explicit ABEND, throwing CicsAbendException; - onAbendL / onCondition<C>L: HANDLE ABEND / CONDITION routes, with a TODO to port the target paragraph; - a class note of RESP checks and every response never tested (up to 30). CicsAbendException, CicsConditionException, UnitOfWorkRollbackException (package exception) and a CicsExceptionAdvice (package web: NOTFND 404, DUPREC/DUPKEY 409, NOTAUTH 403, INVREQ/LENGERR 400, else 500; abend 500; rollback 409) are generated once, only when a service uses them. Service extras gain `annotations` and `class_doc`, merged by merge_extras. A service without them is byte-identical. Corpora: | corpus | @transactional | commits | rollbacks | abends | handlers | unchecked RESPs | |----------|----------------|---------|-----------|--------|----------|-----------------| | CardDemo | 25 | 14 | 2 | 5 | 11 | 40 | | CBSA | 28 | 3 | 16 | 60 | 9 | 14 | | GENAPP | 31 | 0 | 10 | 24 | 5 | 150 | | zECS | 5 | 3 | 1 | 0 | 1 | 73 | 6 corpora x 13 configs compile via --scan; preflight all PASS; full suite 11,663 passed. Drafted by an agy (Gemini 3.1 Pro) agent. Review: - plans once in __init__ (the counters used to be bumped per service_extras call); - generates and imports the exception package only when a service uses it (a CICS program without handlers imported a package that did not exist; a test pins it); - cites real file:line paths (they printed a literal "file:"); - fixed 2 lint + 2 type findings the agent's run missed, caught by preflight. 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 #3621 (epic #3625).
A CICS task is one unit of work: CICS commits at task end and backs out on an abend, which is exactly @transactional method-boundary semantics. The new
UowForge, registered in the #3657SkeletonForgespipeline, builds from the field-testedunits of work and handlerschannel.@Service@Transactionalon the classEXEC CICS SYNCPOINT/EXEC SQL COMMITcommitPointL<line>(): documented as a transaction split point (TransactionTemplate), with a TODO. Never a faked commitSYNCPOINT ROLLBACKrollbackL<line>()throwsUnitOfWorkRollbackException, and the boundary rolls backEXEC CICS ABEND ABCODE(x)abend<X>L<line>()throwsCicsAbendExceptionHANDLE ABEND/HANDLE CONDITION conAbendL<line>()/onCondition<C>L<line>(), with a TODO to port the target paragraphGenerated once, only when a service uses them:
CicsAbendException,CicsConditionExceptionandUnitOfWorkRollbackException(packageexception), plus, with REST controllers,CicsExceptionAdvice(NOTFND 404, DUPREC/DUPKEY 409, NOTAUTH 403, INVREQ/LENGERR 400, else 500; abend 500; rollback 409).Every method cites
file:line, paragraph, and field-testing status. Service extras gain optionalannotations/class_doc; a service without them is byte-identical.Verified
--scan.Provenance
Drafted by an agy (Gemini 3.1 Pro) agent. Review:
service_extrascall);file:);🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g