Skip to content

Bring the Line-Endings Reference and a Test Docstring to the Corrected Wording - #2707

Merged
ptr727 merged 2 commits into
developfrom
feature/auto-1237
Oct 10, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/auto-1237

Conversation

@ptr727

@ptr727 ptr727 commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Brings the two remaining surfaces #1237 names into line with the wording GOVERNANCE.md "Verification Discipline" now carries. The third surface, agent-conduct, already matched on develop.

  • The comment-and-doc-style line-endings reference said write_text() writes \n back and offered newline='' on Path.read_text(). It now says write_text() translates each \n to os.linesep, and the fix is bytes or open() with newline='' on both the read and the write, since Path.read_text() accepts newline only on Python 3.13 and newer. The two generated copies are regenerated by scripts/build_dist.py.
  • The tests/test_repo_gate.py docstring blamed a shell heredoc, which a quoted heredoc disproves. It now names printf, echo -e, and $'...'. The local review pass also found that the pattern loop only compiled each pattern, which a control character survives, so the loop now also asserts each pattern is printable ASCII. A mutant pattern carrying a backspace fails the test, and the real patterns pass.

Verified: ruff format and check, mypy, prose_lint.py with and without --check sentence-length, build_dist.py --check, spec/validate.py, and tests.test_repo_gate (144 tests) all pass. Two local strict review passes ran, the first raising three findings that the second commit fixes, the second raising none.

Closes on promotion: #1237

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified guidance for preserving line endings during text edits, including how newline handling varies across Python versions.
  • Tests
    • Expanded checks to verify that key patterns compile and contain only printable ASCII characters.

ptr727 and others added 2 commits October 9, 2026 23:58
…d Wording

The line-endings reference still said write_text() writes \n back and
offered newline='' on Path.read_text(), which only Python 3.13 and newer
accept. It now says write_text() translates each \n to os.linesep and
points at bytes or open() with newline='' on both sides, matching
GOVERNANCE.md "Verification Discipline".

The test_repo_gate.py docstring blamed a shell heredoc for consuming
backslash escapes, which a quoted heredoc does not do. It now names the
escape-interpreting constructs instead, and the assertion is unchanged.

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

The local review pass found two sentences over the length limit in the
rewritten line-endings paragraph, and found that the test's pattern loop
only compiled each pattern, which a control character survives. The loop
now also asserts each pattern is printable ASCII, so the docstring's
claim holds for the patterns as well as for the SHA exceptions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 10, 2026 07:02
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a28ab52e-ca50-4286-95b2-61f88852f968

📥 Commits

Reviewing files that changed from the base of the PR and between 349f129 and d14a960.


