Compare commits

...

6 Commits

Author SHA1 Message Date
Mikkeli Matlock 74dfdc50cc Merge branch 'fix/gitattributes-stray-cr' 2026-09-14 01:41:30 +09:00
Mikkeli Matlock 94d41d5c8a fix: remove a stray CR byte from .gitattributes
The previous commit wrote a literal carriage-return byte into a comment, where
the text was meant to show the two characters backslash-r. Git's content sniffing
treats a lone CR as a sign of binary data, so .gitattributes itself was classed
-text (git ls-files --eol reported i/-text): the one file in the repository
that the new LF policy could not normalise.

The rules themselves were never affected - the byte sat inside a comment, and
deploy.bat and the sources were already checking out with the intended endings.

The comment now says "a trailing CR byte" in words. .gitattributes reports
i/lf w/lf, and `git add --renormalize .` stages nothing else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LU1NRL7fAaZTtFMTTPn2b1
2026-09-14 01:41:30 +09:00
Mikkeli Matlock b27ef57676 Merge branch 'chore/lf-line-endings' 2026-09-14 01:39:09 +09:00
Mikkeli Matlock c940f31ec7 chore: pin LF line endings in .gitattributes
The branding checker failed all 29 of its sites on Windows while passing on the
Linux CI runner. Nothing had drifted. Git for Windows installs with
core.autocrlf=true, which checked tools/branding-sites.tsv out as CRLF, and the
checker reads that table with `read` - so every row's last field, the pattern,
gained a trailing \r and matched nothing. Only *.sh was pinned to LF, which is
why the scripts were fine and their data was not.

Set the policy in the repository rather than trusting each machine:

    * text=auto eol=lf       LF in the repo and every working tree, every OS
    *.sh text eol=lf         kept explicit: a CRLF shebang is a hard failure
    *.bat/*.cmd eol=crlf     the one exception; cmd.exe misparses LF batch files

An attribute beats core.autocrlf, so a fresh clone gets LF however its machine
is configured. Verified in a throwaway repo: under autocrlf=true a text file
checks out LF and a .bat checks out CRLF.

No blob changes. Every committed blob was already LF (git ls-files --eol shows
i/lf throughout) and `git add --renormalize .` stages nothing but this file.
The working tree was re-checked-out to match: 25 files CRLF -> LF, deploy.bat
LF -> CRLF. Checker 40 passed / 0 failed, build clean, 20 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LU1NRL7fAaZTtFMTTPn2b1
2026-09-14 01:39:09 +09:00
mikkeli a8f1244b00 Merge branch 'ci/validate-workflow-changes'
CI / Build (push) Successful in 30s
Include the workflow file in both path filters so CI changes are self-validating.
2026-09-04 19:33:12 +09:00
mikkeli d107127017 ci: let a workflow change validate itself
Adds .github/workflows/** to both path filters. A broken step, a moved
script path or a wrong runner label now fails on the commit that caused
it, instead of surfacing later against an unrelated source change and
looking like that change's fault.

This session produced exactly that bug: after the branding tools moved
under tools/, the workflow still ran `sh check-branding.sh` at the old
path, and it was caught by reading the file rather than by CI.

The limit is worth stating: this validates the job body, not the trigger
block. Break `on:` and the symptom is silence, which is indistinguishable
from success.

Workflow edits are rare enough that the extra builds cost nothing, and CI
config is the definition of how the project is built and verified — it
belongs on the source side of "source code edits only", not with the docs.

kolmekivi additionally gains the pull_request path filter the other two
already had.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHt4DykxXaQnyaJfyS8KCn
2026-09-04 19:33:12 +09:00
2 changed files with 26 additions and 3 deletions
+19 -3
View File
@@ -1,4 +1,20 @@
# Shell scripts must keep LF endings. core.autocrlf=true on Windows would # Line endings: LF in the repository and in every working tree, on every OS.
# otherwise check them out CRLF, which a strict POSIX sh (dash, CI containers) #
# rejects at the shebang. # This file is the policy, not each machine's git config. Git for Windows installs
# with core.autocrlf=true, which checks text out as CRLF; an attribute here beats
# that setting, so a fresh clone gets LF regardless of how its machine is set up.
#
# It matters beyond tidiness. tools/branding-sites.tsv is read line by line with
# `read`, and under CRLF every row's last field gained a trailing CR byte - so the
# branding checker reported all 29 sites as missing on Windows while passing on the
# Linux CI runner. text=auto leaves genuinely binary files alone.
* text=auto eol=lf
# Shell scripts are pinned explicitly as well: a strict POSIX sh (dash, CI
# containers) rejects a CRLF shebang outright rather than misbehaving quietly.
*.sh text eol=lf *.sh text eol=lf
# The exception. cmd.exe misparses LF-only batch files around labels and long
# lines, so these alone are checked out CRLF. The repository copy is still LF.
*.bat text eol=crlf
*.cmd text eol=crlf
+7
View File
@@ -10,6 +10,12 @@ on:
- 'Cargo.lock' - 'Cargo.lock'
- 'bundler.toml' - 'bundler.toml'
- 'tools/**' - 'tools/**'
# This workflow validates itself: a broken step, a moved script path or a
# wrong runner label then fails loudly on the commit that caused it, rather
# than surfacing later against an unrelated source change. Note the limit -
# it checks the job body, not the trigger block above. Break `on:` and the
# symptom is silence, which looks like success.
- '.github/workflows/**'
# Mirrors the push filter. Without it a PR touching only the README would run a # Mirrors the push filter. Without it a PR touching only the README would run a
# full build - the branch filter alone constrains where, not what. # full build - the branch filter alone constrains where, not what.
pull_request: pull_request:
@@ -21,6 +27,7 @@ on:
- 'Cargo.lock' - 'Cargo.lock'
- 'bundler.toml' - 'bundler.toml'
- 'tools/**' - 'tools/**'
- '.github/workflows/**'
workflow_dispatch: workflow_dispatch:
# Target the self-hosted Rust/audio runner registered to the `musiikki` org. # Target the self-hosted Rust/audio runner registered to the `musiikki` org.