Skip to content

feat(ci): auto-fixable contributor attribution gate - #77116

Merged
teknium1 merged 1 commit into
mainfrom
chore/attribution-autofix
Aug 2, 2026
Merged

feat(ci): auto-fixable contributor attribution gate#77116
teknium1 merged 1 commit into
mainfrom
chore/attribution-autofix

Conversation

@teknium1

@teknium1 teknium1 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The check-attribution CI gate is now auto-fixable: scripts/audit_pr_attribution.py --fix resolves and writes contributor email mappings in one command, and the gate's failure message points at it.

Salvage PRs kept going red on this gate because mapping was a manual step that only surfaced after push — bare <login>@users.noreply.github.com emails (increasingly common from contributor tooling) don't auto-resolve like the <id>+<login> form, and nothing pre-push checked for them.

Changes

  • scripts/audit_pr_attribution.py (new): mirrors the CI gate's exact logic (merge-base scan, same skip rules). Report mode for pre-push audits; --fix resolves the GitHub login (bare-noreply local part verified against the users API, else GitHub email search) and writes contributors/emails/<email> via the existing add_contributor.py. Unresolvable emails still fail with the manual command.
  • .github/workflows/contributor-check.yml: failure output and review_status.how_to_fix now lead with the one-command fix; drops the stale "add to AUTHOR_MAP" guidance (AUTHOR_MAP is frozen).

Deliberately NOT auto-committing from CI: bare-noreply local parts are user-controlled (the historical bryan@…hydraxman mismatch), so a human confirms the resolved login — the script prints an explicit confirm warning for that case.

Validation

Case Result
Branch with all emails mapped exit 0, "all mapped"
Test commit with unmapped bare-noreply author report mode exit 1, names the email
--fix on that commit resolves bennybuoy, writes mapping file, prints user-controlled warning
Parity with CI gate on the live a2a salvage branch matches (green after mapping)

Infographic

attribution-autofix

….py + gate points at it

The check-attribution CI gate kept bouncing salvage PRs because mapping
contributor emails was a manual, easy-to-forget step (bare
<login>@users.noreply.github.com emails don't auto-resolve like the
<id>+<login> form).

- scripts/audit_pr_attribution.py: mirrors the CI gate's logic exactly
  (merge-base scan, same skip rules). Report mode for pre-push checks;
  --fix auto-resolves via the bare-noreply local part (verified against
  the GitHub users API) or GitHub email search, then writes
  contributors/emails/<email> files via add_contributor.py. Prints a
  confirm-the-human warning on bare-noreply resolution since the local
  part is user-controlled (the bryan->hydraxman case).
- contributor-check.yml: failure output + review_status how_to_fix now
  lead with the one-command fix instead of hand-editing instructions
  (also drops the stale 'edit AUTHOR_MAP' guidance — AUTHOR_MAP is
  frozen).
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on dcfc1df

ℹ️ Info

CI-sensitive file review · View job

PR touches sensitive files, but the ci-reviewed label has been added, approving them.

Sensitive files changed:

@teknium1 teknium1 added the ci-reviewed applied to manually approve dangerous changes label Aug 2, 2026
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation labels Aug 2, 2026
@teknium1
teknium1 merged commit 1c39f1c into main Aug 2, 2026
97 of 100 checks passed
@teknium1
teknium1 deleted the chore/attribution-autofix branch August 2, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-reviewed applied to manually approve dangerous changes comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants