smart-rb/smart_operation
53.2
Adequate · 20 September 2026
763
lines of production code
Ruby
primary language
4
measurements over time
What this system is
This system is a Ruby library that provides a structured framework for defining and executing discrete operations. It enables dependency injection and enforces type-safe parameter configuration through a dedicated class constructor. The library manages execution outcomes using explicit result types—Success, Failure, Fatal, and Callback—which support both synchronous return values and block-based callback handling for robust error management.
Features
Introduces interface modules for callable operations, dependency injection, and result handling
This change adds three new interface modules to the library: \Callable\, which provides a class-level \call\ method for instantiating and executing operations; \DI\, which includes the \SmartCore::Injection\ module to enable dependency injection within operations; and \Result\, which exposes factory methods (\Success\, \Failure\, \Fatal\, \Callback\) for constructing result objects. These modules form the foundational interface layer for defining and executing smart core operations with support for dependency injection and structured result handling.
_lib/smart\core/operation/interface · high confidence
Behavioural changes
Introduce structured Result types for operations
The \lib/smart\_core/operation/result\ directory now contains a complete set of classes to represent operation outcomes, replacing the previous implicit or unstructured approach. Users can now distinguish between \Success\, \Failure\, \Fatal\, and \Callback\ results. \Success\ results allow accessing returned data via virtual accessors and a \to\_h\ method, while preventing key collisions with core methods. \Failure\ and \Fatal\ results provide structured error handling through an \Error::Set\ that aggregates error codes and contexts, enabling iteration over individual error cases. This change provides a consistent, type-safe interface for handling both successful execution and various error states within operations.
_lib/smart\core/operation/result · high confidence
Introduction of Parameters class for type system configuration
A new Parameters class has been added to the ClassConstructor module to manage the type system configuration. This class accepts a type\_system argument (String or Symbol) during initialization, providing a dedicated structure for handling parameter type definitions within the operation's class constructor logic.
_lib/smart\_core/operation/class\constructor · high confidence
Operation class refactored to support dependency injection and structured results
The SmartCore::Operation class has been restructured to include interfaces for dependency injection (DI), callability, and result handling. This change introduces a new result system with Success, Failure, Fatal, and Callback states, and integrates DI support via the SmartCore::Injection module. Users can now define operations that automatically inject dependencies and return structured results, improving error handling and modularity.
_lib/smart\core · high confidence
Operation execution now supports block-based result handling
The \SmartCore::Operation\ class has been updated to allow its \call\ method to accept a block. When a block is provided, the result (whether success or fatal error) is yielded to that block, enabling asynchronous or callback-style handling of operation outcomes without requiring explicit return value inspection. This change is implemented via the new \InstanceBuilder\ which prepends a module to the operation's singleton class to intercept the \call\ method and yield results.
_lib/smart\core/operation · high confidence
Switches development console from IRB to Pry
The local development console (bin/console) now uses Pry instead of IRB for the interactive Ruby shell, providing users with enhanced debugging and navigation capabilities when running the application locally.
bin · high confidence
Test coverage
Added smoke tests for operation results and dependency injection
Added a new smoke test suite (\spec/smoke\_test\_spec.rb\) that validates core operation behaviors, including basic execution, dependency injection via container registration, and the four result types: Success, Failure, Fatal, and Callback. The tests also verify the block-notation API for handling these results. Additionally, the test configuration (\spec/spec\_helper.rb\) was updated to enable branch and line code coverage reporting and added a dependency on \pry\.
spec · high confidence
Dependencies
Upgrade smart\_operation to 0.1.0 with new dependencies and tooling updates
The smart\_operation gem has been updated to version 0.1.0, introducing new runtime dependencies on smart\_initializer (\~\> 0.4) and smart\_injection (\~\> 0.2), while upgrading the core smart\_engine dependency from \~0.5 to \~0.11. Development tooling has also been updated, including bundler (\~\> 2.2), rspec (\~\> 3.10), armitage-rubocop (\~\> 1.7), and simplecov (\~\> 0.21), with the addition of pry (\~\> 0.13) as a new development dependency.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 51 → 53 (+2.6)
- Rubric changed (rubric-2026.08.17 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 51 → 51 (+0.0)
- Readiness 32 → 38 (+6.6)
- Security 100 → 93 (-6.7)
Resolved (6)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — no supported dependency manifest was read
- No exposed public API
- Test reliability not included
- no production source files with tracked history to analyse
- single-maintainer — knowledge-concentration (bus factor) risk
New (15)
- Ambiguous method overloading/signature conflict. The class exposes two methods named call with different arities (one takes an operation argument, the other takes none). In most static analysis or API consistency contexts, this is confusing unless explicitly documented as overloaded behavior, which is rare in Ruby-style dynamic typing without clear convention.
- Critical CVE: [GHSA redacted] (Gemfile.lock)
- Documentation: no architecture or design documentation (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- Medium CVE: [GHSA redacted] (Gemfile.lock)
- Outdated: armitage-rubocop
- Outdated: pry
- Outdated: rake
- Outdated: rspec
- Outdated: smart_engine
- Outdated: smart_initializer
- Outdated: smart_injection
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
smart-rb/smart_operation was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit bdf607eaad92f49616d084636d0f9db8ef479648 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.