2.3 KiB
2.3 KiB
NOTE: diff-ref mode entry (code committed in the same commit as this log); backfilled from the live dev session transcript per the /prompt-io skill rules.
git log -1 -p --follow -- piker/data/_daemon.py
Generated symbols + key design decisions:
_datad_service_mods: list[str]— datad-always enabled mods, the data-side successor to the oldpiker.brokers._daemon._data_modsset; kept minimal per the caps-sec model._setup_persistent_datad()—@tractor.contextlifetime fixture: console-log setup then allocates the actor-global feed bus viafeed.get_feed_bus(brokername, service_nursery)exactly as the old brokerd fixture did, pinned open withctx.started()+sleep_forever().datad_init()— actor namef'datad.{brokername}'; copies backend_spawn_kwargs(CRITICAL forib’sinfect_asyncio=True); buildsenable_modulesfromgetattr(brokermod, '_datad_mods', getattr(brokermod, '__enable_modules__', []))as the flat-backend fallback.spawn_datad()—Services.actor_n.start_actor()+Services.start_service_task()exactly mirroringspawn_brokerd(); dedup-composes enable mods vialist(dict.fromkeys(...)).maybe_spawn_datad()— wrapsmaybe_spawn_daemon( service_name=f'datad.{brokername}', ...).
git log -1 -p --follow -- piker/service/_actor_runtime.pygit log -1 -p --follow -- piker/service/__init__.pygit log -1 -p --follow -- tests/test_services.py
Design rationale (verbatim from session):
_root_modulesmust gainpiker.data._daemonsopikerd_portal.run(spawn_datad, ...)resolves in the root.- the
Services-based impl style deliberately mirrorsspawn_brokerd()so the eventualtractor.hilevelServiceMngrport (see theservice_mng_to_tractorbranch’s d8c21d44 prep, surfaced by the user-requested branch-overlap survey) lands symmetrically on both spawn fns. - mod placement (
piker/data/_daemon.pyvs. generalizingpiker.brokers._daemon) follows the per-subsystem daemon-mod convention (.clearing._ems,.data._sampling) and resolves the existing TODO atbrokers/_daemon.py:49(“move this def to the.datasubpkg”).