Repository navigation
Java forges: shared helpers, one skeleton-forge pipeline, counters, one name registry (#3657) - #3662
Merged
Merged
Conversation
…ne name registry (#3657) - cobol_to_java_common.py holds what the transaction, call, repository and schema forges share: java_type, java_identifier (was the spring forge's _java_field_name), container_var, status_text (was _status), merge_extras, and ClassNames. No forge imports another's private names any more. - ClassNames is one registry of generated simple class names across dto.contract, entity.vsam (entities, @EmbeddedId keys), repository.vsam and client. A name one forge generated is never reused by another, so a service can never import two classes with one simple name. - cobol_to_java_skeleton_forges.SkeletonForges plans every skeleton-driven forge together. It writes their files, merges each service's extras and writes the audit lines. The controller wires this one object; a new layer (#3618+) registers there. - CallForge counts LINK / XCTL / CALL / dispatch / remote as it emits them; the audit no longer parses generated method text. Output is byte-identical: all 1,504 generated Java files across 6 corpora x 3 configs (default, plain + records, gradle + local remote calls) match main + #3617. The refraction snapshot shows 0 differ. The full suite passes (11,631), and ruff / mypy audits are clean. A new test pins the cross-forge name registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> 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 #3657 (epic #3625). Builds on #3617 (#3648, merged).
What changes
cobol_to_java_common.pyholds what the forges share:java_type,java_identifier,container_var,status_text,merge_extrasandClassNames. The call and repository forges no longer import private names (_status,_java_field_name) from the other forges.ClassNamesis one registry of generated simple class names acrossdto.contract,entity.vsam(entities and@EmbeddedIdkeys),repository.vsamandclient. A name one forge generated is never reused by another, so a service can never import two classes with the same simple name. A new test pins it.SkeletonForges(cobol_to_java_skeleton_forges.py) plans every skeleton-driven forge together. It writes their files, merges each service's extras and writes the audit lines.cobol_to_java_controller.main()now wires this one object instead of three forges, and Java conversion: embedded DB2 (table access + DCLGEN) -> repositories, dialect per config #3618+ register new forges here without touching the controller.Behaviour: byte-identical
remote_calls: local. Generation ran against the cached corpus scans, and the timestamped clean-room names were normalised before comparing.refraction_snapshot.py check: 0 differ on 6 corpora.ruff_audit/mypy_audit: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g