chore: rename SMTP env vars to LETS_CHAT_SMTP_* (LC-201) #244
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/lc-201-prefix-smtp-env-vars"
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?
Summary
Brings the SMTP mailer config into the
LETS_CHAT_*namespace shared by every other runtime env var, and fixes the stalestate.rsmailer comment that referenced a nonexistentLETS_CHAT_SMTP_URLvar.Rename map
SMTP_HOST->LETS_CHAT_SMTP_HOST,SMTP_PORT->LETS_CHAT_SMTP_PORT,SMTP_TLS->LETS_CHAT_SMTP_TLS,SMTP_FROM->LETS_CHAT_SMTP_FROM,SMTP_USERNAME->LETS_CHAT_SMTP_USERNAME,SMTP_PASSWORD->LETS_CHAT_SMTP_PASSWORD.Hard rename, no dual-read fallback. Nothing in production sets the flat names yet (no lets-chat
compose-secrets.ymlexists and LC-200 is still open), so a dual-read path would be dead weight.Changes
server/src/mail.rs: env reads, doc block,warn!messages.server/src/state.rs:47: rewrote comment toLETS_CHAT_SMTP_HOST / _PORT / _TLS / _FROM, dropped the nonexistent_URL.server/src/routes/admin.rs: twoSMTP_*comment references on the gutted settings handler.server/migrations/settings/0006_drop_smtp_settings.sql: comment reference.server/templates/admin/settings.html: admin UI hint text.server/tests/email_notification_dispatch.rs,server/tests/email_notification_post_path.rs: set/remove the prefixed names.README.md(env table + setup list),docs/email-ingress.md,.env.standalone: operator docs.compose.dev-web.yml,compose.dev-web-saas.yml,compose.dev.yml.1: dev-stack env blocks.Coordination
LC-200's
server/c-01/lets-chat/compose-variables.ymlandcompose-secrets.ymlmust adopt the prefixed names; this rename should land before or together with the LC-200 deployment.Verification
rg '\bSMTP_(HOST|PORT|TLS|FROM|USERNAME|PASSWORD)\b' --glob '!docs/superpowers/**'returns zero matches../dev/cargo check -p lets-chat-server --all-targetsis clean.email_notification_dispatch(7 tests) andemail_notification_post_path(3 tests) pass. Fullcargo testis green except a pre-existing concurrent-load flake inemail_ingress_attachments::jpeg_re_encode_strips_exif_signature_from_stored_bytes(passes in isolation onmaintoo).just check's clippy step trips on a pre-existingtoo_many_argumentsonresolve_msg_authorinserver/src/routes/mod.rs:153that also reproduces onmainand is out of scope for this rename.LC-201
Bring the SMTP mailer config into the LETS_CHAT_* namespace shared by every other runtime env var, and fix the stale `state.rs` mailer comment that referenced a nonexistent LETS_CHAT_SMTP_URL var. Renames: SMTP_HOST/PORT/TLS/FROM/USERNAME/PASSWORD -> LETS_CHAT_SMTP_HOST/PORT/TLS/FROM/USERNAME/PASSWORD. Hard rename, no dual-read fallback (no deployment currently sets the flat names). Touched: server/src/mail.rs (env reads + doc block + warn! messages), server/src/state.rs (mailer doc comment), server/src/routes/admin.rs (two SMTP_* comment references), server/migrations/settings/0006_drop_smtp_settings.sql (comment), server/templates/admin/settings.html (admin UI text), server/tests/email_notification_{dispatch,post_path}.rs, README.md, .env.standalone, docs/email-ingress.md, compose.dev-web.yml, compose.dev-web-saas.yml, compose.dev.yml.1. Verified no unprefixed SMTP_(HOST|PORT|TLS|FROM|USERNAME|PASSWORD) remains outside docs/superpowers/. `just check` clippy error pre-exists on main (too_many_arguments on resolve_msg_author) and is unrelated. Renamed tests pass; full `cargo test` is green except a flake under concurrent load (email_ingress_attachments::jpeg_re_encode_..., passes in isolation on main too). #LC-201