Commit Graph

2 Commits

Author SHA1 Message Date
HAL9000 40137f4f2a fix(test): consolidate registry-thread-safety BDD test files
The PR contained duplicate step definitions and feature files that caused
behave AmbiguousStep errors crashing the unit_tests gate. The underlying
thread-safety fix for get_provider_registry() already landed on master in
commit e1cd306f6, so the scenario now passes as a regression test.

- Delete scripts/fix_registry_steps_tmp.py: temporary debugging script with
  hardcoded /tmp paths that produced 6 ruff errors (F401, UP015, E501 x4).
- Delete features/tdd_registry_thread_safety.feature and
  features/steps/tdd_registry_thread_safety_steps.py: weaker duplicates of
  the canonical files under features/providers/ and features/steps/. Their
  step decorators collided with the elaborate barrier-based steps in
  registry_thread_safety_steps.py, causing AmbiguousStep across the suite.
- Remove @tdd_expected_fail tag from the canonical scenario per the
  CONTRIBUTING.md bug fix workflow: behave's TDD harness explicitly
  instructs removing the tag once the bug appears fixed, so the scenario
  now functions as a normal regression test.
- Apply ruff format to features/steps/registry_thread_safety_steps.py.

ISSUES CLOSED: #10409
2026-06-06 20:45:20 -04:00
HAL9000 16a3fdf8b1 test(providers): add failing BDD scenario for get_provider_registry() thread-safety race condition
Implemented a Behave BDD test to prove the thread-safety race in get_provider_registry():
- Added features/providers/test_registry_thread_safety.feature with a two-thread scenario using a Barrier to trigger an actual race and asserting both threads obtain the same singleton instance. The scenario is tagged @tdd_issue, @tdd_issue_10409, and @tdd_expected_fail.
- Added features/steps/registry_thread_safety_steps.py implementing Given/When/Then steps to coordinate threads and verify singleton identity.
- The scenario currently fails against the unfixed code due to non-thread-safe singleton; the @tdd_expected_fail tag inverts the result so CI passes.

ISSUES CLOSED: #10409
2026-06-06 20:45:20 -04:00