Skip to content

HLASM lowering: rename reserved-word symbols; zecs002 case deferred (Part of #5859, slice 3e) - #6910

Merged
squid-shepherd[bot] merged 5 commits into
churn/5859-20261028T1538Z-regraftfrom
churn/5859-20261028T1613Z
Oct 28, 2026
Merged

squid-shepherd[bot] merged 5 commits into
churn/5859-20261028T1538Z-regraftfrom
churn/5859-20261028T1613Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5859, slice 3e. Stacked on #6905 (its slices 3c/3d are in this diff until it merges; the file cap counts only this slice's 4 hand-written files: det/hlasm.py, test_hlasm_lowering_5859.py, ggcics.c, ladder_exclusions.py).

Class

HLASM field and label names spelled like a COBOL reserved word (PASSWORD, DATE, TIME, FILE, KEY, LABEL, STATUS ...). The lowering emitted them verbatim, so cobc rejected the lowered source. _cobol() now renames them with a -HL suffix at every declaration and use, and refuses the program if the renamed name collides with another symbol.

What changed from the plan

The plan expected the zecs-zecs002 ladder case to run after the rename. It does not: ZECS002 converts USERID with TR A_TO_E, so the USERID holds EBCDIC bytes, and the fault plan (faults.cfg, VERIFY USERID NTH RESP RESP2) is ASCII-only. The harness stops with "VERIFY PASSWORD with no stated verdict". Fixing that touches the stub, the forge and the validator and regenerates 155 CICS ports, well past the file cap, so the case is not committed. The ladder_exclusions.py reason says why. GGCVER now refuses with the userid named instead of failing opaquely.

Checklist: partial [c:e14a97c1] -- ZECS002 lowers and compiles; no equivalence case until the EBCDIC verdict key exists
Checklist: partial [c:f5d905de] -- unchanged, ZUIDSTCK frontier

Sibling gaps

  • VERIFY fault-plan key has no EBCDIC/hex form (blocks zecs002 and any program that converts the userid).
  • The reserved-word list is hand-curated, not checked against cobc (none installed on this box).
  • Java-side naming of renamed fields is untested.
  • VERIFY PHRASE / TOKEN stay refused.
  • Possible stub gaps not yet exercised: @tdq@ queue literal, FORMATTIME YYYYMMDD/DATESEP/TIMESEP.

Remaining slices

  1. EBCDIC-aware VERIFY verdict key across stub, forge and validator; then commit the zecs-zecs002 case, equivalence.py run --record, det_port, ledgers, drop the exclusion.
  2. Interpreter cross-check (hlasm_interp.py does not exist; over the file cap).
  3. Stub gaps above, if the case exposes them.

Gates

audit_check clear (ruff, mypy, dead-key, format); 73 hlasm lowering tests pass; pr_gates --fast 8/9 on the run before the last commit, the failing lint gate being the SIM905 finding fixed in the final commit (not re-run in full). Not run: crucible_check / golden bless (det translator is not in the golden path), det_port check and the equivalence run (no cobc on this box). Cross-repo: none.

Lessons for agents

  • A new HLASM symbol spelled like a COBOL reserved word breaks cobc; rename in _cobol(), never at call sites.
  • faults.cfg is ASCII-only: a program that converts its USERID to EBCDIC cannot state a VERIFY verdict.
  • A hook blocks any command containing find /.

🤖 Generated with Claude Code

squid-protocol and others added 5 commits October 28, 2026 15:54
…n module tree (Part of #6266) (#6899)

* call_resolver: a ctor-init tie keeps the class fewest include hops away (Part of #6266)

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

* DOOM-rosetta: re-bless doomsday callgraph_misses 74 -> 73 (Part of #6266)

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

* Include resolution: generated forwarder headers and the importer's own module tree (Part of #6266)

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

* DOOM-rosetta: re-bless doomsday callgraph_misses 73 -> 70 (Part of #6266)

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

* DOOM-rosetta: re-bless doomsday after merging main (Part of #6266)

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

* DOOM-rosetta: oracle drops branches on toggles no file defines, as the engine does (Part of #6266)

#6870 made the engine drop preprocessor branches on toggles no C file or build file
defines; the oracle kept them, so 19 ports went red. The oracle now reads the same toggle
table (the engine's file selection, vendored libraries excluded) and evaluates #if/#ifdef
with the engine's _directive_value. Where tree-sitter pairs a conditional with the wrong
#endif or splits an if head over #else, the function is read by its directive lines.

Re-blessed every port. 18 licensed ports reach 0 misses / 0 engine-only; doom3-bfg,
fastdoom and gzdoom keep callgraph in expected_fails for engine defects (vcxproj toggles
unread; a function-like macro expanded at its own definition).

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

* DOOM-rosetta: re-bless doomsday after merging main (Part of #6266)

The merge conflict on the binary golden is resolved by a rescan of the merged head:
callgraph_unscored 4668 -> 4664; misses 46 and engine-only 67 unchanged.

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

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
…> 52 of 70 (Part of #6882) (#6900)

* CICS fault vocabulary: SET / INQUIRE TERMINAL faults, CBSA SET arms (Part of #6882)

A scenario can plan TERMIDERR (RESP2 23) or INVREQ (RESP2 43) on SET TERMINAL
and TERMIDERR (RESP2 1) on INQUIRE TERMINAL, as DELAY does (X72): the stub's
injected() and the port's task.planned() read the same line, a planned fault
means the command is not performed. Four CBSA scenarios reach BNK1CCS 415/1134
and BNK1DCS 532/1676 (net branches 126->128 of 143 and 93->95 of 102).

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

* CICS fault vocabulary: RUN TRANSID and FETCH ANY faults, CBSA CRECUST 46 -> 52 of 70 net branches (Part of #6882)

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

* strengthen-loop fault-command test: plan the SET/INQ TERMINAL, RUN TRANSID and FETCH ANY conditions (Part of #6882)

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

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
…SSWORD) (Part of #5859, slice 3e)

cobc stops at a DSECT field named PASSWORD (unexpected PASSWORD); _cobol() now gives a reserved-word symbol a -HL suffix and refuses a rename that collides with another symbol. GGCVER names the USERID it found no verdict for.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…613Z

# Conflicts:
#	tests/tools/equivalence_cics_faults.py
@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 16:40
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 93374d1 into churn/5859-20261028T1538Z-regraft Oct 28, 2026
5 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/5859-20261028T1613Z branch October 28, 2026 16:44
squid-shepherd Bot pushed a commit that referenced this pull request Oct 28, 2026
…lice 3c) (#6905)

* EXEC CICS VERIFY PASSWORD: ZECS002 translates whole (Part of #5859, slice 3c)

Regraft of #6902 onto current main.

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

* EXEC CICS VERIFY PASSWORD: stub GGCVER, fault-plan validation (Part of #5859, slice 3d) (#6907)

The cobol-stub side models VERIFY PASSWORD: GGCVER looks up the verdict a
scenario states for the trimmed USERID and records one VERIFY-PASSWORD event;
the password is never passed (register X32). equivalence_cics_faults.py accepts
only NORMAL / USERIDERR / NOTAUTH / INVREQ and no RESP2. The zecs-zecs002 case
is not in this commit: GnuCOBOL reserves PASSWORD and the HLASM lowering emits
the DSECT field verbatim (see PR body).

Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* test_strengthen_loop: plan VERIFY's fault by its userid, NOTAUTH with no RESP2 (Part of #5859)

The PR added VERIFY to FAULT_COMMANDS but not to the test's fault tables, so
the parametrized case planned NOTAUTH/RESP2 101 on a file, which the X32
registry entry rightly refuses (ground-truth red on #6905).

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

* HLASM lowering: rename reserved-word symbols; zecs002 case deferred (Part of #5859, slice 3e) (#6910)

* Include resolution: generated forwarder headers and the importer's own module tree (Part of #6266) (#6899)

* call_resolver: a ctor-init tie keeps the class fewest include hops away (Part of #6266)

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

* DOOM-rosetta: re-bless doomsday callgraph_misses 74 -> 73 (Part of #6266)

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

* Include resolution: generated forwarder headers and the importer's own module tree (Part of #6266)

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

* DOOM-rosetta: re-bless doomsday callgraph_misses 73 -> 70 (Part of #6266)

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

* DOOM-rosetta: re-bless doomsday after merging main (Part of #6266)

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

* DOOM-rosetta: oracle drops branches on toggles no file defines, as the engine does (Part of #6266)

#6870 made the engine drop preprocessor branches on toggles no C file or build file
defines; the oracle kept them, so 19 ports went red. The oracle now reads the same toggle
table (the engine's file selection, vendored libraries excluded) and evaluates #if/#ifdef
with the engine's _directive_value. Where tree-sitter pairs a conditional with the wrong
#endif or splits an if head over #else, the function is read by its directive lines.

Re-blessed every port. 18 licensed ports reach 0 misses / 0 engine-only; doom3-bfg,
fastdoom and gzdoom keep callgraph in expected_fails for engine defects (vcxproj toggles
unread; a function-like macro expanded at its own definition).

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

* DOOM-rosetta: re-bless doomsday after merging main (Part of #6266)

The merge conflict on the binary golden is resolved by a rescan of the merged head:
callgraph_unscored 4668 -> 4664; misses 46 and engine-only 67 unchanged.

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

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* CICS fault vocabulary: RUN TRANSID and FETCH ANY faults, CRECUST 46 -> 52 of 70 (Part of #6882) (#6900)

* CICS fault vocabulary: SET / INQUIRE TERMINAL faults, CBSA SET arms (Part of #6882)

A scenario can plan TERMIDERR (RESP2 23) or INVREQ (RESP2 43) on SET TERMINAL
and TERMIDERR (RESP2 1) on INQUIRE TERMINAL, as DELAY does (X72): the stub's
injected() and the port's task.planned() read the same line, a planned fault
means the command is not performed. Four CBSA scenarios reach BNK1CCS 415/1134
and BNK1DCS 532/1676 (net branches 126->128 of 143 and 93->95 of 102).

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

* CICS fault vocabulary: RUN TRANSID and FETCH ANY faults, CBSA CRECUST 46 -> 52 of 70 net branches (Part of #6882)

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

* strengthen-loop fault-command test: plan the SET/INQ TERMINAL, RUN TRANSID and FETCH ANY conditions (Part of #6882)

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

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* HLASM lowering: rename symbols spelled like a COBOL reserved word (PASSWORD) (Part of #5859, slice 3e)

cobc stops at a DSECT field named PASSWORD (unexpected PASSWORD); _cobol() now gives a reserved-word symbol a -HL suffix and refuses a rename that collides with another symbol. GGCVER names the USERID it found no verdict for.

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

* hlasm: build the reserved-word set with findall (SIM905)

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

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Joe Esquibel <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Oct 28, 2026
…) (#6923)

* EXEC CICS VERIFY PASSWORD: ZECS002 translates whole (Part of #5859, slice 3c)

Regraft of #6902 onto current main.

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

* EXEC CICS VERIFY PASSWORD: stub GGCVER, fault-plan validation (Part of #5859, slice 3d) (#6907)

The cobol-stub side models VERIFY PASSWORD: GGCVER looks up the verdict a
scenario states for the trimmed USERID and records one VERIFY-PASSWORD event;
the password is never passed (register X32). equivalence_cics_faults.py accepts
only NORMAL / USERIDERR / NOTAUTH / INVREQ and no RESP2. The zecs-zecs002 case
is not in this commit: GnuCOBOL reserves PASSWORD and the HLASM lowering emits
the DSECT field verbatim (see PR body).

Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* test_strengthen_loop: plan VERIFY's fault by its userid, NOTAUTH with no RESP2 (Part of #5859)

The PR added VERIFY to FAULT_COMMANDS but not to the test's fault tables, so
the parametrized case planned NOTAUTH/RESP2 101 on a file, which the X32
registry entry rightly refuses (ground-truth red on #6905).

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

* HLASM lowering: rename reserved-word symbols; zecs002 case deferred (Part of #5859, slice 3e) (#6910)

* Include resolution: generated forwarder headers and the importer's own module tree (Part of #6266) (#6899)

* call_resolver: a ctor-init tie keeps the class fewest include hops away (Part of #6266)

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

* DOOM-rosetta: re-bless doomsday callgraph_misses 74 -> 73 (Part of #6266)

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

* Include resolution: generated forwarder headers and the importer's own module tree (Part of #6266)

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

* DOOM-rosetta: re-bless doomsday callgraph_misses 73 -> 70 (Part of #6266)

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

* DOOM-rosetta: re-bless doomsday after merging main (Part of #6266)

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

* DOOM-rosetta: oracle drops branches on toggles no file defines, as the engine does (Part of #6266)

#6870 made the engine drop preprocessor branches on toggles no C file or build file
defines; the oracle kept them, so 19 ports went red. The oracle now reads the same toggle
table (the engine's file selection, vendored libraries excluded) and evaluates #if/#ifdef
with the engine's _directive_value. Where tree-sitter pairs a conditional with the wrong
#endif or splits an if head over #else, the function is read by its directive lines.

Re-blessed every port. 18 licensed ports reach 0 misses / 0 engine-only; doom3-bfg,
fastdoom and gzdoom keep callgraph in expected_fails for engine defects (vcxproj toggles
unread; a function-like macro expanded at its own definition).

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

* DOOM-rosetta: re-bless doomsday after merging main (Part of #6266)

The merge conflict on the binary golden is resolved by a rescan of the merged head:
callgraph_unscored 4668 -> 4664; misses 46 and engine-only 67 unchanged.

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

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* CICS fault vocabulary: RUN TRANSID and FETCH ANY faults, CRECUST 46 -> 52 of 70 (Part of #6882) (#6900)

* CICS fault vocabulary: SET / INQUIRE TERMINAL faults, CBSA SET arms (Part of #6882)

A scenario can plan TERMIDERR (RESP2 23) or INVREQ (RESP2 43) on SET TERMINAL
and TERMIDERR (RESP2 1) on INQUIRE TERMINAL, as DELAY does (X72): the stub's
injected() and the port's task.planned() read the same line, a planned fault
means the command is not performed. Four CBSA scenarios reach BNK1CCS 415/1134
and BNK1DCS 532/1676 (net branches 126->128 of 143 and 93->95 of 102).

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

* CICS fault vocabulary: RUN TRANSID and FETCH ANY faults, CBSA CRECUST 46 -> 52 of 70 net branches (Part of #6882)

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

* strengthen-loop fault-command test: plan the SET/INQ TERMINAL, RUN TRANSID and FETCH ANY conditions (Part of #6882)

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

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* HLASM lowering: rename symbols spelled like a COBOL reserved word (PASSWORD) (Part of #5859, slice 3e)

cobc stops at a DSECT field named PASSWORD (unexpected PASSWORD); _cobol() now gives a reserved-word symbol a -HL suffix and refuses a rename that collides with another symbol. GGCVER names the USERID it found no verdict for.

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

* hlasm: build the reserved-word set with findall (SIM905)

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

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* zecs-zecs002 case: VERIFY userid_hex, latin-1 fault logs (Part of #5859)

ZECS002 holds the USERID as EBCDIC bytes, so a plain-text VERIFY verdict could not
match it. `userid_hex` states the verdict for the field's own bytes; faults.cfg and
the fired-fault logs are read/written as latin-1 (COBOL stub) and UTF-8 (Java), split
on newline only. COBOL-reserved-word renaming (PASSWORD etc.) came with #6905.

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

* fact-crosscheck ledger: ZECS002.asm disagreements assigned hlasm-lowered-cobol (Part of #5859)

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

---------

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