⛔ Files ignored due to path filters (3)
  • .claude-plugin/fleet-skills/.source-digests/comment-and-doc-style is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/skills/comment-and-doc-style/references/line-endings.md is excluded by !.claude-plugin/fleet-skills/**
  • .github/skills/comment-and-doc-style/references/line-endings.md is excluded by !.github/skills/**

📒 Files selected for processing (2)
  • .agents/skills/comment-and-doc-style/references/line-endings.md
  • tests/test_repo_gate.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

The pull request updates guidance for editing files with CRLF line endings and strengthens checks for four regex patterns in the repository gate test.

Changes

Line-ending guidance

Layer / File(s) Summary
Line-ending editing guidance
.agents/skills/comment-and-doc-style/references/line-endings.md
The guidance explains how regex captures can create CRCRLF, describes text-mode newline translation, and recommends byte-based editing or open() with newline=''. It notes that Path.read_text(newline=...) requires Python 3.13 or later.

Regex integrity checks

Layer / File(s) Summary
Regex pattern validation
tests/test_repo_gate.py
The test checks that USES, PIN, WORKFLOW, and HTTP_STATUS compile and contain only ASCII printable characters. Its description now identifies printf, echo -e, and $'...' as escape sources.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes


Merge Risk: ⚪ Minimal · up to d14a9

The guidance and regex checks are sound; no actionable merge risk was identified.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the two main changes: updating the line-endings reference and correcting the test docstring wording.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • 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 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@349f129). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2707   +/-   ##
==========================================
  Coverage           ?   59.67%           
==========================================
  Files              ?       16           
  Lines              ?     8334           
  Branches           ?        0           
==========================================
  Hits               ?     4973           
  Misses             ?     3361           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 59.67% <ø> (?)

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.

🟢 Approval recommended

Only a minor formatting nit remains; no approval-blocking issues were identified.

0 open findings

What changed in this PR

Updates line-ending guidance and strengthens repository-gate pattern validation.

Changes:

  • Corrects canonical and generated documentation.
  • Refreshes the source digest.
  • Validates patterns as printable ASCII.
File Summary
tests/​test_repo_gate.py Updates rationale and pattern validation.
.github/​skills/​comment-and-doc-style/​references/​line-endings.md Regenerated guidance copy.
.claude-plugin/​fleet-skills/​skills/​comment-and-doc-style/​references/​line-endings.md Regenerated guidance copy.
.claude-plugin/​fleet-skills/​.source-digests/​comment-and-doc-style Updated source digest.
.agents/​skills/​comment-and-doc-style/​references/​line-endings.md Corrected canonical guidance; minor paragraph reflow nit remains.

🧠 Review effort: Lite


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

@ptr727

ptr727 commented Oct 10, 2026

Copy link
Copy Markdown
Owner Author

Answer to the one remark in the Copilot round on d14a9603, which states 0 open findings and raises this only in its file table (1 remark, no thread).

.agents/skills/comment-and-doc-style/references/line-endings.md: "Corrected canonical guidance; minor paragraph reflow nit remains."

No change needed. The rewritten paragraph (lines 112-120) fills to the same 100-column width as the rest of the file. Its lines run 89 to 99 columns, and the two paragraphs above it run 67 to 98, measured with awk '{print length}' over that range. prose_lint.py passes on the diff with and without --check sentence-length. The remark names no rule or reader-visible defect, so it is a preference that fleet-code-review "Review the Change" item 5 omits.

@ptr727

ptr727 commented Oct 10, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

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 e5961b0 into develop Oct 10, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/auto-1237 branch October 10, 2026 07:19
ptr727 added a commit that referenced this pull request Oct 10, 2026
… Corrections to Main (#2740)

## Summary

Promotes 20 changes from `develop` to `main`:

- #2737: Flag a Lone Semicolon After an Explanatory Colon in the Prose
Gate
- #2734: Share pr_review.py wait's Liveness Readings and Open the Held
Poll on Its Snapshot
- #2732: Share One Bounded Backoff Loop Between pr_review.py wait's Two
Polls
- #2729: Document pr_review.py wait's Immediate 44 and check_nodes's
Node Keys
- #2727: Narrow pr_review.py wait's Exit 44 to Required Checks
- #2722: Poll an Attested Head's Checks in pr_review.py wait
- #2720: Name the Command That Enumerates Open Feature Pull Requests in
backlog-burndown
- #2718: Point the Skills Refresh Cadence at host-setup.md
- #2716: Fall Back to os.defpath for PATH in Two Test Harnesses
- #2714: State the Pip Form's Root-Config Type-Check Command in
python-codestyle
- #2712: State the Build Profile's CI Type Check as the Validator Runs
It
- #2709: Bring the Fleet-Map workflow-ci-contract Entry and G9 Gap Up to
the Skill Description
- #2707: Bring the Line-Endings Reference and a Test Docstring to the
Corrected Wording
- #2705: Drop the Stale Utilities driftNote From the Registry
- #2703: Remove the Inert SC2016 Directives in configure.sh and Correct
the shell-codestyle Claim
- #2701: Report Whether the Fleet Skills Plugin Is Installed and Enabled
in the Live Channel
- #2699: Align the Audit Report Template Dimensions With AUDIT.md
Section 4
- #2697: Harden the Source-Pinning Assertions in test_pr_review.py
- #2695: Name the Off-Grammar --branch Outcome in AUDIT.md
- #2693: Count Every Unresolved Review Thread in pr_review.py

Closes #1396
Closes #2731
Closes #2723
Closes #2725
Closes #2724
Closes #2685
Closes #1308
Closes #2191
Closes #1862
Closes #2711
Closes #2025
Closes #1243
Closes #1237
Closes #1115
Closes #1156
Closes #1757
Closes #1593
Closes #1732
Closes #1509
Closes #1404

🤖 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