Skip to content

State What the Fence Scanner Does in Its Comments - #4184

Merged
ptr727 merged 4 commits into
developfrom
burndown/fence-scanner-comments
Nov 13, 2026
Merged

ptr727 merged 4 commits into
developfrom
burndown/fence-scanner-comments

Conversation

@ptr727

@ptr727 ptr727 commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

One pass over the fence scanner's comments and docstrings in tests/test_release_guards.py, with deletion as the default. Each comment left states what the scan does. A renderer is cited only where a test case pins the difference. No test logic changed, and the suite passes.

Disposition of the issue's items

Each item was re-verified against the current file first. The file now lives at tests/test_release_guards.py, not under scripts/tests/.

  1. Blank-line refusal comment. Still present and still false of the scan. Deleted, with its two neighbouring sentences, including the renderer clause on the no-break-space case above it.
  2. "ends that container on a line carrying less than that". Both copies still present. Deleted from the refused-case list and from fenced_blocks. The body-indent comment keeps only its two lines that state the scan's rule.
  3. "A fence sharing a line with anything else needs the container to read." Still present. Deleted, with the container sentence after it.
  4. "because a scan that guesses at the container..." in the extractor test's docstring. Still present. Deleted, with the "Everything else is refused" sentence, which the left-standing HTML-block gap also made untrue.
  5. "The refused cases below are the list." Still present. Deleted, with the second-list-level example no case pins and the "by convention rather than by check" sentence. A refused shape in a document under test raises, so that sentence was also false. "Legal Markdown is among what this refuses" stays, pinned by the refused cases such as a list-marker line and a tilde in a backtick fence's info string.
  6. "Five silent defects..." in the guard test's docstring. Still present. Deleted as defect history, with the "sixth defect" paragraph. The "four functions named below" sentence was also wrong, since five are named, so it now states which source is read without a count.
  7. "Left to surface as an unterminated block, it would name a line carrying no fence." Still present. Deleted.
  8. The three lower-confidence ones.
    • "never miss one it does" (still present): the five-line renderer comparison above the info-string split is deleted, since no case pins it. The any-whitespace: marker stays on the line, and its inline reason now reads "no matched label holds whitespace", a fact about the callers' label sets rather than about a renderer.
    • "Whitespace after a closing fence is not text after it" (still present): deleted.
    • "A run of three or more backticks or tildes opens or closes a code block" (still present): deleted, with the two lines after it, which depended on it. The docstring now says a fence-run line is refused unless it matches FENCE_LINE.

Other deletions in the same pass

  • The fenced_blocks docstring's container and HTML-block reasoning. Its one load-bearing fact is restated as scan behaviour: a fence line met while a block is open either closes it or raises, so no labelled block is read as another's body.
  • The docstring's whitespace-defect history and bullet list.
  • The line-split comment's three hypothetical-alternative lines. The two lines pinned by the carriage-return and line-separator cases stay.
  • Refused-case comments giving renderer reasoning that no case pins, and comments that only restated a case's name.

Local review findings from the opening push

The opening push spent its two-round local-strict-review budget with two introduced findings open. Each is now disposed of in ce88ccf, and the pass over that head recorded no findings.

  • introduced, the .split() marker # any-whitespace: can add a match, never split one. Fixed. The marker now reads no matched label holds whitespace, a fact about the callers' label sets. An earlier pass asked the marker to also say that a wider split can add a match. That point is declined under the issue's own rule, since that says how another reader splits the label, and no case pins it.
  • introduced, the fenced_blocks docstring sentences claiming each whitespace comparison is named or marked and that a test holds that rule. Fixed by deletion. The guard reads named methods and the \s spelling only, so the claim was wider than the check.

Closes on promotion: #1620

🤖 Generated with Claude Code

ptr727 and others added 3 commits November 13, 2026 13:40
Delete the comments that reasoned about a renderer's containers, and state the scan's own rules.
A renderer is cited only where a test case pins the difference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Delete the docstring sentence that claimed a narrower class agrees with Python's split.
A label before which Python-only whitespace sits is a counterexample.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The exemption's reason states both directions: a wider class can add a match and never splits one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 13, 2026 21:50
@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between cb15c14 and ce88ccf.

Files selected for processing: 1

  • tests/test_release_guards.py
  • 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

The guard reads named methods and the backslash-s spelling, not every whitespace comparison.
The marker's reason goes back to the fact about the callers' labels, which cites no renderer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

