Skip to content

fix: normalize comparison checkout line endings - #219

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/comparison-line-endings
Oct 13, 2026
Merged

tannerlinsley merged 1 commit into
mainfrom
taren/comparison-line-endings

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Fix the remaining Windows validation problem from #155. Equivalent LF and CRLF checkouts now produce the same comparison input digest.

Thanks to @nafasebra for the original fix. The adapter lifecycle tests from that PR already shipped in 1.0 through d288212. This carries forward the remaining tooling change without replacing the current comparison baseline with older metadata.

The regression failed before the fix and passes afterward. It covers CRLF, mixed line endings and UTF-8 text, and verifies that changed code, lone carriage returns and removed final newlines still change the digest.

Validation: pnpm validate passes all 19 tasks, including 2,221 main-suite tests. The recorded comparison digest is unchanged on this checkout. No runtime changes, bundle budget increases, new CI jobs or package release are needed.

PR #218 is merged and this PR now targets main. Keep #155 open until this remaining fix lands.

Summary by CodeRabbit

  • Bug Fixes
    • Source comparisons now produce consistent results across checkouts that use different Windows or Unix line endings. Changes to source content, including meaningful whitespace changes, continue to affect the comparison.
  • Documentation
    • Added a note describing how line endings are handled when calculating source comparisons.

Co-authored-by: Nafas Ebrahimi <ebranafas@gmail.com>
@changeset-bot

changeset-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3afff5f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a9e544d5-591d-48ff-a54e-237c01158846
📥 Commits

Reviewing files that changed from the base of the PR and between 2f2d9d0 and 3afff5f.

📒 Files selected for processing: 3
  • API-FRICTION.md
  • scripts/comparison-source-revision.mjs
  • scripts/comparison-source-revision.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

📝 Walkthrough

The comparison input digest now normalizes CRLF to LF before hashing UTF-8 text. Regression tests cover line-ending variants and source changes, and the F-197 follow-up documents the behavior.

Changes: Comparison digest normalization

Layer / File(s) Summary
Digest normalization and regression coverage
scripts/comparison-source-revision.mjs, scripts/comparison-source-revision.test.mjs, API-FRICTION.md
The digest calculation converts CRLF to LF before hashing. Tests check that LF and CRLF inputs produce the same digest, while source edits, CR-only line endings, and removal of a final newline produce different digests. The follow-up documents the normalization and test coverage.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 3afff

The change makes the current text inputs hash consistently across LF and CRLF checkouts, with regression coverage for line-ending and content changes. No material merge risk was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: normalizing line endings in comparison checkouts.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tannerlinsley
tannerlinsley changed the base branch from taren/tooltip-animation-lifecycle to main October 13, 2026 21:39
@nx-cloud

nx-cloud Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 3afff5f

Command Status Duration Result
nx run charts-workspace:ci-distributed ✅ Succeeded 46s View ↗
nx run charts-workspace:package-check ✅ Succeeded <1s View ↗
nx run charts-workspace:benchmark-check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-10-13 21:51:05 UTC

@tannerlinsley
tannerlinsley merged commit 7069309 into main Oct 13, 2026
16 checks passed
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