Skip to content

Java conversion: porting tickets in port order, most-depended-on programs first (#3237 follow-up) - #3792

Merged
squid-protocol merged 2 commits into
mainfrom
feat/port-order-3237
Sep 26, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
feat/port-order-3237

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Follow-up to #3790 (#3237). This commit was pushed just after #3790 merged, so it lands here.

With call/exec edges in the dependency graph, a program's callers now include the programs that CALL/LINK/XCTL it and the JCL steps that EXEC it. That lets the COBOL→Java tickets be put in order: the programs the most other code depends on come first. A shared service or error handler then gets ported, proven and approved before the programs that call it.

  • Metrics in the clean room. The refractor writes 04_ir_state_dumps/graph_metrics.json (callers, calls and blast radius per file) from the engine DB it read, for both --scan and --galaxy-db, so the clean room stays self-contained (galaxy_ir.write_graph_metrics).
  • Ticket priority. Each ticket carries priority (rank of N, callers, blast radius), and its Markdown shows it.
  • Order files. ai_agent_jobs/port_order.json / .md list the tickets ordered by callers, then blast radius. Blast radius only breaks ties: PageRank flows in from well-linked callers such as CBSA's Java web layer, and leading with it would put a one-caller program above INQCUST's four.
  • Worklist and loop. The worklist's by-program table follows the order, and port_runner status lists tickets in it and names the next open one.
  • Without a DB, nothing changes: no priority, name order.

Resulting order:

  • CBSA: ABNDPROC (23 callers), INQCUST (4), INQACCCU (3), INQACC (2), DELACC (2), …
  • CardDemo: CSUTLDTC (the shared date utility, 3), COMEN01C (3), CBTRN03C (2), …

The generated Java is unchanged; only tickets, the worklist and the order files change.

Tests: test_port_order.py runs a real scan in which two programs CALL a third; that program is first in the tickets, port_order, the worklist and status. Locally the mainframe and recorder suites pass (1017).

🤖 Generated with Claude Code

https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g

…ograms first (#3237)

With call/exec edges in the graph, a program's callers now include the programs
that CALL / LINK / XCTL it and the JCL steps that EXEC it, so the graph can say
which programs to port first.

- The refractor writes 04_ir_state_dumps/graph_metrics.json (callers, calls,
  blast radius per file) from the engine DB it read (--scan or --galaxy-db), so
  the clean room stays self-contained (galaxy_ir.write_graph_metrics).
- Each porting ticket carries `priority` (rank of N, callers, blast radius) and
  its Markdown says so; ai_agent_jobs/port_order.json / .md list the tickets
  ordered by callers, then blast radius (PageRank flows in from well-linked
  callers such as a web layer, so it breaks ties rather than leading).
- The worklist's by-program table follows the port order; the porting loop's
  `status` lists tickets in it and names the next open one.
- Without a DB nothing changes: no priority, name order.

CBSA: ABNDPROC (23 callers), INQCUST (4), INQACCCU (3), ...; CardDemo:
CSUTLDTC (3), COMEN01C (3), CBTRN03C (2), ...

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 a319b1d into main Sep 26, 2026
36 checks passed
@squid-protocol
squid-protocol deleted the feat/port-order-3237 branch September 26, 2026 19:40
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.

2 participants