intentservice global state (`is_loaded`/`intents_active`) not reset between tests
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start with tests/langservice/conftest.py::clear_langprovider_state and compare its fixture setup with the intentservice globals is_loaded and intents_active. Run the two pytest command orderings from the issue, then verify the equivalent intentservice state cleanup makes results independent of test order.
Written by the indexing model from the issue text.
Description
intentservice.is_loaded/intents_active are module globals and no fixture resets them. Suite runs single-process, so whichever test last called load() decides the next test's state.
Observed while reviewing #1775: test_probe_prompt_translation[probes.tap.TAPIntent] flips result by run order alone:
python -m pytest -p no:cacheprovider "tests/langservice/probes/test_probes_base.py::test_probe_prompt_translation[probes.tap.TAPIntent]" "tests/probes/test_probes.py::test_probe_metadata[probes.audio.AudioAchillesHeel]" -v
# SKIPPED
python -m pytest -p no:cacheprovider "tests/probes/test_probes.py::test_probe_metadata[probes.audio.AudioAchillesHeel]" "tests/langservice/probes/test_probes_base.py::test_probe_prompt_translation[probes.tap.TAPIntent]" -v
# FAILED: assert 0 == 93 (real bug: TAPIntent.probe() never calls get_text)
Pre-existing, outside #1775's diff
Precedent: langservice has the same issue, already fixed via tests/langservice/conftest.py::clear_langprovider_state. Needs the equivalent for intentservice.
- Dominant language
- Python
- Stars
- 9.3k
- Forks
- 1.3k
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 12
Contributor 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 NVIDIA/garak
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100