# Refactor: delete unused FindExistingTileAsync

**Task**: AZ-376_refactor_delete_findexistingtile
**Name**: Delete dead FindExistingTileAsync method
**Description**: Remove `FindExistingTileAsync` from `ITileRepository` and `TileRepository` — no callers exist and it takes the obsolete `version` argument C06 is removing.
**Complexity**: 1 point
**Dependencies**: None (verify with one final grep before deletion)
**Component**: DataAccess
**Tracker**: AZ-376
**Epic**: AZ-350

## Problem

`SatelliteProvider.DataAccess/Repositories/ITileRepository.cs` declares `FindExistingTileAsync(latitude, longitude, tileSizeMeters, zoomLevel, version)` and `SatelliteProvider.DataAccess/Repositories/TileRepository.cs:51-76` implements it, but no caller exists in the codebase. Dead code that also takes the obsolete `version` argument C06 is removing.

## Outcome

- Method removed from both the interface and the implementation.
- `dotnet build` succeeds across all consumers.
- 37 unit + 5 smoke tests stay green.

## Scope

### Included
- Verify with `grep -r "FindExistingTileAsync"` that no caller exists outside docs and the implementation file.
- Delete the method declaration from `ITileRepository`.
- Delete the implementation from `TileRepository`.
- Update `_dependencies_table.md` if needed.

### Excluded
- Replacing it with anything (no caller wants it).

## Acceptance Criteria

**AC-1: Method gone**
Given the post-refactor source
When grepped for `FindExistingTileAsync`
Then matches are confined to docs (and even those should be cleaned up if they describe the method as live).

**AC-2: Build succeeds**
Given the post-refactor solution
When `dotnet build` runs
Then it succeeds with zero errors.

**AC-3: Tests stay green**
Given the post-refactor build
When `scripts/run-tests.sh --smoke` runs
Then all 37 unit + 5 smoke scenarios pass.

## Constraints

- Verify dead-code claim with one final grep at implementation time.

## Risks & Mitigation

**Risk 1: reflection / DI / dynamic dispatch consumes it**
- *Risk*: a hidden consumer via reflection.
- *Mitigation*: per `coderule.mdc` dead-code rule, scan for reflection / DI registrations that name the method. None are expected; verify before deletion.

Full change entry: `_docs/04_refactoring/03-code-quality-refactoring/list-of-changes.md` (C23).
