Skip to content

fix(prism): give jcl a positional comment surface - #8245

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
fix/jcl-positional-comments
Nov 11, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
fix/jcl-positional-comments

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

jcl now gets a line-aligned positional comment surface (prism.split_positional_comment_stream): each //* comment statement stays verbatim at its line, every other line is blanked. JES3 control verbs (//*MAIN, //*ROUTE, ...) stay code, exactly as _strip_jcl_comments partitions them.

Why. jcl used to contribute a blank stream, on the reasoning that it was "moot: jcl declares no doc rule". Since #8200 the same stream feeds the function-grain comment rules (dead code, ownership, planned/fragile debt, spec exposure attributed to the step that contains them). #8240 adds header-comment detection on top. With a blank stream every jcl step read as uncommented. The language-crucible jcl sample has 56 //* comments directly above a step, and none were seen.

Measured (language-crucible data/jcl, 195 files, 376 steps)

  • Positioned comment lines: 0 -> 1,610.
  • Function-grain comment hits on steps: 4 dead_code (commented-out statements) now land on their step. There were no TODO/ownership comments inside a step in this sample.

Golden master bless scope

Zero differences (golden-lock.sh python tests/tools/crucible_check.py --update --yes, then bless_scope.py): the golden does not record per-step comment hit counts. Once #8240 (has_header_comment) is on main, jcl steps will start reading header comments. Whichever of the two merges second re-blesses, and the jcl Has Header Comment values move then.

Tests

  • tests/extraction/languages/test_jcl_positional_comments.py (new): comment statements keep their lines and a JES3 verb does not; a TODO inside a step is that step's planned debt, and the next step's is not.
  • test_jcl.py, test_jcl_strict.py, test_prism*.py, test_detector.py: 453 passed. The 3 XPASS in test_jcl.py already XPASS on main; checked with this change backed out.
  • ruff_audit.py --ci, doc_refs_audit.py --ci: no new findings.

Cross-repo

None. Related: #8240 and #8244 (comment-extraction series after #8200).

🤖 Generated with Claude Code

