Repository navigation
fix: Ash best practices audit — bug fix and hardening - #106
Merged
Merged
Conversation
- Add @max_instances guard to prevent unbounded recursive generation - A weekly recurrence with a far-future repeat_until could previously generate 260+ huddlz synchronously in a single request
- Match subject.arguments.group_id instead of top-level group_id - The previous pattern never matched the Ash authorization context, silently preventing organizers from using the add_member action - Aligns with GroupOwner and GroupMember check patterns
- Group.description: max 5000, Group.location: max 500 - Huddl.description: max 5000, Huddl.physical_location: max 500 - Huddl.virtual_link: max 2048 - Prevents unbounded text input on fields with no prior limits
- Add Logger.warning for failed huddl searches - UI still degrades gracefully with empty results
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
Full codebase audit for Ash best practices, code quality, and efficiency. Found and fixed 4 issues:
%{group_id: group_id}at the top level, but Ash passes context as%{subject: %{arguments: %{group_id: ...}}}. This silently prevented organizers from using theadd_memberaction (only owners and admins could add members).generate_huddlz_from_templatehad no upper bound; a far-futurerepeat_untilwith weekly frequency could generate 260+ huddlz synchronously.Group.description,Group.location,Huddl.description,Huddl.physical_location,Huddl.virtual_link).Test plan
add_member(proves bug fix)project_evalagainst live app