Repository navigation
Description
Found while working rosetta[jcl] #2581 (epic #2560).
What happens
prism.py never extracts JCL comments. jcl's line_exclusive entry in gitgalaxy_config.py is deliberately empty ("jcl": [] — the inline comment explains why: //* is a whole-line positional prefix, and every JCL statement also starts with //, so the stateless per-line delimiter stripper can't express it without commenting out the entire language). The documented limitation was correct for that stripper — but no positional path was ever added either, so for every .jcl/.prc file:
- Every
//*comment line lands in the code stream. The comment stream is always empty;doc_locis 0 for all JCL. - Comment-surface analysis is structurally dead for JCL:
detector.comment_analysis()(doc / ownership / planned_debt / fragile_debt / dead_code) runs on an empty string. A real mainframe job deck full of//* TODO ...///* FIXME ...banners reports zero technical debt, and comment mass (documentation/cognitive-load risk inputs) is wrong for the whole language. ownership(^//\* Author:…) only works today by accident, becausecoding_analysis()also runs every rule against the code stream — i.e. it is currently counted on the wrong surface.- The keyword-rosetta control corpus measures the consequence directly: jcl
comment_lines≈ 0 real (reported 5 is a per-file total_loc−coding_loc artifact) vs a 46-language median of 30, and the comment-decoy architecture (planted decoys that must contribute nothing) can't be exercised because jcl "comments" are code.
Scope: all ~191 licensed .jcl files in the language-crucible corpus, plus every legacy-modernization scan.
Fix
prism._strip_segment_comments(): routelang_id == "jcl"through a dedicated whole-line//*stripper (same structural slot as the cobol/fortran positional path), preserving line count, with a case-sensitive negative guard for the ten JES3 control verbs (//*MAIN,//*FORMAT,//*NET,//*DATASET,//*ENDDATASET,//*PROCESS,//*ENDPROCESS,//*OPERATOR,//*PAUSE,//*ROUTE) which are statements, not comments.languages/jcl.py: with a live comment surface, wire the comment-anchored signal rules JCL genuinely has morphology for:fragile_debt/planned_debt= the sharedGLOBAL_FRAGILE_DEBT/GLOBAL_PLANNED_DEBTpatterns (as cobol already does)safety=COND=return-code tests (JCL's step error-handling)safety_bypasses=COND=EVEN/COND=ONLY(run the step even after a prior abend)telemetry=MSGLEVEL=/MSGCLASS=(job log verbosity)
- Golden masters re-blessed (real expected diff: JCL coding_loc/doc_loc split changes corpus-wide; debt/safety signals appear on real JCL).
cleanup (DISP=(...,DELETE)) was considered and deliberately not added: DISP= already feeds the io rule, and the overlap would double-count every disposition; ledgered as morphology in the rosetta corpus instead.
Activity
docs(jcl): refresh language-status for #2610 + first rosetta consiste…
feat(core-engine): jcl dead_code + jcl/yaml spec_exposure comment-str…
feat(core-engine): jcl sync_locks counts the exclusive-ENQ dispositio…
feat(core-engine): jcl api, cleanup and globals rules; high_risk_exec…