Skip to content

Excerpt-vs-clone test skips before running git in an absent clone dir (#8572) - #8576

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8572-20261117T1552Z
Nov 17, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8572-20261117T1552Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes the red Full Suite Gate on main (#8572, run 44096791630): all 8 failing matrix legs failed only on the 10 test_committed_excerpt_is_byte_identical_to_the_clone[*] cases.

Root cause

The test ran git rev-parse HEAD with cwd=<clone> before checking the clone exists. On CI .mainframe_corpora/<name> is absent, so subprocess.run raised FileNotFoundError (Linux/macOS) / NotADirectoryError [WinError 267] (Windows) instead of reaching the documented skip. It passed only on boxes with the clones.

Fix

Check (clone / ".git").exists() and skip first; only then run git and compare to the pin. Logic moved to _assert_excerpt_matches_clone; skip-on-ref-mismatch and byte comparison unchanged.

Class sweep

Class: a test runs a subprocess with cwd= a possibly-absent corpus clone before its skip guard. Siblings checked, all already guard on .git existence first: test_refraction_differential.py::test_full_corpus_no_new_unexplained, test_refraction_snapshot.py::test_full_corpus_snapshot, test_completeness.py::test_pinned_corpus_completeness. Other rev-parse ... cwd= uses in tests run in tmp repos they create.
Sibling gaps: none.

Tests

New test_excerpt_check_skips_when_the_clone_is_absent (missing dir, dir without .git). Verified: 48 passed from an unrelated cwd; with an empty corpora dir the excerpt cases skip (9 skipped) instead of erroring. ruff_audit --ci run.

Facts checked: no other failing tests in the run log; no engine/golden change.

Cross-repo: none.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 17, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 17, 2026 15:58
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 17, 2026 15:59
@squid-shepherd
squid-shepherd Bot merged commit 8b0bf14 into main Nov 17, 2026
59 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8572-20261117T1552Z branch November 17, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant