@@ -49,6 +49,21 @@ def _enabled(value: Any, *, default: bool = True) -> bool:
4949 return str (value ).strip ().lower () not in {"0" , "false" , "no" , "n" , "off" }
5050
5151
52+ def runtime_target_permits_standard_execution (runtime_target : Mapping [str , Any ]) -> bool :
53+ """Return whether normal execution receipts are expected for a target.
54+
55+ A continuity record deliberately distinguishes an authorised live baseline
56+ from reconciliation, pause, and specialised risk-reduction states. The
57+ generic heartbeat must not demand a normal execution report when the
58+ runtime is explicitly prohibited from normal execution; those states are
59+ verified by their dedicated reconciliation controls instead.
60+ """
61+
62+ continuity = _mapping (runtime_target .get ("live_continuity" ))
63+ state = str (continuity .get ("state" ) or "" ).strip ().upper ()
64+ return not state or state in {"ACTIVE_LKG" , "ROLLBACK_LKG" }
65+
66+
5267def _mapping (value : Any ) -> Mapping [str , Any ]:
5368 return value if isinstance (value , Mapping ) else {}
5469
@@ -317,7 +332,7 @@ def runtime_target_configuration_has_enabled_targets(
317332 )
318333 if enabled_value is None :
319334 enabled_value = runtime_target .get ("runtime_target_enabled" )
320- if _enabled (enabled_value ):
335+ if _enabled (enabled_value ) and runtime_target_permits_standard_execution ( runtime_target ) :
321336 return True
322337 return False
323338
@@ -342,7 +357,10 @@ def load_runtime_targets(
342357 )
343358 if enabled_value is None :
344359 enabled_value = runtime_target .get ("runtime_target_enabled" )
345- enabled = _enabled (enabled_value )
360+ enabled = (
361+ _enabled (enabled_value )
362+ and runtime_target_permits_standard_execution (runtime_target )
363+ )
346364 if not enabled and not include_disabled :
347365 continue
348366 target_scope = _first_value (
0 commit comments