Skip to content

Compare Gmail addresses the way Gmail does in the groups sync - #59

Merged
rachmo merged 1 commit into
mainfrom
claude/gmail-dots
Sep 29, 2026
Merged

rachmo merged 1 commit into
mainfrom
claude/gmail-dots

Conversation

@rachmo

@rachmo rachmo commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Found while reading open findings with Rachel on 2026-09-29. Separate from the step 7 pull requests, because it fixes something that repeats every hour today.

The loop

Gmail ignores dots (and anything after a +, and treats googlemail.com as gmail.com), so h.smith@gmail.com and hsmith@gmail.com are one account. Google Groups keeps such a member under the account's own spelling, whichever was added.

P0063's parent is on the sheet with a dot and sits in grp-parents without one (Rachel checked; she confirmed it is a dot, without sharing the address). So since the first apply on 2026-09-28:

  1. every hourly run saw the sheet's spelling missing and "added" it — Google answered "already a member", which addMember counts as success;
  2. the group's spelling matched nobody on the sheet, so it was held: finding #142, "an address the lifecycle sheet does not account for … is in grp-parents" (and, until Held parent alert names grp-parents instead of "is in ." #58, "is in .").

Harmless — the parent was in the group throughout — but a Remove from groups click on #142 would have removed them only for the next run to add them back.

The fix

domain/lifecycle/address.ts: addressKey compares Gmail addresses without dots, +tags or googlemail, and every other domain lower-cased and otherwise as written — whether dots matter elsewhere is that domain's business, and guessing could merge two different people. It is only for comparing: a join still sends the sheet's spelling, a removal the group's.

Used by the groups planner (groupPlan.ts) and the offboarding planner (offboarding.ts), so the step 7 warnings agree with it. Two students listing one parent spelled two ways are one parent.

After deploy, the next hourly groups run stops re-adding P0063's parent and closes #142 as no longer held — no sheet edit needed.

Tests

test/gmailAddresses.test.ts (6); two of them fail on main without the fix. npm run typecheck && npm test && npm run format:check && npm run build pass (824 tests). Merges independently of #57 and #58 (checked).

🤖 Generated with Claude Code

Gmail ignores dots and anything after a +, and googlemail.com is
gmail.com, so h.smith@gmail.com and hsmith@gmail.com are one account.
Google Groups keeps such a member under the account's own spelling. P0063's
parent is on the sheet with a dot and in grp-parents without one, so every
hourly run "added" them again (Google answered "already a member", which
counts as success) and held the group's spelling as an address nobody
lists (#142, open since the first apply on 2026-09-28).

`addressKey` compares Gmail addresses without dots, +tags or googlemail,
and every other domain lower-cased and otherwise as written. It is used
only to compare: an add still sends the sheet's spelling, and a removal
the group's. The groups planner and the offboarding planner use it, so
the step 7 warnings agree.

After deploy, the next hourly groups run stops re-adding P0063's parent
and closes #142 as no longer held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rachmo
rachmo requested a review from willtoth September 29, 2026 23:02
@rachmo
rachmo merged commit 263ac49 into main Sep 29, 2026
1 check passed
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