Repository navigation
Fix #4001: BMS output fidelity in the stub and CicsTask (9 cobol-stub cells) - #4021
Merged
Merged
Conversation
Contributor
squid-protocol
force-pushed
the
fix/4001-bms-output-fidelity
branch
4 times, most recently
from
September 29, 2026 19:48
4e3fbb9 to
9f544f9
Compare
… cells) A new harness BMS model (tests/tools/cics_bms.py) reads the BMS source (DFHMSD / DFHMDI / DFHMDF with continuations) and resolves a SEND MAP the way BMS builds the output screen (crucible SPEC 6.3): each field's attribute from the program's byte unless MAPONLY or the byte is X'00'/X'80'/X'02'/X'82', else the DFHMDF ATTRB (3270 graphic encoding); data from the program unless its first byte is null, else the map INITIAL; colour / highlight from the field, then the map, then the mapset; DATAONLY omits fields BMS sends nothing for; the cursor from CURSOR(n), symbolic positioning (length -1 + CURSOR) or IC. RECEIVE MAP input is justified per JUSTIFY / NUM, and an erased field comes back with length 0 and DFHBMEOF. Stub side: the DFHBMSCA stand-in holds each constant as its EBCDIC byte, so names, hex literals and bit arithmetic give mainframe bytes, compared as EBCDIC; the translator passes CURSOR's value and the stub logs it; the runner decodes the symbolic map (L, F/A, C, H, O) and resolves it through the model. Java side: CicsTask.sendMap(map, mapset, screen, MapSubfields, options...) records the mapset, sorted options, per-field attribute / colour / highlight bytes and lengths, and CURSOR(n); the runner resolves it through the same model. The port tickets describe the API. Unlocks hx-attr-bytes (3), hx-extended-cursor (3) and pc-wizard (3) cobol-stub cells: 53 pass, 38 fail, 3 unsupported on main after #4006. Part of #3989. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EC8FWfn3aPmsUPnRgKNVup
squid-protocol
force-pushed
the
fix/4001-bms-output-fidelity
branch
from
September 29, 2026 20:10
9f544f9 to
1d73d61
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4001
Part of #3989 (phase 3, lane A)
What changed
The harness's BMS model is a new file,
tests/tools/cics_bms.py. It is the harness's own reading of BMS, independent of the engine's parser. It reads the BMS source (DFHMSD / DFHMDI / DFHMDF, including column-72 continuations, quoted INITIALs with''and commas, and DSATTS) and resolves a SEND MAP the way BMS builds the output screen (crucible SPEC 6.3, IBM "Building the output screen" and "SEND MAP"):CURSOR(n)gives{"offset": n}.CURSORalone gives the first field whose length is -1 (symbolic cursor positioning). Otherwise, without DATAONLY, it is the IC field.Stub side (cobol-stub)
tests/equivalence/cics/DFHBMSCA.cpynow holds each constant as its EBCDIC byte: DFHBMPRO is X'60', not the ASCII-, and DFHRED is X'F2', not2. A DFHBMSCA name, a hex literal (MOVE X'3C' TO RAWA) and bit arithmetic (DFHBMUNP+ 1 = X'41') therefore all give the byte a mainframe holds. Attribute, colour and highlight bytes are compared as those EBCDIC bytes; data is transcoded from the runtime's page as before.CURSOR(n)inGG-LEN(-1 when no value is given), andGGCSMAPlogscursor=.cics_crucible.Screendecodes the symbolic map (<f>L,<f>F/A,<f>C,<f>H,<f>O) and resolves it through the model.Screen.receive_input) instead ofequivalence_cics.map_input. CardDemo keepsmap_inputunchanged.COBOL_CAPSmodels every SEND-MAP key, field key and DATAONLY omission.Java side (CicsTask)
sendMap(map, mapset, screen, MapSubfields, String... options).CicsTask.MapSubfieldsholdsattr/color/hilightas EBCDIC byte values,length(cursor(field)sets it to -1) andcursorAt(offset).sendMap(map, screen)still works.java_send_map), andJAVA_CAPSmodels every SEND-MAP key.Crucible cells
Before is main at 99450e5 (after #4006); after is this branch, rebased there.
hx-attr-bytes: first-display, echo-dataonly and clear-maponly;hx-extended-cursor: bad-account, good-entry and pf5-blink;pc-wizard: happy-post, back-and-fix and mapfail-clear-cancel. These were blocked only on BMS once CICS harness: TS queues READQ/WRITEQ TS (unlocks 9 cobol-stub cells) #4002 landed.run_taskbuilds RECEIVE MAP input and resolves SEND MAP through the per-casecase_screenscache.baseline.json(41 cells now), and the report is regenerated.runTaskis not ported (Logic porting loop: bring-your-own LLM, human approval, proven by the equivalence harness #3753).Generated output
java_target_matrix.py --same-as origin/mainon CardDemo (default) reports exactly one changed build input,cics/CicsTask.java. The change is intended: it addssendMap(map, mapset, screen, MapSubfields, options...)andMapSubfields. Forge-compile passes in all 10 crucible cases. No golden-master fixtures change.Tests
tests/cics_crucible/test_cics_bms.py(new, no Docker or JDK) covers:test_cics_crucible_runner.pycovers the stub's symbolic-map bytes resolved into fields and cursor, justified and erased RECEIVE MAP input, and a CicsTask SEND-MAP event resolved like the stub's.test_cics_endpoints.pychecks that the generatedCicsTaskhas the new API.Verification
cics_crucible.py --ciis green against the lowered baseline: 53 pass, 38 fail, 3 unsupported.EQUIVALENCE_E2E=1,tests/cics_crucible,test_equivalence_cics.pyandtest_cics_endpoints.pypass 85 of 85. The CardDemo account view is still equal on every event with the EBCDIC DFHBMSCA stand-in.gitgalaxy.core.source_text.read_source, and CicsTask text becomes EBCDIC with X'3F' (SUB) for a character CCSID 037 lacks, never a lossyerrors=(Decoding foundation: read_source (BOM / strict UTF-8 / UTF-16 / declared / cp1252-Latin-1 fallback), per-file source_encoding, no errors=ignore anywhere (lint gate) #3813's guard,tests/test_source_reads.py).ruff formatis clean on the touched files, andtool_regex_redos --cireports 0 offenders. The BMS reader uses no regexes; it scans characters.🤖 Generated with Claude Code