Skip to content

det: translate(zos_comp5=True) holds COMP-5 big-endian and lifts the byte-use refusals (Part of #5865, #7646, slice 2 of 3) - #7673

Merged
squid-shepherd[bot] merged 7 commits into
mainfrom
churn/7646-20261104T0815Z
Nov 4, 2026
Merged

squid-shepherd[bot] merged 7 commits into
mainfrom
churn/7646-20261104T0815Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5865, #7646 (slice 2 of 3). Stacked on #7671 (slice 1, the runtime switch Cobol.swapZosComp5).

Cross-repo: none; no companion PR in another repo.

What

det.program.translate(..., zos_comp5=True) holds COMP-5 big-endian as z/OS does, and only then lifts the refusals of a COMP-5 item's bytes (the oracle's bytes are the reverse: a declared difference the harness must state, slice 3). Default off: no port moves, no golden change.

  • layout.py: COMP5_BIG context variable; the VALUE image (encode_number) is written in that order.
  • program.py: translate(zos_comp5=) sets it (sibling services included); lifted-item init order follows it; every entry is wrapped in Cobol.swapZosComp5(true) / restore (with_trunc); zos_comp5_refusal refuses by name a program using EXEC SQL, CEE* / DSNTIAC, a CALL outside its source, or a CICS LINK / XCTL (their COMP-5 bytes are the runtime's, little-endian).
  • gen.py: Gen.zos_comp5 lifts the reference-modification refusal; group MOVE / REDEFINES / record / 88 refusals lift because comp5_extents stays empty under the switch.
  • docs/language_status/register/C7.md: what is wired and what is not.
  • Tests: tests/cobol_mainframe/test_det_zos_comp5.py (11): six byte-use shapes (group, REDEFINES x3 sizes, refmod, OCCURS, REDEFINES to COMP) refused by default / translated under the switch with the wrapper; the VALUE image both orders; SQL, CEEDAYS, DSNTIAC, foreign CALL refused.

Class / Sibling gaps

Class: every det-port site that reads or writes a COMP-5 item's bytes, or its byte order, in the translator. Members:

Member Status
group MOVE over COMP-5 (gen.check_lift / field_expr overlap) handled under switch, test
REDEFINES overlay of COMP-5 handled under switch, test
reference modification of COMP-5 handled under switch, test
file / sort record holding COMP-5 (check_record_bytes) lifted with the same extents; no file-record test here (harness slice)
88 on an item overlaying COMP-5 (cond_field) lifted with the same extents
VALUE image and lifted-item init order handled, test
entry wrapper restoring the caller's order handled, test
SQLCA / DetSql.putInt / sql.py SQLCODE / Dsntiac / CEE* refused by name under switch (stay little-endian)
CALL outside the source, CICS LINK / XCTL refused by name under switch

Sibling gaps (not done here, different mechanism): (1) harness declared_differences field and comparator reversal, so a case can run with the switch (slice 3); (2) HFP byte view for COMP-1 / COMP-2 (runtime stores HFP, translator still refuses, oracle bytes are IEEE); (3) a real GnuCOBOL proof of a COMP-5-byte program under the switch (needs the comparator), and the census re-run; (4) CALL / LINK between programs both on the switch (bytes cross consistently only inside one source today); (5) record-file COMP-5 bytes are lifted but unproven end to end.

Remaining slices: slice 3 of 3: tests/tools/equivalence.py (+ case schema) declared_differences, the comparator's byte reversal, one burned case proven under it, HFP view, census re-run.

Evidence

pytest tests/cobol_mainframe/test_det_zos_comp5.py 11 passed; test_det_programs.py -k "comp5 or overlap or trunc" 25 passed. Translation only: no oracle run, so nothing here is proven; it is translated-under-a-declared-difference. Gates: see the report below.

Lessons for agents

  • A bare cat > file in a Bash call blocks on stdin and times out; use printf or a quoted heredoc.

Co-Authored-By: Claude Sonnet 5.5 [email protected]

File-cap exception: stacked on #7671 (base is its branch); against that base this PR touches 5 hand-written files. The other files (Cobol.java, Codec.java, test_det_programs.py) are #7671's.

🤖 Generated with Claude Code

squid-protocol and others added 5 commits November 4, 2026 02:57
…tch; the oracle difference is a byte reversal (Part of #5865, #7646)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…byte-use refusals under that declared difference (Part of #5865, #7646)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…api.py generate (Part of #5865, #7646)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…th main)

Resolutions:
- register/C7.md: the PR's text (the switch is wired in slice 2; it names the SQLCA / Dsntiac /
  LE / CALL / LINK refusals that main's "not wired yet" note asked for).
- test_det_programs.py: main's side (its javac/java calls carry the UTF-8 flags
  test_java_subprocess_utf8 requires).
- cobolrt_api.json: main's copy regenerated with `cobolrt_api.py generate --promote-used`.
  Cobol.swapZosComp5 becomes public: the translator now emits it, and an emitted internal
  member fails `cobolrt_api.py --check` (as swapTruncBinary / swapNumprocPfd are public).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol
squid-protocol changed the base branch from churn/7646-20261104T0750Z to main November 4, 2026 16:15
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 4, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

squid-shepherd Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

PR #7673 @ 4a1c61e: 1 failed check(s)

== squid-protocol.gitgalaxy (action_required) -- real
https://github.com/squid-protocol/gitgalaxy/runs/126698221037
repro: python tests/tools/pr_gates.py --fast
log tail:

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 4, 2026
@squid-protocol
squid-protocol marked this pull request as ready for review November 4, 2026 16:36
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

…le Azure 'skipped due to merge conflicts' check holds ci-gate on 4a1c61e)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-shepherd

squid-shepherd Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 4, 2026 17:17
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 4, 2026
@squid-shepherd
squid-shepherd Bot merged commit 29fa23c into main Nov 4, 2026
55 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/7646-20261104T0815Z branch November 4, 2026 18:09
squid-protocol added a commit that referenced this pull request Nov 4, 2026
…-gate (#7673) (#7732)

azure-pipelines.yml has `pr: none`, so Azure never validates a PR; on a PR it sees as
conflicting it still posts action_required "Skipped due to merge conflicts" and never
replaces it. After #7673's conflict was fixed, that run held ci-gate red with all 37 other
checks green, and only a new head freed it. pr_check.classify now treats action_required
from an app in NO_PR_APPS as neutral (a conflict is read from mergeable_state); an Actions
action_required and a real Azure failure still fail. Replayed on #7673's stuck head
4a1c61e: 53 runs, failed [] (was the Azure run).

Co-authored-by: Joe Esquibel <[email protected]>
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

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant