Skip to content

fix: let archived fixtures bypass Git version gates (#1622)#2732

Draft
Sebastian Thiel (Byron) wants to merge 2 commits into
mainfrom
testools-use-archive
Draft

fix: let archived fixtures bypass Git version gates (#1622)#2732
Sebastian Thiel (Byron) wants to merge 2 commits into
mainfrom
testools-use-archive

Conversation

@Byron

Copy link
Copy Markdown
Member

Tasks

This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.

  • refackiew

Everything below this line was generated by Codex GPT-5.

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

Summary

  • add Git-version-aware scripted fixture loaders that require an identity-matching archive when the installed Git is incompatible
  • keep required fixtures in a dedicated cache, honor archives even with GIX_TEST_IGNORE_ARCHIVES, and never generate them with incompatible Git
  • run the affected rev-spec tests against the Git 2.50.1 archive on Git 2.47.x, while skipping only when the matching SHA-1/SHA-256 archive is unavailable
  • migrate Git >= 2.31 worktree tests and restore 32-bit CI to Debian stable

Git 57fb139b5e introduced reversed :/ traversal in 2.47.x; Git 0ff919e87a restored youngest-first ordering in 2.48.0.

Refs #1622

Validation

  • cargo test -p gix-testtools --all-features --lib
  • cargo test -p gix-testtools --no-default-features --lib
  • cargo nextest run -p gix revision::spec::from_bytes --no-default-features --features max-performance-safe,comfort,basic
  • GIX_TEST_FIXTURE_HASH=sha256 cargo nextest run -p gix revision::spec::from_bytes::regex::find_youngest_matching_commit --no-default-features --features max-performance-safe,comfort,basic
  • focused worktree tests
  • cargo clippy -p gix-testtools --all-targets --all-features -- -D warnings
  • cargo clippy -p gix --tests -- -D warnings
  • cargo doc -p gix-testtools --no-deps
  • cargo fmt --all -- --check
  • git diff --check
  • Codex commit review, including a simulated Git 2.47 archive-path test

Git-dependent fixture tests currently skip outright when the installed Git is incompatible, even when a checked-in archive contains a known-good fixture that could run safely. This also keeps 32-bit CI pinned to Debian 12 because Debian 13 ships affected Git 2.47.x.

Add guarded scripted-fixture loaders that use normal generation for compatible Git versions and require an identity-matching archive otherwise. Required archives use a dedicated cache, ignore GIX_TEST_IGNORE_ARCHIVES, and never fall back to generation. Apply this to minimum-version worktree tests and the shared rev-spec fixture, then return 32-bit CI to Debian stable.

Git 57fb139b5e introduced reversed :/<text> traversal in 2.47.x; Git 0ff919e87a restored youngest-first ordering in 2.48.0. The regression tests cover missing, stale, ignored, and valid required archives.

Validated with:
- cargo test -p gix-testtools --all-features --lib
- cargo test -p gix-testtools --no-default-features --lib
- cargo nextest run -p gix revision::spec::from_bytes
- focused default and non-revparse-regex rev-spec tests
- focused worktree tests
- cargo clippy for gix-testtools and supported gix features
- cargo doc -p gix-testtools --no-deps

Refs #1622
Comment thread .github/workflows/ci.yml Fixed
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.

3 participants