Skip to content

Java forges: shared helpers, one skeleton-forge pipeline, counters, one name registry (#3657) - #3662

Merged
squid-protocol merged 1 commit into
mainfrom
refactor/java-forges-3657
Sep 25, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
refactor/java-forges-3657

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #3657 (epic #3625). Builds on #3617 (#3648, merged).

What changes

  • cobol_to_java_common.py holds what the forges share: java_type, java_identifier, container_var, status_text, merge_extras and ClassNames. The call and repository forges no longer import private names (_status, _java_field_name) from the other forges.
  • ClassNames is one registry of generated simple class names across dto.contract, entity.vsam (entities and @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 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.
  • Counters. The call forge counts LINK / XCTL / CALL / dispatch / remote as it emits them; the audit no longer parses generated method text.

Behaviour: byte-identical

🤖 Generated with Claude Code

https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g

…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
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 73556d5 into main Sep 25, 2026
36 checks passed
@squid-protocol
squid-protocol deleted the refactor/java-forges-3657 branch September 25, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: shared Java-forge helpers, one skeleton-forge pipeline, counters instead of text parsing (before #3618)

1 participant