{"record":{"id":"87adfaacd75ea7ed","repo":"Hmbown/CodeWhale","slug":"context-expected-name-id-login-users-noreply","errorCode":null,"errorMessage":"{context}: expected 'Name <id+login@users.noreply.github.com>'","messagePattern":"(.+?): expected 'Name <id\\+login@users\\.noreply\\.github\\.com>'","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"scripts/check-coauthor-trailers.py","lineNumber":133,"sourceCode":"    def is_merge_commit(self) -> bool:\n        return len(self.parents.split()) > 1\n\n\ndef norm_key(value: str) -> str:\n    return value.strip().lower()\n\n\ndef github_login_from_noreply(email: str) -> str | None:\n    if not CANONICAL_NOREPLY_RE.match(email):\n        return None\n    local = email.split(\"@\", 1)[0]\n    return local.split(\"+\", 1)[1]\n\n\ndef parse_identity(raw: str, context: str) -> Identity:\n    match = IDENTITY_RE.match(raw)\n    if not match:\n        raise ValueError(f\"{context}: expected 'Name <id+login@users.noreply.github.com>'\")\n    identity = Identity(match.group(\"name\").strip(), match.group(\"email\").strip())\n    if not CANONICAL_NOREPLY_RE.match(identity.email):\n        raise ValueError(\n            f\"{context}: right-hand email must be numeric GitHub noreply, got {identity.email}\"\n        )\n    return identity\n\n\ndef load_author_map(path: Path) -> dict[str, Identity]:\n    aliases: dict[str, Identity] = {}\n    for lineno, raw_line in enumerate(path.read_text(encoding=\"utf-8\").splitlines(), start=1):\n        line = raw_line.split(\"#\", 1)[0].strip()\n        if not line:\n            continue\n        if \"=\" not in line:\n            raise ValueError(f\"{path}:{lineno}: expected 'alias = Name <email>'\")\n        alias, raw_identity = [part.strip() for part in line.split(\"=\", 1)]\n        identity = parse_identity(raw_identity, f\"{path}:{lineno}\")","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/scripts/check-coauthor-trailers.py#L115-L151","documentation":"scripts/check-coauthor-trailers.py validates identities in .github/AUTHOR_MAP and commit trailers against the strict form 'Name <id+login@users.noreply.github.com>'. This error is raised by parse_identity when the whole raw string does not match IDENTITY_RE — i.e. the '<...>' angle-bracket email part is missing or the line is not a single Name + email pair.","triggerScenarios":"An AUTHOR_MAP entry like 'jane = Jane Doe' (no angle-bracket email) or 'jane = Jane <jane@x.com> <jane@y.com>' (two pairs); a Co-authored-by trailer whose value lacks the email portion; stray characters that break the regex.","commonSituations":"Editing .github/AUTHOR_MAP by hand and forgetting the noreply email; squash-merge trailers copied from patch emails; name fields containing unbalanced '<' or '>'; entries copied from a map format used by other tools (Name <email> without the numeric id+login).","solutions":["Fix the offending entry/trailer to exactly: Display Name <1234567+login@users.noreply.github.com>.","Get the numeric id+login from the contributor's GitHub profile (the ID is the numeric account id, the login their username).","Re-run scripts/check-coauthor-trailers.py locally over your commit range before pushing.","If a contributor has no GitHub noreply address, coordinate with maintainers on the canonical identity to record in AUTHOR_MAP."],"exampleFix":"# before (.github/AUTHOR_MAP)\njane = Jane Doe\n# after\njane = Jane Doe <1234567+janedoe@users.noreply.github.com>","handlingStrategy":"validation","validationCode":"import re\n\nIDENTITY_RE = re.compile(r\"^(?P<name>.+) <(?P<email>[^>]+)>$\")\n\ndef identity_well_formed(raw: str) -> bool:\n    return IDENTITY_RE.match(raw.strip()) is not None","typeGuard":"def is_canonical_identity(raw: object) -> bool:\n    if not isinstance(raw, str):\n        return False\n    match = IDENTITY_RE.match(raw.strip())\n    return bool(match) and bool(\n        re.match(r\"^[0-9]+\\+[a-zA-Z0-9-]+@users\\.noreply\\.github\\.com$\", match.group(\"email\"))\n    )","tryCatchPattern":null,"preventionTips":["Keep every AUTHOR_MAP entry in the form 'alias = Name <id+login@users.noreply.github.com>'.","Run scripts/check-coauthor-trailers.py over your branch range before pushing.","Copy noreply addresses from the contributor's actual commits rather than inventing them."],"tags":["git","coauthor-trailers","validation","author-map","ci"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}