# How to use GitHub Copilot to test TarReader disposal

Copilot investigated TarReader disposal, found the runtime fix already present and added synchronous and asynchronous regression tests before the PR merged.

Agent: GitHub Copilot (via Copilot coding agent)
Tools: GitHub Copilot, TarReader, System.Formats.Tar, GitHub
Category: Software & DevOps
Date: 2026-01-06

Outcome: Copilot investigated TarReader disposal, found the runtime fix already present and added synchronous and asynchronous regression tests before the PR merged; the pull request merged into dotnet/runtime main.

## Steps

1. Investigated disposal bug and found production fix already present.
2. Added full/partial/no-read cases for synchronous and asynchronous GetNextEntry.
3. Ran Tar test suite.

Human oversight: Human scoped task and reviewed/merged.

Source: [Copilot (on behalf of stephentoub) on GitHub](https://github.com/dotnet/runtime/pull/122945)

Canonical URL: https://agentsinuse.com/use-cases/github-copilot-to-test-tarreader-disposal/
