Skip to content

fragile cache name property pattern for _xpehh_gwss_cache_name and _ihs_gwss_cache_name #1198

@kunal-10-cloud

Description

@kunal-10-cloud

Problem

_xpehh_gwss_cache_name and _ihs_gwss_cache_name in anopheles.py (lines 183-191) exhibit the same fragile pattern that caused the crash bug reported in #1151.

These properties are declared as @property @abstractmethod in the base class but overridden by class attributes in species classes. Under MRO edge cases or version skew, this pattern can crash with NotImplementedError instead of returning the expected cache name string.

Root Cause

Impact

  • Two latent crash bugs that could be triggered by version skew or edge cases
  • Inconsistent with the corrected pattern already applied to _roh_hmm_cache_name

Solution

Apply the safe resolver pattern from #1193:

  • Replace abstract properties with concrete _get_xpehh_gwss_cache_name() and _get_ihs_gwss_cache_name() methods
  • Methods safely retrieve class attributes with fallback defaults
  • Update call sites to use resolver methods instead of property access
  • Remove fragile class attribute overrides from species classes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions