Skip to content

[codex] Exclude ignored files from telemetry stats#1628

Open
svarlamov wants to merge 1 commit into
mainfrom
chore/telemetry-all-git-line-counts-exclude-ignores
Open

[codex] Exclude ignored files from telemetry stats#1628
svarlamov wants to merge 1 commit into
mainfrom
chore/telemetry-all-git-line-counts-exclude-ignores

Conversation

@svarlamov

@svarlamov svarlamov commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Track deleted-line counts per file in the git diff parser so post-commit stats-cost estimation can filter ignored deletions before summing.
  • Keep committed metric scalar values sourced from ignore-filtered commit stats and add sparse-position coverage for the committed event payload.
  • Add post-commit hunk coverage showing metric-facing hunk JSON excludes default ignored files, .git-ai-ignore matches, and linguist-generated files.

Why

Commit stats and telemetry can otherwise overcount large ignored/generated changes, especially deletion-heavy commits where ignored files previously contributed to the expensive stats preflight estimate.

Validation

  • task fmt
  • task lint
  • task build
  • git diff --check
  • task test TEST_FILTER=test_committed_metric_values_use_filtered_stats_and_hunks_payload
  • task test TEST_FILTER=test_commit_hunks_post_commit_path_respects_all_ignore_sources
  • task test TEST_FILTER=test_post_commit_large_ignored_deletions_do_not_trigger_skip_warning
  • task test TEST_FILTER=test_parse_diff_added_lines_with_insertions

Open in Devin Review

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@woud420 woud420 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Some(commit.summary().unwrap_or_default().to_string()),
Some(commit.body().unwrap_or_default().to_string()),
),
Err(_) => (None, None),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit : worth a trace here?

.commit_sha(commit_sha)
.base_commit_sha(parent_sha);

// Get repo URL from default remote

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit : might be worth to put the whole condition in a function for debug traces.

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