Skip to content

Java signals: det-port runtime (cobolrt) as I/O, program control and open work - #4163

Merged
squid-protocol merged 1 commit into
mainfrom
feat/scan-cobolrt-io
Oct 2, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
feat/scan-cobolrt-io

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

A det port names no File or Connection. Its READ / WRITE / EXEC CICS / EXEC SQL statements are calls into cobolrt, so GitGalaxy read every port as having no I/O: median 0, against the COBOL's 4, on the 49 programs of the scan-parity study.

Rules (java.py)

  • io:
    • the CICS file, browse, queue and counter operations on the task. A file store's wiring (task.write("F", () -> repo.save(e))) is excluded.
    • DetSql's statements. close, closeAll and reset are cleanup, as COBOL's CLOSE is.
    • a batch FD's operations, in the exact shapes det/gen.py writes: a COBOL open mode or a numeric record length anchors each one.
  • ipc_rpc_bridges: task.link, task.xctl and task.returnTransid, mirroring cobol.py's LINK / XCTL / RETURN. task.start is left out because Kafka and Elasticsearch use it for their own worker tasks.
  • planned_debt: an untranslated statement, if (true) throw new Hole("..."). The runtime's guards (default -> throw new Hole() are not counted as debt.

Measured

  • False positives: 0 new hits on 47,701 ordinary Java files (gradle, jenkins, kafka, elasticsearch, spock). An earlier, looser draft matched task.start(, VALUE_SCHEMA.write( and LIBC.open(; those cases are now negative tests.

  • 49 det ports, COBOL vs Java Spearman:

    Signal Before After Per estate (CardDemo / CBSA / GenApp)
    io 0.24 0.87 0.90 / 0.91 / 0.68
    ipc n/a (all zero) 0.84 —
  • Medians: io 0 → 2 (COBOL 4); ipc 0 → 4 (COBOL 4).

  • Holes: COTRTLIC's one untranslated statement now counts as planned debt.

  • Model-written ports: these use the same CicsTask API, so 13 of 23 gained io and 15 gained ipc. Their api, planned_debt and tech-debt readings are unchanged.

Docs

  • docs/io_rule_contract.md gets a new section on translated programs.
  • signal_contracts.py (and its rendered sheet) notes that a comment-stream rule may own a code shape.

Tests

  • New test_java_strict.py cases cover each det-port shape (positive), its nearest non-operation (negative), and ReDoS immunity.
  • Locally, tests/extraction, tests/core_engine, the signal suites, the crucible pins and the dead-key audit all pass: 11,258 passed before the sheet re-render; the re-rendered sheet test also passes. The ruff audit shows no new findings.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

…ntrol and open work

A det port names no File or Connection: its READ / WRITE / EXEC CICS / EXEC SQL are calls into
cobolrt, so a scan read every port as having no I/O (median 0 against the COBOL's 4).

- io: the CICS file, browse, queue and counter operations on the task (a store's wiring excluded),
  DetSql's statements (close/closeAll/reset are cleanup), and a batch FD's operations in the shapes
  det/gen.py writes (a COBOL open mode or a numeric record length anchors them).
- ipc_rpc_bridges: task.link / xctl / returnTransid (COBOL's LINK / XCTL / RETURN); not task.start,
  which kafka and elasticsearch use for their own worker tasks.
- planned_debt: an untranslated statement, `if (true) throw new Hole("...")`; the runtime's guards
  (`default -> throw new Hole(`) are not debt.

Measured: 0 new hits on 47,701 ordinary Java files (gradle, jenkins, kafka, elasticsearch, spock).
On the 49 det ports of the scan-parity study the COBOL-vs-Java Spearman for io rises 0.24 -> 0.87,
ipc reads 0.84 (was all zero), and COTRTLIC's one hole is counted. Contract: docs/io_rule_contract.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit ed12b97 into main Oct 2, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the feat/scan-cobolrt-io branch October 2, 2026 19:11
squid-protocol added a commit that referenced this pull request Oct 2, 2026
…4163/#4164

Spearman now gives tied values their average rank (I/O rho 0.24, not -0.03);
records the I/O and IPC agreement after #4163 (0.87 / 0.84).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
squid-protocol added a commit that referenced this pull request Oct 2, 2026
* docs(wiki): COBOL <-> Java scan parity -- what GitGalaxy sees before and after a port

49 programs from CardDemo, CBSA and GenApp scanned as COBOL, as the proven
deterministic Java port and (23 CardDemo programs) as the model-written port:
structure keeps its rank (functions rho 0.94, branches 0.83, mutations 0.76),
size and token mass do not, I/O moves into the cobolrt runtime, risk scores
rank within one language only. Method, tables, scanner and translation lessons,
and the follow-ups in progress.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

* docs(wiki): scan parity -- tie-corrected Spearman, follow-ups #4162/#4163/#4164

Spearman now gives tied values their average rank (I/O rho 0.24, not -0.03);
records the I/O and IPC agreement after #4163 (0.87 / 0.84).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

* docs(wiki): scan parity -- COTRTLIC keeps one hole (dynamic CALL); 48 of 50 cases prove

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant