test(spp_registry): hold the phone-fallback and unlink-permission tests on a full stack (#443) - #541
Open
gonzalesedwin1123 wants to merge 2 commits into
Open
gonzalesedwin1123 wants to merge 2 commits into
gonzalesedwin1123 wants to merge 2 commits into
Conversation
…ts on a full stack The unparseable-phone test builds its record with new() instead of create(): spp_base_common, installed on every full stack, overrides create() to refuse a number containing letters before the registry compute is reached, so the test failed in all three demo stacks while pinning behaviour every real deployment replaces on purpose. The unlink-permission tests pin the starter bundles' admin-only registry switch off for their transaction. spp_starter_sp_mis ships it on and #411 enforces it server-side, so the manager the registry rule allows was refused under the SP-MIS stack. The guard reads the parameter live and the change rolls back with the test, as spp_mis_demo_v2's own access-control tests already do. Refs #443
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #541 +/- ##
==========================================
- Coverage 76.91% 76.88% -0.03%
==========================================
Files 704 740 +36
Lines 45774 48024 +2250
==========================================
+ Hits 35205 36923 +1718
- Misses 10569 11101 +532
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
gonzalesedwin1123
marked this pull request as ready for review
September 21, 2026 06:11
Member
Author
|
Full-stack evidence: SP-MIS
|
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 original two tests this issue was filed for, plus the one test red in all three stacks.
Causes
TestComputePhoneSanitized.test_unparseable_phone_falls_back_to_original(all three stacks). The test pins spp_registry's own compute: an unparseable number falls back to the original string.spp_base_common(which every stack installs; 11 modules depend on it) overridesspp.phone.number.create()to run its documented validation, which refuses a number containing letters before the compute is reached. The test now builds the record withnew(), so it exercises the registry compute alone regardless of which overlays are installed.TestRegistrantUnlinkPermissions.test_manager_can_unlink/test_officer_plus_manager_can_unlink(SP-MIS stack).spp_starter_sp_misshipsspp_starter.registry_admin_only_crud = True(noupdate, OP#1142) and fix(starter_sp_mis): make registry access control persist and enforce #411 enforces it server-side, so a registry manager withoutgroup_spp_adminis refused. The tests pin spp_registry's own rule (officer blocked, manager allowed), sosetUpClasssets both keys inres_config_settings._LEGACY_KEYSto"False"for the test transaction. The guard reads the parameter live (get_param, ormcache cleared on write) and the change rolls back with the test;spp_mis_demo_v2/tests/test_access_control.pyalready does exactly this. The fix(starter_sp_mis): make registry access control persist and enforce #411 guard itself is untouched: spp_starter_sp_mis: make registry_admin_only_crud opt-out per action, not a global New-button hide #298 was closed as superseded by it and spp_starter_sp_mis: supported exemption from registry_admin_only_crud for designated non-admin roles #455 is the only sanctioned future exemption.Evidence
-i spp_registry,spp_base_common,spp_starter_sp_mison the two classes:0 failed, 0 error(s) of 10 tests(both classes were red in the 2026-09-20 weekly run).0 failed, 0 error(s) of 285 tests. All pre-commit hooks pass.spp_registry19.0.2.2.4 → 19.0.2.2.7 (2.2.5 and 2.2.6 are held by the unmerged #522 and #533; whichever lands out of order renumbers). README/index.html left for CI's generator.