Repository navigation
Strip a Tilde or Unclosed Fence Before Reading Review Coverage - #1825
Conversation
FENCE now accepts either fence character, closes only on a run of the opener's character at least as long as the opener, and runs an unclosed fence to the end of the body, so a coverage marker quoted in a tilde fence or after an unclosed backtick fence is no longer read as stated coverage. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 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. Comment |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The behavioral change is narrowly scoped to fence stripping, is consistent with Markdown rules, and is covered by targeted regression tests (only a minor docstring wording nit remains).
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This change hardens scripts/pr_review.py coverage parsing by ensuring coverage markers inside Markdown fenced code blocks (including ~~~ fences and unclosed fences) are treated as quoted text and therefore not counted as the round's stated coverage.
Changes:
- Expand the
FENCEstripper to handle both backtick and tilde fences, require a closer that matches the opener character and length, and treat unclosed fences as running to end-of-body. - Add regression tests covering quoted-marker cases (tilde fences, unclosed fences, mismatched closers) plus still-valid cases (closed fences, CRLF).
| File | Description |
|---|---|
| scripts/pr_review.py | Updates the fenced-block stripping regex used before reading coverage markers from review bodies. |
| scripts/tests/test_pr_review.py | Adds regression tests to ensure quoted markers inside fences are not treated as stated coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Masking the rest of the body after an unclosed fence hid a suppressed section from its reader, which reads as clean. Every other reader keeps reading past an unclosed fence as it did before, while the coverage reader, where masking reads as no coverage and so blocks, still runs it to the end. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new fence regex still allows a coverage-marker bypass when the backtick fence info string contains a backtick (e.g., ```text`), so quoted markers can still be misread as stated coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
Resolved since last review (1)
…rship to Main (#1827) Promotes `develop` to `main`. ## Carried - #1806: adds the unattended handoff loop and the attended resume procedure. - #1807: renames three skills and states which skill wins each shared trigger. - #1809: names a pin by its mechanism rather than its value, and audits for copies. - #1808: leads every choice with a recommendation and closes every session in order. - #1813: bans every version literal in the four instruction documents and catches abbreviated SHAs, following #1809. - #1820: refuses a coverage marker indented into a code block, per #1725. - #1823: states that the hub commits audit reports and that a downstream session resyncs itself. This covers the Fleet Bootstrap section, the host fleet block, `RESYNC.md`, `AUDIT.md`, `check-this-repo`, and `resync-a-repo`, and settles #1822. The Fleet Bootstrap section is byte-locked, so every carrier reports drift on it until its next resync. - #1825: strips a tilde or unclosed fence before reading review coverage, per #1821. Closes #1725 Closes #1821 Closes #1822 🤖 Generated with [Claude Code](https://claude.com/claude-code)


FENCEinscripts/pr_review.pystripped only a closed backtick fence, so a coverage marker quoted inside a~~~fence, or after a backtick fence that never closes, was read as the round's stated coverage, which fails open.FENCEnow accepts either fence character and closes only on a run of the opener's own character at least as long as the opener. Every formerFENCE.subcaller goes through a newstrip_fenceshelper. The coverage reader runs an unclosed fence to the end of the body, where masking reads as no coverage and so blocks. Every other reader keeps reading past an unclosed fence as before, since masking the rest of the body there hid a suppressed section, which reads as clean. A closed backtick fence and a marker outside any fence read as before, including under CRLF line endings.Regression tests cover each quoting case, each case still read, and a suppressed section after a stray fence. Each fails with its part of the fix reverted.
Closes on promotion: #1821
🤖 Generated with Claude Code