Skip to content

Ship .admx/.adml with consistent line endings across all download methods - #43

Merged
Joel Platek (VAsHachiRoku) merged 1 commit into
mainfrom
fix/admx-line-endings-gitattributes
Aug 24, 2026
Merged

Ship .admx/.adml with consistent line endings across all download methods#43
Joel Platek (VAsHachiRoku) merged 1 commit into
mainfrom
fix/admx-line-endings-gitattributes

Conversation

@VAsHachiRoku

Copy link
Copy Markdown
Contributor

Summary

Ensures the ADMX/ADML administrative templates ship with consistent line endings across every download method, so the tool's source-file hash verification passes no matter how the code is obtained.

Background

The MD5 hashes recorded in config/tiermodel-admx.json and config/tiermodel-adml-en-US.json are computed over each file's exact bytes — including line endings. The Windows templates were recorded as CRLF; the Office/Edge templates as LF. Because the repo had no .gitattributes rules for .admx/.adml, Git delivered these files with different line endings depending on how they were fetched:

How the code is obtained Line endings delivered Source-hash check
TierModel-<ver>.zip release asset CRLF (built on a Windows runner) ✅ passes
GitHub "Source code (zip)" raw LF blobs ❌ Windows files fail
git clone with core.autocrlf=false/input LF ❌ Windows files fail

A customer who downloaded the "Source code (zip)" (instead of the release asset) hit Source ADMX file hash mismatch on all Windows templates, which blocks the ADMX deployment.

Fix

Mark *.admx and *.adml as binary in .gitattributes so Git stores and delivers their exact bytes unchanged on every path — git archive (which powers the "Source code (zip)"), and git clone regardless of the user's core.autocrlf. The 30 affected files are re-staged so their blobs match the recorded hashes.

No file content changes — this only fixes line-ending handling. The TierModel-<ver>.zip release asset is byte-identical before and after.

Verification

60/60 hash match confirmed across all three delivery paths:

  • git archive (source-zip): 60/60 ✅
  • git clone -c core.autocrlf=false: 60/60 ✅
  • git clone -c core.autocrlf=true: 60/60 ✅

Also note: this commit adds the repo's first tracked .gitattributes (the existing Squad merge=union rules were only ever a local, untracked file — they are now properly committed alongside the ADMX rules).

Release note

Intended to re-release v1.3.1 in place (no version bump — this is a packaging/line-ending fix with no functional code change). After merge, the v1.3.1 tag is moved to this commit so GitHub regenerates the "Source code (zip)" with correct line endings.

…hods

The MD5 hashes recorded in config/tiermodel-admx.json and
config/tiermodel-adml-en-US.json are computed on the files' exact bytes,
including line endings (Windows templates = CRLF, Office/Edge = LF). Because
the repository had no .gitattributes rules for these files, Git delivered them
with different line endings depending on how the code was obtained:

  - TierModel-<ver>.zip release asset  -> CRLF (matched, worked)
  - GitHub "Source code (zip)"          -> raw LF blobs (Windows files failed
                                           the source-hash check)
  - git clone with core.autocrlf=false  -> LF (same failure)

Mark *.admx and *.adml as binary so Git stores and delivers their exact bytes
unchanged on every path (git archive, and clone regardless of core.autocrlf).
Re-stage the 30 affected files so their blobs match the recorded hashes. No
file content changes; this only fixes line-ending handling. Verified 60/60
hash match across git archive, autocrlf=false, and autocrlf=true.
Copilot AI lite review requested due to automatic review settings August 24, 2026 06:45

Copilot AI 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.

Pull request overview

This pull request aims to ensure the repository’s shipped ADMX/ADML administrative templates have byte-stable contents (especially line endings) across git archive / “Source code (zip)”, git clone (with varying core.autocrlf), and release assets, so the module’s MD5-based source-file verification remains consistent.

Changes:

  • Add .gitattributes rules for *.admx / *.adml to prevent Git line-ending transformations.
  • Re-stage multiple ADMX/ADML files so their committed blobs align with the recorded MD5 hashes used by the tool.
  • No functional PowerShell logic changes; this is a packaging/byte-consistency change.

Reviewed changes

Copilot reviewed 1 out of 31 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.gitattributes Adds Git attributes intended to preserve exact ADMX/ADML bytes across checkout/archive paths.
config/admx/UserProxySettings.admx Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/Sudo.admx Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/NetworkProvider.admx Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/LocalSecurityAuthority.admx Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/LAPS.admx Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/Kerberos.admx Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/kdc.admx Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/GameDVR.admx Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/DeviceGuard.admx Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/UserProxySettings.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/Sudo.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/NetworkProvider.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/MSS-legacy.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/LocalSecurityAuthority.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/LAPS.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/LanmanWorkstation.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/LanmanServer.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/KDC.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/GameDVR.adml Re-staged to ensure consistent bytes/line endings for hash verification.
config/admx/en-US/DeviceGuard.adml Re-staged to ensure consistent bytes/line endings for hash verification.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .gitattributes
Comment on lines +10 to +11
*.admx binary
*.adml binary
@VAsHachiRoku
Joel Platek (VAsHachiRoku) merged commit 6881d0e into main Aug 24, 2026
10 checks passed
@VAsHachiRoku
Joel Platek (VAsHachiRoku) deleted the fix/admx-line-endings-gitattributes branch August 24, 2026 07:06
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.

2 participants