Skip to content

fix: keep version check inputs LF on Windows - #448

Open
agammann wants to merge 1 commit into
vxcontrol:mainfrom
agammann:fix/windows-shell-checkout-line-endings
Open

agammann wants to merge 1 commit into
vxcontrol:mainfrom
agammann:fix/windows-shell-checkout-line-endings

Conversation

@agammann

@agammann agammann commented Oct 15, 2026 •

Copy link
Copy Markdown

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

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-15T05:17:26.399074Z 4edfeb4 PR 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.

Copy link
Copy Markdown
Author

The Docker and E2E workflow runs for this PR were marked failed after remaining pending, with no jobs shown in either run. Could a maintainer check the workflow approval or configuration and advise on running the appropriate PR checks? I can address any results.

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