#448

fix: keep version check inputs LF on Windows

Openagammannwants to merge intofrom

Description of the Change

Problem

On Windows, a fresh clone with core.autocrlf=true checks out shell scripts and the version test fixture with CRLF endings. Bash then rejects scripts/check-version-rule.sh at line 26, and go test ./pkg/version reads a trailing carriage return from version_strings.tsv.

Solution

Add .gitattributes rules that keep tracked *.sh, Dockerfile, and backend/pkg/version/testdata/version_strings.tsv at LF in the working tree. This changes checkout behavior only; no application logic or fixture values change.

Type of Change

  • 🐛 Bug fix
  • 🔧 Configuration change

Areas Affected

  • Infrastructure/DevOps

Testing and Verification

Test Configuration

PentAGI Version: main at 843dfeb4bfc809c09d1bc5022e567c602d8fc9dd
Docker Version: 29.8.2
Host OS: Windows; Linux Docker container for the version rule
LLM Provider: not used
Enabled Features: none

Test Steps and Results

  1. Before this change, use a fresh Windows clone with core.autocrlf=true: bash -n scripts/check-version-rule.sh fails at line 26, and go test ./pkg/version fails because the fixture line ends in \r.
  2. After this change, use a fresh Windows clone with the same setting: git ls-files --eol reports w/lf for all tracked shell scripts, Dockerfile, and the version fixture. bash -n passes for all 16 tracked shell scripts; go test ./pkg/version passes.
  3. Run scripts/check-version-rule.sh in a Linux docker:cli container with Docker socket access. All six label, binary, and version.sh cases pass: check-version-rule: label, binary and version.sh agree on all six.
  4. git diff --check passes. Broader Windows Go tests in pkg/flowfiles still fail on existing Unix-path expectations; this change does not touch that package.

Security Considerations

No permissions, dependencies, or runtime behavior change. The version check can execute on Windows checkouts with Bash.

Performance Impact

None.

Documentation Updates

None required.

Deployment Notes

No migration or configuration change. Existing worktrees can refresh the affected files with Git; fresh clones get LF automatically.

Checklist

  • I ran the existing version test and full version rule against a fresh checkout
  • I have considered security implications
  • Changes are backward compatible

Activity

2
chatgpt-codex-connector[bot]24d ago

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
📝 Code Review⚠️ Failed 2026-10-15T05:17:26.399074Z4edfeb4PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.