Add NEMO_EMAIL_MODE env var to gate email_blast permissions #35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — safety gate identified during westside-email-agent buildout (2026-04-04). NEMO (Qwen 3.5:4b) should not have unrestricted email blast access.
Repo
forgejo_admin/westside-ai-assistantUser Story
As a superadmin, I want to control NEMO's email permissions via environment variable, so that I can restrict a small model to test-only sends until trust is earned.
Context
NEMO currently has an
email_blasttool that can send to any audience. A 4B model should not have unrestricted access to blast real parents. The permission level should be controlled via deployment config (env var), not code changes.Three modes:
disabled— email_blast tool not available, NEMO cannot send any emailstest_only— tool exists but forces test_email to an allowlist. Rejects blasts without test_email. DEFAULT.full— unrestricted (future, after trust is earned)File Targets
Files to modify:
app/config.py— addnemo_email_mode: str = "test_only"andnemo_test_emails: str = "draneylucas@gmail.com,marcusdraney23@gmail.com"app/ai.py— checksettings.nemo_email_modebefore executing email_blast. Indisabledmode, remove tool from TOOLS list. Intest_onlymode, force test_email param and reject if not in allowlist.Files to modify in pal-e-deployments:
overlays/westside-ai-assistant/prod/deployment-patch.yaml— addNEMO_EMAIL_MODE=test_onlyandNEMO_TEST_EMAILSenv varsAcceptance Criteria
NEMO_EMAIL_MODE=disabled— email_blast tool not in TOOLS listNEMO_EMAIL_MODE=test_only— email_blast works but only sends to addresses in NEMO_TEST_EMAILSNEMO_EMAIL_MODE=full— unrestricted (existing behavior)test_onlywhen env var not setTest Expectations
pytest tests/ -vConstraints
Checklist
Related
sop-email-send— email safety rulesarch-email— email architecture