Skip to content

feat(standard): §6.5 Text File Format (LF, UTF-8, final newline) — v1.51 - #31

Merged
UnbreakableMJ merged 1 commit into
mainfrom
feat/6.5-text-file-format
Aug 28, 2026
Merged

feat(standard): §6.5 Text File Format (LF, UTF-8, final newline) — v1.51#31
UnbreakableMJ merged 1 commit into
mainfrom
feat/6.5-text-file-format

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

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-8 in this document's masthead was the only encoding statement anywhere, and it governs one file.

The convention existed anyway, unwritten. anvil and bravais ship .gitattributes with * text=auto eol=lf; loran and caliper ship .editorconfig with charset/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.autocrlf defaults to true on Windows, so a clone of a repository without .gitattributes gets 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

LF line endings Lines terminate with LF (U+000A). CRLF and lone CR prohibited.
Final newline Every text file ends with a newline.
UTF-8, no BOM The BOM breaks shebangs, #-comment parsing, and config readers.
.gitattributes required * text=auto eol=lf — the only mechanism independent of per-clone Git config.
.editorconfig required Reaches editors that never consult Git.
CI gate CI MUST fail on a CR byte in a tracked text file.
Exceptions Vendored upstream (§4.2), cmd.exe scripts, 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 bullet
  • The_Steelbore_Standard.md — regenerated companion
  • CHANGELOG.md — v1.51 entry
  • Self-application: .gitattributes, .editorconfig, and a POSIX CR check added to the existing CI lint job

Verification

  • makeinfo --no-split — zero errors, zero warnings
  • reuse lint — compliant (13/13 files; both new dotfiles carry inline SPDX tags, so no REUSE.toml change needed)
  • validate-configs.py — 3 config files checked, 0 failed
  • New CI step verified against a deliberately CRLF-ified probe file (detected) and the clean tree (passes)

Follow-up

The Construct-side sync (spacecraft-steelbore-standard SKILL.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

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .github/workflows/ci.yml
- name: Text file hygiene (LF line endings)
run: |
CR=$(printf '\r')
if git grep -Il "$CR" -- .; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@UnbreakableMJ
UnbreakableMJ merged commit 8a40c64 into main Aug 28, 2026
2 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the feat/6.5-text-file-format branch August 28, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant