<@U09A2SBEAQG>: deleting lmdb_store didn't change ...
# development
f
@acoustic-spring-13969: deleting lmdb_store didn't change the outcome
Diagnosis from Codex (GPT-5.5 model):
• Diagnosed. The mismatch is real and is caused by Ruff isort’s package classification
depending on whether opentelemetry/__init__.py is present in the same sandbox invocation.
Key facts:
- ./pants lint src/python/pants/backend/observability/opentelemetry runs ruff check on all
13 files, including opentelemetry/__init__.py, and reports two fixable I001 issues.
- ./pants fix ... splits the files into two fix batches: init.py alone, then the other
12 files. The 12-file Ruff check --fix sandbox lacks opentelemetry/__init__.py, so Ruff no
longer treats opentelemetry as a local package and says “All checks passed!”
- Running Ruff manually in the lint sandbox with --fix fixes both issues. Running it without
opentelemetry/__init__.py reproduces the false “All checks passed!” behavior.
So yes: namespace/package shadowing around the new local
pants.backend.observability.opentelemetry package is the trigger, but the Pants-side bug is
that fix batches Ruff with less package context than lint.
Likely fix direction: ensure Ruff fix processes get the same package-context inputs as lint,
or at least include package marker files like init.py in the sandbox even if they are
not in the file batch being edited. The current by-file fix batching is too context-starved
for Ruff isort.
with the PR in place,
./pants fix src/python/pants/backend/observability/opentelemetry::
correctly fixes the import sorting