feat(standard): §6.5 Text File Format (LF, UTF-8, final newline) — v1.51 - #31
Conversation
The Standard fixed the content conventions of a file — Texinfo as prose source (§8), ISO 8601 timestamps (§14), SPDX headers (§4.3) — and never said how a text file is terminated. The convention existed anyway: anvil and bravais already carry `* text=auto eol=lf`, loran and caliper already carry the three .editorconfig keys. Four repositories out of ~99, each having arrived at it independently. §6.5 states the three rules — LF (U+000A) line endings, a final newline, UTF-8 without BOM — requires .gitattributes and .editorconfig at every repository root, and requires CI to fail on a CR byte in a tracked text file. .gitattributes is mandatory because it is the only mechanism independent of a contributor's core.autocrlf, which defaults to true on Windows; .editorconfig because it reaches editors that never consult Git. CRLF exceptions (vendored upstream per §4.2, cmd.exe scripts, CRLF-mandating formats) are pinned explicitly rather than left implicit. Wire-protocol CRLF is out of scope — the section governs files on disk. §16 gains a §6.5 bullet. This repository self-applies in the same change: .gitattributes, .editorconfig, and a CR check added to the existing CI lint job. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XGgUmYtDJxo8EMKyB5LdoV
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 882eff51bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Text file hygiene (LF line endings) | ||
| run: | | ||
| CR=$(printf '\r') | ||
| if git grep -Il "$CR" -- .; then |
There was a problem hiding this comment.
Exclude sanctioned CRLF files from the scan
When a repository uses the new §6.5-sanctioned *.bat text eol=crlf exception, actions/checkout materializes that tracked text file with CRLF and this command returns its path, so the lint job fails despite the explicit exception. Git’s git grep -h defines -I only as “don't match patterns in binary files”; text eol=crlf marks the file as text, not binary (reproduced with a tracked probe.bat). The scan therefore needs explicit exception handling rather than relying on -I.
Useful? React with 👍 / 👎.
What
Adds §6.5 — Text File Format to chapter §6 (Platform & Systems Requirements), and bumps the Standard to v1.51 (2026-08-29).
Why
The Standard has fixed the content conventions of a Spacecraft Software file for a long time — §8 makes Texinfo the canonical prose source, §14 fixes ISO 8601 and UTC, §4.3 fixes the SPDX header every file carries — and had never said how a text file is terminated.
@documentencoding UTF-8in this document's masthead was the only encoding statement anywhere, and it governs one file.The convention existed anyway, unwritten.
anvilandbravaisship.gitattributeswith* text=auto eol=lf;loranandcalipership.editorconfigwithcharset/end_of_line/insert_final_newline. Four repositories out of ~99, each having arrived at it independently, with nothing making the other 95 follow.The failure mode is silent where it originates. Git's
core.autocrlfdefaults totrueon Windows, so a clone of a repository without.gitattributesgets a working tree rewritten to CRLF; the contributor's editor shows nothing unusual, and the commit that leaves their machine rewrites every line of every file they touched. The reviewer gets a whole-file diff with the actual edit buried in it.The rules
#-comment parsing, and config readers..gitattributesrequired* text=auto eol=lf— the only mechanism independent of per-clone Git config..editorconfigrequiredcmd.exescripts, CRLF-mandating formats — each pinned explicitly in.gitattributes, never implicit.Out of scope: wire-protocol CRLF (HTTP, SMTP) — §6.5 governs files on disk, not bytes on a socket.
Changes
The_Steelbore_Standard.texi— masthead → 1.51 / 2026-08-29 (all three lines); §6 menu; new §6.5; §16 checklist bulletThe_Steelbore_Standard.md— regenerated companionCHANGELOG.md— v1.51 entry.gitattributes,.editorconfig, and a POSIX CR check added to the existing CIlintjobVerification
makeinfo --no-split— zero errors, zero warningsreuse lint— compliant (13/13 files; both new dotfiles carry inline SPDX tags, so noREUSE.tomlchange needed)validate-configs.py— 3 config files checked, 0 failedFollow-up
The Construct-side sync (
spacecraft-steelbore-standardSKILL.md +references/CHANGELOG.md) lands as its own PR at this same version and date. The umbrella-wide rollout of the two config files to the remaining ~95 repositories is a separate migration, one PR per repo.🤖 Generated with Claude Code
https://claude.ai/code/session_01XGgUmYtDJxo8EMKyB5LdoV