Fix test and worker guard after Newsletters extraction - #417
Merged
Conversation
- Remove PhoenixKit.Modules.Newsletters from @all_internal_modules in module_test.exs (module deleted from core, extracted to separate package) - Update describe block count from 21 to 20 modules - Add function_exported? guard for process_scheduled_broadcasts/0 in ProcessScheduledJobsWorker to prevent crash on version mismatch
ddon
added a commit
that referenced
this pull request
Mar 16, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. Both fixes correctly address the issues flagged in PR #413 review: test module list cleanup and symmetric |
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
Two fixes for issues discovered in code review of PR #413 (Newsletters extraction).
Changes
Fix 1 —
module_test.exs: remove Newsletters from internal modules listPhoenixKit.Modules.Newsletterswas left in@all_internal_modulesafter being extracted to thephoenix_kit_newsletterspackage.Code.ensure_loaded!would crash since the module no longer exists in core. Updated describe count 21→20.Fix 2 —
process_scheduled_jobs_worker.ex: symmetric guard forprocess_scheduled_broadcastsThe guard checked
function_exported?(newsletters_mod, :enabled?, 0)but callednewsletters_mod.process_scheduled_broadcasts()without a matching check. Addedfunction_exported?(newsletters_mod, :process_scheduled_broadcasts, 0)to prevent Oban worker crash on version mismatch.Test plan
mix compile --warnings-as-errors— cleanmix test— 549 tests, 0 failuresmix credo --strict— no issuesmix dialyzer— passes