Skip to content

Mainframe fact channel: MQ messaging: queues, put/get direction, producer/consumer graph #3447

Closed

Description

@squid-protocol

Problem

IBM MQ calls are invisible as named facts. The engine can't say which program puts to or gets from which queue, so the asynchronous message flow between programs is missing.

Evidence

22 MQ calls in CardDemo (CALL 'MQOPEN', 'MQPUT', 'MQPUT1', 'MQGET', 'MQCLOSE'), mainly in app/app-authorization-ims-db2-mq/ and COACCT01 / CODATE01. Queue names travel through data: MOVE 'CARD.DEMO.REPLY.ACCT' TO REPLY-QUEUE-NAME → MQOD-OBJECTNAME → MQOPEN.

Proposal

A per-file channel for MQ operations: the verb, the queue name (literal, or resolved through MOVE and the working-storage VALUE), the direction (put or get), and the open options. Then a resolved producer → queue → consumer edge set across programs. Trigger definitions (which transaction an MQ trigger starts) live outside the repository; say so in SCOPE.

Acceptance (ground truth, as for every channel since #3210)

  • An independent draft reader in tests/tools/cobol_answer_key.py. It must not import the engine; test_draft_readers_never_import_the_parsers_they_grade enforces this.
  • A new answer-key section, drafted for all three pinned corpora (zopeneditor, CBSA, CardDemo).
  • A blind census of that section with tests/tools/cross_verify.py census, with every disagreement ruled against the source.
  • A new scored field in tests/tools/ground_truth_ledger.py, so mainframe-ground-truth.yml fails CI on any regression.
  • The channel follows gitgalaxy/core/how_to_add_a_fact_channel.md: extractor, *_data table, delta restore, galaxy_ir.EngineFile reader and SCOPE update.

Part of #3445.

🤖 Generated with Claude Code

Activity

  1. added
    enhancement
    core-engine
    legacy-modernization
    on Sep 24, 2026
  2. squid-protocol commented on Sep 24, 2026

    @squid-protocol
    OwnerAuthor

    Done. It landed on main through #3461 → #3460. #3461 was merged into #3460's branch, so the "Closes" keyword never fired.

    What shipped

    • core/mq_calls.py → the mq_call_data table: one row per MQOPEN / MQPUT / MQPUT1 / MQGET / MQCLOSE call, with direction, queue, handle and options.
    • The queue is read from the object descriptor's OBJECTNAME. Queues that only exist at run time are named as trigger (from MQTM-QNAME) or reply_to (from MQMD-REPLYTOQ), never guessed.
    • Handles are followed through the shared MQ-HOBJ to the right MQOPEN.
    • GalaxyIR.mq_queues() / mq_flows() give the producer→consumer pairs. CardDemo's requesters live outside the repo, so it has no in-repo pair; a unit test covers the pairing.

    Acceptance

    • Independent reader: add-mq.
    • Scored field MQ calls. The engine matches the key exactly: CardDemo 22/22. During development the ledger caught a bug where columns 73–80 cut the CALL's operand list short (4/22 → 22/22).
    • Blind census: Ground truth: blind census of the fact-channel key sections (#3445) #3467, every file, 0 key errors. The field is now cross_verified.
    • Fact-channel spine: extractor, table, delta restore, IR reader and SCOPE.

    Not modelled: the MQ trigger definitions (MQSC DEFINE PROCESS) that would resolve the trigger queues; CardDemo documents them only in a README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineenhancementlegacy-modernization

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions