Repository navigation
fix(telemetry): count Azure DevOps task runs as surface azure-devops-task - #307
Merged
adityankale190895 merged 1 commit intoNov 18, 2026
Merged
Conversation
The DiffCIObserve task runs the CLI with DIFFCI_SURFACE=azure-devops-task, but surfaceOf only passed github-action and gitlab-component through, so Azure runs were counted as cli. Add azure-devops-task to UsageSurface, pass it through, and list it in docs/telemetry.md. Unknown values still count as cli. Fixes DiffCI#303 Signed-off-by: FredApps <[email protected]>
adityankale190895
marked this pull request as ready for review
November 18, 2026 05:04
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.
Needs maintainer: confirm that
https://app.diffci.com/v1/usage-eventsacceptssurface: "azure-devops-task"(or say which value it expects). If it does, this can be marked ready as is; if it validatessurfacestrictly, the server needs that value first, or Azure runs stop being counted.Fixes #303
Important
Keep this as a draft until a maintainer confirms the usage endpoint (
https://app.diffci.com/v1/usage-events) acceptssurface: "azure-devops-task". Today the client never sends that value, so nothing has exercised the server with it. If the endpoint validatessurfaceagainst the four existing values, merging this first could get Azure task usage events rejected instead of counted ascli.Why: the Azure DevOps task (
integrations/azure-devops/DiffCIObserve/index.js:131) runs the CLI withDIFFCI_SURFACE: "azure-devops-task". ButsurfaceOf(packages/diffci-cli/src/client/telemetry.ts) only passed throughgithub-actionandgitlab-component, so every Azure task run was counted ascli. This is the Azure counterpart of #284/#285.Change
usage-signal.ts:UsageSurfacegains"azure-devops-task".telemetry.ts:surfaceOfpassesazure-devops-taskthrough. Any other value is still counted ascli.docs/telemetry.md: lists the value in thesurfacerow and mentions the Azure DevOps task among the wrappers whose runs are counted.Test:
packages/diffci-cli/tests/client/telemetry.test.ts› "each CI wrapper's surface is counted as itself, and unknown values as cli". It records usage bodies through a stubbedfetchforgithub-action,gitlab-component,azure-devops-taskand an unknown value.mainthe result is['github-action', 'gitlab-component', 'cli', 'cli'](fails).[…, 'azure-devops-task', 'cli'](passes).Local results
npm run typecheck,npm test(1167 pass),npm run buildandnpm run audit:boundaryall pass.packages/diffci-cli: typecheck and build pass.npm testgives 518 pass and 2 fail. Both failures also happen onmainand are already filed: CLI tests: cli-agent.test.ts expects the old verify usage line and fails on main #193 and CLI tests: the init --install test looks for npm-cli.js under npm's global prefix #196.