Skip to content

Eliminate instance allocation in validation by converting to stateless modules#341

Merged
afuno merged 7 commits into
mainfrom
feature/SRV-409/allocation
Feb 12, 2026
Merged

Eliminate instance allocation in validation by converting to stateless modules#341
afuno merged 7 commits into
mainfrom
feature/SRV-409/allocation

Conversation

@afuno
Copy link
Copy Markdown
Member

@afuno afuno commented Feb 11, 2026

No description provided.

- Transitioned `Validation` and `Performer` from classes to modules for a simpler structure.
- Removed redundant instance variables and caching, favoring local variables for clarity and maintainability.
- Simplified method signatures and reduced complexity by consolidating and refactoring validation and error handling logic.
- Updated related type signatures in `.rbs` files to match refactored implementation.
- Enhanced error propagation for clearer exception handling in validation workflows.
- Replaced `validation_classes_from` with direct calls to `collection_of_options.validation_classes` for simplicity.
- Removed redundant private methods in `Performer` and `Validation` for cleaner implementation.
- Added `check_options` parameter to maintain uniformity across validation interfaces.
- Updated type signatures in `.rbs` files to reflect the refactored method signatures and structure.
- Improved readability and streamlined validation workflows.
- Removed `rubocop:disable Metrics/MethodLength` as it is no longer necessary.
- Simplified `process_option` method declaration for cleaner and more concise readability.
- Retained consistency with the existing `validation_classes` structure.
@afuno afuno added this to the v3.1.0 milestone Feb 11, 2026
@afuno afuno self-assigned this Feb 11, 2026
@afuno afuno added the feature label Feb 11, 2026
- Enhanced exception creation in `Performer` to include attribute names.
- Fixed error propagation in `Validation` with clearer mapping to failed inputs.
- Improved method parameter formatting for better readability and consistency.
- Refined internal workflows to ensure accurate error context and clearer logic flow.
- Renamed `desired_attribute_hash` to `typed_actor_kwargs` for improved semantic clarity.
- Updated related method calls and type signatures in `.rb` and `.rbs` files to reflect the new method name.
- Ensured consistency in validation workflows by adjusting references to the renamed attribute.
- Preserved functionality while improving readability and expressiveness of the codebase.
- Replaced verbose exception creation with streamlined method call to `fail_<system_name>!`.
- Removed redundant attributes in error raising logic.
- Enhanced clarity and conciseness of error handling implementation.
- Added `# rubocop:disable Metrics/MethodLength` to `process`, `process_option`, and `validate!` methods to comply with RuboCop rules without refactoring.
- Change maintains current functionality while addressing style enforcement.
@afuno afuno marked this pull request as ready for review February 11, 2026 21:30
@afuno afuno merged commit ca923b6 into main Feb 12, 2026
37 checks passed
@afuno afuno deleted the feature/SRV-409/allocation branch February 12, 2026 08:22
@afuno afuno added polish and removed feature labels Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant