Skip to content

Separate agent and ci_system properties#142

Merged
schnie merged 4 commits intomainfrom
separate-agent-ci-system
Feb 27, 2026
Merged

Separate agent and ci_system properties#142
schnie merged 4 commits intomainfrom
separate-agent-ci-system

Conversation

@schnie
Copy link
Member

@schnie schnie commented Feb 27, 2026

Summary

  • Separate agent and ci_system telemetry fields: Previously a single agent property held both AI agent names and CI system names, making them mutually exclusive. Now agent and ci_system are independent fields — both populate when an agent runs inside CI (e.g. Claude Code in GitHub Actions).
  • Simplify context field: Now only reflects terminal type (interactive / non-interactive), no longer duplicates agent/CI info with agent or ci values.
  • Disable telemetry in all tests: Added root tests/conftest.py that sets AF_TELEMETRY_DISABLED=1 so no test suite fires real telemetry events.

Example event shape

{
  "context": "non-interactive",
  "agent": "claude-code",
  "ci_system": "github-actions",
  "command": "dags list",
  ...
}

@schnie schnie marked this pull request as draft February 27, 2026 17:51
@schnie schnie marked this pull request as ready for review February 27, 2026 18:10
@schnie schnie requested a review from Copilot February 27, 2026 18:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the telemetry schema to distinguish AI agent identity from CI system identity, and aligns context to represent only terminal interactivity. It also ensures telemetry is disabled by default across the full test suite.

Changes:

  • Updated invocation context detection to return (context, agent, ci_system) and emit ci_system as a separate telemetry property.
  • Simplified context telemetry property to only "interactive" / "non-interactive".
  • Added a root tests/conftest.py to disable telemetry globally during tests and removed redundant integration-test-only disabling.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
astro-airflow-mcp/src/astro_airflow_mcp/telemetry.py Updates context detection and adds ci_system to MCP tool-call telemetry properties.
astro-airflow-mcp/src/astro_airflow_mcp/cli/telemetry.py Threads ci_system into CLI telemetry properties.
astro-airflow-mcp/tests/test_telemetry.py Updates tests for the new (context, agent, ci_system) tuple and validates combined agent+CI detection.
astro-airflow-mcp/tests/test_telemetry_middleware.py Updates middleware telemetry tests for the new context tuple and context semantics.
astro-airflow-mcp/tests/integration/conftest.py Removes per-suite telemetry disabling in favor of global test configuration.
astro-airflow-mcp/tests/conftest.py Disables telemetry for all tests via AF_TELEMETRY_DISABLED=1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@schnie schnie merged commit 9cc4449 into main Feb 27, 2026
10 checks passed
@schnie schnie deleted the separate-agent-ci-system branch February 27, 2026 19:47
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.

3 participants