Repository navigation
feat(team-provisioner): make forwarding to personal email opt-in - #193
Open
Alexanderamiri wants to merge 3 commits into
Open
Alexanderamiri wants to merge 3 commits into
Alexanderamiri wants to merge 3 commits into
Conversation
New accounts no longer get Gmail API forwarding to their personal email (it only sent Google's confirmation mail; forwarding came from the "Personlige aliaser" routing rule, which forwarded every member's mail away from the java.no inbox and is now disabled). Forwarding is opt-in per member with `forward_to_personal: true` in the registry's members.yaml: - scripts/gmail-address-map.py prints the recipient address map for opted-in members, for an admin to paste into the routing rule (it has no API) - provision-groups.py posts a reminder when the opted-in members change - diff-groups.py shows the flag in the registry plan comment - the Lambda drops _setup_email_forwarding and the gmail.settings.sharing scope Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sort-members.py and sync-members.py rebuild members.yaml from known fields; both now keep the opt-in, and the sheet sync never sets it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Terraform Plan🚧 Changes detected — Plan: 0 to add, 1 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Plan makes a single in-place update to the Lambda function javabin-team-provisioner, changing only its source code hash (new deployment package); no creates or destroys.
|
This branch has not been deployed
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.
Summary
Mail to java.no accounts now stays in the java.no inbox. Forwarding to a member's personal email is opt-in, with
forward_to_personal: truein the registry'smembers.yaml. It goes through the Gmail routing rule "Personlige aliaser", which an admin updates by hand (the rule has no API). The Lambda no longer touches Gmail forwarding.Background: since 2026-10-24, the routing rule forwarded all 64 members' mail to their personal emails with "Also route to original destination" OFF, so java.no inboxes got nothing. It was disabled today. The Lambda's Gmail API forwarding barely took effect: per-user forwarding is on for one member only (bjorn.hamre@java.no), possibly set by himself, and has been left as it is.
Evidence
python3 -m unittest scripts/tests/test_forwarding.py terraform/lambda-src/tests/test_team_provisioner_forwarding.py→FAILED (failures=1, errors=5)After:
python3 -m unittest discover -s scripts/tests→ 239 OK;-s terraform/lambda-src/tests→ 270 OKReview focus
scripts/provision-groups.pyforwarding_changes/post_forwarding_reminder: personal emails must never reach Slack.test_main_posts_reminder_without_personal_emailscovers this throughmain().handler.py_sync_hero_account: new accounts still get the welcome mail, and nothing calls the Gmail settings API.Out of scope:
provision-groups.ymlonly diffs againstHEAD~1, so a multi-commit push misses earlier changes (predates this PR).Merge danger
Door: two-way
Blast radius: new hero accounts
Prod via platform CI (Lambda code update). Merge before javaBin/registry
feat/forwarding-toggle, because registry workflows run platformmain'ssort-members.py, and the old one strips the flag.After merge:
gmail.settings.sharingfrom the domain-wide delegation client (Admin console > Security > API controls > Domain-wide delegation). No code needs it any more, so it only lets the SA key set forwarding on any mailbox.aliasis forwarded too. The map lists primary addresses only.OpenSpec
spec-free: the repo has no
openspec/; behaviour is documented indocs/lambda-functions.mdandCLAUDE.md.🤖 Generated with Claude Code