On this page
Refresh-callback factories bridging trace readers and overseer staleness logic into the scheduler's in-memory constraint, lesson, and notepad lists, without the scheduler ever importing overseer.
#services.src.orxtra.services._injection
#services.src.orxtra.services._injection
Refresh-callback factories for scheduler injection points.
Bridges trace readers and overseer staleness logic into the scheduler's in-memory lists. Lives in the composition layer (services), which legally imports both orchestration (scheduler) and intelligence (overseer).
The scheduler receives pre-built async callbacks and never imports from overseer -- the layer boundary is maintained.
#build_constraints_refresher
def build_constraints_refresher(backend: StorageBackend) -> Callable[[UUID], Awaitable[list[tuple[str, str]]]]Build a callback that reads active constraints from trace.
Returns (text, tier) tuples matching the scheduler's _active_constraints format.
#build_lessons_refresher
def build_lessons_refresher(backend: StorageBackend, repo_dir: Path, relevance_tags: list[str]) -> Callable[[UUID], Awaitable[list[dict[str, Any]]]]Build a callback that reads lessons, applies staleness check.
Uses overseer's filter_stale_lessons to split fresh/stale. Returns dicts with text and stale keys, matching the scheduler's _lessons format consumed by LessonsProvider.
#build_notepad_refresher
def build_notepad_refresher(backend: StorageBackend) -> Callable[[UUID], Awaitable[list[NotepadEntry]]]Build a callback that reads notepad entries from trace.