Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

test-isolation: global set_tracer_provider collision across agent test modules (14 failures when run together)

Open
#641 0 comments 0 reactions 0 assignees View on GitHub

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

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

bug

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Metabuilder-Labs/tokenjam

All issues in Metabuilder-Labs/tokenjam

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.