Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Optimize telemetry adoption reporting
rcourtman3ad35750cb47
diff --git a/docs/PRIVACY.md b/docs/PRIVACY.mdindex 6f51285608..c6031bc1ff 100644--- a/docs/PRIVACY.md+++ b/docs/PRIVACY.md@@ -50,8 +50,8 @@ Every field is listed below with the reason it exists. Nothing else is included| OS | `linux` | See whether operating-system-specific issues exist || Arch | `amd64` | See whether CPU-architecture-specific issues exist || Event | `startup` or `heartbeat` | Distinguish first-run/session starts from daily active-install heartbeats |-| Deployment method | `docker_compose`, `docker_run`, `container_other`, `systemd`, `binary_other`, or `other` | Compare coarse installation paths without sending an image name, filesystem path, command, or URL |-| Known install age bucket | `under_1d`, `1_7d`, `8_30d`, `31_90d`, `91_365d`, or `over_365d` | Understand activation by coarse age; for upgraded installs this is a lower bound measured from the first v2 observation, not an original installation date |+| Deployment method | `docker_compose`, `docker_run`, `container_other`, `systemd`, `binary_other`, or `other` | Compare coarse current-runtime installation evidence without sending an image name, filesystem path, command, or URL. Upgraded installs often fall back to `container_other` or `binary_other`, so this is not precise evidence of the original installation path |+| Known install age bucket | `under_1d`, `1_7d`, `8_30d`, `31_90d`, `91_365d`, or `over_365d` | Measure coarse time since Pulse first created the schema-v2 lifecycle record. For upgraded installs this is only a lower bound, not the original installation age || Activation stage | `started`, `secured`, `connected`, `monitoring`, or `outcome_observed` | Measure the highest coarse setup milestone reached without sending a user journey or event log || Time to first monitored resource bucket | `not_observed`, `present_at_first_observation`, `under_15m`, `15m_1h`, `1_6h`, `6_24h`, `1_3d`, `4_7d`, `8_30d`, or `over_30d` | Measure coarse time to initial monitoring value without sending exact timestamps or resource identity; `present_at_first_observation` keeps upgraded installs from being assigned an invented historical duration || Estate size bucket | `empty`, `1_10`, `11_50`, `51_200`, `201_1000`, or `over_1000` | Segment aggregate usage by approximate monitored-resource scale without adding a new identifier |@@ -177,6 +177,8 @@ no notification content or identity fields.- Telemetry pings are stored on the Pulse license server only for aggregate install/use analysis.- The license server stores only the same coarse telemetry fields listed above; it does not expand them into exact commercial tiers, exact API-token counts, prompts, chat messages, command text, action output, token values, or resource identifiers.- Pulse may derive aggregate Pulse Intelligence adoption reports from those same rows, including whether an install reached Patrol issue activity, Patrol resolution, Assistant, direct external-agent, or MCP collaboration, Patrol mode starter use, paid Patrol mode cohorts, governed-action activity, approved or rejected action decisions, approved action success, completed Patrol control work, recent retention, and observed free-to-paid movement within the source window. Those reports do not add prompts, findings, resource identifiers, tool names, tool inputs, tool outputs, command payloads, action outputs, account links, or exact commercial tiers.+- Aggregate reports preserve the closed deployment-method buckets, but treat them as best-effort current-runtime evidence. In particular, `container_other` and `binary_other` are unknown fallbacks for many upgraded installs, not precise original installation provenance.+- Aggregate reports describe the known-age bucket as time since Pulse first created the schema-v2 lifecycle record. It is only a lower bound for an upgraded install and must not be presented as original installation age.- External-agent/MCP activity is stored only as a coarse adapter-origin flag plus capability-class counters: context, event stream, provisioning, operator state, findings, and action requests.- The receiver stores only fields in its versioned telemetry allowlist. A cross-repository parity check prevents client fields from being silently dropped and prevents the storage contract from growing beyond the disclosed payload.- Telemetry rows older than **90 days** are purged automatically.diff --git a/docs/release-control/v6/internal/subsystems/security-privacy.md b/docs/release-control/v6/internal/subsystems/security-privacy.mdindex 2e44d171ef..97dd7a1750 100644--- a/docs/release-control/v6/internal/subsystems/security-privacy.md+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md@@ -334,6 +334,13 @@ the `white_label` branding entitlement.counts, because versions that predate client-side mock suppression keeppinging the synthetic fleet until upgraded; `--include-mock-fleet` remainsthe audit path.+ The existing `known_install_age_bucket` wire field must be presented as+ time since the first schema-v2 lifecycle observation. For an upgraded+ install it is only a lower bound, never original installation age.+ Deployment-method buckets are best-effort current-runtime evidence.+ `container_other` and `binary_other` are unknown fallbacks for many upgraded+ installs and must not be presented as precise original installation+ provenance.7. Change data-at-rest encryption-key or control-plane magic-link HMAC key and storage-root hardening semantics through `internal/crypto/crypto.go`, `internal/cloudcp/auth/magiclink.go`, `internal/cloudcp/auth/magiclink_store.go`, and `internal/securityutil/secure_storage_dir.go` together so writable-but-not-owned runtime storage mounts stay supported without weakening file-level secrecy.Control-plane portal session lifetime rides on that same service: the authservice session TTL is configurable (`CP_SESSION_TTL`, longer@@ -456,6 +463,10 @@ the `white_label` branding entitlement.2. Keep shared API-contract proof routing aligned whenever auth, token, or telemetry settings payloads change.3. Keep shared frontend settings proof routing aligned whenever security/privacy presentation changes.4. Keep the checked-in telemetry adoption report aligned with the same release-identity rules used by the runtime telemetry payload.+4a. Keep full-history Pulse Intelligence cohort and funnel aggregation linear+ in the number of input rows. Parse and order each install's timestamps once,+ share that analysis across cohort and funnel projections, and preserve+ exact aggregate counts, rates, exclusions, and privacy boundaries.5. Update this contract whenever a new canonical security, token, auth, or privacy surface becomes part of the governed trust boundary.5a. Keep localized privacy and telemetry settings copy covered by catalogcompleteness, fallback, and non-translatable-token tests so translated@@ -977,6 +988,11 @@ recipients, endpoints, alert content, notification content, prompts, commands,or an event-level journey/clickstream. Known install age for an upgradedinstallation is therefore a lower bound beginning with its first schema-v2observation, not a reconstructed installation date.+The adoption report must name that bucket as time since the first schema-v2+lifecycle observation without renaming the wire field. Its deployment-method+projection must preserve the closed wire buckets while clearly marking the+signal as best effort. Unknown `container_other` and `binary_other` fallbacks+must not be interpreted as precise original installation provenance.Schema v3 preserves that field/type allowlist but corrects`notification_failures_7d` from all unsuccessful attempts to terminalfailed/dead-letter outcomes; `notification_attempts_7d` still includes retrydiff --git a/frontend-modern/public/docs/PRIVACY.md b/frontend-modern/public/docs/PRIVACY.mdindex 6f51285608..c6031bc1ff 100644--- a/frontend-modern/public/docs/PRIVACY.md+++ b/frontend-modern/public/docs/PRIVACY.md@@ -50,8 +50,8 @@ Every field is listed below with the reason it exists. Nothing else is included| OS | `linux` | See whether operating-system-specific issues exist || Arch | `amd64` | See whether CPU-architecture-specific issues exist || Event | `startup` or `heartbeat` | Distinguish first-run/session starts from daily active-install heartbeats |-| Deployment method | `docker_compose`, `docker_run`, `container_other`, `systemd`, `binary_other`, or `other` | Compare coarse installation paths without sending an image name, filesystem path, command, or URL |-| Known install age bucket | `under_1d`, `1_7d`, `8_30d`, `31_90d`, `91_365d`, or `over_365d` | Understand activation by coarse age; for upgraded installs this is a lower bound measured from the first v2 observation, not an original installation date |+| Deployment method | `docker_compose`, `docker_run`, `container_other`, `systemd`, `binary_other`, or `other` | Compare coarse current-runtime installation evidence without sending an image name, filesystem path, command, or URL. Upgraded installs often fall back to `container_other` or `binary_other`, so this is not precise evidence of the original installation path |+| Known install age bucket | `under_1d`, `1_7d`, `8_30d`, `31_90d`, `91_365d`, or `over_365d` | Measure coarse time since Pulse first created the schema-v2 lifecycle record. For upgraded installs this is only a lower bound, not the original installation age || Activation stage | `started`, `secured`, `connected`, `monitoring`, or `outcome_observed` | Measure the highest coarse setup milestone reached without sending a user journey or event log || Time to first monitored resource bucket | `not_observed`, `present_at_first_observation`, `under_15m`, `15m_1h`, `1_6h`, `6_24h`, `1_3d`, `4_7d`, `8_30d`, or `over_30d` | Measure coarse time to initial monitoring value without sending exact timestamps or resource identity; `present_at_first_observation` keeps upgraded installs from being assigned an invented historical duration || Estate size bucket | `empty`, `1_10`, `11_50`, `51_200`, `201_1000`, or `over_1000` | Segment aggregate usage by approximate monitored-resource scale without adding a new identifier |@@ -177,6 +177,8 @@ no notification content or identity fields.- Telemetry pings are stored on the Pulse license server only for aggregate install/use analysis.- The license server stores only the same coarse telemetry fields listed above; it does not expand them into exact commercial tiers, exact API-token counts, prompts, chat messages, command text, action output, token values, or resource identifiers.- Pulse may derive aggregate Pulse Intelligence adoption reports from those same rows, including whether an install reached Patrol issue activity, Patrol resolution, Assistant, direct external-agent, or MCP collaboration, Patrol mode starter use, paid Patrol mode cohorts, governed-action activity, approved or rejected action decisions, approved action success, completed Patrol control work, recent retention, and observed free-to-paid movement within the source window. Those reports do not add prompts, findings, resource identifiers, tool names, tool inputs, tool outputs, command payloads, action outputs, account links, or exact commercial tiers.+- Aggregate reports preserve the closed deployment-method buckets, but treat them as best-effort current-runtime evidence. In particular, `container_other` and `binary_other` are unknown fallbacks for many upgraded installs, not precise original installation provenance.+- Aggregate reports describe the known-age bucket as time since Pulse first created the schema-v2 lifecycle record. It is only a lower bound for an upgraded install and must not be presented as original installation age.- External-agent/MCP activity is stored only as a coarse adapter-origin flag plus capability-class counters: context, event stream, provisioning, operator state, findings, and action requests.- The receiver stores only fields in its versioned telemetry allowlist. A cross-repository parity check prevents client fields from being silently dropped and prevents the storage contract from growing beyond the disclosed payload.- Telemetry rows older than **90 days** are purged automatically.diff --git a/scripts/telemetry_adoption_report.py b/scripts/telemetry_adoption_report.pyindex e5e8416d88..9514c35671 100644--- a/scripts/telemetry_adoption_report.py+++ b/scripts/telemetry_adoption_report.py@@ -68,8 +68,14 @@ FEATURE_BOOL_FIELDS = (("has_api_tokens", "Has API tokens"),)USER_BASE_CATEGORY_FIELDS = (- ("deployment_method", "Deployment method"),- ("known_install_age_bucket", "Known install age"),+ (+ "deployment_method",+ "Deployment method signal (best effort; upgraded installs often report container_other or binary_other)",+ ),+ (+ "known_install_age_bucket",+ "Time since first schema-v2 lifecycle observation",+ ),("activation_stage", "Highest observed activation stage"),("time_to_first_monitored_resource_bucket", "Time to first monitored resource"),("estate_size_bucket", "Estate size"),@@ -916,6 +922,80 @@ class ClassifiedVersion:is_published_release: bool+@dataclass(frozen=True)+class PulseIntelligenceInstallAnalysis:+ latest_received_at: datetime+ first_paid_at: datetime | None+ observed_free_start: bool+ observed_free_to_paid: bool+ cohort_keys: frozenset[str]+ free_cohort_keys: frozenset[str]+ signal_groups: frozenset[str]+ free_signal_groups: frozenset[str]+++PULSE_INTELLIGENCE_ANALYSIS_BOOL_FIELDS = tuple(+ sorted(+ {+ field+ for _, _, bool_fields, _ in PULSE_INTELLIGENCE_OUTCOME_COHORTS+ for field in bool_fields+ }+ | {+ field+ for bool_fields, _ in PULSE_INTELLIGENCE_OPERATION_SIGNAL_GROUPS.values()+ for field in bool_fields+ }+ )+)+PULSE_INTELLIGENCE_ANALYSIS_COUNT_FIELDS = tuple(+ sorted(+ {+ field+ for _, _, _, count_fields in PULSE_INTELLIGENCE_OUTCOME_COHORTS+ for field in count_fields+ }+ | {+ field+ for _, count_fields in PULSE_INTELLIGENCE_OPERATION_SIGNAL_GROUPS.values()+ for field in count_fields+ }+ )+)+PULSE_INTELLIGENCE_COHORT_BOOL_KEYS_BY_FIELD = {+ field: frozenset(+ key+ for key, _, bool_fields, _ in PULSE_INTELLIGENCE_OUTCOME_COHORTS+ if field in bool_fields+ )+ for field in PULSE_INTELLIGENCE_ANALYSIS_BOOL_FIELDS+}+PULSE_INTELLIGENCE_COHORT_COUNT_KEYS_BY_FIELD = {+ field: frozenset(+ key+ for key, _, _, count_fields in PULSE_INTELLIGENCE_OUTCOME_COHORTS+ if field in count_fields+ )+ for field in PULSE_INTELLIGENCE_ANALYSIS_COUNT_FIELDS+}+PULSE_INTELLIGENCE_SIGNAL_GROUP_BOOL_KEYS_BY_FIELD = {+ field: frozenset(+ key+ for key, (bool_fields, _) in PULSE_INTELLIGENCE_OPERATION_SIGNAL_GROUPS.items()+ if field in bool_fields+ )+ for field in PULSE_INTELLIGENCE_ANALYSIS_BOOL_FIELDS+}+PULSE_INTELLIGENCE_SIGNAL_GROUP_COUNT_KEYS_BY_FIELD = {+ field: frozenset(+ key+ for key, (_, count_fields) in PULSE_INTELLIGENCE_OPERATION_SIGNAL_GROUPS.items()+ if field in count_fields+ )+ for field in PULSE_INTELLIGENCE_ANALYSIS_COUNT_FIELDS+}++def normalize_reported_version(raw: str) -> str:value = raw.strip()if value.startswith("v"):@@ -1461,6 +1541,70 @@ def pulse_intelligence_timed_rows(return timed_rows+def pulse_intelligence_row_analysis_keys(+ row: dict[str, Any],+) -> tuple[set[str], set[str]]:+ cohort_keys: set[str] = set()+ signal_groups: set[str] = set()+ for field in PULSE_INTELLIGENCE_ANALYSIS_BOOL_FIELDS:+ if not parse_optional_bool(row.get(field)):+ continue+ cohort_keys.update(PULSE_INTELLIGENCE_COHORT_BOOL_KEYS_BY_FIELD[field])+ signal_groups.update(PULSE_INTELLIGENCE_SIGNAL_GROUP_BOOL_KEYS_BY_FIELD[field])+ for field in PULSE_INTELLIGENCE_ANALYSIS_COUNT_FIELDS:+ if parse_optional_nonnegative_int(row.get(field)) <= 0:+ continue+ cohort_keys.update(PULSE_INTELLIGENCE_COHORT_COUNT_KEYS_BY_FIELD[field])+ signal_groups.update(PULSE_INTELLIGENCE_SIGNAL_GROUP_COUNT_KEYS_BY_FIELD[field])+ return cohort_keys, signal_groups+++def analyze_pulse_intelligence_install(+ install_rows: Iterable[dict[str, Any]],+) -> PulseIntelligenceInstallAnalysis:+ timed_rows = pulse_intelligence_timed_rows(install_rows)+ if not timed_rows:+ raise ValueError("Pulse Intelligence install analysis requires at least one row")++ first_free_at = next(+ (received_at for received_at, _, posture in timed_rows if posture is False),+ None,+ )+ first_paid_at = next(+ (received_at for received_at, _, posture in timed_rows if posture is True),+ None,+ )+ observed_free_start = first_free_at is not None and (+ first_paid_at is None or first_free_at < first_paid_at+ )++ cohort_keys: set[str] = set()+ free_cohort_keys: set[str] = set()+ signal_groups: set[str] = set()+ free_signal_groups: set[str] = set()++ for received_at, row, posture in timed_rows:+ row_cohort_keys, row_signal_groups = pulse_intelligence_row_analysis_keys(row)+ cohort_keys.update(row_cohort_keys)+ signal_groups.update(row_signal_groups)+ if posture is False and (first_paid_at is None or received_at < first_paid_at):+ free_cohort_keys.update(row_cohort_keys)+ free_signal_groups.update(row_signal_groups)++ pulse_intelligence_derive_signal_groups(signal_groups)+ pulse_intelligence_derive_signal_groups(free_signal_groups)+ return PulseIntelligenceInstallAnalysis(+ latest_received_at=timed_rows[-1][0],+ first_paid_at=first_paid_at,+ observed_free_start=observed_free_start,+ observed_free_to_paid=observed_free_start and first_paid_at is not None,+ cohort_keys=frozenset(cohort_keys),+ free_cohort_keys=frozenset(free_cohort_keys),+ signal_groups=frozenset(signal_groups),+ free_signal_groups=frozenset(free_signal_groups),+ )++def pulse_intelligence_first_paid_at(timed_rows: Iterable[tuple[datetime, dict[str, Any], bool | None]],) -> datetime | None:@@ -1594,6 +1738,7 @@ def summarize_pulse_intelligence_install_outcomes(current_time: datetime,retention_window: timedelta,signal_outcomes_by_install: dict[str, tuple[bool, bool]] | None = None,+ analysis_by_install: dict[str, PulseIntelligenceInstallAnalysis] | None = None,) -> dict[str, int]:install_id_list = list(install_ids)retained_installs = 0@@ -1608,16 +1753,29 @@ def summarize_pulse_intelligence_install_outcomes(latest = latest_by_install.get(install_id)if latest is None:continue- latest_received_at = parse_received_at(str(latest["received_at"]))+ analysis = (+ analysis_by_install.get(install_id)+ if analysis_by_install is not None+ else None+ )+ latest_received_at = (+ analysis.latest_received_at+ if analysis is not None+ else parse_received_at(str(latest["received_at"]))+ )if current_time - latest_received_at <= retention_window:retained_installs += 1if parse_optional_bool(latest.get("paid_license")) is True:paid_latest += 1else:free_latest += 1- free_start, converted = pulse_intelligence_observed_conversion(- rows_by_install.get(install_id, [])- )+ if analysis is not None:+ free_start = analysis.observed_free_start+ converted = analysis.observed_free_to_paid+ else:+ free_start, converted = pulse_intelligence_observed_conversion(+ rows_by_install.get(install_id, [])+ )if free_start:observed_free_starts += 1if converted:@@ -1671,35 +1829,47 @@ def group_pulse_intelligence_rows_by_install(return rows_by_install+def analyze_pulse_intelligence_rows(+ rows: Iterable[dict[str, Any]],+) -> dict[str, PulseIntelligenceInstallAnalysis]:+ return {+ install_id: analyze_pulse_intelligence_install(install_rows)+ for install_id, install_rows in group_pulse_intelligence_rows_by_install(rows).items()+ }++def summarize_pulse_intelligence_outcome_cohorts(rows: Iterable[dict[str, Any]],latest_by_install: dict[str, dict[str, Any]],*,now: datetime | None = None,retention_window: timedelta = timedelta(days=7),+ analysis_by_install: dict[str, PulseIntelligenceInstallAnalysis] | None = None,) -> dict[str, Any]:current_time = now or datetime.now(timezone.utc)cohort_install_ids: dict[str, set[str]] = {key: set() for key, _, _, _ in PULSE_INTELLIGENCE_OUTCOME_COHORTS}- rows_by_install = group_pulse_intelligence_rows_by_install(rows)+ analyses = (+ analysis_by_install+ if analysis_by_install is not None+ else analyze_pulse_intelligence_rows(rows)+ )- for install_id, install_rows in rows_by_install.items():- for row in install_rows:- for key, _, bool_fields, count_fields in PULSE_INTELLIGENCE_OUTCOME_COHORTS:- if pulse_intelligence_row_matches_cohort(row, bool_fields, count_fields):- cohort_install_ids[key].add(install_id)+ for install_id, analysis in analyses.items():+ for key in analysis.cohort_keys:+ cohort_install_ids[key].add(install_id)cohorts: list[dict[str, Any]] = []- for key, label, bool_fields, count_fields in PULSE_INTELLIGENCE_OUTCOME_COHORTS:+ for key, label, _, _ in PULSE_INTELLIGENCE_OUTCOME_COHORTS:install_ids = cohort_install_ids[key]signal_outcomes_by_install = {- install_id: pulse_intelligence_signal_observed_conversion(- install_rows,- bool_fields,- count_fields,+ install_id: (+ key in analyses[install_id].free_cohort_keys,+ key in analyses[install_id].free_cohort_keys+ and analyses[install_id].first_paid_at is not None,)- for install_id, install_rows in rows_by_install.items()+ for install_id in install_ids}cohorts.append({@@ -1708,10 +1878,11 @@ def summarize_pulse_intelligence_outcome_cohorts(**summarize_pulse_intelligence_install_outcomes(install_ids,latest_by_install,- rows_by_install,+ {},current_time,retention_window,signal_outcomes_by_install,+ analyses,),})@@ -1728,34 +1899,32 @@ def summarize_pulse_intelligence_operations_funnel(*,now: datetime | None = None,retention_window: timedelta = timedelta(days=7),+ analysis_by_install: dict[str, PulseIntelligenceInstallAnalysis] | None = None,) -> dict[str, Any]:current_time = now or datetime.now(timezone.utc)- rows_by_install = group_pulse_intelligence_rows_by_install(rows)- signal_groups_by_install: dict[str, set[str]] = {- install_id: set() for install_id in rows_by_install- }-- for install_id, install_rows in rows_by_install.items():- for row in install_rows:- signal_groups_by_install[install_id].update(- pulse_intelligence_row_signal_groups(row)- )- pulse_intelligence_derive_signal_groups(signal_groups_by_install[install_id])+ analyses = (+ analysis_by_install+ if analysis_by_install is not None+ else analyze_pulse_intelligence_rows(rows)+ )stages: list[dict[str, Any]] = []for key, label, required_groups in PULSE_INTELLIGENCE_OPERATIONS_FUNNEL_STAGES:install_ids = [install_id- for install_id, groups in signal_groups_by_install.items()- if all(group in groups for group in required_groups)+ for install_id, analysis in analyses.items()+ if all(group in analysis.signal_groups for group in required_groups)]- signal_outcomes_by_install = {- install_id: pulse_intelligence_stage_signal_observed_conversion(- install_rows,- required_groups,+ signal_outcomes_by_install: dict[str, tuple[bool, bool]] = {}+ for install_id in install_ids:+ observed_free_signal = all(+ group in analyses[install_id].free_signal_groups+ for group in required_groups+ )+ signal_outcomes_by_install[install_id] = (+ observed_free_signal,+ observed_free_signal and analyses[install_id].first_paid_at is not None,)- for install_id, install_rows in rows_by_install.items()- }stages.append({"key": key,@@ -1764,10 +1933,11 @@ def summarize_pulse_intelligence_operations_funnel(**summarize_pulse_intelligence_install_outcomes(install_ids,latest_by_install,- rows_by_install,+ {},current_time,retention_window,signal_outcomes_by_install,+ analyses,),})@@ -1923,6 +2093,8 @@ def summarize_rows(published_versions: set[str],target_version: str | None = None,include_mock_fleet: bool = False,+ *,+ now: datetime | None = None,) -> dict[str, Any]:row_list: list[dict[str, Any]] = []mock_fleet_rows = 0@@ -1941,7 +2113,8 @@ def summarize_rows(if existing is None or str(row["received_at"]) > str(existing["received_at"]):latest_by_install[install_id] = row- current_time = datetime.now(timezone.utc)+ current_time = now or datetime.now(timezone.utc)+ pulse_intelligence_analysis = analyze_pulse_intelligence_rows(row_list)latest_install_windows = summarize_latest_install_windows(latest_by_install,published_versions,@@ -1975,11 +2148,13 @@ def summarize_rows(row_list,latest_by_install,now=current_time,+ analysis_by_install=pulse_intelligence_analysis,),"pulse_intelligence_operations_loop_funnel": summarize_pulse_intelligence_operations_funnel(row_list,latest_by_install,now=current_time,+ analysis_by_install=pulse_intelligence_analysis,),"target_release_coverage_7d": summarize_target_version_coverage(latest_by_install,@@ -2137,7 +2312,12 @@ def format_text(summary: dict[str, Any], repo: str, since_days: int) -> str:)lines.append("- interpretation: known install age begins when schema v2 lifecycle tracking is first initialized; "- "older upgraded installs are therefore lower bounds"+ "for upgraded installs it is only a lower bound, not original installation age"+ )+ lines.append(+ "- interpretation: deployment method is best-effort current-runtime evidence; "+ "upgraded installs often fall back to container_other or binary_other, so these buckets "+ "must not be read as precise original installation provenance")lines.append("- notification failure semantics: schema v2 counted unsuccessful retry attempts; "diff --git a/scripts/tests/test_telemetry_adoption_report.py b/scripts/tests/test_telemetry_adoption_report.pyindex 07f6f6ceed..f1cebea3e7 100644--- a/scripts/tests/test_telemetry_adoption_report.py+++ b/scripts/tests/test_telemetry_adoption_report.py@@ -9,6 +9,7 @@ import gzipimport jsonimport subprocessimport sys+import timeimport unittestfrom unittest import mock@@ -1289,6 +1290,143 @@ class TelemetryAdoptionReportTest(unittest.TestCase):self.assertEqual(stages["approved_action_success"]["observed_signal_free_starts"], 1)self.assertEqual(stages["approved_action_success"]["observed_signal_free_to_paid"], 1)+ def test_precomputed_pulse_intelligence_analysis_matches_reference_helpers(self) -> None:+ rows = [+ {+ "install_id": "mixed-posture",+ "received_at": "2026-07-20 09:00:00",+ "paid_license": "yes",+ "pulse_intelligence_patrol_resolved_findings_30d": 1,+ "pulse_intelligence_approved_action_successes_30d": 1,+ },+ {+ "install_id": "mixed-posture",+ "received_at": "2026-07-18 09:00:00",+ "paid_license": 0,+ "pulse_intelligence_patrol_new_findings_30d": 1,+ "pulse_intelligence_assistant_context_ai_calls_30d": 2,+ },+ {+ "install_id": "mixed-posture",+ "received_at": "2026-07-19 09:00:00",+ "paid_license": "false",+ "pulse_intelligence_approved_action_decisions_30d": 1,+ "pulse_intelligence_external_agent_action_requests_30d": "3",+ "pulse_intelligence_mcp_adapter_used_30d": "true",+ },+ {+ "install_id": "mixed-posture",+ "received_at": "2026-07-17 09:00:00",+ "paid_license": None,+ "pulse_intelligence_patrol_runs_30d": -1,+ "pulse_intelligence_loop_configured": "not-a-bool",+ },+ ]++ analysis = report.analyze_pulse_intelligence_install(rows)+ expected_free_start, expected_conversion = report.pulse_intelligence_observed_conversion(rows)+ self.assertEqual(analysis.observed_free_start, expected_free_start)+ self.assertEqual(analysis.observed_free_to_paid, expected_conversion)++ for key, _, bool_fields, count_fields in report.PULSE_INTELLIGENCE_OUTCOME_COHORTS:+ with self.subTest(cohort=key):+ expected_match = any(+ report.pulse_intelligence_row_matches_cohort(row, bool_fields, count_fields)+ for row in rows+ )+ expected_free_signal, expected_signal_conversion = (+ report.pulse_intelligence_signal_observed_conversion(+ rows,+ bool_fields,+ count_fields,+ )+ )+ self.assertEqual(key in analysis.cohort_keys, expected_match)+ self.assertEqual(key in analysis.free_cohort_keys, expected_free_signal)+ self.assertEqual(+ key in analysis.free_cohort_keys and analysis.first_paid_at is not None,+ expected_signal_conversion,+ )++ expected_groups: set[str] = set()+ for row in rows:+ expected_groups.update(report.pulse_intelligence_row_signal_groups(row))+ report.pulse_intelligence_derive_signal_groups(expected_groups)+ self.assertEqual(analysis.signal_groups, expected_groups)++ for key, _, required_groups in report.PULSE_INTELLIGENCE_OPERATIONS_FUNNEL_STAGES:+ with self.subTest(stage=key):+ expected_free_signal, expected_signal_conversion = (+ report.pulse_intelligence_stage_signal_observed_conversion(+ rows,+ required_groups,+ )+ )+ observed_free_signal = all(+ group in analysis.free_signal_groups for group in required_groups+ )+ self.assertEqual(observed_free_signal, expected_free_signal)+ self.assertEqual(+ observed_free_signal and analysis.first_paid_at is not None,+ expected_signal_conversion,+ )++ def test_pulse_intelligence_production_scale_performance_guard(self) -> None:+ now = datetime(2026, 7, 23, 12, tzinfo=timezone.utc)+ rows: list[dict[str, object]] = []+ latest_by_install: dict[str, dict[str, object]] = {}+ install_count = 500+ rows_per_install = 100+ for install_index in range(install_count):+ install_id = f"install-{install_index:04d}"+ for row_index in range(rows_per_install):+ row: dict[str, object] = {+ "install_id": install_id,+ "received_at": (+ now - timedelta(minutes=rows_per_install - row_index)+ ).strftime("%Y-%m-%d %H:%M:%S"),+ "paid_license": row_index >= rows_per_install // 2,+ "pulse_intelligence_loop_configured": 1,+ "pulse_intelligence_patrol_new_findings_30d": row_index % 3 == 0,+ "pulse_intelligence_assistant_context_ai_calls_30d": row_index % 5,+ "pulse_intelligence_external_agent_context_requests_30d": row_index % 7,+ "pulse_intelligence_approved_action_decisions_30d": row_index % 11 == 0,+ "pulse_intelligence_approved_action_attempts_30d": row_index % 13 == 0,+ "pulse_intelligence_approved_action_successes_30d": row_index % 17 == 0,+ }+ rows.append(row)+ latest_by_install[install_id] = row++ original_parse_received_at = report.parse_received_at+ started = time.perf_counter()+ with mock.patch.object(+ report,+ "parse_received_at",+ wraps=original_parse_received_at,+ ) as parse_received_at:+ analyses = report.analyze_pulse_intelligence_rows(rows)+ report.summarize_pulse_intelligence_outcome_cohorts(+ rows,+ latest_by_install,+ now=now,+ analysis_by_install=analyses,+ )+ report.summarize_pulse_intelligence_operations_funnel(+ rows,+ latest_by_install,+ now=now,+ analysis_by_install=analyses,+ )+ elapsed = time.perf_counter() - started++ self.assertEqual(len(analyses), install_count)+ self.assertEqual(parse_received_at.call_count, len(rows))+ self.assertLess(+ elapsed,+ 5.0,+ f"50,000-row Pulse Intelligence aggregation took {elapsed:.3f}s",+ )+def test_is_mock_fleet_row_matches_scaled_fixture_signature(self) -> None:self.assertTrue(report.is_mock_fleet_row({"kubernetes_pods": 120, "vmware_hosts": 7}))self.assertTrue(report.is_mock_fleet_row({"kubernetes_pods": 600, "vmware_hosts": 35}))@@ -1377,10 +1515,23 @@ class TelemetryAdoptionReportTest(unittest.TestCase):deployment = next(item for item in summary["category_signals"] if item["field"] == "deployment_method")+ self.assertEqual(+ deployment["label"],+ "Deployment method signal (best effort; upgraded installs often report container_other or binary_other)",+ )self.assertEqual(deployment["buckets"],[{"bucket": "docker_compose", "installs": 1}, {"bucket": "legacy_unknown", "installs": 1}],)+ known_age = next(+ item+ for item in summary["category_signals"]+ if item["field"] == "known_install_age_bucket"+ )+ self.assertEqual(+ known_age["label"],+ "Time since first schema-v2 lifecycle observation",+ )configured = next(item for item in summary["count_signals"] if item["field"] == "configured_connections")@@ -1475,7 +1626,14 @@ class TelemetryAdoptionReportTest(unittest.TestCase):self.assertIn("User-base lifecycle and outcomes (7d):", rendered)self.assertIn("Highest observed activation stage: monitoring 2", rendered)self.assertIn("Alerts resolved (30d): 4 across 1 installs", rendered)- self.assertIn("older upgraded installs are therefore lower bounds", rendered)+ self.assertIn(+ "for upgraded installs it is only a lower bound, not original installation age",+ rendered,+ )+ self.assertIn(+ "upgraded installs often fall back to container_other or binary_other",+ rendered,+ )def test_format_text_includes_latest_install_windows(self) -> None:summary = {@@ -1771,6 +1929,14 @@ class TelemetryAdoptionReportTest(unittest.TestCase):self.assertIn("route parameters, resource IDs", content)self.assertIn("Those reports do not add prompts, findings", content)self.assertIn("account links, or exact commercial tiers", content)+ self.assertIn(+ "not precise evidence of the original installation path",+ content,+ )+ self.assertIn(+ "time since Pulse first created the schema-v2 lifecycle record",+ content,+ )if __name__ == "__main__":