Skip to content

feat(cli): send is_eval and agent_name with CLI telemetry (CLI-2716) - #7396

Merged
Coly010 merged 2 commits into
developfrom
columferry/cli-2716-send-an-eval-tag-and-the-detected-agent-name-in-cli
Oct 30, 2026
Merged

Coly010 merged 2 commits into
developfrom
columferry/cli-2716-send-an-eval-tag-and-the-detected-agent-name-in-cli

Conversation

@Coly010

@Coly010 Coly010 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds two properties to every CLI analytics event, cli_command_executed included:

  • is_eval is true when SUPABASE_EVAL is 1 or true (case-insensitive), otherwise false. feat(experiments): tag every CLI arm with SUPABASE_EVAL (CLI-2724) evals#416 already sets SUPABASE_EVAL=1 on every CLI run in the evals harness, and this is the CLI side that reports it, so eval runs can be kept out of agent usage numbers.
  • agent_name is the detected agent (for example claude, codex or cursor_cli), sent only when is_agent is true. It reuses the AiTool detection that already drives is_agent and the feedback add metadata, so usage can be split by harness without decoding env_signals.

Events from earlier CLI versions don't carry is_eval, so queries should treat a missing value as false. Both properties are documented in apps/cli/docs/analytics.md.

Linked issue

Closes CLI-2716

Every analytics event now carries `is_eval`, true when `SUPABASE_EVAL` is
`1` or `true`, so automated evaluation runs can be separated from real
usage. Events from a detected agent also carry `agent_name`, the name the
CLI already resolves for `is_agent`, so usage can be split by harness
without decoding `env_signals`.
@Coly010
Coly010 requested a review from a team as a code owner October 29, 2026 15:28

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Both independent reviews completed. The sole reported finding is refuted: the environment helper clears ambient variables before applying test values and restores them afterward. No confirmed issues remain.

Findings

No issues found.

Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/telemetry/analytics.layer.integration.test.ts:199 (test-coverage): The new analytics tests inherit ambient agent-detection variables and SUPABASE_EVAL, causing environment-dependent failures.
    Refuted: The finding incorrectly describes processEnvLayer as overlaying the real environment. Its applyProcessEnv helper explicitly clears process.env first. Consequently, the plain-run test removes ambient SUPABASE_EVAL and agent variables, while the positive test supplies only its selected evaluation and agent variables, along with telemetry settings and an optional stack test-run marker.

Stats

Claude findings: 1 · Codex findings: 0 · Confirmed: 0 · Refuted: 1 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

@Coly010 Coly010 self-assigned this Oct 29, 2026
Base automatically changed from next to develop October 29, 2026 21:08
@Coly010
Coly010 added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 30, 2026
@Coly010
Coly010 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into develop with commit 8c8f5a7 Oct 30, 2026
49 checks passed
@Coly010
Coly010 deleted the columferry/cli-2716-send-an-eval-tag-and-the-detected-agent-name-in-cli branch October 30, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants