test: a check keeps new Markdown prose within 88 columns (scripts/prose-width.py, in check.sh) #397
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
pearu
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) reportsFILE:LINE: N columnsfor a prose line over 88 and exits 1. With--base REFit judges only the linesgit diff REFadds 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 (elseorigin/main, elsemain); 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.shpasses locally.---
_🤖 Drafted by Claude Code (an AI agent) and reviewed & approved by pearu._