← Back to Pull requests

test: a check keeps new Markdown prose within 88 columns (scripts/prose-width.py, in check.sh) #397

Closed
unknown closed this pull request without merging on Nov 12, 2026 09:28 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 21:52 UTC
Author

A check that keeps the Markdown prose within 88 columns, after the one-time re-flow in #395: reviews kept catching over-long lines by eye.

scripts/prose-width.py (standard library only) reports FILE:LINE: N columns for a prose line over 88 and exits 1. With --base REF it judges only the lines git diff REF adds to *.md; given files, it judges every line. Columns are characters, not bytes. A file is parsed from the top, so a code fence opened above a changed hunk still counts.

Exempt, as in the re-flow: fenced and indented code, table rows, headings, link reference definitions, HTML comments and blocks, and a line whose overflow is one unbreakable word (a URL, a link target, an inline code span, or any word with no space in it) with the text before and after it each within the width, so it could not be wrapped any better: the check never fails a line nobody could fix.

In scripts/check.sh, and so in CI, against the merge base with the pull request's base branch (else origin/main, else main); a push to main is judged against the previous commit. The CI check job now fetches full history so the base is there. AGENTS.md's conventions name the width.

Run over every tracked Markdown file on main, it reports only six lines: blockquotes of quoted transcripts at 89–90 columns that #395 left alone on purpose. They are not touched by any diff, so they do not fail the check; a new quoted line over 88 would.

Tests: tests/unit/prose-width.bats (a long line added, 88 passing and 89 failing, each exemption, a line inside a fence opened above the hunk, a URL that would fit not exempting its line, an untouched old line passing, multi-byte characters, a non-Markdown file ignored). scripts/check.sh passes locally.

---
_🤖 Drafted by Claude Code (an AI agent) and reviewed & approved by pearu._

Diff: 229 lines (+171 / -58) across 2 files Reviewer: pearu Review duration: 695m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 229 lines diff across 2 files
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.325
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #397"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 37.0% (MEDIUM) · Higher = larger blast radius
37.0%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.6% · Safe to merge
14.6%