You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
candidate_summary_card validator accepts lowercase sequences but its test requires rejection (code-vs-test conflict) #842
tests/evidence/test_candidate_summary_card.py::test_lowercase_sequence_fails fails on main. It asserts a lowercase sequence must fail validation (assert not result.passed), but validate_candidate_summary_cardpasses it.
This was hidden until now because CI's pytest step aborted at collection (fixed in #841). This test fails on unmodified main.
The validator uppercases the sequence before checking it against VALID_AMINO_ACIDS, so a lowercase sequence like "kwklfkkiek" normalizes to valid characters and passes. The test expects the opposite.
Why this needs a decision (not a blind fix)
There is a genuine conflict about intended behavior:
The validator's own code (.upper()) is written to accept/normalize lowercase.
Its own test demands rejection.
src/openamp_foundry/qc/presynth_check.py:208 also does seq.upper().strip() — i.e. normalizes (accepts) lowercase elsewhere in the codebase.
docs/evidence/GUIDE_SEQUENCE_VALIDATION.md:9 states "Sequence is uppercase."
So either:
(a) the validator should reject non-uppercase input (add an explicit entry.sequence == entry.sequence.upper() check) — matches the test and the guide, but diverges from presynth_check's normalize-and-accept behavior; or
(b) the test is stale and lowercase should be accepted/normalized — matches the code and presynth_check, but contradicts the guide.
Both are defensible. Picking one changes validation semantics, so it needs an owner's call, not an agent guess.
Activity