Generate actor-specific RBS dispatch types - #66
Conversation
|
@greptileai please review the current head for issue #63, including generated signature correctness, explicit dynamic dispatch, and packaged consumer tests. |
Greptile SummaryThe PR adds opt-in generation of actor-specific RBS dispatch signatures while preserving runtime dispatch behavior and prepares release 0.14.7.
Confidence Score: 5/5The PR appears safe to merge; the combined signatures, package layout, release notes, and version metadata are consistent, with no outstanding actionable issue identified. The packaged signature root includes generated, support, and public declarations; actor-specific generation is covered against a built gem and strict consumer fixtures; and the 0.14.7 version, lockfile, and changelog agree. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Application loads actor classes] --> B[Application supplies actor RBS paths]
B --> C[ActorSignatures loads packaged and application signatures]
C --> D[Reflect registered actor message names]
D --> E[Validate matching public keyword-only declarations]
E --> F[Rewrite operation return types to nil]
F --> G[Generate actor-specific dispatcher interface]
G --> H[Application writes generated RBS]
H --> I[Steep checks schedule, transmit, and callback calls]
Reviews (2): Last reviewed commit: "chore: prepare version 0.14.7" | Re-trigger Greptile |
Combine registered message names with application-declared signatures. Keep strict checks opt-in and preserve dynamic Ruby dispatch and global registry names. Verify actual consumer source and packaged tooling. Closes #63
Combine operation and payload typing release notes after rebasing onto main. Regenerate the lockfile from the gem version.
2eb87c4 to
d29fccf
Compare
|
@greptileai please review head d29fccf after rebasing onto main and preparing 0.14.7. The conflict resolutions retain both payload contracts and actor-operation documentation. Full local rake passes (633 tests, 2238 assertions); please verify combined signatures, packaging, release notes, and regenerated lockfile. |
Typed actors currently get
Ruby::NoMethodfor valid scheduled operations, while misspelled effect callbacks pass Steep. This adds an opt-in RBS generator that combines registered actor message names with application-declared argument types, and prepares version 0.14.7. Existing Ruby calls, runtime validation, and staging behavior stay unchanged.Closes #63. Counterpart to JS #49. Rebased onto
mainate00f4c1, preserving the payload contracts and documentation merged in #65. The release notes cover both typing improvements; the gem version and regenerated lockfile agree.The syntax stays the same:
Before: the first call fails static checking and a callback typo passes. After loading the generated signatures: valid calls pass; invalid operations/callbacks and wrong keyword arguments fail.
require "solid_objects/actor_signatures"loads development tooling only.ActorSignatures.generate(actors:, signatures:)returns deterministic RBS, preserving handwritten inputs and refreshing removed operations. The application owns loading its actors and writing the generated file. It never invokes operations, migrations, or workers. The generator requires explicit signatures, supports inherited/block messages and method overloads/generics, and gives staging methodsnilreturns. Generic actor classes require application-owned signatures.Dynamic names use explicit
public_send; normal typed calls have no catch-all fallback. Global effect/commit-action registries, references, queries, and ordinary untyped Ruby usage remain unchanged. This does not claim actor-specific Sorbet support.Validation after rebase and version bump:
bundle exec rake: 633 tests, 2,238 assertions, no failures/errors (15 environment-gated skips), plus formatting, RBS generation/validation, strict payload and consumer checks, Steep, and Brakeman.Ruby::NoMethod; 14 invalid calls each produce a diagnostic.Release preparation updates the PR branch; publishing remains a separate step.