Skip to content

fix(jcl): //* comments reach the comment surface; COND=/MSGLEVEL/debt rules wired (#2610) - #2611

Merged
squid-protocol merged 1 commit into
mainfrom
fix/jcl-comment-surface
Aug 31, 2026
Merged

fix(jcl): //* comments reach the comment surface; COND=/MSGLEVEL/debt rules wired (#2610)#2611
squid-protocol merged 1 commit into
mainfrom
fix/jcl-comment-surface

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #2610. Part of the rosetta[jcl] consistency work (#2581, epic #2560).

What

  1. prism.py: JCL //* comments now reach the comment stream. The line_exclusive delimiter list for jcl is deliberately empty (// prefixes every statement too), and no positional path existed either — so for every .jcl/.prc file ever scanned, the comment surface was structurally dead: doc_loc 0, comment_analysis() (doc/ownership/debt) running on an empty string, ownership counting only by accident via coding_analysis on the wrong surface. New _strip_jcl_comments whole-line partition (line-count preserving, same structural slot as the cobol/fortran positional path), with a case-sensitive negative guard keeping the ten JES3 //*-prefixed control statements (//*MAIN …) in the code stream while lowercase //*main story... prose still strips.
  2. languages/jcl.py: with a live comment surface, wire the signal rules JCL has genuine morphology for:
    • fragile_debt / planned_debt — shared GLOBAL_* patterns (as cobol): a //* TODO///* HACK banner in a job deck now counts
    • safetyCOND= return-code tests (step error-handling); negative lookahead excludes the bare bypass forms
    • safety_bypassesCOND=EVEN/COND=ONLY (run the step despite a prior abend); combined form COND=((4,LT),EVEN) counts both (it carries a real RC test and a bypass), scanned with the bounded one-level-paren idiom (ReDoS-immune, cannot escape the COND value's parens to reach an unrelated EVEN later on the line — covered by tests)
    • telemetryMSGLEVEL=/MSGCLASS= (job-log verbosity/routing, JCL's observability dials)
    • cleanup (DISP=(...,DELETE)) deliberately not added: DISP= already feeds io; ledgered as morphology in the rosetta corpus instead.

Why the golden masters changed

Expected, real diff (both modes): every corpus .jcl file's coding/doc LOC split changes (comments finally leave the code stream), telemetry/debt/safety signals appear on real decks (e.g. cics-java-jcics-samples MSGCLASS= → Structured Telemetry 0→2), and the 3D topology reflows globally with the corpus mass change (same shape as #2517's re-bless).

Verification

  • pytest tests/ full suite: 7167 passed (153 in the touched prism/jcl files, including new COND partition-semantics, JES3-guard, line-alignment, and 2 new ReDoS detonation tests)
  • crucible_check.py: PASS both venvs after re-bless
  • audit_check.py: ruff/mypy/dead-key/ast-accuracy all clear
  • Empirical before/after on the keyword-rosetta jcl control corpus: comment stream 0 lines → all 9 planted //* lines; //*MAIN CLASS=A stays code; COND=/MSGLEVEL= counts match planted intent exactly

🤖 Generated with Claude Code

https://claude.ai/code/session_01PUfXMUECX4Vq1vqh9mMQqt

…VEL/debt rules (#2610)

prism.py: jcl's line_exclusive delimiter list is (correctly) empty -- //*
is a whole-line positional prefix and every JCL statement also starts
with //, so the stateless per-line stripper could never express it. Every
//* comment line therefore stayed in the code stream: doc_loc was 0 for
all JCL, comment_analysis (doc/ownership/debt) ran on an empty string
engine-wide, and ownership only counted by accident on the wrong surface.
New _strip_jcl_comments whole-line partition (line-count preserving, same
slot as the cobol/fortran positional path) with a case-sensitive negative
guard for the ten JES3 //*-prefixed control verbs, which are statements.

jcl.py: with a live comment surface, wire the signal rules JCL has real
morphology for: fragile_debt/planned_debt (shared GLOBAL_* patterns, as
cobol), safety = COND= return-code tests, safety_bypasses = COND=EVEN/
ONLY (run despite abend; bounded one-level-paren scan for the combined
form), telemetry = MSGLEVEL=/MSGCLASS=. cleanup (DISP DELETE) was
deliberately NOT added -- DISP= already feeds io and would double-count.

Golden masters re-blessed (both modes): expected diff -- every corpus
.jcl's coding/doc LOC split changes, telemetry/debt signals appear on
real decks, and the 3D topology reflows globally with the mass change.

Found via keyword-rosetta cross-language consistency work (#2581):
jcl comment_lines measured ~0 real vs 46-language median 30.

Closes #2610

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PUfXMUECX4Vq1vqh9mMQqt
@squid-protocol squid-protocol added bug Unintended behavior or logic failure in the engine core-engine Modifications to the central physics and parsing engine legacy-modernization COBOL refractor, dead-code extraction, and JCL forging priority: high Core feature broken, but workarounds exist labels Aug 31, 2026
@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 5eed5b6 into main Aug 31, 2026
78 checks passed
@squid-protocol
squid-protocol deleted the fix/jcl-comment-surface branch August 31, 2026 19:11
squid-protocol added a commit that referenced this pull request Aug 31, 2026
…ncy capstone (§10) (#2613)

jcl.md: §1/§3/§4/§6 refreshed to post-#2611 truth (16/27 rules wired,
65 strict tests; safety/safety_bypasses/telemetry/debt documented with
their reasoning; cleanup/globals absences documented as deliberate
decisions with the overlap rationale, not bare Nones); §9's two args
proxy-imprecisions annotated as since-fixed (#2482/#2483); new §10 =
the keyword-rosetta cross-language-consistency capstone -- the #2581
sweep's before/after (13R/7A -> 6R/8A) with every deviation classified
by the five-cause taxonomy, so a deliberately-absent rule reads
differently from an unexamined gap.

language-status SKILL.md: §10 added to the doc template (when to write
it, where the material lives, the taxonomy grouping); README.md index
calls out jcl.md as the first finished example.

Companion: keyword-rosetta PR #5 (rosetta-language-sweep skill +
language_deviations.py).


Claude-Session: https://claude.ai/code/session_01PUfXMUECX4Vq1vqh9mMQqt

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unintended behavior or logic failure in the engine core-engine Modifications to the central physics and parsing engine legacy-modernization COBOL refractor, dead-code extraction, and JCL forging priority: high Core feature broken, but workarounds exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prism: JCL //* comments are never stripped — comment surface structurally dead for jcl (comment_lines ~0, debt/doc rules can never fire)

1 participant