chore: switch .gitattributes to LF + renormalize index - #10
Merged
Conversation
The previous policy forced CRLF for *.cs / *.csproj / *.yml / etc. That worked while the repo was Windows-only, but it actively breaks the moment Linux tooling enters the picture (Jenkins agents, Dependabot, GitHub Actions Linux runners, *nix editors). They all write LF, which then disagrees with the eol=crlf attribute on every checkout, leaving the working tree "dirty" on first read. Symptoms this causes today: - Every Dependabot PR shows whole-file diffs from line-ending churn. - Jenkins's pre-merge step (`git merge main` into a PR branch) fails with "Your local changes to the following files would be overwritten by merge: .github/workflows/docs.yml" — the working tree is dirty on a fresh clone before any user-driven action. Fix: pin every text file to LF in both the index and the working tree. Windows editors (Visual Studio / VS Code / Rider) preserve existing line endings, so this is invisible to Windows developers in practice. This commit only changes the .gitattributes policy. The follow-up commit runs `git add --renormalize .` to rewrite every file in the index to match the new policy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Follows the .gitattributes policy switch in the previous commit. `git add --renormalize .` rewrites every text file in the index to match the new eol=lf attribute. The 18 files affected here are the CRLF holdouts that have been driving Dependabot's whole-file diffs and Jenkins's pre-merge "working tree dirty" failures (especially .github/workflows/*.yml and the *.csproj files). This is a byte-level change only — no content semantics shift, no behavior change. The diff looks scary because every line of each file is a deletion + re-addition (line endings are part of the line for git), but the actual content is byte-identical modulo \r. Verified by: - `dotnet build FrigateRelay.sln -c Release` exits 0, warnings-as- errors clean. - All test projects continue to pass via run-tests.sh. After this lands, Dependabot PRs stop churning whole files, Jenkins's pre-merge step stops refusing on a clean checkout, and PR #9 (Testcontainers 4.11) can rebase cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
=======================================
Coverage 89.98% 89.98%
=======================================
Files 51 51
Lines 1408 1408
Branches 235 235
=======================================
Hits 1267 1267
Misses 74 74
Partials 67 67 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
blehnen
added a commit
that referenced
this pull request
May 11, 2026
Closes the 10 actionable findings from CodeRabbit on PR #46: - Extract canonical `StaticOptionsMonitor<T>` to `tests/FrigateRelay.TestHelpers/` and delete six per-file copies (`StaticMonitor<T>` / `StaticOptionsMonitor<T>`) scattered across the Host test suite. Subsumes the simplifier's deferred Phase 17 cleanup. Resolves CR #4, #5, #6. - Use named `metricsTagWriter:` argument at every downstream call site for `EventPump` and `ChannelActionDispatcher` (mirrors `snapshotResolver:` style; guideline: new required-leading params get named args). Resolves CR #2. - Add `Lock`-based synchronization to `CapturingLogger<T>.Entries` add path and `WaitForEntriesAsync` count read — closes a latent races where pump background-thread writes could corrupt the `List<T>` backing field while a test's poll-loop reads from the test thread. Resolves CR #3. - Hoist `normalizedCamera` local in `ChannelActionDispatcher` exception handler so the second `IncrementExhausted` / `IncrementActionsFailed` call reuses the first allocation. Cold path, but free win. Resolves CR #1. - `using var sp` on every `ServiceProvider` in `CodeProjectAiPluginRegistrarTests` so HttpClientFactory + logging are disposed between test methods. Resolves CR #7. - Fix README.md observability link to include the `#bounding-camera-tag-cardinality-otelmetricstagsknowncameras-v130` anchor on the href side (was only in the link text). Resolves CR #8. - Escape the regex pipe inside the inline-code span at `.shipyard/phases/16/VERIFICATION.md:44` so the markdown table doesn't see it as a column delimiter. Resolves CR #9. - Correct `.shipyard/phases/16/results/SIMPLIFICATION-16.md` subtitle from the stale "parallel validators" (Phase 14 scope) to the actual Phase 16 scope. Resolves CR #10. Verification: - `dotnet build FrigateRelay.sln -c Release` — 0 warnings, 0 errors. - Full unit suite (`.github/scripts/run-tests.sh --skip-integration`): 313/313 pass across all 10 test projects. - Host.Tests: 154/154 (was 154 pre-fix; no regression). - CodeProjectAi.Tests: 13/13. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The repo's existing
.gitattributeswas forcing CRLF for*.cs,*.csproj,*.yml, etc. — sensible when the project was Windows-only, but actively broken once Linux tooling enters the picture. Symptoms in production right now:git merge maininto a PR branch) fails witherror: Your local changes to the following files would be overwritten by merge: .github/workflows/docs.ymlon a fresh checkout.Two commits
a0658f8— switch.gitattributespolicy from CRLF to LF. Replaces the per-extensioneol=crlfrules witheol=lf, plus* text=auto eol=lfas the catch-all. Per-extension entries serve as documentation and belt-and-suspenders.ebb784f—git add --renormalize .Mechanical rewrite of the 18 files that were stored as CRLF in the index (the four GitHub workflow YAML files plus 14.csprojfiles). Byte-level only; no content semantics change. The diff looks scary because every line shows a deletion + re-addition, but the actual content is identical modulo\r.Verification
dotnet build FrigateRelay.sln -c Releaseclean, 0 warnings, 0 errors..github/scripts/secret-scan.sh scanpasses (this script itself is now usable on Linux — it had been failing locally with$'\r': command not foundbefore normalization).bash .github/scripts/run-tests.sh --skip-integration— all unit-test projects green.After merge
Test plan
core.autocrlf=true, which is fine — the index stays LF either way).