98 """Build the registry-backed hub log (plan 272 P2's consumer factory).
100 Lifted verbatim from the registry arm of the pre-272
101 ``hub_manage._build_log``. The package declares the seam and names no
102 registry; this is the consumer that fills it, so the four imports the
103 plan-259 receipt cut as a named edge now live on oc_chat's side of
104 the split, where they always belonged.
107 CorruptHubLogError: SYSTEM_ERROR (L1 for the caller) — the
108 registry could not be opened, or it holds no active operator
109 slot, so there is no actor to attribute the messages to.
111 func =
"_registry_log"
121 location = discover_registry_location(registry_path=args.registry)
122 storage = SQLiteBackend(location.registry_path)
123 actor_slot = args.actor_slot
or storage.active_operator_slot()
124 except Exception
as exc:
130 raise CorruptHubLogError(
131 f
"the registry backend could not be opened: {type(exc).__name__}: {exc}"
133 if actor_slot
is None:
134 raise CorruptHubLogError(
"no active operator slot found in the registry")
135 _dbg(
"OC_CHAT.MAIN", func, f
"registry log as {actor_slot}", 2)
136 return RegistryHubLog(Registry(storage), actor_slot=actor_slot)