Skip to content

Refactor git graph tests to use real repositories - #14349

Draft
williammartin wants to merge 1 commit into
williammartin-git-real-repo-test-harnessfrom
williammartin-git-graph-tests
Draft

williammartin wants to merge 1 commit into
williammartin-git-real-repo-test-harnessfrom
williammartin-git-graph-tests

Conversation

@williammartin

Copy link
Copy Markdown
Member

Description

Layer 2 of the native PR stack following #14348 replaces helper-process mocks in the git client graph, ref, branch configuration, push configuration, tag, checkout, path, and worktree test clusters with hermetic local Git repositories. The tests now assert repository state and semantic errors through the layer 1 testRepo harness without changing production behavior.

How did you test this change?

Not tested manually because this change only refactors automated tests and does not alter user-visible behavior.

Key points

  • The malformed symbolic push-ref case remains synthetic because portable real Git cannot produce that output.
  • Pure parser tests remain synthetic for malformed and cross-platform fixture cases.
  • Broader test-suite consolidation is intentionally deferred to a later stack layer.

Notes for reviewers

Start with newTestRepo and the converted Commits, branch configuration, and worktree scenarios in git/client_test.go. PR #14348 provides the shared real-repository harness this layer builds on.

Authorship and follow-up

Who wrote this:

  • A human wrote it.
  • An agent wrote it under close human direction.
  • An agent wrote it independently, and no human has guided the implementation beyond the initial prompt.

Who answers review comments:

  • @williammartin will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted.
  • Nobody has explicitly committed to replying.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@williammartin
williammartin force-pushed the williammartin-git-graph-tests branch from 4e10fe3 to 091f872 Compare September 4, 2026 15:17

This branch has not been deployed

No deployments
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