Skip to content

Promote the Comment and Docstring Sentence-Length Check and the Attested Wait Hold to Main - #2840

Merged
ptr727 merged 2 commits into
mainfrom
develop
Oct 11, 2026
Merged

ptr727 merged 2 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

Promotes #2836 and #2837 to main.

  • prose_lint.py's opt-in sentence-length check now reads code comments outside Markdown and Python docstrings, scoped to changed lines the way Markdown already was. The comment-and-doc-style Skill names the wider scope.
  • pr_review.py wait holds an attested head on a BLOCKED merge while a check the base branch's rules require has not registered. An unreadable rules read keeps the old behavior and says so. attest waits up to 60 seconds for a push GitHub has not registered yet, only where the remote branch already holds the checkout's commit.

Follow-ups filed: #2838 (sentence-length gaps past the edit budget) and #2839 (required-check matching ignores the rule's integration_id).

Closes #2430
Closes #2750

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 11, 2026 13:05
#2837)

`pr_review.py wait` on an attested head returned exit 0 while the base
branch's other required checks had not yet registered, and `attest`
refused straight after a push.

- `wait` now reads the required status contexts from the base branch's
rules (once per run) and holds a BLOCKED merge while one is absent from
a whole-read rollup. An unreadable rules read keeps the old result and
prints a note.
- `attest` waits up to about 60 seconds for GitHub to register a push,
only where the remote branch tip equals the checkout's HEAD and the pull
request is open.
- Local strict review ran two rounds. Accepted and not changed: a
required context that never registers holds until the timeout (the
settled design), the ls-remote against the head repository URL, and
`gql` exiting on a GraphQL error in the new branch read.

Closes #2750

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Closes #2430

The opt-in `sentence-length` check read only Markdown, so an over-cap
sentence in a shell, Python, or workflow comment passed locally and in
CI. The counting core is now one helper shared by the Markdown reader, a
comment reader, and a Python docstring reader. The comment reader reuses
`comment_wrap_findings`' prose filters. The check stays opt-in and the
Markdown behavior is unchanged.

Local strict review ran two rounds. Known remaining gaps, left unfixed
past the edit budget:

- introduced: an indented table under a colon line in a non-Python
comment is read as prose, since comment extraction strips the indent.
- introduced: NumPy-style docstring sections are joined into one
sentence.
- introduced: a docstring whose closing quotes sit on its last code line
misses the code-block indent base.
- introduced: Google-style `Args:` bodies are treated as code, so a long
sentence there is not checked.
- Pre-existing:
`TestDiffScopeFloor.test_a_deliberately_narrowed_scan_is_not_told_the_narrowing_is_a_defect`
fails on develop in this environment too.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 11, 2026 20:11
@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

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

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ec8fe855-db73-4941-93c0-f8c7cca63f33

  • 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.

@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.47%. Comparing base (4035555) to head (8729928).
⚠️ Report is 364 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2840      +/-   ##
==========================================
+ Coverage   60.26%   60.47%   +0.20%     
==========================================
  Files          16       16              
  Lines        8489     8528      +39     
==========================================
+ Hits         5116     5157      +41     
+ Misses       3373     3371       -2     
Flag Coverage Δ
python-3.13 60.47% <100.00%> (+0.20%) ⬆️

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.

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

A same-name check from another app can satisfy an app-bound requirement and let the attested wait finish early.

1 open finding
What changed in this PR

This PR promotes the sentence-length check and attested review wait improvements to main, strengthening the fleet's prose checks and pull request review tooling.

Changes:

  • Extend the opt-in sentence-length check to code comments and Python docstrings.
  • Hold an attested wait while required checks have not registered, and allow attest to wait briefly for GitHub to register a pushed head.
  • Update tests, documentation, and distributed skill content.
File Description
tests/​test_prose_lint.py Tests comment and docstring sentence checks.
tests/​test_pr_review.py Tests required-check waits and head registration.
scripts/​README.md Documents the attested wait behavior.
scripts/​pr_review.py Adds required-check and head-registration handling.
.github/​skills/​comment-and-doc-style/​SKILL.md Updates generated skill guidance.
.github/​actions/​prose-gate/​prose_lint.py Extends sentence-length checking.
.claude-plugin/​fleet-skills/​skills/​comment-and-doc-style/​SKILL.md Updates the distributed skill copy.
.claude-plugin/​fleet-skills/​.source-digests/​comment-and-doc-style Records the updated source digest.
.agents/​skills/​comment-and-doc-style/​SKILL.md Updates canonical skill guidance.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/pr_review.py
@ptr727
ptr727 merged commit 50b6bc3 into main Oct 11, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants