Skip to content

det: the SQLCA read as bytes is held big-endian under the default switch (Part of #7646) - #7875

Merged
squid-shepherd[bot] merged 11 commits into
mainfrom
churn/7646-20261106T0620Z
Nov 8, 2026
Merged

squid-shepherd[bot] merged 11 commits into
mainfrom
churn/7646-20261106T0620Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Part of #7646 (slice 2: the SQLCA's COMP-5 bytes). Built on #7870's branch (register C7 note); that merge commit is the only unrelated content here.

One port changes (carddemo-cotrtupc). Its proof differed by exactly the byte order; the comparator slice (2nd commit) now reads that, and the case PROVES again.

What it does

A program that reads the SQLCA as bytes (MOVE SQLERRM TO T, MOVE SQLCA TO T, SQLERRM(1:2)) now holds the SQLCA's COMP-5 items (2+ bytes: SQLERRML, SQLCODE-adjacent halfwords) big-endian under the default (zos_comp5=None, auto), as z/OS does. Mechanism:

  • det/gen.py: Gen.sqlca_extents, sql_handoff, sqlca_bytes. field_expr sets sqlca_bytes when a byte view overlaps those items.
  • det/program.py: SqlcaBytesRead raised from _attempt; translate() retries with SQLCA_HOLD set, which adds the items to comp5_held. If the retry meets a zos_comp5 refusal it falls back to the oracle's order (no Hole yet, see Sibling gaps).
  • det/sql.py: the SQL lane's own SQLCA group hand-off is excluded (sql_handoff), otherwise 70 ports move.
  • Explicit zos_comp5=False is unchanged (GnuCOBOL-native what-if).

File-cap exception: the translator change (4 files) and the comparator reading (3 files) cannot land apart: the port change alone turns the cotrtupc proof red in the nightly sweep and Evidence Refresh.

Evidence

  • det_port.py check: 1 of 270 ports moves (carddemo-cotrtupc, STRING ... SQLERRM). cotrtlic and its generated case do not move: CSDB2RPY.cpy names SQLERRM only in a comment.
  • cotrtupc proof before the comparator slice: DIFFERED only at screen.ERRMSG, 0\x00 vs \x000 (the two SQLERRML bytes).
  • Comparator slice: equivalence_common.comp5_zos_text reverses, on the ORACLE side only and only under a declared comp5_byte_order, each halfword n, 0 (n 1-70, SQLERRML's range) in screen fields and SEND TEXT. The port's text is untouched, so a port that kept the oracle's order still differs (unit test). carddemo-cotrtupc/case.json declares comp5_byte_order. det_port.py run carddemo-cotrtupc: 436/436 translated, PROVED. No evidence.json is committed for this case, so there was no --record file to refresh; Evidence Refresh regenerates it.
  • Residual: the rule reads any n, 0 pair in declared cases' text, not only ones traced to SQLERRM; screens of this case carry no other NUL bytes.
  • Tests: test_det_zos_comp5.py (3 byte reads get the wrapper by default, none with explicit False; 3 number/text reads get none). Register C7.md updated.

Class / Sibling gaps

Class member Status
SQLCA COMP-5 read as bytes, default auto this PR
Comparator reading of a screen/message field built by STRING over SQLERRM under comp5_byte_order this PR (2nd commit)
COMP-5 item passed BY REFERENCE to a CALLed program gap
LINK / XCTL COMMAREA covering a COMP-5 item gap
SQLCA byte reader that meets a zos_comp5 refusal falls back to oracle order with no Hole gap
HFP byte view of COMP-1 / COMP-2 gap
Census T3 on #7709 not run

Sibling gaps: the five rows above marked gap / not run; none filed by this PR.

Remaining slices

The sibling gaps above (none blocks this PR).

Checklist: partial [c:c95c362b] -- SQLCA bytes and cotrtupc re-proof done; the other sibling gaps and census T3 remain.

Owner decisions

Owner ruling 2026-11-04: COMP-5 follows z/OS byte order by default (option B). The det port holds COMP-5 big-endian, as z/OS does, for every program, not only where a byte view would otherwise be refused. Rationale: one representation (no per-program hidden mode); no byte-order mismatch when COMP-5 crosses a COMMAREA, file or CALL boundary; IBM is the reference and GnuCOBOL the instrument (#4702). The oracle's little-endian bytes are a declared difference (#7725, #7729, #7733). zos_comp5=False stays an explicit GnuCOBOL-native what-if.

Gates

Not run here: golden bless (no parser change). Run: pr_gates --fast 9/9 pass, 69 targeted tests, the cotrtupc proof, det_port.py check, ruff format on changed files, mypy.

Lessons for agents

  • sql.py hands the SQLCA group through field_expr, so any new SQLCA-byte detection must skip that call (sql_handoff) or ~70 ports move.
  • Test stubs such as _Gen in test_sql_whenever.py lack new Gen methods: use attributes set from the caller, not new methods.

Cross-repo

None: no companion PR in another repo.

🤖 Generated with Claude Code

squid-protocol and others added 6 commits November 6, 2026 01:07
… COTRTUPC / COTRTLIC STRING SQLERRM) (Part of #7646)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… under the default switch (Part of #7646)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…lt screen text as z/OS holds it; cotrtupc declares it and proves (Part of #7646)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… SQLERRML in screen / SEND TEXT text (Part of #7646)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 6, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 6, 2026 07:27
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 6, 2026 07:27
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot disabled auto-merge November 6, 2026 08:11
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

PR #7875 @ d09f3d8: 1 failed check(s)

== det (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/42180993963/job/127783818508
repro: tests/tools/box/heavy-run.sh python tests/tools/proof_sweep.py --det-only --skip-db2 --cases --work /tmp/gitgalaxy-scratch/ci-digest/sweep
errors:
warning: coverage ledger: cruc-hc-eoc-error: stale (harness changed); refresh when convenient
warning: coverage ledger: cruc-hc-ignore-error: stale (harness changed); refresh when convenient
##[error]Process completed with exit code 1.
log tail:
compression-level: 6
overwrite: false
include-hidden-files: false
archive: true
env:
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
##[endgroup]
With the provided path, there will be 270 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: det-sweep-ledger.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 223140
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is c0968817b08ff76cb7b937b7d2f7f25680b575d58473f8ab8c5bc25f35442c13
Finalizing artifact upload
Artifact det-sweep-ledger successfully finalized. Artifact ID 13487625638
Artifact det-sweep-ledger has been successfully uploaded! Final size is 223140 bytes. Artifact ID is 13487625638
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/42180993963/artifacts/13487625638
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/4fa580aa-28cd-4ce2-b10e-a21ea930e6b0' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@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 6, 2026
squid-protocol and others added 2 commits November 7, 2026 13:09
…t of #7646)

Its case.json gained declared_differences [comp5_byte_order] in this PR, so the
ledger entry went stale (CI det: 'sweep: 1 unexpected'). Local Db2 sweep:
PROVED on 54 scenarios, 63/63 paragraphs, 140/166 branches -- coverage unchanged,
only the input fingerprints move. Also regenerates docs_read_by_tests.txt (#8026).

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

squid-shepherd Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (39bf8a7) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd squid-shepherd Bot removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 7, 2026
@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 7, 2026 18:19
@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 7, 2026
@squid-protocol
squid-protocol marked this pull request as ready for review November 7, 2026 22:14
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Nov 7, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 7, 2026 22:15
@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 8, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 8, 2026 20:37
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Nov 8, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (416a212) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 8, 2026 20:37
auto-merge was automatically disabled November 8, 2026 20:37

Pull request was converted to draft

@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (416a212) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 8, 2026
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 8, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 8, 2026 21:19
@squid-shepherd squid-shepherd Bot added shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Nov 8, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 8, 2026 21:20
Picks up #8133 (assert_linear meta-test on a deterministic fake clock), whose
timing flake failed full-suite part 2/3 on this PR.

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

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 8, 2026
squid-shepherd Bot pushed a commit that referenced this pull request Nov 8, 2026
…n) (#8137)

test_the_committed_list_is_fresh kept failing PRs that moved faster than the committed list
(#7875's approved head, and others). Paused with a skip marker, not deleted: the list and its
generator stay, and the planners that read it keep working; re-enable by deleting the marker.
While paused, the list can lag the code, so a docs-only change could skip a test that reads the
changed doc; refresh with tests/tools/change_classifier.py --write. It is fresh as of this commit.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@squid-shepherd
squid-shepherd Bot merged commit c58cb3a into main Nov 8, 2026
67 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/7646-20261106T0620Z branch November 8, 2026 22:14
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