Type Ruby effect callback payloads - #65
Conversation
Publish reusable RBS records and check the runtime constructors and a packaged consumer with strict Steep diagnostics. Preserve existing serialized hashes, keyword callbacks, and retry behavior. Closes #64
|
@greptileai please review the current head for issue #64, including the strict constructor contracts, packaged consumer checks, and preserved Ruby callback behavior. |
Greptile SummaryThis PR publishes reusable RBS types for effect callback payloads and refactors the runtime constructors to conform to those types.
Confidence Score: 5/5The PR appears safe to merge; no actionable new issue remains, and both previous findings are fully fixed. The current implementation preserves the existing runtime payload shapes while adding strict public typing and comprehensive runtime coverage. The installed-artifact test now activates the exact built gem and verifies its resolved specification path, and the error-message constructor removes the redundant conversion while retaining a strict body-level type annotation. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Effect[Effect execution] --> Outcome{Outcome}
Outcome -->|Success| Success[EffectPayload.success]
Outcome -->|Failure after retries| Error[EffectPayload.error]
Error --> Failure[EffectPayload.failure]
Success --> Message[(Durable callback message)]
Failure --> Message
Message --> Callback[Actor callback keywords]
PublicRBS[Public RBS aliases] -. type-check .-> Success
PublicRBS -. type-check .-> Error
PublicRBS -. type-check .-> Failure
Reviews (3): Last reviewed commit: "test: isolate packaged signature loading" | Re-trigger Greptile |
|
@greptileai please review the new head bfaa5d1. The Steep setup example now uses library "solid_objects", and a consumer check verifies that exact loading configuration. |
|
@greptileai please review the new head 8987fdc. Both findings are fixed: isolated installed-artifact resolution is asserted, and the redundant conversion is replaced with a scalar type annotation. Focused strict, runtime, and formatting checks pass. |
Effect callbacks expose their original arguments and outcome as serialized hashes, but typed applications had to repeat those records. This publishes reusable RBS envelope/error aliases and checks the actual constructors with strict Steep diagnostics, preserving keyword handlers and existing delivery behavior.
Closes #64. Ruby counterpart to JS #48.
Before, an application maintained its own error record:
After:
The full
effect_failure_payload[Arguments]andeffect_success_payload[Arguments, Result]aliases ship in maintainedsig/public. Application parameters describe serialized values; they do not infer registered effect contracts. Ruby retains its string keys, nullable exception class, message/backtrace limits, top-level keyword invocation, retries, transactions, and idempotency keys. Generic parameters remain unconstrained because RBS cannot express Ruby serialization's normalization as a generic bound.Validation: