test-isolation: global set_tracer_provider collision across agent test modules (14 failures when run together)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- observability, testing
Research direction
Start by running the three named test files together: tests/integration/test_full_pipeline.py, tests/agents/test_record_outcome.py, and tests/agents/test_mock_scenarios.py. Read the module-level set_tracer_provider() calls and Critical Rule #11 to understand the global provider behavior. Done means the tests pass together and an autouse fixture prevents provider or _tracer state from leaking between agent-test modules.
Written by the indexing model from the issue text.
Description
Found while reviewing #630 (the test_full_pipeline tracer-leak fix). Separate, pre-existing test-isolation bug — not introduced by #630.
Symptom: running tests/integration/test_full_pipeline.py + tests/agents/test_record_outcome.py + tests/agents/test_mock_scenarios.py together yields ~14 failures — both WITH and WITHOUT #630's patch.
Root cause: two module-level set_tracer_provider() calls collide. Per Critical Rule #11, the global OTel TracerProvider is set-once per process — a second module setting its own provider (or relying on a different one) breaks interception in the other.
Why CI is still green: it does not affect CI's collection order — tests/agents/ alone passes, and CI runs unit + integration together (where #630's now-fixed leak manifested). So this is a latent, order-dependent fragility, not a current CI failure.
Fix direction: an autouse fixture that snapshots + restores the global provider (and/or the module-level _tracer) around each agent-test module, per Rule #11 — closing the class of bug rather than the single instance.
Out of scope for #630 (which correctly did the narrow per-fixture restore for #615).
- Dominant language
- Python
- Stars
- 122
- Forks
- 35
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 8
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Metabuilder-Labs/tokenjam
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Metabuilder-Labs/tokenjam#786 ·
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Metabuilder-Labs/tokenjam#759 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Metabuilder-Labs/tokenjam#728 ·
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Metabuilder-Labs/tokenjam#591 ·
Maintainers usually reply within 1 day
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Metabuilder-Labs/tokenjam#559 ·
Maintainers usually reply within 1 day
All issues in Metabuilder-Labs/tokenjam
Similar issues
-
[Bug]: Revit selector reads process ids 2000-2099 as years (flaky AgentClientTests.AYearOrAProcessIdSelectsTheHost)Possibly taken @Wurschdhaud claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
pyrevitlabs/pyRevit#3817 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4074 ·
-
follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Helm chart: allow setting ingressClassName on the IngressPossibly taken @commarla claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
pgadmin-org/pgadmin4#10658 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100