Repository navigation
Description
Found by a real-repo plausibility audit of a galaxyscope scan of IBM's zopeneditor-sample (COBOL/PL-I/JCL/HLASM/REXX mainframe sample corpus), run against engine main just after REXX #2504 merged (PR #3107).
What the scan shows
ASMCOPY/REGISTRS.asm is a 19-line HLASM register-equate copybook — R0 EQU 0 through R15 EQU 15, name field in column 1, no colon after the name. It classifies as x86/ARM assembly, decided at Tier 1.5 by the "Ecosystem Consensus Lock (75% Local Dominance)".
The neighbours show the discriminator working everywhere except this shape:
| file | content | outcome |
|---|---|---|
ASM/ASAM1.asm |
carries CSECT/USING/AMODE |
correctly resolves hlasm at Tier 2 via the #2503 internal_discriminator |
ASM/[email protected] |
6,432-line RACF exit | excluded by the lexical-monotony guard |
ASMCOPY/REGISTRS.asm |
EQU-only equate copybook | misclassified assembly |
The gap is specifically EQU-only members: they carry none of the discriminator's tokens (CSECT/DSECT/RSECT/AMODE/RMODE/USING/LTORG/MEND/DFHEIENT/DFHEIRET), so Tier 2 never fires and gravity decides.
The design tension (to adjudicate here, not pre-decided)
The obvious widening is the name-field EQU shape ^name[ \t]+EQU[ \t] — HLASM equates have no colon after the name. But MASM also writes colon-less NAME EQU value, so a naive single-line EQU alternative could flip real x86 MASM equate files to hlasm. Candidate mitigations for the implementer to weigh:
- Register-equate idiom specifically:
^R[0-9]{1,2}[ \t]+EQU[ \t]+[0-9]{1,2}\b, requiring multiple hits — the single most common HLASM copybook shape. - N distinct EQU lines plus absence of x86 markers (
.model,section,%macro,mov/rax). - Leave Tier 2 alone and teach the gravity path that a mainframe-sibling folder (
.cbl/.jcl/.plineighbours — this repo has all of them) outweighs same-extension neighbours.
Impact
Cosmetic-to-minor today — EQU copybooks carry near-zero signal mass — but it is a wrong-language identity on a canonical IBM sample, and hlasm's per-language rules never run on the file.
Cross-references: #2503 (built the internal_discriminator this widens), #2504 / PR #3107 (the batch/.cmd sibling of this mechanism), closed epic #2516.
Activity
test(detection): add the language-detection accuracy harness (#3117) (#…
chore(corpus): bump the language-crucible pin to v1.3.0 (#3117) (#3138)
ruff format: wrap internal_discriminator concatenation (#3110)
Bless golden masters: REGISTRS.asm now classifies as hlasm (#3110)
Widen hlasm internal_discriminator to catch EQU-only register copyboo…
Bless golden masters: testrunner.tcl recovers 18 procs (#3142)
Fix tcl proc loss after an unterminated double-quote (#3142) (#3149)
docs(wiki): add Claim 11 -- multi-signal language detection (#3119) (#…