Skip to content

v0.0.16

New: Namespace Mounting

Separates namespace definition from persistence activation. Namespaces are defined declaratively (YAML/dict), then ns.mount(storage) activates caching, provenance, and logging in one call.

  • @mountable / @mount_required marker decorators for introspection — no runtime behavior, just flags for tooling.
  • ns.is_mounted / ns.requires_mount / ns.has_mountable properties detect whether a namespace needs or benefits from mounting.
  • Namespace.mount(storage) wraps cache nodes, sets up DAG provenance, and configures logging.
  • Discriminated config deserializationfrom_dict dispatches on type field ("cache", "auto") via _CONFIG_TYPES dict, enabling cache config in YAML.
  • mount_cached_node() extracted from the old imperative path. register_cached_callable removed entirely.
  • DAG provenance on mount_register_dag creates DagRunner per-call with ns._provenance, falling back to NullProvenance when unmounted.

Changed: Logging Configuration

  • LogConfig base class with log_file, log_level, loggers fields and a setup_logging() method. StorageConfig inherits it.
  • LogConfig.setup_logging() configures the root logger with a FileHandler, NodeRunLogFilter, configurable level, and per-category overrides. Usable standalone or via mount().
  • _setup_file_logging removed from lyth.py.

Changed: StorageConfig Path Resolution

  • dag_db renamed to dags_db, trigger_db renamed to triggers_db.
  • get_cache_db(root) / get_dags_db(root) / get_triggers_db(root) / get_log_file(root) — resolve paths relative to a root directory.
  • resolve_paths(root) resolves all storage paths in-place. _resolve_config in lyth.py reduced to a single call.

Fixes

  • Trigger payload bug_poll_loop was passing payload={} when no poll_fn was configured, causing fire() to skip the config's default payload. Changed to payload=None.