Files
wehub-resource-sync 4b6817381b
CI (OpenClaw E2E) / openclaw test (push) Has been cancelled
CI / coverage-report (push) Has been cancelled
CI / test-kubernetes (push) Has been cancelled
CI / should-run-thorough (push) Has been cancelled
CI / test-thorough (cloudwatch-demo) (push) Has been cancelled
CI / test-thorough (flink-ecs) (push) Has been cancelled
CI / test-thorough (upstream-lambda) (push) Has been cancelled
CI / test-thorough (prefect-ecs-fargate) (push) Has been cancelled
Release / build-binaries (zip, opensre.exe, onefile, windows-latest, windows-x64) (push) Has been cancelled
Benchmark image — build + push to ECR (any adapter) / build + push (push) Has been cancelled
CI / quality (ubuntu-latest) (push) Has been cancelled
CI / test (tools-runtime) (push) Has been cancelled
CI / test (e2e-general) (push) Has been cancelled
CI / test (cli-runtime) (push) Has been cancelled
CI / test (e2e-provider-and-openclaw) (push) Has been cancelled
CI / test (integrations-and-misc) (push) Has been cancelled
Release / verify (push) Has been cancelled
Release / build-python-dist (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, macos-15-intel, darwin-x64) (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, macos-latest, darwin-arm64) (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04, linux-x64) (push) Has been cancelled
Release / publish-release (push) Has been cancelled
Release / publish-main-release (push) Has been cancelled
Interactive Shell Live (PR + post-merge) / turn-checks (no-LLM) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Interactive Shell Live (PR + post-merge) / turn-live shard ${{ matrix.shard_index }} (push) Has been cancelled
Release / prepare (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04-arm, linux-arm64) (push) Has been cancelled
Synthetic Deterministic Tests / Synthetic offline (deterministic) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:10:45 +08:00

48 lines
1.7 KiB
Python

"""Package-layout contract for ``platform.observability`` after the trace/render/errors split."""
from __future__ import annotations
def test_public_observability_ports_still_export_from_package_root() -> None:
from platform import observability
assert hasattr(observability, "debug_print")
assert hasattr(observability, "get_progress_tracker")
assert hasattr(observability, "NoopProgressTracker")
assert hasattr(observability, "get_output_format")
def test_trace_subpackage_exports_span_helpers() -> None:
from platform.observability.trace import spans
for name in (
"component_span",
"stage_span",
"tool_span",
"llm_span",
"emit_route",
"traced_session",
"mark_span_outcome",
"NoopSessionTraceSink",
"is_session_trace_active",
):
assert hasattr(spans, name), name
def test_render_and_errors_subpackages_import() -> None:
from platform.observability.errors import boundary, sentry, service
from platform.observability.render import debug, display, progress
from platform.observability.trace import hook, process_stats, prompts, redaction
assert callable(debug.debug_print)
assert callable(display.render_investigation_header)
assert callable(progress.get_progress_tracker)
assert callable(hook.traceable)
assert callable(process_stats.sample_turn_boundary_stats)
assert callable(prompts.persist_turn_system_prompt)
assert callable(redaction.redact_sensitive)
assert callable(sentry.init_sentry)
assert callable(sentry.capture_exception)
assert callable(boundary.report_exception)
assert callable(service.capture_service_error)