sched: extract typed preparer/dispatcher seams; test impl out of production (F6)

This commit is contained in:
lda
2026-09-08 11:19:48 +07:00 Verified
parent 7f6c832b0b
commit 15bd472bdc
8 changed files with 564 additions and 162 deletions
+2 -9
View File
@@ -171,16 +171,9 @@ def _mark_pending(run_store: Any, run_id: str) -> None:
def _is_pending(run_store: Any, run_id: str) -> bool:
try:
return bool(run_store.is_pending_dispatch(run_id))
except AttributeError:
# Legacy stores without the pending protocol: treat as not pending.
return False
return bool(run_store.is_pending_dispatch(run_id))
def clear_pending(run_store: Any, run_id: str) -> None:
"""Clear the pending-dispatch marker after the poll sweep dispatches."""
try:
run_store.clear_pending_dispatch(run_id)
except AttributeError:
return
run_store.clear_pending_dispatch(run_id)