Repository navigation
fix: stop parsing email domains as maintainer handles - #533
Merged
mlieberman85 merged 1 commit intoOct 6, 2026
Merged
mlieberman85 merged 1 commit into
mlieberman85 merged 1 commit into
Conversation
mlieberman85
reviewed
Oct 6, 2026
mlieberman85
left a comment
Contributor
There was a problem hiding this comment.
Thanks, the parsing fix looks right. I checked the issue's example plus user@localhost @erin, [@bob](url) and (alice@corp.io), and all parse correctly. Three things before we can merge:
- The DCO check is failing. Please sign off your commits (
git rebase --signoff main, then force-push). - Please say in the AI-assistance section which tool you used and for which parts, and add an
Assisted-by:trailer (see AI_POLICY.md). - Rebase onto current
main.
Optional, or as a follow-up: detect('maintainers') still reports confidence 1.0 for this source (context/sieve.py), which #464 asks to lower.
Drafted with Claude Code; reviewed and posted by me.
ContextSieve._parse_maintainers_file() matched @([a-zA-Z0-9]...) against the whole file, so the domain of every email address became a handle: '- Alice Example <alice@realcorp.io> @alice' produced ['@RealCorp', '@alice', 'Alice Example'], scored 0.95 and auto-accepted, and the phantom handle was later rendered into CODEOWNERS. The parser now strips email addresses before matching handles and requires the @ not to be glued to a word character, so the issue's example yields ['@alice']. Display names are no longer emitted as maintainers: a bare name is not a GitHub handle and GitHub rejects it as a code owner. Signed-off-by: Akshat Shah <akshatdi@usc.edu> Assisted-by: Muse (muse.ai)
akshatshahh
force-pushed
the
fix/issue-464-maintainers-email-domain
branch
from
October 6, 2026 17:11
508a4b6 to
c5c14cc
Compare
Contributor
Author
|
All three addressed:
Leaving the confidence-1.0 follow-up for a separate PR as suggested. |
mlieberman85
approved these changes
Oct 6, 2026
mlieberman85
left a comment
Contributor
There was a problem hiding this comment.
Thanks, all three points addressed. The parser fix and tests look good; merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #464.
What:
ContextSieve._parse_maintainers_file()ran its handle regex over the whole file, so the domain of every email address became a handle:- Alice Example <alice@realcorp.io> @aliceproduced['@realcorp', '@alice', 'Alice Example'], scored 0.95 (EXPLICIT_FILE), auto-accepted, and the phantom handle was later rendered into CODEOWNERS.Fix: the parser now strips email addresses before matching handles and requires the
@not to be glued to a word character (covers address-like leftovers such asuser@localhost). The issue's example now yields['@alice']. Display names are no longer emitted as maintainers either: a bare name is not a GitHub handle and GitHub rejects it as a code owner.Tests: 6 new tests in
tests/darnit/context/test_context_sieve.py— the issue's exact example, name+email with no handle, a bare email address, plain @mentions (behavior preserved), a handle glued directly after an email, and an end-to-enddetect('maintainers')check. 5 of the 6 fail on the pre-fix code. Full context + remediation suites pass (346 passed),ruff checkclean.AI assistance disclosure (per AI_POLICY.md): this PR was prepared with Muse (muse.ai), an AI coding assistant, which drafted the parser fix in
packages/darnit/src/darnit/context/sieve.pyand the 6 new tests intests/darnit/context/test_context_sieve.py. I reviewed every line of the change, ran the full test suite, and stand behind it.