Skip to content

test(ci): ci tests start no git on fake - #2894

Merged
dan-petty merged 1 commit into
mainfrom
test/2179-ci-tests-reach-git-fake
Oct 31, 2026
Merged

dan-petty merged 1 commit into
mainfrom
test/2179-ci-tests-reach-git-fake

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Closes #2179

Summary

Migrate all CI, test runner, and fail-to-pass tests to use the hermetic git fake or pure-Python state simulators instead of spawning git subprocesses.

Changes

  • Migrated tests/commands/test_uv.py to route git operations through git_fake and use a local hermetic nested worktree fixture.
  • Migrated tests/commands/test_test_runner.py with pure-Python project state simulation for file operations.
  • Migrated tests/commands/test_ci_build_index.py using git_fake answers for repository layout.
  • Migrated tests/ci/test_ci_cache_fingerprint.py and tests/ci/test_ci_cache.py with pure-Python git status and hash object simulation.
  • Migrated tests/ci/test_ci_mutate.py using module-level pure-Python fake handlers.
  • Migrated tests/ci/test_fail_to_pass.py using pure-Python worktree and test simulation on git_fake.
  • Migrated tests/commands/test_ci.py to use _make_ci_git_fake for workspace fingerprinting and removed obsolete image change detection tests per Criterion 3.

Verification

  • Tested with audit hook: 0 tests start git subprocesses across all 8 files.
  • Test suite runtime decreased from 28.99s (230 tests) to 11.45s (228 tests).
  • All checks pass cleanly with uv run devops ci.

The CI, test runner and fail-to-pass tests start no git binary and reach git through the git fake or pure-Python state simulators.

Duration across the eight test files improved from 28.99s (230 tests) down to 11.45s (228 tests). Obsolete devcontainer image change detection workflow tests in test_ci.py were deleted per Criterion 3.

Closes #2179
@dan-petty dan-petty added type/test Type test: a new or changed test scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners labels Oct 31, 2026
@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 18:07
@dan-petty
dan-petty merged commit 5305ad3 into main Oct 31, 2026
18 checks passed
@dan-petty
dan-petty deleted the test/2179-ci-tests-reach-git-fake branch October 31, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners type/test Type test: a new or changed test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(ci): the devops ci, devops test and fail-to-pass tests start no git and reach git through the git fake

1 participant