Follow-up to PR #535 (#443). That PR made the executor probe the retired spp_indicators evaluation service by capability, so a database with spp_indicator installed no longer crashes on a metric() over a not-fresh cached variable. Its honest net effect on OpenSPP2, where no module provides the legacy service, is that the not-fresh path is permanently inert: it returns an empty match set with a warning and a no_service metrics-info entry, and the values are never refreshed even though spp.data.cache.manager.refresh_variable() (models/data_evaluator.py) is in the same module. Callers that treated valid=False as fail-closed (spp_programs eligibility, compliance manager, entitlement condition, spp_simulation, spp_dci_server_social search) now receive a valid domain matching nobody on those databases — the same degradation every database without spp_indicator already had.
Work:
- Replace the two legacy branches in
cel_executor.py (_exec_metric ~line 1190 and the aggregate path ~1610) with spp.data.cache.manager.refresh_variable(...) followed by the SQL lookup, per the two # TODO: Fully migrate to spp.data.cache.manager (Phase 4 of ADR-017 complete) comments. Decide the behaviour for a variable with no provider (today's test_metric_lookup_empty_cache_graceful expects 0 ids).
- Delete the dead legacy probes:
spp.indicator.value (:375), spp.indicator.registry (~1278), spp.indicator.invalidation.buffer (~1114, ~1576), _legacy_metric_service itself once nothing calls it.
- Drop the
"spp.indicator" not in self.env clause from _check_metrics_available (cel_executor.py:354) and cel_translator.py:127: unreachable today only because spp.data.value is defined by this module, and wrong by name if that ever changes.
Follow-up to PR #535 (#443). That PR made the executor probe the retired
spp_indicatorsevaluation service by capability, so a database withspp_indicatorinstalled no longer crashes on ametric()over a not-fresh cached variable. Its honest net effect on OpenSPP2, where no module provides the legacy service, is that the not-fresh path is permanently inert: it returns an empty match set with a warning and ano_servicemetrics-info entry, and the values are never refreshed even thoughspp.data.cache.manager.refresh_variable()(models/data_evaluator.py) is in the same module. Callers that treatedvalid=Falseas fail-closed (spp_programseligibility, compliance manager, entitlement condition,spp_simulation,spp_dci_server_socialsearch) now receive a valid domain matching nobody on those databases — the same degradation every database withoutspp_indicatoralready had.Work:
cel_executor.py(_exec_metric~line 1190 and the aggregate path ~1610) withspp.data.cache.manager.refresh_variable(...)followed by the SQL lookup, per the two# TODO: Fully migrate to spp.data.cache.manager (Phase 4 of ADR-017 complete)comments. Decide the behaviour for a variable with no provider (today'stest_metric_lookup_empty_cache_gracefulexpects 0 ids).spp.indicator.value(:375),spp.indicator.registry(~1278),spp.indicator.invalidation.buffer(~1114,~1576),_legacy_metric_serviceitself once nothing calls it."spp.indicator" not in self.envclause from_check_metrics_available(cel_executor.py:354) andcel_translator.py:127: unreachable today only becausespp.data.valueis defined by this module, and wrong by name if that ever changes.