test(spp_drims): assert SLA coverage over the canonical priority codes only (#443) - #542
Open
gonzalesedwin1123 wants to merge 2 commits into
Open
gonzalesedwin1123 wants to merge 2 commits into
gonzalesedwin1123 wants to merge 2 commits into
Conversation
…s only test_sla_hours_are_keyed_by_real_priority_codes compared against every code in the vocabulary, so installing an overlay that legitimately extends priorities (spp_drims_sl adds life_threatening, ADR-016) made the exact-match assertion fail on a fourth key spp_drims never claimed to cover. Its sibling test already used _canonical_codes_in for the same reason (#438). Refs #443
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #542 +/- ##
=======================================
Coverage 76.91% 76.91%
=======================================
Files 704 704
Lines 45774 45774
=======================================
Hits 35205 35205
Misses 10569 10569
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Member
Author
|
Full-stack evidence: DRIMS Sri Lanka
|
gonzalesedwin1123
marked this pull request as ready for review
September 21, 2026 06:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #443 (weekly ci-full red). Test-only; the one failure in the DRIMS Sri Lanka stack.
Cause
TestDrimsConstants.test_sla_hours_are_keyed_by_real_priority_codescollected the codes with_codes_in, which includes locally added vocabulary codes, then asserted exact equality against{routine, urgent, critical}.spp_drims_sladdslife_threateningas a local overlay code by design (ADR-016), so under the DRIMS stack the dict gained a fourth key and the assertion failed:The sibling test in the same PR (#438) already switched to
_canonical_codes_infor exactly this reason; this one was not given the same treatment. The test now asserts what it means to assert: every priority spp_drims itself ships gets its own SLA.Evidence
Stack run
-i spp_drims,spp_drims_sl --test-tags /spp_drims:TestDrimsConstants:0 failed, 0 error(s) of 9 tests(red in the 2026-09-20 weekly run).spp_drims19.0.4.0.4 → 19.0.4.0.5 + HISTORY. README/index.html left for CI's generator.Noted, not changed
A Sri Lanka life-threatening request currently gets the 24-hour routine SLA:
spp_drims_slships approval rules keyed on that code but nodrims.sla.hours.life_threateningparameter. That is a production data gap inspp_drims_sl, the same "wrong answer rather than an error" class #438 fixed forurgent; filed separately.