The regex patterns in bias_detector.py require near-exact phrase sequences (e.g. “bootcamp graduates lack rigor”) and miss natural phrasings of the same bias, such as “The candidate only attended a bootcamp, so this project lacks the rigor of a formal CS education” or age-based assumptions like “Given their age, they likely cannot keep up with modern frameworks”. Nine unit tests specifying the intended coverage fail.
Steps to reproduce:
from safety.bias_detector import BiasDetector
print(BiasDetector.detect_bias('The candidate only attended a bootcamp, so this project lacks the rigor of a formal CS education'))
# observed: (False, '') (expected: flagged as dismissive educational-background language)
Related failing tests: 9 tests in tests/unit/test_bias_detector.py (e.g. test_dismissive_bootcamp_language_detected, test_demographic_assumption_age_detected).
The regex patterns in
bias_detector.pyrequire near-exact phrase sequences (e.g. “bootcamp graduates lack rigor”) and miss natural phrasings of the same bias, such as “The candidate only attended a bootcamp, so this project lacks the rigor of a formal CS education” or age-based assumptions like “Given their age, they likely cannot keep up with modern frameworks”. Nine unit tests specifying the intended coverage fail.Steps to reproduce:
Related failing tests: 9 tests in
tests/unit/test_bias_detector.py(e.g.test_dismissive_bootcamp_language_detected,test_demographic_assumption_age_detected).