hermes-agent/tests/telemetry
emozilla e829d03fec refactor(telemetry): drop policy.resolve(); read config directly
policy.resolve() / TelemetryDecision was a read-only projection used only by
`hermes telemetry status` for display. The actual behavior gates already read
telemetry.* straight from config: the emitter (whether to write) and the plugin
loader (whether to auto-load) each call .get("local", True) on the loaded config,
never through policy.

Make config the single chokepoint the status command reads too: it now resolves
local/allow_aggregate/consent_state inline from the loaded config, the same way
the other gates do. policy.py keeps only what config can't express on its own —
the consent constants, ensure_install_id(), and may_upload_aggregate(config) as a
pure function (the gate a future uploader must consult). resolve() and the
TelemetryDecision dataclass are removed; policy.py drops 107 -> 70 lines.

No behavior change: status renders identically, and the default-on local plane is
still defaulted in DEFAULT_CONFIG plus a fail-safe .get(..., True) at each gate.
2026-07-24 18:54:45 +00:00
..
__init__.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_cli_telemetry.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_emitter.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_export_redaction.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_exporter_bulk.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_governance.py refactor(telemetry): drop policy.resolve(); read config directly 2026-07-24 18:54:45 +00:00
test_insights_integration.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_otlp_exporter.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_plugin_autoload.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_plugin_hooks.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_policy_consent.py refactor(telemetry): drop policy.resolve(); read config directly 2026-07-24 18:54:45 +00:00
test_rollup.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00
test_schema_migration.py feat(telemetry): local-first telemetry & observability 2026-07-24 18:54:45 +00:00