fix(telemetry): drop profile field [skip-runtime-e2e]#189
Merged
saurabhjain1592 merged 2 commits intomainfrom May 8, 2026
Merged
fix(telemetry): drop profile field [skip-runtime-e2e]#189saurabhjain1592 merged 2 commits intomainfrom
saurabhjain1592 merged 2 commits intomainfrom
Conversation
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 <saurabhjain1592@gmail.com>
Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mechanical revert of the v1 telemetry
profilefield added in 8.0.0 (PR #188). The field was sourced fromAXONFLOW_PROFILE, which is already in use by the governance engine on the agent (platform/agent/profile.go:47, ADR-036). A customer settingAXONFLOW_PROFILE=strictfor governance would have telemetry POSTs rejected by the server validator with HTTP 400 (validator only acceptsdev/prod/unknown).The field also has no analytics consumer in the platform —
deployment_mode(self_hosted | community_saas | unknown) already carries the topology dimension thatprofilewas meant to add. Removing it eliminates the env-var collision class entirely.Bumps 8.0.0 → 8.0.1. No public API changes. Tracker: axonflow-enterprise#2033.
Why drop instead of rename
grep -rn "Profile\\.S\\|\\.Profile\\b\\|profile.*dimension" platform/ ee/ --include="*.go" | grep -v _test.goreturns ZERO hits in non-test, non-checkpoint-service code on the server side. Nothing reads the stored field. No aggregator, no daily-report dimension, no dashboard. Renaming would still cost the 9-repo coordination + a new env var; dropping costs less and loses no analytics signal.Changes
axonflow/telemetry.py— removeos.environ.get("AXONFLOW_PROFILE")read, removeprofile_env/profile_stripped/profilelocals, removeprofilekey from the payload dict, remove the doc-comment block describing the field.tests/test_telemetry.py— removetest_payload_profile_from_env(which monkeypatchedAXONFLOW_PROFILE); updatetest_payload_formatto assert"profile" not in payload; updateTestSendTelemetryPing::test_payload_posted_correctlysimilarly.axonflow/_version.py,pyproject.toml—8.0.0→8.0.1.CHANGELOG.md— new[8.0.1]entry underRemoved.Audit grep result
After the edits:
Code package + tests are clean of
AXONFLOW_PROFILEreads and ofprofilepayload writes. The 4 remainingprofilementions are negation assertions confirming the field is gone. CHANGELOG references in the new 8.0.1 entry + historical 8.0.0 / 6.2.0 entries are intentional.5-question self-review (per
feedback_self_review_is_mandatory_every_pr.md)For each hunk:
feedback_self_review_check_other_callsites.md, greppedAXONFLOW_PROFILEand\bprofile\bacross the repo (see audit above). All references in package code + tests are accounted for.test_payload_formatandtest_payload_posted_correctlynow assert"profile" not in payload, which is the actual contract after this PR. The deletedtest_payload_profile_from_envwas specifically testing the env-var-read behavior we're removing — no replacement needed.osimport intelemetry.pyis still needed by_is_telemetry_enabled,_classify_deployment_mode, andsend_telemetry_pingenv reads.pytest tests/is green for all telemetry tests (973 pass, 29 skipped) and for the targetedtests/test_telemetry.py+tests/test_telemetry_short_lived.pysubset. Coverage at 81.22% (above the 75% threshold). See "Test plan" below for the one local-only flake noted.Test plan
pip install -e ".[dev]"cleanpytest tests/test_telemetry.py— 23/23 passpytest tests/— 973 pass, 29 skipped (coverage 81.22%, above 75% threshold)Local-only flake observation (not introduced by this PR)
tests/test_telemetry_short_lived.py::test_telemetry_flushes_on_immediate_exitfailed locally on the first run but the cause was a stale~/Library/Caches/axonflow/python-telemetry-last-sentstamp file gating the heartbeat in the spawned subprocess (the subprocess does NOT inherit pytest's monkeypatched cache dir). Removing the stamp made the test pass. Verified the same failure happens on cleanmainwith the stale stamp — i.e., this is pre-existing test-isolation behavior, not introduced here. Filing a follow-up so the test setsXDG_CACHE_HOME/HOMEin the subprocess env to a tmpdir is out of scope for this mechanical revert; CI starts fresh so it doesn't hit this.No tag
Per
feedback_releases_require_approval.md+ the issue #2033 brief: do NOT tag v8.0.1 or publish to PyPI on merge of this PR. The full 10-PR train (9 clients + server) needs to merge first; tagging is operator-gated and happens after the train lands.Coordinated train
This PR is one of nine client-side reverts coordinated under axonflow-enterprise#2033. Server validator removal lands in a parallel axonflow-enterprise PR. Either merge order is safe (JSON unmarshaling tolerates a server still tolerating an absent
profilefield, and a server tolerating an extra unknown field).Skip-runtime-e2e justification
This PR is part of the #2033 coordinated train across 1 server + 9 client repos. Per the session-2033 brief, runtime proof is deferred to the post-server-merge staging-checkpoint deploy:
axonflow-enterprise#2035(server) merges +gh workflow run deploy-checkpoint.yml -f environment=stagingdeploys the new code tostaging-checkpoint.getaxonflow.com.profile) and (b) the resulting DDB row has noprofileattribute.runtime-e2e/profile_field_removal/EVIDENCE/<utc-ts>/post-deploy.Adding a same-PR
runtime-e2e/test here would either:lint-no-mocks-in-runtime-e2e.sh), orThe post-deploy proof against staging-checkpoint is the only meaningful runtime test for this train.