Skip to content

Move system-dependent unit coverage to functional components - #2163

Merged
Tyrie Vella (tyrielv) merged 6 commits into
microsoft:masterfrom
tyrielv:tyrielv/isolated-unit-tests
Nov 17, 2026
Merged

Tyrie Vella (tyrielv) merged 6 commits into
microsoft:masterfrom
tyrielv:tyrielv/isolated-unit-tests

Conversation

@tyrielv

@tyrielv Tyrie Vella (tyrielv) commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem and Context

Unit tests currently start Git, shell commands, and the mount executable, and use real HTTP and named-pipe connections.
These dependencies require machine setup and place integration failures in the unit-test gate.
The real behavior checks remain important and must not disappear behind mocks.

Changes

  • Move 101 existing integration cases into the existing functional test suite.
  • Preserve real Git authentication matching, configuration precedence, credential-file locks, worktree settings, and Git/libgit2 comparisons.
  • Preserve process timeout, output-callback, argument round-trip, and mount executable exit-code checks.
  • Preserve the current upstream worktree-ID, locale-policy, output-redirection, and standard-input checks.
  • Preserve loopback HTTP timeout, status, credential-policy, connection-permit, and cancellation-ownership checks.
  • Preserve named-pipe telemetry delivery, reconnect, mount-error, and connection-timeout checks.
  • Keep isolated policy, parser, controlled-stream, and filesystem-only libgit2 tests in the unit suite.
  • Keep native hook executable tests and deterministic in-process Windows API tests in the unit suite.
  • Apply isolated Git environments to child processes without changes to the functional runner environment.
  • Make the shared Git process factory overridable. Functional fixtures still use the real command, retry, and diagnostic paths.
  • Run scenarios that require native global configuration or unattended-state changes in bounded child test processes.
  • Preserve exact parameterized case selection and report child assertion failures through the normal functional fixtures.
  • Add functional tests for concurrent Git configurations, failed process starts, and cancellation cleanup. These tests assert that the parent environment stays unchanged.
  • Resolve Git through the product platform API. Use that installation for Bash and every local Git fixture.
  • Resolve the mount executable beside the selected payload.
  • Run the migrated tests with the other functional tests through the existing build.yaml workflow and CI slices.
  • Keep release-build test execution unchanged. No separate component step or wrapper is necessary.
  • Document that API-level functional tests can use real local dependencies without a mounted enlistment or remote repository.

Preserve real Git, process, HTTP, and named-pipe checks in local functional
fixtures. Keep isolated policy, parser, filesystem, native hook, and
in-process Windows API coverage in the unit suite.

Run local functional components in PR and release build jobs through the
existing runner and service lifecycle.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <[email protected]>
Use the product Git installation resolver for functional tests and derive
Bash from the same installation. Initialize the platform before settings.

Complete filesystem setup before environment mutation. Quote test result
paths and preserve the surviving unit fixture encoding.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <[email protected]>
Remove the extra component steps from release and PR builds.
Keep the migrated fixtures in the existing functional discovery and CI
slices, which use the controlled Git installation from the build workflow.

Remove the redundant component wrapper and clarify fixture organization.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <[email protected]>
Apply Git configuration overrides to child process launch settings instead
of the functional runner environment. Keep real Git execution through the
shared process factory.

Run native configuration and unattended-state scenarios in isolated test
processes. Preserve exact case selection, bounded cleanup, and assertion
results without a separate suite or CI step.

Add functional tests for concurrent configuration isolation, failed starts,
and cancellation cleanup without parent environment changes.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <[email protected]>
Verify inherited Git configuration overrides and preserve product launch
policy. Stop owned concurrent reads after a timeout.

Observe canceled process termination through an independent handle and use
a single child process. Keep the concurrency barrier safe across retries.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <[email protected]>
Move the new real-Git worktree ID and locale cases into isolated functional
workers. Move the standard-input process check into the same suite.

Keep all assertions and parameters. Remove the remaining unit references to
Git discovery instead of restoring external-program dependencies.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <[email protected]>
@tyrielv
Tyrie Vella (tyrielv) marked this pull request as ready for review November 17, 2026 15:58
@KeithIsSleeping

Copy link
Copy Markdown

[KeithBot]: ✅ No issues found · iteration 4 (dbee22b)

Approach: Right layer: real Git, process, HTTP and pipe cases join the existing FT slices, which run the shipped microsoft/git, so the unit gate no longer needs Git on PATH.

Validation

  • ✅ Unit suite: head 1931, base 2031
  • ✅ Unit suite with no Git on PATH
  • ✅ LocalComponents FTs locally (105)
  • ✅ CI run 43972880869, 34 jobs
  • ✅ Moved-case inventory, base vs head
  • ✅ Child-harness failure injection
  • ✅ Mutants caught by moved FTs
  • ✅ CommandLine.Tests at head and base
  • ✅ Dev script /result quoting
  • ✅ Merge with master 60bffb4

Approving.

🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon + approach review · reply on a thread to dispute

@tyrielv
Tyrie Vella (tyrielv) merged commit d2a164f into microsoft:master Nov 17, 2026
35 checks passed
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.

2 participants