Skip to content

jcl + yaml: dead_code and spec_exposure comment-stream rules missing where the comment stream exists (#2610 leftover) #2732

Closed

Description

@squid-protocol

Found by the epic #2560 n/a sweep of non-planted risk-formula inputs (child of #2669; na_check.py flags jcl/dead_code, jcl/spec_exposure, yaml/spec_exposure as unreviewed absences).

What's missing

dead_code and spec_exposure are comment-stream rules — detector.comment_analysis() applies them alongside doc/ownership/planned_debt/fragile_debt. Among the 46 rosetta-covered languages, only three lack spec_exposure: markdown (deliberate — the generic [SPEC-…]/[spec …] bracket-tag pattern collides with markdown link syntax, now ledgered corpus-side), jcl, and yaml. jcl also lacks dead_code.

Evidence the morphology is real (jcl dead_code)

Commenting out a statement by turning // into //* is the universal JCL practice. The pool corpus (gitgalaxy/data) has 14 licensed .jcl/.prc files carrying //*-commented-out statements, including whole JOB cards:

//*CREL005 JOB ,,CLASS=A,MSGCLASS=H,
//*CREL001 JOB ,,CLASS=A,MSGCLASS=H,

Fix shapes

# jcl — commented-out statements (comment stream = raw //* lines post-#2610).
# Keyword must be followed by operand-shaped text, not prose, to keep
# "//* PROC statements are..." banners out (observed FP shape in the pool):
"dead_code": re.compile(
    r"^//\*[A-Za-z0-9_#$@]*[ \t]+(?:EXEC[ \t]+\S|DD[ \t]+\S|JOB[ \t]*[,(]|SET[ \t]+[A-Za-z0-9_#$@]+=|INCLUDE[ \t]+MEMBER=)",
    re.M | re.I,
),
# jcl + yaml — the shared generic tag rule, verbatim from python/go/java/js:
"spec_exposure": re.compile(r"\[(?:\s*SPEC\s*-\s*\d{1,10}|spec|audit)[^\]]{0,300}\]", re.I),

Paired work (GATING.md n/a semantics)

The rosetta corpus currently plants none of these idioms (no commented-out jcl statement, no [SPEC-n] tag in data/jcl or data/yaml), so per keyword-rosetta GATING the rule and the corpus plant must land together or the new cells flip from documented-n/a to measured-0 without review. Ledger entry comment-stream-rules-missing-jcl-yaml (disposition upstream-question) covers the three cells until this lands; it retires (still_reproduces → false) with this fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_011r3fcWzSUJCQeoYc1XgJ6S

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

    scope:frontier

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions