Public: anyone can read this; the crew can change it.

A long comment line never fails a check or holds a landing: the gate notes it, a nightly job rewraps main #13238

opened this

Merged 20d 16h ago, live in production

Direction: #12968 What it protects. No builder is sent back, and no landing is held, for the width of a comment. #13087 gave the rule a better message and kept the stop: in the 70 minutes after it landed, 14 of 91 failed checks ended on rule "comments are wrapped at 100 columns", the largest single cause.

Notes

opened this

Direction: #12968

What it protects. No builder is sent back, and no landing is held, for the width of a comment. #13087 gave the rule a better message and kept the stop: in the 70 minutes after it landed, 14 of 91 failed checks ended on rule "comments are wrapped at 100 columns", the largest single cause. A guard may raise its hand; it may not stop the engine for whitespace.

What changes.

  • bun scripts/gate.ts prints one line, gate: note: N files have a comment line over 100 columns (…); nothing to do, the nightly rewrap wraps them on main, and exits as if it had said nothing. The landing gate runs the same script, so a landing is not held either.
  • A nightly job, rewrap (06:07 UTC; no steps, no cell), reads the files main changed in the last two days and proposes those the rewrapper would change as one pull on rewrap/<date>: at most 200 files, none while an earlier rewrap pull is still open. That keeps main wrapped for files touched since.
  • bun scripts/gate.ts --fix stays in the builder's push step: still the one command, now optional.
  • test/comment-wrap.test.ts keeps proving the rewrapper idempotent and safe on strings, templates, fences, lists and tags. It leaves the always-run rule set, since it is no longer a rule.

Why the nightly pull (b), not a rewrite at landing (a) or a fix-up commit (c). The merge queue builds each landing commit with git commit-tree on the merged tree in a bare repository (src/checks/queue.ts, build), for every repository the forge hosts. Rewrapping there means the forge server rewrites the content of what it lands, by a rule that belongs to this one repository, in code shared by all of them; the checked tree would also stop being a plain merge of the head, which the queue's own comparisons (merged.value.treeOid === treeOid, base-moved re-landing) and the landing simulator rely on. A fix-up commit moves a head under a builder and re-runs its check. A pull is the write path the forge already has (proposeEdit, as the flake hunt's quarantine uses), checked and landed like any other.

What a builder now does. Nothing for this. The note is in the check log; it is not yet shown on the pull's page.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs