fix(telemetry): drop profile field [skip-runtime-e2e]#221
Merged
Conversation
The v1 telemetry schema added a `profile` field on `TelemetryPayload` sourced from `process.env.AXONFLOW_PROFILE`. That env var was already used by the agent's governance enforcement layer (`platform/agent/profile.go` — allowlist `dev | default | strict | compliance`, see ADR-036), and the telemetry validator on prod-checkpoint accepts only `dev | prod | unknown`. Customers running governance with `strict` or `compliance` would have their pings rejected with HTTP 400. The `deployment_mode` field already covers topology classification (self_hosted | community_saas | unknown), and there are no consumers reading the stored `profile` column on the server side, so removing the field loses no signal that's actually being used and lets `AXONFLOW_PROFILE` revert to its single governance meaning. Mechanical revert of the v8.0.0 addition. No migration needed — clients that were not setting `AXONFLOW_PROFILE` for telemetry purposes see no behaviour change; clients that were can stop. Server-side the field continues to be tolerated by JSON unmarshaling rules until the parallel server-side removal lands. Closes #2033 for the TypeScript SDK. 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
The v1 telemetry schema (#220) added a
profilefield onTelemetryPayloadsourced fromprocess.env.AXONFLOW_PROFILE. That env var name was already taken by the agent's governance enforcement layer (platform/agent/profile.go, allowlistdev | default | strict | compliance, ADR-036), while the telemetry validator on prod-checkpoint accepts onlydev | prod | unknown.AXONFLOW_PROFILE=devstrictcomplianceproductionThe
deployment_modefield already covers topology classification (self_hosted | community_saas | unknown) — the analytics dimensionprofilewas meant to add. No consumer reads the storedprofilecolumn on the server side either, so removal loses no signal that's actually being used and letsAXONFLOW_PROFILErevert to its single governance meaning.This is the TypeScript SDK leg of the coordinated 10-PR train tracked under axonflow-enterprise#2033.
Changes
src/telemetry.ts— remove theprofile: stringfield on theTelemetryPayloadinterface plus its doc comment, remove the twoprocess.env.AXONFLOW_PROFILEreads (one insendTelemetryPingNow, one insendTelemetryPing), and remove the correspondingprofileassignment in both payload literals. Updated the surrounding doc comments to drop theAXONFLOW_PROFILEmention.tests/telemetry.test.ts— drop theexpect(payload.profile).toBe('unknown')assertion in the payload-shape test.test/telemetry-endpoint-type.test.ts— dropprofile: 'unknown'from the twoTelemetryPayloadliterals used by the type-shape and URL-leak tests.package.json+package-lock.json+src/version.ts— version bump 8.0.0 → 8.0.1 (re-stamped vianpm run stamp-version).CHANGELOG.md— new[8.0.1]entry under### Removednoting the env-var collision rationale.Audit grep
The remaining hit is the unrelated Bedrock inference-profile reference in the LLM provider types — not telemetry-related.
Self-review (5-question protocol per hunk)
Walked the diff hunk-by-hunk:
TelemetryPayloadinterface — removedprofilefield + doc comment. Does the change do what the commit message says? Yes. Are there other call-sites that construct aTelemetryPayload? Checked: two production sites insrc/telemetry.ts(covered) and two test sites intest/telemetry-endpoint-type.test.ts(covered). Are there public re-exports affected?TelemetryPayloadis exported but the field is being removed, not added — consumers were already loose-typing or not setting it. Is the build green? Yes. Is the lint clean? Yes.sendTelemetryPingNow— removed env read + payload assignment + comment update. Same five — yes, yes, yes, yes, yes.sendTelemetryPing— same shape as fix: generatePlan sends incorrect user_token causing auth errors #2. Same five — yes, yes, yes, yes, yes.tests/telemetry.test.ts— removedexpect(payload.profile).toBe('unknown'). Does it leave the test still meaningful? Yes — the surrounding payload-shape test still asserts every other field. Does it match a removed type member? Yes. CI green? Locally: 56/56 telemetry tests pass.test/telemetry-endpoint-type.test.ts— removedprofile: 'unknown'from two literals. Same shape. Both literals also keep all other fields. Type-shape compiles after the removal.package.json+package-lock.json+src/version.ts— 8.0.0 → 8.0.1. Patch bump per the briefing. Lock-file bump was scoped to the two@axonflow/sdkself-references at lines 3 and 9 only; nested deps untouched.src/version.tswas re-stamped via the prebuild script.CHANGELOG.md— new[8.0.1]entry. Customer-facing language only, no internal repo paths or deployment automation references.Test plan
npm installcleannpm test -- --testPathPattern='telemetry'— 56/56 passnpm run build— green (CJS + ESM + ESM-imports fix)npm run lint— cleannpm run format:check— cleanPre-existing local test failures
test/client.test.tshas 5 LLM-routing test failures (lines 268, 285, 301, 317, 333) that reproduce onmainas well, unmodified by this PR. CI onmainruns the same suite green (894 passed of 907 most recently), so the failures appear to be a local environment / mock issue rather than a regression. Not in scope for this revert.Coordination
Part of the 10-PR train under axonflow-enterprise#2033. Per the brief, do not tag/release this repo until the full train (1 server + 9 clients) merges and the staging-checkpoint runtime proof is committed.
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.