Uh oh!
There was an error while loading. Please reload this page.
V152: deliveries addressability CHECK + friendly incomplete-credentials flash - #649
Merged
Merged
Conversation
…s flash Follow-up to the PR BeamLabEU#647 post-merge credential-leak fix (82f2ffc): - phoenix_kit_newsletters_deliveries gains CHECK (user_uuid IS NOT NULL OR recipient_email IS NOT NULL) in V152's broadcast section — a both-NULL delivery row is unaddressable. Idempotently guarded via information_schema (same pattern as V125), dropped first in down/1. The newsletters Broadcaster already filters such rows before insert_all, so this is a pure DB backstop. - The Email Sending test-send flash now renders a specific message for {:error, {:incomplete_credentials, fields}} (field names only) instead of falling through to the generic inspect(reason).
ddon pushed a commit
that referenced
this pull request
Jul 19, 2026
Reviewed alongside PR #648 as part of the same release: no issues found, both the CHECK constraint and the incomplete-credentials flash are correctly implemented and tested. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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 freeto 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.
Follow-up to the post-merge credential-leak fix (82f2ffc) that closed the [MAJOR] finding from the #647 review — two small pieces from that review round hadn't landed with it:
Deliveries addressability CHECK.
phoenix_kit_newsletters_deliveriesgainsCHECK (user_uuid IS NOT NULL OR recipient_email IS NOT NULL)in V152's broadcast section — with both columns now nullable, a both-NULL row is unaddressable. Idempotently guarded viainformation_schema.table_constraints(the V125 pattern; Postgres has noADD CONSTRAINT IF NOT EXISTS), dropped first indown/1. The newsletters Broadcaster already filters such rows beforeinsert_all, so this is a pure DB backstop; V152Test covers both-null rejected / either-side-alone accepted.Friendly flash for incomplete credentials. The Email Sending test-send handler now renders a specific message for
{:error, {:incomplete_credentials, fields}}(field names only) instead of the genericinspect(reason)fallback, plus a LiveView test walking the full chain (validated connection → required field blanked → stillconnected?→ flash names the missing field, and the secret never appears in the rendered HTML).Databases already stamped '152' need the constraint applied manually (
ALTER TABLE ... ADD CONSTRAINT phoenix_kit_newsletters_deliveries_recipient_check CHECK (user_uuid IS NOT NULL OR recipient_email IS NOT NULL)) — same accumulator caveat as documented in the migration's moduledoc.Verification: V152 fresh-chain + targeted suites (migration, mailer, Email Sending LiveView) — 69 tests, 0 failures; credo --strict clean on touched files.