Found by running, not by reading: `pipdock list` on a venv with one editable install
printed the package twice.
`importlib.metadata.distributions()` walks sys.path and yields one entry per metadata
directory. `pip install -e` puts the project's own src/<name>.egg-info on sys.path via the
.pth file, so the package is discovered both there and at the venv's .dist-info. `pip list`
shows it once; PipDock showed it twice.
Deduplicated by normalized name, first occurrence winning — sys.path precedence, which is
the copy an `import` would actually resolve to.
This matters more for S2 than for the CLI. The Installed table joins `pkg_list` against
`pkg_outdated` on the normalized name, so a duplicate is an ambiguous key, and it renders
as two rows a user cannot tell apart.
Covered by a new L2 step rather than a unit test: there is no Python test harness, and the
condition needs a real editable install to exist at all. The step asserts both of this
area's claims — listed once, and reporting no size. **Both halves were exercised**: with
the fix reverted the count assertion throws with "got 2", and with it restored the step
passes and leaves $LASTEXITCODE at 0, which is the trap the guard step hit in L2's first
runs. The pyproject is written as a string array rather than a here-string, because a
here-string's closing '@ has to land at column 0 after YAML strips the block indentation.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>