🟡 Changes recommended

Two active nit findings remain in the release-guard tests: an unclear exception description and a docstring that overstates the guard’s whitespace-comparison coverage.

2 open issues
What changed in this PR

This pull request simplifies the fence scanner's comments and docstrings so they describe tested scanner behavior without changing executable logic.

Changes:

  • Removes unsupported renderer, container, and historical-defect explanations.
  • Retains documentation for behavior covered by tests.
  • Narrows fence parsing and whitespace-guard commentary.
File Description
tests/​test_release_guards.py Removes unsupported scanner commentary and updates fence parsing, extraction, and whitespace-guard documentation without changing test logic.

Review effort: Lite

Comment thread tests/test_release_guards.py Resolved
Comment thread tests/test_release_guards.py Resolved
@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

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

@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.71%. Comparing base (b38e084) to head (ce88ccf).
⚠️ Report is 207 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4184      +/-   ##
===========================================
- Coverage    81.60%   76.71%   -4.89%     
===========================================
  Files           26       41      +15     
  Lines         9070    14317    +5247     
===========================================
+ Hits          7402    10984    +3582     
- Misses        1668     3333    +1665     
Flag Coverage Δ
python-3.13 76.71% <ø> (-4.89%) ⬇️

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 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit d466a29 into develop Nov 13, 2026
13 checks passed
@ptr727
ptr727 deleted the burndown/fence-scanner-comments branch November 13, 2026 22:10
ptr727 added a commit that referenced this pull request Nov 13, 2026
… Rules (#4189)

## Summary

Promotes the backlog-burndown rounds and changes from other hub sessions
from `develop` to `main`.

- Hooks and the prose gate: #4132, #4134, #4136, #4145, #4152, #4184.
The Husky hook reads its path list once and diffs a merge against
`MERGE_HEAD`. Interrupts re-raise their signal, a Markdown code span
reads as quoted data, and the gate picks a commit's diff base and
recognizes a conflicted promotion's branch cut from `main`.
- Procedures and carried rules: #4133, #4139, #4141, #4149, #4166,
#4177, #4179, #4183, #4185. Resync, audit and check-this-repo procedure
gaps, code style and shell interrupt rules, review-loop gaps across four
skills, the context and delegation section of `AGENTS.md`, question
rules in governance, the promotion line in pull request bodies,
closing-keyword behavior on promotion, and the history-rewrite premise.
- Review and cleanup tooling: #4138, #4148, #4154, #4156, #4157, #4163,
#4164, #4168, #4174, #4180. Cleanliness reads, parked handoffs, the
backlog report's JSON output, exact inline script pins, trusted inputs,
env-file includes, the bounded review wait, side-reviewer matching, and
a Copilot billing-failure notice read as a refusal.
- Workflow and runbook contract: #4153, #4155, #4169, #4171, #4178,
#4182. The runtime-secrets check, a registry entry and spec references,
the Copilot runbook pointers, credential-free checkout steps, and the
deploy-key and runner wording.
- From other hub sessions: #4159 (a repository's own .NET line under a
fleet default), #4161 (the 1Password CLI as an optional host tool),
#4162 (Codex's Windows installer and one managed opencode copy). These
carry no promotion line.

#4182 carries no promotion line by design, and #4175 holds the split-out
part of #4057's scope. Both #1448 and #4175 stay open.

Fixes #1071
Fixes #1154
Fixes #1391
Fixes #1471
Fixes #1594
Fixes #1620
Fixes #1627
Fixes #1650
Fixes #1801
Fixes #2853
Fixes #3620
Fixes #3668
Fixes #3697
Fixes #3766
Fixes #3787
Fixes #3837
Fixes #3840
Fixes #3842
Fixes #3844
Fixes #3865
Fixes #3882
Fixes #3890
Fixes #3894
Fixes #3912
Fixes #3916
Fixes #3954
Fixes #4014
Fixes #4015
Fixes #4016
Fixes #4043
Fixes #4050
Fixes #4057
Fixes #4058
Fixes #4062
Fixes #4084
Fixes #4097
Fixes #4098
Fixes #4099
Fixes #4104
Fixes #4108
Fixes #4114
Fixes #4115
Fixes #4117
Fixes #4118
Fixes #4119
Fixes #4121
Fixes #4122
Fixes #4123
Fixes #4131
Fixes #4135
Fixes #4140
Fixes #4142
Fixes #4143
Fixes #4144
Fixes #4151

🤖 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