Skip to content

CICS: a fullword GET / QUERY COUNTER over a counter past 31 bits is LENGERR RESP2 1/2/3 (Part of #4770) - #5213

Merged
squid-protocol merged 4 commits into
mainfrom
churn/4770-20261015T2121Z
Oct 15, 2026
Merged

squid-protocol merged 4 commits into
mainfrom
churn/4770-20261015T2121Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4770 (does not close it: cics-crucible case C3 and the pin bump are separate).

What

IBM's GET COUNTER / QUERY COUNTER pages say LENGERR is a warning: for a counter a DCOUNTER command made, past 31 bits, "the named counter server completes the operation", VALUE holds the low-order 32 bits (possibly negative), RESP2 1 (sign-bit overflow), 2 (too large by exactly 1 bit), 3 (by more than 1); "LENGERR can't occur at counter-at-limit". It never applies to DCOUNTER. Before: fullword QUERY refused the value; fullword GET handed it out whole with RESP NORMAL.

Now (both runtimes, both translators): RESP 22 with RESP2 1 / 2 / 3 and the low 32 bits written; a counter at its limit is NORMAL; QUERY COUNTER MINIMUM / MAXIMUM of a counter whose limits exceed a fullword is REFUSED by name. Register X30 records it with the ASSUMED points (numbering by high word, the GET advances the counter, the limits refusal).

Class table

Member Status
GET COUNTER past 31 bits (CicsTask.fullwordGet, ggcics.c GGCGCNT / GGCGCNX) done here
QUERY COUNTER value past 31 bits (CicsTask.queryCounter, GGCQCNT) done here
counter-at-limit (max + 1) reads NORMAL done here
GET / QUERY DCOUNTER never LENGERR, unchanged
COUNTER / DCOUNTER of one name: 202 both ways, either GET reads it pinned by tests (was assumed, untested)
UPDATE / REWIND COUNTER no value out, no LENGERR; unchanged
QUERY COUNTER limits past a fullword refused by name

Tests

tests/cics_crucible/test_counter_shared_namespace_4770.py (stub and CicsTask over one scenario list: 2^31-1, 2^31, 2^32-1, 2^32, 2^33, 2^40+1, 2^63+5, at-limit, limits past a fullword, 202 both ways), translator test in test_counter_ops_translate_5039.py; two older assertions that pinned the refusal / old text updated (test_cics_runtimes.py, test_det_translate.py).

Gates

pr_gates --fast 6/6, --ratchets 8/8 (none skipped), det_port.py check: every port's CicsTask.java moves (runtime text), only genapp-lgwebst5 changes otherwise; det_port.py run genapp-lgwebst5 PROVED. No golden drift expected (no scanner change; not run).

Cross-repo

None required. cics-crucible C2 / C3 cases can now cite this behaviour; no pin bump here.

Lessons for agents

  • IBM's COUNTER pages are fetchable with WebFetch (...?topic=summary-get-counter-get-dcounter); read them before deciding a condition is "refused".
  • A translator change to the emitted text of a COUNTER command moves every det port's CicsTask.java: expect "14/112 unchanged" from det_port check; re-prove only the ports whose generated source changed.

🤖 Generated with Claude Code

…ENGERR RESP2 1/2/3 with the low 32 bits (Part of #4770)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 15, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 15, 2026 21:45
@squid-protocol
squid-protocol enabled auto-merge (squash) October 15, 2026 21:51
import sys
from pathlib import Path

import pytest
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5213 @ 312cec7: 2 failed check(s)

== ground-truth (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38812303625/job/116699094647
repro: python tests/tools/pr_gates.py --ratchets --only-ratchets ground-truth
errors:
##[error]Process completed with exit code 1.
log tail:
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {1a592f4e-e9f8-4ece-a0db-e6d5d8ee72ba}
Region: southcentralus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: ground-truth
##[group]Run echo "ground-truth parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE)"
echo "ground-truth parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure
# #5164: ... or when the plan found no ground-truth input in the PR (mode none). An empty mode is not none.
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && { test "$SKIP" = "true" || test "$MODE" = "none"; }; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
MODE: full
##[endgroup]
ground-truth parts: failure (tested-tree skip: , plan mode: full)
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== ground-truth part 1/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38812303625/job/116691711800
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/cobol_mainframe/test_det_translate.py::test_deleteq_ts_and_inquire_association_and_the_receive_map_terminal_option
errors:
fail-on-cache-miss: false
tests/cobol_mainframe/test_det_translate.py:1389: AssertionError
FAILED tests/cobol_mainframe/test_det_translate.py::test_deleteq_ts_and_inquire_association_and_the_receive_map_terminal_option - assert (True and '.getCounter(' in 'long[] counter5 = task.getCounter("", KEY.strip());' and False)
##[error]Process completed with exit code 1.
log tail:
11.16s setup tests/cobol_mainframe/test_port_tickets.py::test_every_program_with_business_logic_gets_a_ticket
11.16s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE 9999 TO SH MOVE SH TO NS ADD 1 TO NS MOVE NS TO SH-10000 into a signed 4-digit binary item-True]
11.12s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE 9999 TO SH MOVE SH TO NS ADD 1 TO NS MOVE NS TO SH-10000 into a signed 4-digit binary item-False]
11.11s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE 99999 TO SH-99999 into a signed 4-digit binary item-True]
10.63s call tests/cobol_mainframe/test_det_programs.py::test_all_literal_relation_emits_compilable_java_with_and_without_a_collating_sequence
10.41s call tests/cobol_mainframe/test_refraction_differential.py::test_excerpt_no_new_unexplained[cics-banking-sample-application-cbsa]
10.38s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[ADD 9999 TO K7-10006 into a signed 4-digit binary item-True]
10.28s setup tests/cobol_mainframe/test_port_invariance.py::test_contract_holds_on_the_committed_pairs
10.15s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[ADD 9999 TO K7-10006 into a signed 4-digit binary item-False]
10.14s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE P0 TO UW MULTIPLY 100000 BY UW-9876500000 into a 9-digit binary item-False]
9.85s call tests/cobol_mainframe/test_lifted_binary_trunc.py::test_typed_binary_stores_equal_bytes_and_the_oracle[arithmetic-BIN]
9.64s call tests/cobol_mainframe/test_lifted_binary_trunc.py::test_typed_binary_stores_equal_bytes_and_the_oracle[item-STD]
9.34s call tests/cobol_mainframe/test_trunc_opt.py::test_conforming_values_give_trunc_stds_results[True]
9.07s call tests/cobol_mainframe/test_tool_regex_redos.py::test_a_sharded_sweep_returns_the_serial_rows_in_order
9.04s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE P0 TO UW MULTIPLY 100000 BY UW-9876500000 into a 9-digit binary item-True]
8.95s setup tests/cobol_mainframe/test_multi_program_data_4245.py::test_each_item_names_its_owning_program
=========================== short test summary info ============================
FAILED tests/cobol_mainframe/test_det_translate.py::test_deleteq_ts_and_inquire_association_and_the_receive_map_terminal_option - assert (True and '.getCounter(' in 'long[] counter5 = task.getCounter("", KEY.strip());' and False)
+ where True = <built-in method startswith of str object at 0x7fa934f86550>('long[] counter')
+ where <built-in method startswith of str object at 0x7fa934f86550> = 'long[] counter5 = task.getCounter("", KEY.strip());'.startswith
+ and False = <built-in method endswith of str object at 0x7fa934f86490>('[0] == 0) {')
+ where <built-in method endswith of str object at 0x7fa934f86490> = 'counter5 = task.fullwordGet("", KEY.strip(), counter5);'.endswith
1 failed, 3890 passed, 555 skipped, 1 warning in 398.54s (0:06:38)
##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/2c43d4f9-084c-4d5e-a02e-864662b0ff70' 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/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-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 15, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (304f0fb) 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).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 15, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 15, 2026 22:41
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

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.

2 participants