Skip to content

MQ runtime: a put whose BufferLength passes the caller's field no longer throws in the event (Part of #6072) - #6789

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6072-20261027T1106Z
Oct 27, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6072-20261027T1106Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

QueueManager.putEvent threw IndexOutOfBounds when MQPUT/MQPUT1 BufferLength exceeded the caller's field array (COPAUA0C 501-request scenario: range 0..201 of a 200-byte buffer). put() zero-padded the same read, so the event and the stored message could disagree. A single bytesAt(Ref, len) helper (zero-pads past the end of the field) now feeds both.

Assumption: where BufferLength runs past the field, IBM/GnuCOBOL read the adjacent storage; the Java runtime cannot see it and reads zeros. Deterministic; the 501-request scenario should pass an exact-size buffer.

Class / Sibling gaps

Class: a Ref(b, at) read for len bytes with at + len > b.length in QueueManager. Handled here: MQPUT and MQPUT1 event data and stored message (BufferLength negative, 0, short, equal, +1, far past; test test_a_put_longer_than_the_callers_field_stores_and_reports_the_same_bytes, fails without the fix). Sibling gaps: MQGET copying into buffer/MQMD when BufferLength exceeds the caller's array (arraycopy would throw; no scenario reaches it, not changed); a short MQMD passed to put (field writes throw); the C oracle (ggmq.c) reads adjacent memory for an overlong length, so that class is Java-only tested, not byte-for-byte against C.

Remaining slices

The 501-request COPAUA0C scenario itself (net 339:true), then the oracle_assumptions.md note for the zero-pad assumption (not added; stated in code comment and here).

Checklist: partial [c:3d9f3444] -- COPAUA0C 339:true still needs the 501-request scenario (this PR is the runtime fix only)

Gates

pr_gates --fast 9/9; --ratchets 9 pass (0 skipped); det_port check 180/180 ports unchanged; test_det_mq.py 65 passed (JDK 17). No golden bless (no parsing change).

🤖 Generated with Claude Code

…ger throws in the event (Part of #6072)

putEvent hex-formatted buffer[at, at+bl) and threw IndexOutOfBounds when the COBOL
BufferLength (201) exceeded the 200-byte field, while put() zero-padded the stored
message. One bytesAt helper now serves both, so event and stored message agree.

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 27, 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 27, 2026 11:24
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 27, 2026 11:24
@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 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6789 @ 35e6621: 1 failed check(s)

== ground-truth part 2/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40495919469/job/122162352939
repro: python -m pytest -q tests/cobol_mainframe/test_cobolrt_rules.py::test_the_catalogue_matches_the_runtime
failing tests: tests/cobol_mainframe/test_cobolrt_rules.py::test_the_catalogue_matches_the_runtime
errors:
fail-on-cache-miss: false
E AssertionError: assert ['mq/QueueMan...its plumbing'] == []
tests/cobol_mainframe/test_cobolrt_rules.py:88: AssertionError
FAILED tests/cobol_mainframe/test_cobolrt_rules.py::test_the_catalogue_matches_the_runtime - AssertionError: assert ['mq/QueueMan...its plumbing'] == []
##[error]Process completed with exit code 1.
log tail:
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
GITGALAXY_MAINFRAME_CORPORA: /home/runner/work/gitgalaxy/gitgalaxy/.mainframe_corpora
MAINFRAME_ENGINE_KEY: 91977a13e6c0343ec60c2e5bb82711db6f48faf00826d9858165f19b3d08b7aa
PYTHONUTF8: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-ground-truth-part-2.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 123980
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 4b94c4ba624507acd4ce5e58890a7fbc1db3ffac3a22223f4c192a05102b4113
Finalizing artifact upload
Artifact test-times-ground-truth-part-2 successfully finalized. Artifact ID 12731776438
Artifact test-times-ground-truth-part-2 has been successfully uploaded! Final size is 123980 bytes. Artifact ID is 12731776438
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/40495919469/artifacts/12731776438
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/7113cd7e-d308-4971-943d-6cdc286dc9bc' 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-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 27, 2026
squid-protocol added a commit that referenced this pull request Oct 27, 2026
…e test failed on #6789's helper) (Part of #6072)

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

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (af9e8b7) 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-shepherd
squid-shepherd Bot disabled auto-merge October 27, 2026 12:06
@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 Oct 27, 2026
@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 Oct 27, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 27, 2026 12:08
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit e516602 into main Oct 27, 2026
61 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6072-20261027T1106Z branch October 27, 2026 12:27
squid-shepherd Bot pushed a commit that referenced this pull request Oct 27, 2026
…it exit, net 66/71 (Part of #6072) (#6791)

* MQ runtime: a put whose BufferLength passes the caller's field no longer throws in the event (Part of #6072)

putEvent hex-formatted buffer[at, at+bl) and threw IndexOutOfBounds when the COBOL
BufferLength (201) exceeded the 200-byte field, while put() zero-padded the stored
message. One bytesAt helper now serves both, so event and stored message agree.

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

* ladder(carddemo-copaua0c): 501-request scenario takes the request-limit exit (WIP, Part of #6072)

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

* ladder(carddemo-copaua0c): refresh coverage ledger and evidence record (Part of #6072)

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

* cobolrt rules: list QueueManager.bytesAt as MQ plumbing (the catalogue test failed on #6789's helper) (Part of #6072)

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

---------

Co-authored-by: Claude Sonnet 5.5 <[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