Skip to content

ref(pr-metrics): Add observability for dropped delegated-agent attribution#119005

Open
giovanni-guidini wants to merge 1 commit into
masterfrom
gio/ref/cursor-delegated-attribution-logging
Open

ref(pr-metrics): Add observability for dropped delegated-agent attribution#119005
giovanni-guidini wants to merge 1 commit into
masterfrom
gio/ref/cursor-delegated-attribution-logging

Conversation

@giovanni-guidini

Copy link
Copy Markdown
Contributor

Adds a few logs to the Cursor delegated-agent attribution path so we can tell why some completed agents don't get attributed.

The completion webhook silently skips attribution when one of its guards fails, so today there's no way to see whether it was known_to_seer, a missing PR URL, or the webhook not matching a run. This logs the blocking gate and adds a run_id -> agent_id join key on the launch log. No behavior change.

…ution

Missing SEER_DELEGATED_CURSOR attributions are currently undiagnosable. When a
Cursor completion webhook arrives but the agent PR is not attributed, the guard in
handle_status_change skips silently, so there is no trace of which condition blocked
it. Separately, a delegation's Seer run_id could not be joined to the Cursor agent_id
that provider webhooks key on, because the launch log omitted the launched agent ids.

Add a cursor_webhook.attribution_skipped log that fires when a completed agent is not
attributed, recording known_to_seer and has_pr_url so the blocking gate is visible.
Surface known_to_seer on the status_updated_to_seer log, and include the launched
agent_ids on the coding-agent launch_result log to provide the run_id -> agent_id join
key. No change to attribution behavior.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 3, 2026
@giovanni-guidini giovanni-guidini marked this pull request as ready for review July 3, 2026 16:12
@giovanni-guidini giovanni-guidini requested a review from a team as a code owner July 3, 2026 16:12
@giovanni-guidini giovanni-guidini requested a review from vaind July 3, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant