Skip to content

feat(github): attribute commits to accounts, capture more fields - #2545

Merged
aleksdotbar merged 3 commits into
mainfrom
claude/github-connector-fields
Aug 16, 2026
Merged

feat(github): attribute commits to accounts, capture more fields#2545
aleksdotbar merged 3 commits into
mainfrom
claude/github-connector-fields

Conversation

@aleksdotbar

@aleksdotbar aleksdotbar commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Problem

Commits carry an e-mail and never an account — git has no concept of one. Gold attributes activity by e-mail, and the roster connector can only claim an e-mail for a member who publishes one, so a member who keeps their address private gets no commit attribution at all.

Separately, the streams declared a narrow subset of the payloads they already fetch: account ids, the triggering actor of a CI re-run, who merged a pull request, and review-comment threading were all discarded.

Two defects found while working here:

  • The repository roster lost fork exclusion. A fork's clone carries its whole upstream history, so admitting one credits every upstream commit to this organization.
  • file_extension split the whole path, so a dot in a directory name returned the rest of the path as the extension. Present in all three git connectors.

Fix

Commit attribution. Three sources now claim an e-mail for an account, strongest first:

  1. commit_authors — the proxy enumerates a repository's distinct authors from the clone it already holds, and the connector asks GitHub who each one is. One vendor call per author, not per commit. Reaches authors who never open a pull request.
  2. pull_request_commits — its response already named the commit e-mail and the account together, including addresses that are not public; the connector was dropping both.
  3. noreply addresses, which encode the login they were issued to.

github__account_emails collects the pairs; github__identity_inputs publishes them as value_type='email' claims into silver.identity_inputs. No value_type='id' binding is emitted — what an account means is the persons-seed's decision, so an account the roster does not know resolves through an e-mail match or is minted, as for any other source.

Field capture. Every stream now keeps the identity and process fields its payload already carried. Hypermedia URLs, avatars and reaction breakdowns stay dropped.

Fork exclusion restored on all three repository rosters, with a test pinning it.

file_extension moves to a shared git_file_extension macro that takes the basename before splitting, applied to all three git connectors.

Merge order and deploy notes

  • Depends on a git-cli-proxy serving /v1/authors (feat(git-cli-proxy): serve distinct commit authors per repository #2555). Merge that first and ship a proxy image; until then commit_authors gets a 404, which the repo-scoped handler treats as "skip this repository" — silent, not loud.
  • file_extension needs a one-off backfill. The *__file_changes models are incremental, so rows already in silver keep the old values and identical paths would disagree depending on ingestion time. Run the three models once with --full-refresh after deploy.
  • The connector and github-directory must be configured with the same insight_source_id — both describe the same accounts, and resolution keys on (source type, source id, login). Documented in the connector README.
  • descriptor.yaml version bumped so reconcile rolls the manifest out.
  • connectors-ddl/github.sql regenerated from a full bootstrap; field-parity audit passes.

@aleksdotbar
aleksdotbar requested a review from a team as a code owner August 14, 2026 11:46
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 059e4546-80df-434e-8a4e-43574cefc4c1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Commits carry an e-mail and no account, and the roster can only claim an
e-mail for a member who publishes one, so a member who keeps their address
private got no commit attribution. The pull-request commit response names
the e-mail and the account together; collect those pairs, plus the ones a
noreply address encodes, and publish them as e-mail claims.

Every stream now keeps the identity its payload already carried (account
ids, triggering actor, merged-by, review threading) and the process fields
dropped alongside them, rather than the subset the first pass declared.

Also restores fork exclusion from the repository roster: a fork's clone
carries its whole upstream history, so admitting one credits every upstream
commit to this organization.

The file-extension expression split the whole path, so a dot in a directory
name returned the rest of the path as the extension; it moves to a shared
macro that takes the basename first, fixing all three git connectors.

Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
@aleksdotbar
aleksdotbar force-pushed the claude/github-connector-fields branch from 67bd234 to 742898d Compare August 14, 2026 11:56
@aleksdotbar aleksdotbar changed the title feat(github): attribute commits to accounts, keep the fields dropped feat(github): attribute commits to accounts, capture more fields Aug 14, 2026
@aleksdotbar
aleksdotbar enabled auto-merge August 14, 2026 12:10
@aleksdotbar
aleksdotbar disabled auto-merge August 14, 2026 12:11
@aleksdotbar
aleksdotbar enabled auto-merge August 14, 2026 12:11
An author who never opens a pull request and does not use a noreply address
claims no e-mail today, so their commits reach no person. The proxy now
enumerates a repository's distinct authors from the clone it already holds,
and this stream asks GitHub who each one is — one call per author rather
than per commit, which is what the proxy exists to avoid.

`author: null` marks an e-mail verified on no account (CI and service
identities); those records are dropped rather than stored as unresolved.
The filter compares the login against '' because the interpolation renders
an absent one as the string "None", which is not falsy.

Requires a git-cli-proxy serving /v1/authors.

Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
@aleksdotbar
aleksdotbar added this pull request to the merge queue Aug 16, 2026
Merged via the queue into main with commit 310b77d Aug 16, 2026
68 checks passed
@aleksdotbar
aleksdotbar deleted the claude/github-connector-fields branch August 16, 2026 06:31
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