jcl contributed a blank positional stream ('moot: no doc rule'), but the
stream now also feeds the function-grain comment rules (#8200) and header
comments (#8240): every jcl step read as uncommented. Keep each //* comment
statement at its line (JES3 verbs excluded, as _strip_jcl_comments does).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol
squid-protocol marked this pull request as ready for review November 11, 2026 00:03
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 11, 2026 00:15
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 8ade559 into main Nov 11, 2026
115 checks passed
@squid-shepherd
squid-shepherd Bot deleted the fix/jcl-positional-comments branch November 11, 2026 00:35
squid-protocol added a commit that referenced this pull request Nov 11, 2026
#8240 was blessed before #8245 merged, so main's goldens never had both:
with jcl's positional comments, 119 jcl steps now read Has Header Comment
0 -> 1. Plus this PR's own GLTFLoader.js banner drift.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
squid-protocol added a commit that referenced this pull request Nov 11, 2026
…t of #6454)

Main's #8240 (has_header_comment) and #8245 (jcl positional comment surface)
landed without a joint bless; JCL function rows now report Has Header Comment 1
where a header comment precedes them. No Haskell/Rust golden drift.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
squid-protocol added a commit that referenced this pull request Nov 11, 2026
squid-shepherd Bot pushed a commit that referenced this pull request Nov 11, 2026
…locks (#8244)

* fix(doc): guard 13 languages' doc rule against star-banner and slash-divider false positives

Same /**(?!\*) and (?<!/)///(?!/) guard #8200 put on c/cpp: apex, dart,
groovy, java, javascript, kotlin, objective-c, php, scala, solidity, swift,
typescript, yacc. A /***** box border or //// divider is not a doc block.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(doc): narrow the banner guard so /*** + newline docblocks still count

(?!\*) also rejected Magento-style '/***' docblocks (found on the golden:
Mysql.php's doc count went up as their @var tags counted alone). Reject
only banner shapes: /**** (2+ extra stars) and one-line '/*** x ***/'
boxes. Applied to all 15 /** languages, c/cpp included.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): bless the banner guard (threejs GLTFLoader.js: 67 -> 58 doc blocks)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* style: ruff format the widened doc rules (patterns unchanged)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): re-bless after merging main (#8240 + #8245 together)

#8240 was blessed before #8245 merged, so main's goldens never had both:
with jcl's positional comments, 119 jcl steps now read Has Header Comment
0 -> 1. Plus this PR's own GLTFLoader.js banner drift.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Nov 11, 2026
…6454) (#8252)

* Haskell calls_out: primed identifiers are not char literals (Part of #6454)

Two names ending in a prime on one line (`Just (_, t') -> case T.unsnoc t' of`)
were paired by the shared literal shield as a char literal, blanking the code
between them. The rule now masks identifier primes before the shield and
restores them after it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Re-bless golden: JCL has_header_comment after #8245 prism change (Part of #6454)

Main's #8240 (has_header_comment) and #8245 (jcl positional comment surface)
landed without a joint bless; JCL function rows now report Has Header Comment 1
where a header comment precedes them. No Haskell/Rust golden drift.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Nov 11, 2026
…t of #4108) (#8257)

* Hidden text: U+180E outside Mongolian and lone interlinear marks fire (Part of #4108)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Re-bless golden masters: Has Header Comment drift from #8240/#8245 (Part of #4108)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Nov 11, 2026
…t end in C-family (#8255)

* fix(doc): guard 13 languages' doc rule against star-banner and slash-divider false positives

Same /**(?!\*) and (?<!/)///(?!/) guard #8200 put on c/cpp: apex, dart,
groovy, java, javascript, kotlin, objective-c, php, scala, solidity, swift,
typescript, yacc. A /***** box border or //// divider is not a doc block.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(doc): narrow the banner guard so /*** + newline docblocks still count

(?!\*) also rejected Magento-style '/***' docblocks (found on the golden:
Mysql.php's doc count went up as their @var tags counted alone). Reject
only banner shapes: /**** (2+ extra stars) and one-line '/*** x ***/'
boxes. Applied to all 15 /** languages, c/cpp included.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): bless the banner guard (threejs GLTFLoader.js: 67 -> 58 doc blocks)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* style: ruff format the widened doc rules (patterns unchanged)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): re-bless after merging main (#8240 + #8245 together)

#8240 was blessed before #8245 merged, so main's goldens never had both:
with jcl's positional comments, 119 jcl steps now read Has Header Comment
0 -> 1. Plus this PR's own GLTFLoader.js banner drift.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(dead_code): control keywords need '(' and return needs a statement end in C-family

On curl 39 of 48 dead_code hits were prose: '/* for offsetof() */',
'/* if a request ... (on a file) */', '/* return the position after
%time{} */'. In c/cpp/java/javascript/typescript, if/for/while must be
followed by '(' (their conditions always are); in c/cpp/java a commented
return must end in ';' or return a call directly (#7207's
'// return foo(x)'). curl: 48 -> 9 hits, both real commented-out
statements kept, the rest are commented prototypes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): bless the dead_code shape fix (3 corpus files; plus main's stale jcl header drift)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): re-bless after merging #8244 (derived gpu digest only)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Nov 11, 2026
…; rejects trailing-comment tails (#8256)

* fix(doc): guard 13 languages' doc rule against star-banner and slash-divider false positives

Same /**(?!\*) and (?<!/)///(?!/) guard #8200 put on c/cpp: apex, dart,
groovy, java, javascript, kotlin, objective-c, php, scala, solidity, swift,
typescript, yacc. A /***** box border or //// divider is not a doc block.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(doc): narrow the banner guard so /*** + newline docblocks still count

(?!\*) also rejected Magento-style '/***' docblocks (found on the golden:
Mysql.php's doc count went up as their @var tags counted alone). Reject
only banner shapes: /**** (2+ extra stars) and one-line '/*** x ***/'
boxes. Applied to all 15 /** languages, c/cpp included.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): bless the banner guard (threejs GLTFLoader.js: 67 -> 58 doc blocks)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* style: ruff format the widened doc rules (patterns unchanged)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): re-bless after merging main (#8240 + #8245 together)

#8240 was blessed before #8245 merged, so main's goldens never had both:
with jcl's positional comments, 119 jcl steps now read Has Header Comment
0 -> 1. Plus this PR's own GLTFLoader.js banner drift.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(dead_code): control keywords need '(' and return needs a statement end in C-family

On curl 39 of 48 dead_code hits were prose: '/* for offsetof() */',
'/* if a request ... (on a file) */', '/* return the position after
%time{} */'. In c/cpp/java/javascript/typescript, if/for/while must be
followed by '(' (their conditions always are); in c/cpp/java a commented
return must end in ';' or return a call directly (#7207's
'// return foo(x)'). curl: 48 -> 9 hits, both real commented-out
statements kept, the rest are commented prototypes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): bless the dead_code shape fix (3 corpus files; plus main's stale jcl header drift)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(detector): has_header_comment steps over the unit's own prototype; rejects trailing-comment tails

From the curl hand audit (temporal-crucible#118): curl documents
UNITTEST functions as comment, forward declaration, definition, and the
walk stopped at the prototype's ';'; a blank line inside a /* */ block cut
the block short; and the wrapped tail of a #define's trailing comment read
as a header. curl C: 1,196 -> 1,223 header comments (29 gained, all the
UNITTEST idiom; 2 lost, both trailing-comment tails).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): bless the header-comment fixes (29 corpus units gain a header; plus main's stale jcl drift)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(golden): re-bless after merging #8244 (derived gpu digest only)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant