Files
zeekay bc4ddf332b chore: rebase the tree onto upstream master fa1a9a60
Mechanically re-derived: bin/debrand runs over a fresh import of
posthog/posthog@fa1a9a60d4 (2026-08-06).
The pipeline (.hanzo/workflows), the Dockerfiles and bin/docker*
entrypoints, compose files, LLM.md and the squashed initial migration
are restored from the shipped tree, same as the previous import.

The prune's import-closure guard kept 21 products the new core now
imports; dropping them is a refactor now, recorded rather than forced.
2026-08-06 01:25:36 -07:00

32 lines
1.3 KiB
Python

from typing import TYPE_CHECKING
from django.apps import AppConfig
if TYPE_CHECKING:
from products.exports.backend.models.exported_asset import ExportedAsset
def _export_dataset_jsonl(asset: "ExportedAsset") -> None:
from products.ai_observability.backend.dataset_export import ( # noqa: PLC0415 -- keeps dataset export dependencies off the Django startup path
export_dataset_jsonl,
)
export_dataset_jsonl(asset)
class AIObservabilityConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "products.ai_observability.backend"
label = "ai_observability"
def ready(self) -> None:
# Connect the Evaluation activity-log receiver at app-population. It lives in a light
# activity_logging module (not the evaluations viewset, which pulls scipy / google.genai /
# the ai_observability Temporal worker) so wiring it here stays off the django.setup() path.
from products.ai_observability.backend import activity_logging # noqa: F401, PLC0415
from products.exports.backend.facade.exporters import ( # noqa: PLC0415 -- registration belongs at app population
register_export_format_handler,
)
register_export_format_handler("application/x-ndjson", _export_dataset_jsonl)