From 8ff1ce7ee486ac947cc20cc6b4186d8ef09c852e Mon Sep 17 00:00:00 2001 From: Saurabh Jain Date: Fri, 8 May 2026 20:22:06 +0200 Subject: [PATCH 1/2] fix(telemetry): drop profile field (collides with governance env var) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v8.0.0 telemetry payload added a `profile` field sourced from `AXONFLOW_PROFILE`. That env var is already used by the governance engine (`platform/agent/profile.go`, ADR-036) — a customer setting `AXONFLOW_PROFILE=strict` for governance would have telemetry POSTs rejected by the server validator (HTTP 400). The field also has no analytics consumer; `deployment_mode` (`self_hosted | community_saas | unknown`) already carries the topology dimension. Mechanical revert of the v8.0.0 profile additions: drop the env-var read, drop the payload field, drop the doc-comment, drop the profile-from-env unit test, and update remaining test assertions to confirm the field is absent. Bump 8.0.0 → 8.0.1. The env var reverts to its sole governance-engine meaning. No public API changes; `pip install --upgrade axonflow` is sufficient. Coordinated with parallel reverts in axonflow-sdk-go / -typescript / -java / -rust + the four plugin repos + the server validator, per the issue #2033 train. Signed-off-by: Saurabh Jain --- CHANGELOG.md | 22 ++++++++++++++++++++++ axonflow/_version.py | 2 +- axonflow/telemetry.py | 6 ------ pyproject.toml | 2 +- tests/test_telemetry.py | 14 ++++---------- 5 files changed, 28 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e183642..187e998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 and tag v{X.Y.Z}. The release workflow's preflight checks the section header matches the tag. --> +## [8.0.1] - 2026-05-08 — Drop telemetry `profile` field + +**Patch release.** Mechanical revert of the `profile` field added in 8.0.0 +to the heartbeat payload. The field was sourced from `AXONFLOW_PROFILE`, +which collides with the existing governance-engine env var of the same +name (`platform/agent/profile.go`, ADR-036) — a customer setting +`AXONFLOW_PROFILE=strict` for governance would have telemetry POSTs +rejected by the server validator. The field also had no analytics +consumer; `deployment_mode` (`self_hosted | community_saas | unknown`) +already carries the topology dimension. Removing it eliminates the +collision class entirely. + +No public API changes; `pip install --upgrade axonflow` is sufficient. + +### Removed + +- **Telemetry `profile` field.** `_build_payload` no longer reads + `AXONFLOW_PROFILE` and no longer emits `profile` in the heartbeat + payload. The env var reverts to its sole governance-engine meaning. + Any internal analytics queries that referenced the column should + switch to `deployment_mode` (already populated, same wire shape). + ## [8.0.0] - 2026-05-08 — Decision history API + telemetry simplification **Major release.** The headline feature is the new decision-history client API: diff --git a/axonflow/_version.py b/axonflow/_version.py index fff09e2..83a2486 100644 --- a/axonflow/_version.py +++ b/axonflow/_version.py @@ -1,3 +1,3 @@ """Single source of truth for the AxonFlow SDK version.""" -__version__ = "8.0.0" +__version__ = "8.0.1" diff --git a/axonflow/telemetry.py b/axonflow/telemetry.py index 6cf9fdd..134408b 100644 --- a/axonflow/telemetry.py +++ b/axonflow/telemetry.py @@ -214,8 +214,6 @@ def _build_payload( derived from the endpoint host plus ``AXONFLOW_TRY=1`` override (see ``_classify_deployment_mode``). The ``mode`` parameter is kept for legacy callers but no longer drives this dimension. - * ``profile`` — sourced from ``AXONFLOW_PROFILE``; ``"unknown"`` - when unset. Free-form deployment classifier; analytics only. The ``stream`` field classifies the heartbeat sub-stream. Sandbox-mode clients emit ``"sandbox"`` so analytics can distinguish dev/test pings @@ -225,9 +223,6 @@ def _build_payload( wire-allowlist is enforced server-side — see checkpoint-service ``IsValidIncomingStream``. """ - profile_env = os.environ.get("AXONFLOW_PROFILE") - profile_stripped = profile_env.strip() if profile_env is not None else "" - profile = profile_stripped if profile_stripped else "unknown" payload: dict[str, object] = { "telemetry_type": "sdk", "sdk": "python", @@ -240,7 +235,6 @@ def _build_payload( "endpoint_type": endpoint_type, "features": [], "instance_id": str(uuid.uuid4()), - "profile": profile, } if mode == "sandbox": payload["stream"] = "sandbox" diff --git a/pyproject.toml b/pyproject.toml index dd48499..585b6df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "axonflow" -version = "8.0.0" +version = "8.0.1" description = "AxonFlow Python SDK - Enterprise AI Governance in 3 Lines of Code" readme = "README.md" license = {text = "MIT"} diff --git a/tests/test_telemetry.py b/tests/test_telemetry.py index ba3ac67..89198a3 100644 --- a/tests/test_telemetry.py +++ b/tests/test_telemetry.py @@ -107,8 +107,8 @@ def test_payload_format(self) -> None: assert isinstance(payload["instance_id"], str) # Should be a valid UUID assert len(payload["instance_id"]) == 36 # UUID v4 string length - # v1 telemetry-schema profile field - assert payload["profile"] == "unknown" + # v1 telemetry-schema field removed in 8.0.1: profile is no longer in payload + assert "profile" not in payload def test_payload_deployment_mode_propagated(self) -> None: """deployment_mode reflects the supplied v1 schema value.""" @@ -119,13 +119,6 @@ def test_payload_deployment_mode_propagated(self) -> None: assert cs["deployment_mode"] == "community_saas" assert un["deployment_mode"] == "unknown" - def test_payload_profile_from_env(self, monkeypatch: pytest.MonkeyPatch) -> None: - """profile sourced from AXONFLOW_PROFILE; unknown when unset.""" - monkeypatch.setenv("AXONFLOW_PROFILE", "production") - assert _build_payload("production")["profile"] == "production" - monkeypatch.delenv("AXONFLOW_PROFILE", raising=False) - assert _build_payload("production")["profile"] == "unknown" - def test_payload_instance_id_unique(self) -> None: """Each call generates a new instance_id.""" p1 = _build_payload("production") @@ -191,7 +184,8 @@ def test_payload_posted_correctly( assert payload["sdk"] == "python" # v1 schema: deployment_mode classifies from endpoint host. assert payload["deployment_mode"] == "self_hosted" - assert payload["profile"] == "unknown" + # 8.0.1: profile field removed (collided with governance env var). + assert "profile" not in payload assert "instance_id" in payload # Production-mode payload omits stream (server defaults to heartbeat). assert "stream" not in payload From 92ecfdaccc914e92cc1d76b43aa79246618b9308 Mon Sep 17 00:00:00 2001 From: Saurabh Jain Date: Fri, 8 May 2026 20:27:00 +0200 Subject: [PATCH 2/2] chore: retrigger CI after [skip-runtime-e2e] title update Signed-off-by: Saurabh Jain