Skip to content

merge(jobs): rebuild the skill fixture from a cache skeleton - #53

Merged
LittleCoinCoin merged 1 commit into
mainfrom
fix/skill-repo-fixture
Nov 18, 2026
Merged

LittleCoinCoin merged 1 commit into
mainfrom
fix/skill-repo-fixture

Conversation

@LittleCoinCoin

Copy link
Copy Markdown
Member

main has been red since 9560cd3 (#51, roadmap-only): 20 candler-core guards fail on CI with ".claude/skills/htn/SKILL.md is not in commit <main's HEAD>". The code at #50, the last green run, is the same.

Cause

Swatinem/rust-cache saves target/ after deleting every file outside the build profiles. It keeps the directories (cleanup rule: "Files other than CACHEDIR.TAG are removed").

So the cache restores the shared fixture target/tmp/job_skill_repo as empty folders, .git included. skill_repo() only checked that .git exists, so it reused the skeleton. git did not recognise the skeleton as a repository and searched upward until it reached the checkout's own repository.

Fix (test support only)

  • The fixture is reused only when .git/HEAD is a file.
  • A skeleton is pruned by removing empty directories only, deepest first, so a repository that another nextest process has just placed is never deleted.
  • git runs with GIT_CEILING_DIRECTORIES set to the scratch directory, so a missing repository fails at once instead of reading the checkout's.

Evidence

With a planted skeleton in an in-repo target/:

  • the old fixture fails with CI's exact error (2 of 3 sampled guards);
  • the fixed one passes 16 of 16 sampled guards;
  • the full candler-core suite passes 329 of 329;
  • fmt and clippy (-D warnings) are clean.

This also unblocks #52, whose 21 failures share this cause.

🤖 Generated with Claude Code

rust-cache deletes every file outside the build profiles before saving,
but keeps the directories. CI therefore restores target/tmp/job_skill_repo
as empty folders, `.git` included. skill_repo saw `.git` and reused it.
git did not recognise the skeleton as a repository and climbed to the
checkout's own repository, so 20 guards failed on main since 9560cd3
with "SKILL.md is not in commit <main's HEAD>".

The fixture now tests for `.git/HEAD`. It prunes a skeleton by removing
empty directories only, so it never deletes a repository that another
test process has just placed. It also runs git with
GIT_CEILING_DIRECTORIES, so a missing repository fails here instead of
reading the checkout's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LittleCoinCoin
LittleCoinCoin merged commit af67caa into main Nov 18, 2026
8 checks passed
@LittleCoinCoin
LittleCoinCoin deleted the fix/skill-repo-fixture branch November 18, 2026 13:13
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