Skip to content

Lex Each of Two Heredoc Bodies Alone and Keep Autolinks Out of the Code-Span Mask - #3439

Merged
ptr727 merged 2 commits into
developfrom
feature/prose-gate-split-heredoc-bodies
Oct 24, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/prose-gate-split-heredoc-bodies

Conversation

@ptr727

@ptr727 ptr727 commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Fixes the two findings the promotion review raised on #3438, each with a test that fails before and passes after.

Refs #3428, #3429

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 24, 2026 16:20
…de-Span Mask

The run-block heredoc split cuts a token holding two bodies at the first terminator, so an
apostrophe in the first body cannot open a string through a comment in the second. The inline
comment mask lets a URI autolink take its backticks, the one stray-backtick form #3429 names that
the previous change left out. Three single-use assignments become walrus conditions, which keeps
the gate at its 1862-line ceiling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The autolink alternative copies AUTOLINK_RE's character classes, a scheme of ASCII letters, digits,
`+`, `.`, and `-`, and a target excluding control characters and the space, rather than an
approximation of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 24, 2026 23:24
@ptr727

ptr727 commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head a53ee15a86c120190fd4fd5c865540acef488638, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review issues remain, and focused regression coverage is included.

No open issues 🎉

What changed in this PR

This pull request fixes two prose-gate parsing gaps: independently lexing multiple heredoc bodies and excluding URI autolinks from Markdown code-span masking.

Changes:

  • Splits heredoc tokens at the first terminator so each body is lexed independently.
  • Masks URI autolinks as non-code Markdown spans.
  • Adds regression tests and simplifies three single-use assignments with walrus conditions.
File Description
tests/​test_prose_lint.py Adds regression coverage for independent heredoc lexing and URI autolinks.
.github/​actions/​prose-gate/​prose_lint.py Updates heredoc splitting, Markdown span masking, and assignment style.

Review effort: Lite

@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.76%. Comparing base (33d4763) to head (a53ee15).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3439   +/-   ##
========================================
  Coverage    80.76%   80.76%           
========================================
  Files           23       23           
  Lines         8839     8839           
========================================
  Hits          7139     7139           
  Misses        1700     1700           
Flag Coverage Δ
python-3.13 80.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit 9f759a3 into develop Oct 24, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/prose-gate-split-heredoc-bodies branch October 24, 2026 23:35
ptr727 added a commit that referenced this pull request Oct 25, 2026
…ktick Fixes to Main (#3438)

## Summary

Promotes the pull requests merged into develop since release 2.0.1163.

- [#3437](#3437): the
prose gate reads a heredoc label opening on a digit where its terminator
line follows, queues a second heredoc on one opener line, skips the
run-block heredoc split for a step whose `shell:` is neither bash nor
sh, and numbers inline Markdown comments with escapes, HTML comments,
and tags taking their backticks as CommonMark reads them, using
markdown-it-py's own tag grammar. The gate's size ceiling moves from
1840 to 1862 lines, as the maintainer decided this round.
- [#3439](#3439): fixes
the two findings this promotion's review raised. Each of two heredoc
bodies on one opener line is lexed alone, and a URI autolink keeps its
backticks out of the code-span mask, using markdown-it-py's own autolink
character classes. Three walrus rewrites hold the gate at the 1862-line
ceiling.
- [#3440](#3440): rewords
the comment above `HEREDOC` to say the last, unclosed branch is the one
that drops a digit label, after this promotion's review read that branch
as the second-opener conditional's else branch a second time.

Closes #3428
Closes #3429
Closes #3430
Closes #3435

## Constituent coverage

Each change this promotion carries had coverage on its own pull request
into develop, at its merged head:

| Pull request | Merged head | Coverage |
| --- | --- | --- |
| [#3437](#3437) |
`2e271e22` | attested local pass, and a Copilot table naming exactly the
changed files, `coverage=table` |
| [#3440](#3440) |
`7bbd7780` | attested local pass, and a Copilot table naming exactly the
changed file, `coverage=table` |
| [#3439](#3439) |
`a53ee15a` | attested local pass, and a Copilot table naming exactly the
changed files, `coverage=table` |

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants