Problem
sync.availability.latest_available_function accepts a dotted-path string, implying plugin support. However, the resolution in sync_engine._get_dynamic_function uses plain importlib.import_module without ensuring plugins_dir is on sys.path first.
Plugin availability functions only resolve if the dataset registry happened to run earlier in the same process (which adds plugins_dir to sys.path as a side effect). This is an accidental dependency on call ordering, not a guarantee.
The other three dotted-path extension points — ingestion.function, transforms:, and execution_function — all explicitly handle plugins_dir before resolving. This one does not.
Proposed resolution
Remove the implicit plugin support and restrict latest_available_function to built-in functions in climate_api/providers/availability.py. Availability logic is tightly coupled to provider behaviour (lag windows, release schedules) and belongs in core code, not plugins.
If a new provider cadence is needed, the right fix is a new built-in function or a new parameter on an existing one — not a plugin hook.
Acceptance criteria
Problem
sync.availability.latest_available_functionaccepts a dotted-path string, implying plugin support. However, the resolution insync_engine._get_dynamic_functionuses plainimportlib.import_modulewithout ensuringplugins_diris onsys.pathfirst.Plugin availability functions only resolve if the dataset registry happened to run earlier in the same process (which adds
plugins_dirtosys.pathas a side effect). This is an accidental dependency on call ordering, not a guarantee.The other three dotted-path extension points —
ingestion.function,transforms:, andexecution_function— all explicitly handleplugins_dirbefore resolving. This one does not.Proposed resolution
Remove the implicit plugin support and restrict
latest_available_functionto built-in functions inclimate_api/providers/availability.py. Availability logic is tightly coupled to provider behaviour (lag windows, release schedules) and belongs in core code, not plugins.If a new provider cadence is needed, the right fix is a new built-in function or a new parameter on an existing one — not a plugin hook.
Acceptance criteria
latest_available_functiononly supports built-in dotted paths