Skip to content

HLASM slice 4: independent POPS interpreter cross-checks the lowering (Part of #5859) - #6934

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/5859-20261028T1917Z
Oct 28, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/5859-20261028T1917Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

What

Slice 4 of the assembler path (#5859): an independent interpreter for the HLASM subset, used to cross-check det/hlasm.py. The oracle proves the det port of the lowered COBOL, not the lowering (design-doc assumption 1); this adds a check of the lowering that has no COBOL in it.

  • tests/tools/hlasm_interp.py (new): written from the Principles of Operation only, imports nothing from det/ (so the translator fingerprint does not move). EBCDIC cp037 storage, 32-bit registers, real condition code, EXEC CICS as recorded events.
  • tests/cobol_mainframe/test_hlasm_interp_5859.py (new, 70 tests, 0.1 s): every CH mask of the lowering's branch condition vs the interpreter over boundary pairs (masks 1 and 14 are refused by name); CLI/CLC/OC/XC/SR condition codes; the IC/SLL/SLDL/STCM/BAS semantics the Base64 decoder leans on; MVC overlap; ZECS002's end COMMAREA and CICS event sequence for all 11 zecs-zecs002 scenarios against the GnuCOBOL run of the lowering (pinned from a det_port.py run, 511/511 PROVED).
  • docs/language_status/hlasm_cics_design.md: Status / Remaining refreshed (cases exist, slice 4 partial).
  • tests/tools/ladder_exclusions.py: the ZECS002 reason said "no equivalence case yet"; it has one. Text only; the entry and its kind are unchanged.

Finding

The lowering stores MVC CA_RC,=C'00' as ASCII text (3030); z/OS stores EBCDIC F0F0. Same characters, other encoding: the known cost of assumption 3. The test normalises that two-byte field and nothing else; every other COMMAREA byte is identical in all 11 scenarios.

Class and siblings

Class: the lowering's fidelity to POPS rests on regex unit tests only. Fixed here: the branch-condition and ZECS002 end-state mechanism. Sibling gaps: ZECSNC's 7 scenarios are not run through the interpreter (needs zecs-zecsnc); a per-instruction differential under cobc (Docker-only on this box); an X register entry for ZECSNC assumption 1. Non-burned estates are out of scope.

Remaining slices

  1. Per-instruction differential interpreter vs lowered COBOL under cobc. 2. ZECSNC scenarios through the interpreter.

Checklist: partial [c:e14a97c1] -- the cobc differential and ZECSNC scenarios through the interpreter are left

Gates

New + lowering + exclusions tests 150 passed; pr_gates --fast 9/9; time ratchet PASS; audit_check.py all clear. No engine code changed, so no golden bless.

Lessons for agents

The zecs-zecs002 case's encoded field is EBCDIC base64 at COMMAREA offset 20, not ASCII at 12.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 28, 2026 15:33
… (Part of #5859)

tests/tools/hlasm_interp.py interprets the lowering's subset from the Principles of
Operation alone (EBCDIC storage, 32-bit registers, real condition code, EXEC CICS as
events). The test compares CH branch conditions of the lowering with it, pins the
instruction semantics the Base64 decoder uses, and checks ZECS002's end COMMAREA and
event sequence for all 11 scenarios against the GnuCOBOL run of the lowering. One
difference surfaced: CA_RC is ASCII text in the lowering, EBCDIC on z/OS.

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 Oct 28, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 28, 2026 19:36
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 28, 2026 19:37
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 28, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6934 @ e689ddf: 1 failed check(s)

== shepherd (label event) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40756128515/job/123055400388
repro: python tests/tools/pr_gates.py --fast
errors:
fail-on-cache-miss: false
##[error]Process completed with exit code 1.
log tail:
Cache restored successfully
Cache restored from key: flake-history-40692939546
##[warning]Input 'app-id' has been deprecated with message: Use 'client-id' instead.
##[group]Run actions/create-github-app-token@bcd2ba4
with:
app-id: ***
private-key: ***
skip-token-revoke: false
github-api-url: https://api.github.com
##[endgroup]
Inputs 'owner' and 'repositories' are not set. Creating token for this repository (squid-protocol/gitgalaxy).
##[group]Run python3 tests/tools/shepherd_gh.py event --event-path "$GITHUB_EVENT_PATH" --flake-cache flake-cache/flake_history.json
python3 tests/tools/shepherd_gh.py event --event-path "$GITHUB_EVENT_PATH" --flake-cache flake-cache/flake_history.json
shell: /usr/bin/bash -e {0}
env:
GH_TOKEN: ***
SHEPHERD_TRUSTED_BOTS: squid-shepherd[bot],squid-protocol
##[endgroup]
#6934 approval marker for e689ddf: ok
#6934 ci-gate pending: waiting on: full-suite part 1/2, full-suite part 2/2, ground-truth, shard 1/3, shard 2/3, shard 3/3: FAILED: gh: Resource not accessible by integration (HTTP 403)
##[error]Process completed with exit code 1.
##[warning]Input 'app-id' has been deprecated with message: Use 'client-id' instead.
Post job cleanup.
Token revoked
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/1ff80b12-506f-455d-8008-e6200c9457be' 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 Oct 28, 2026
@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 Oct 28, 2026
@squid-shepherd
squid-shepherd Bot merged commit cde0fc2 into main Oct 28, 2026
62 of 66 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/5859-20261028T1917Z branch October 28, 2026 20:08
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