Skip to content

Engine: labeled candidate join for installation-symbol dataset names in VSAM stores (#3656) - #3673

Merged
squid-protocol merged 1 commit into
mainfrom
engine/symbolic-dsn-3656
Sep 25, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
engine/symbolic-dsn-3656

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #3656 (epic #3625).

Problem. CBSA's IDCAMS defines @[email protected], while its CSD says CBSA.CICSBSA.CUSTOMER. They are the same file with an install-time symbol, so vsam_stores() (correctly) never joined them: the IDCAMS keys were orphaned, and the Java took its keys from RIDFLDs.

Change (engine, galaxy_ir.vsam_stores). A candidate join, never an asserted one:

  • _symbolic_pattern: @X@, <X> and &X. become a regex. A symbol that is the whole first qualifier matches a qualifier chain; any other symbol matches within one qualifier.
  • A defined symbolic store merges into the unique concrete, undefined store it matches only with corroboration: a placed RIDFLD equals KEYS, or a program record equals RECORDSIZE max.
  • It is refused when a RIDFLD disagrees, or every program record exceeds the maximum (VSAM allows shorter records, never longer ones), or nothing corroborates the name pattern.
  • A merged store carries defined_by: {match: symbolic, pattern, evidence}. A refused one notes symbolic_candidate_rejected: {pattern, why}. Every other store gets defined_by exact / None.
  • The repository forge cites a symbolic join in the entity's javadoc:
    * IDCAMS define matched by installation-symbol pattern @[email protected] (a candidate join: RIDFLD CUSTOMER-KEY at 4/16 equals KEYS(16 4); program record of 259 bytes equals RECORDSIZE max 259)

Results

corpus effect
CBSA ABNDFILE merges (RIDFLD 0/12 = KEYS(12 0); 678-byte records fit max 681) and CUSTOMER merges (two RIDFLDs 4/16 = KEYS(16 4); 259 = max 259). Keys now come from IDCAMS, and "not generated" goes 2 → 0
GENAPP / zECS / CardDemo / DSF / zOE store sets unchanged

Verified

  • ir_join_diff.py --base origin/main: only vsam_stores changes, on every corpus by the new defined_by key, on CBSA 4 → 2.
  • CBSA compiles (default, plain-records, gradle-plain-21).
  • preflight.py: all gates PASS. Full suite: 11,666 passed.
  • Tests: pattern rules (chain vs in-qualifier, &HLQ.., escaping); merge; key conflict refused; a shorter record merges; a longer record is refused; a pattern alone is refused.

Provenance. Drafted by an agy (Gemini 3.1 Pro) agent. Review replaced its merge rule, which let a key match override a record-size conflict, with the VSAM record-length rule, and added the corroboration requirement (a name pattern alone never merges), with tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g

…in VSAM stores (#3656)

Estates write dataset names with install-time symbols, so the IDCAMS
DEFINE and the CSD name one file differently: CBSA's IDCAMS
`@[email protected]` is the CSD's `CBSA.CICSBSA.CUSTOMER`.
vsam_stores() now tries a CANDIDATE join, never an asserted one.

_symbolic_pattern turns `@X@`, `<X>` and `&X.` symbols into a regex. A
symbol that is the whole first qualifier matches one or more
qualifiers (a high-level-qualifier chain); any other symbol matches
within one qualifier.

A defined symbolic store merges into the concrete, undefined store it
uniquely matches only when:
- a RIDFLD placed in the program record equals the DEFINE's KEYS, or a
  program record equals its RECORDSIZE maximum; and
- no RIDFLD disagrees with KEYS, and not every record exceeds the
  maximum. VSAM allows a shorter record, never a longer one.
The merged store carries defined_by = {match: symbolic, pattern,
evidence}. A refused candidate keeps both stores and notes
symbolic_candidate_rejected (pattern, why). Every other store gets
defined_by exact / None. The repository forge cites a symbolic join in
the entity's javadoc.

CBSA:
- ABNDFILE merges on RIDFLD 0/12 = KEYS(12 0); its 678-byte records fit
  RECORDSIZE max 681;
- CUSTOMER merges on two RIDFLDs at 4/16 = KEYS(16 4) and a 259-byte
  record = max 259;
- both entities now key from IDCAMS, and stores "not generated" go 2 -> 0.
GENAPP / zECS / CardDemo / DSF / zOE: unchanged store sets.

Verification:
- ir_join_diff: only vsam_stores changes (defined_by on every store,
  CBSA 4 -> 2);
- CBSA compiles (default, plain-records, gradle-plain-21);
- preflight all PASS; full suite 11,666 passed.

Drafted by an agy (Gemini 3.1 Pro) agent. Review replaced its merge
rule, which let a key match override a record-size conflict, with the
VSAM record-length rule above. It also now requires corroboration: the
name pattern alone never merges. Tests were added for both branches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 1abc15c into main Sep 25, 2026
36 checks passed
@squid-protocol
squid-protocol deleted the engine/symbolic-dsn-3656 branch September 25, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Engine: labeled candidate join for installation-symbol dataset names (@BANK_PREFIX@, <USRHLQ>) in VSAM stores and lineage

1 participant