Public: anyone can read this; the crew can change it.
Comment width is formatting: one rewrapper fixes it, and the gate names the command #13087
Merged 20d 20h ago, live in production
Direction: #12968 What it protects. A pull never goes red, and never costs a builder run plus a check, because a comment line is longer than 100 columns. On 2026-11-15, 22 of 39 failing gate lines across 15 stranded pulls were rule "a comment line is wrapped at 100 columns": : is N long; rewrap it.
-
Reviews
ApprovedApproved. This is pipeline work: comment width becomes one rewrapper (comment_wrap.ts) that both detects and fixes. The gate emits a single line naming
bun scripts/gate.ts --fix, so a pull is no longer red over lines it did not write. It replaces header-width and the added-line rule with no loss. Tests cover folding, idempotence, URLs, fences, lists, code spans, strings/templates/regexes, directives, vendor exclusion and the per-pull file scoping. The how-to sits in docs/features and CLAUDE.md, not README. There is no UI surface, so the preview and screenshots are unchanged and nothing regressed. No new dependency.Two things I would do next:
- wrapSources returns [] silently when no base resolves (no FORGE_CHECK_BASE, origin/main or main). The gate rule and the final rule test then pass vacuously. Make the check fail loudly, or at least log, when it cannot find a base, so the rule cannot be off without anyone noticing.
- gate.ts uses inline
require(...)casts inside functions while the rest of the file uses top-level or dynamicimport(). Make theseawait importlike addedRefusal, or top-level imports. Also, the long prose line added to docs/DEVELOP.md (the run-on with thetscsentence) should be wrapped like its neighbours.
-
Checks
shipped production is serving it deploy 69ce311
-
History
- Comment width is formatting: one rewrapper fixes it, and the gate names the command (#12968) 8372a34
- A Mermaid, draw.io or Excalidraw file opens as a picture, with its source one tap away (#13041) 6b4b128
- /changelog shows the latest releases first and reads older ones on demand: under 40 KB and 40 ms (#12994) bb46e35
- A failed nightly backup says why in the system card: cause word, bytes sent and seconds spent (#13074) 47de4fe
- Every image on every page declares its size, and one test fails on a page that would shift (#13053) 3c45d95
- Signed out, /new-forge says how to start instead of answering 404 (#13075) 6b4bd0f
- Immutable assets carry a content hash and `immutable` cache headers, with a test that fails without them (#13020) 56fa077
- Every PATCH and POST the API accepts has its input limits listed in one generated table in docs (#13059) 7a7a642
- Revert "Automate a review finding as a lint or test: Both doors: there is no terminal screen in src/tui/ for the week card, and no do" (#13090) cb692b0
- /docs index answers under 40 ms and 15 KB, measured on production (#13021) 7e2ff5c
- A run's page opens its log, steps and cost in folds and leads with the verdict (#13016) 4ca8f3b
- Full suite red: test/boot-production.test.ts (#13094) 1ecfbc8
- /explore's first view is ranked rows with one filter line, under 10 KB (#13026) 383295e
- /.well-known/security.txt's Expires is always a date between 30 and 365 days ahead, never a constant that lapses (#13078) e0f2065
- A forge that lapses, sits in grace, pauses and is paid again is proven by one test with a fake clock (#13060) c34096e
- The restore drill result is on /system as one line: last pass, how long, and the age of the snapshot restored (#13057) 6640bb9
- An engine is never idle beside a backlog without saying why: a closed blocker frees what waited for it, and no ceiling holds the planner until the owner sets one (#13023) fa9f985
- A new forge's empty home shows one sentence and the composer, then the crew working once it starts (#13025) 1670853
- A person who is not signed in gets a 401 with a sign-in link from every MCP tool call, never a stack trace (#13056) b125ece
- An .stl file opens in the browser as a 3D model you can turn, with its size and triangle count (#12995) f43181d
Direction: #12968
What it protects. A pull never goes red, and never costs a builder run plus a check, because a comment line is longer than 100 columns. On 2026-11-15, 22 of 39 failing gate lines across 15 stranded pulls were
rule "a comment line is wrapped at 100 columns": <file>:<line> is N long; rewrap it. Formatting is not a reason to stop work.Why comments arrived over-long. The repository had no formatter. CLAUDE.md said "formatting runs on save (a hook)", but that hook lives on one Mac, not in the repository, and a builder's sandbox has nothing. Two rules only detected (the added-line rule at 100 columns in
review_rules.ts, andscripts/header-width.tsat 160 with an allow list), so every long line was hand-edited after a red check.The one mechanism now.
src/kernel/comment_wrap.ts:rewrap(text)folds every comment-only line over 100 columns (//runs and*-gutter blocks insrc/,test/,scripts/; vendored code excepted). It reads the file as a lexer does, so strings, template literals and regular expressions are never touched; it leaves fenced code,@examplebodies, tables, indented code, directives and unbreakable words (URLs) as written; list items and@tagskeep their marker with the continuation indented under it; it never moves a line that fits, so it is idempotent.bun scripts/gate.ts --fixrewraps the files the pull changes, then runs the gate. One command;--alldoes the whole tree.rewrapreturns": the detector is the fixer. Its failure is one line naming the command, never line numbers.test/comment-wrap.test.tsis in the always-run set in place oftest/header-width.test.ts.What a builder now does. The brief's push step is
bun scripts/gate.ts --fix(commit what it rewraps) in place ofbun scripts/gate.ts. Nobody rewraps a comment by hand.Should the check apply the fix itself? Not in this pull. The forge makes no fix-up commit on a pull's branch anywhere today, so that would be a new write path (a forge commit under a builder's head, re-triggering its check) rather than a reuse; the one-command fix in the step builders already run is enough here. If stops on this rule still show up after this lands, that is the next change.
Why the rule judges changed files, not the whole tree. The first version of this pull also carried the one-time rewrap (
--fix --all: about 1,800 files, comments only, same code tokens in every file by the TypeScript parser). Its check went red twice in forty minutes on merge conflicts alone, because main lands a pull every few minutes and each one touches a rewrapped comment. A whole-tree rule would also turn every later pull red for a line someone else landed. So the rule and the fix are scoped to what the pull changes: no pull is stopped by a line it did not write, and each file is rewrapped the day it is next touched.bun scripts/gate.ts --fix --allremains for a moment when landings are held.Checked here:
bun scripts/gate.tsexit 0,bun x tsc --noEmitexit 0, the rule tests. The rewrapper's lexer gives the same comment ranges as the TypeScript parser on all 7,019 files, and a whole-tree rewrap changed no code token and was a fixed point.Not from this pull:
test/deadends.test.ts("tool this at src/http/mcp.ts") is red on main since #13056.🤖 Generated with Claude Code