refactor(observability): re-home telemetry + monitoring onto aragora.observability (VAL-P4A-010/011)#8690
Conversation
…observability (VAL-P4A-010/011) Move the telemetry collector + research-events originals and the monitoring SimpleObserver into aragora/observability/, leaving DeprecationWarning re-export shims at the legacy aragora.telemetry.* and aragora.monitoring.* paths. No caller migration (telemetry floor stays 0; the single monitoring consumer stays on the shim so the ceiling stays 1). Generated METRICS.md / module_tiers.yaml are not regenerated here (path-frozen by open PRs); drift deferred to the phase merge-train. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Aragora Code ReviewAdvisory-only review. No issues found. |
Claude independent model reviewReviewer: claude (anthropic) — independent adversarial model review via the Aragora Claude reviewer, grounded on the exact PR head. Verdict: PASS Verified the truncated shims against the pre-PR symbol sets, smoke-tested every import path, and checked for cycles, consumers, and
dogfood: yes |
What
Re-home the telemetry and monitoring originals into
aragora.observability, leaving deprecation-warning re-export shims at the old import paths. Part of the P4a layering foundation (milestonep4a-layering-foundation).aragora/telemetry/collector.py→ moved toaragora/observability/telemetry_collector.py; old path is now a pure re-export shim.aragora/telemetry/research_events.py→ moved toaragora/observability/research_events.py; old path is now a pure re-export shim.aragora/telemetry/__init__.pykeeps its existing observability re-exports and now emits aDeprecationWarning.aragora/monitoring/simple_observer.py(SimpleObserver) → moved toaragora/observability/simple_observer.py; old path + package__init__are two-sided shims emittingDeprecationWarning.No caller migration:
aragora.telemetryalready had zero internal callers (floor stays 0), and the singlearagora.monitoringconsumer (aragora/server/handlers/admin/health/detailed.py) intentionally stays on the shim (ceiling stays at 1).Behavior
All previously-working import paths keep working unchanged; the only new runtime behavior is a
DeprecationWarningon import of the legacy modules. The moved originals are byte-identical to their previous content (the telemetry collector differs by exactly one internal import line repointed to the new research-events home).Fulfills
aragora/telemetry/*is now original-code-free (pure re-export shims), old paths import,aragora.telemetryemits atelemetryDeprecationWarning, internal caller floor stays 0.aragora/monitoring/*retired into observability with a two-sided shim, old path + new home import,aragora.monitoringemits amonitoringDeprecationWarning, caller ceiling stays at 1.Validation (run in worktree with
PYTHONPATH=<wt>)aragora/telemetry/*.pyandaragora/monitoring/*.py.aragora.telemetry(tokentelemetry),aragora.monitoring(tokenmonitoring), plus the submodule shims, all PASS.from aragora.telemetry import get_logger; from aragora.telemetry.collector import TelemetryCollector, get_telemetry_collector; from aragora.telemetry.research_events import TelemetryEvent, TelemetryEventType→ ok.from aragora.monitoring import SimpleObserver→ ok.detailed.py).ruff check+ruff format --check: clean. Changed-file mypy: no errors in the 8 changed files.make test-smoke: pass. Targeted pytesttests/telemetry tests/monitoring: 160 passed.Risks
Low. Behavior-neutral move + shims; the only consumer of the moved code remains functional via the shim. Generated files
docs/METRICS.mdandaragora/module_tiers.yamlare intentionally NOT regenerated here (both are path-frozen by open PRs #8460/#8461/#8382); the structural drift is deferred to the phase merge-train's single consolidated regen.