Skip to content

fix(test): address failing windows test by standardizing line endings#1758

Open
Hweinstock wants to merge 1 commit into
aws:refactorfrom
Hweinstock:fix/windows-tests
Open

fix(test): address failing windows test by standardizing line endings#1758
Hweinstock wants to merge 1 commit into
aws:refactorfrom
Hweinstock:fix/windows-tests

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Built on #1748

Problem

Windows tests are failing #1751.

Root Cause

When the CI runner checks out the repo on windows, its changing the \n at the end of line to \r\n to be windows friendly (crlf). However, this causes the tests to fail when comparing results against golden files, which now include extra \r at the end of each line.

Solution

Normalize line endings on each commit, and on each checkout via .gitattributes.

From docs here https://git-scm.com/docs/gitattributes#_end_of_line_conversion:

If the eol attribute is unspecified for a file, its line endings in the working directory are determined by the core.autocrlf or core.eol configuration variable (see the definitions of those options in git-config[1]). If text is set but neither of those variables is, the default is eol=crlf on Windows and eol=lf on all other platforms.

We set text=auto to ensure windows developers cannot commit code with lines following crlf, and eol=lf to ensure that checkouts on windows leverage the lf format and don't attempt to reformat.

Testing

I do not have a windows laptop readily available, but this tests are now passing in CI with the fix.

@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Jul 14, 2026
@codecov-commenter

codecov-commenter commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (refactor@b5e68f8). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             refactor    #1758   +/-   ##
===========================================
  Coverage            ?   93.59%           
===========================================
  Files               ?      115           
  Lines               ?     6681           
  Branches            ?        0           
===========================================
  Hits                ?     6253           
  Misses              ?      428           
  Partials            ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Jul 14, 2026
@Hweinstock Hweinstock marked this pull request as ready for review July 16, 2026 00:02
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