Skip to content

test(analysis): git_candidate_execution materialization tests fail on clones with core.autocrlf=true #3541

Closed

Description

@EffortlessSteven

Classification: verified_current (low severity, environment-dependent; CI is green).

Observation

On this Windows clone with core.autocrlf=true (repo-local git config), three analysis::git_candidate_execution tests fail on clean main:

  • resolves_trees_derives_diff_and_materializes_bytes
  • worktree_mutations_cannot_change_the_analysis_input
  • long_paths_materialize_through_pax_headers

Example (main, crates/ripr/src/analysis/git_candidate_execution.rs:668):

assertion `left == right` failed
  left: "long path content\r\n"
 right: "long path content\n"

Cause

The tests commit LF content, materialize the candidate tree through git (subject/resolve → checkout machinery), then read the materialized file with std::fs::read_to_string expecting LF. With core.autocrlf=true, git's checkout filters rewrite the bytes to CRLF during materialization, so the read-back differs.

Why it matters beyond the tests

Materialized candidate bytes feed evidence extraction; on autocrlf-enabled checkouts the materialized bytes differ from the committed blobs. If evidence should be filter-independent (identity anchored to the git object, not the checkout), reading through git cat-file (bypasses filters) instead of the materialized working-tree file would make the analysis host-config-honest — the same family as the probe-path normalization and seam-cache host-honest fixes.

Reproduction

git config core.autocrlf true && cargo test -p ripr --lib git_candidate_execution on Windows → 3 failures; with false, all pass. Linux CI is unaffected (run history green on main).

Non-claims

No claim that production evidence is currently wrong on Linux CI or for autocrlf=false checkouts; no claim about which fix (test normalization vs git cat-file reads) the maintainers prefer.

Activity

  1. EffortlessSteven commented on Aug 29, 2026

    @EffortlessSteven
    MemberAuthor

    PR #3548 addresses this exact failure: candidate materialization now invokes git archive with core.autocrlf=false, and Windows candidate-execution tests compare extracted bytes with git show candidate blobs. Focused proof passes 10/10, plus fmt, clippy, and diff checks. Keeping this issue open until #3548 completes hosted proof and merges.

  2. EffortlessSteven commented on Aug 29, 2026

    @EffortlessSteven
    MemberAuthor

    In-flight repair: #3548 (force git archive materialization to disable core.autocrlf so candidate-tree bytes remain exact on Windows; tests compare extracted bytes with git show candidate blobs). Its required check was green at its head on 2026-08-29. This issue should close when that lands.

  3. EffortlessSteven commented on Aug 29, 2026

    @EffortlessSteven
    MemberAuthor

    Closing: PR #3548 merged at d42e158, and that merge commit is an ancestor of current main. The core.autocrlf candidate-materialization repair is therefore landed; no remaining issue work is recorded here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions