Type actor operation references - #49
Conversation
|
@greptileai please review this draft at head 0a8caa4. The broad legacy schedule/transmit override incompatibility is explicitly recorded as a pending user design decision; please check the receiver inference, independent callback constraints, package declarations, and any additional compatibility or correctness gaps. |
Greptile SummaryThe PR adds actor-specific typing for scheduled and transmitted operations, independently checks literal effect callback names, combines the rebased effect-payload contracts, and prepares release 0.14.9.
Confidence Score: 5/5The PR appears safe to merge; the combined type surfaces and release metadata are consistent, and no outstanding blocking failure remains. Root and core exports expose the documented operation and payload contracts, installed-package checks exercise both contract groups, and all checked release metadata agrees on version 0.14.9. The sole previous finding was resolved after Greptile accepted the compatibility rationale, so it is not outstanding. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Actor["Concrete Actor type"] --> Schedule["schedule / transmit"]
Schedule --> Operations["ScheduledOperationsFor<ActorType>"]
Operations --> CheckedOperation["Typed operation name and arguments"]
Actor --> Emit["emit(effect, options)"]
Emit --> Callbacks["Independently inferred success/failure callbacks"]
Runtime["Runtime registry validation"] --> Schedule
Runtime --> Emit
Package["Root and core entry points"] --> Consumer["Installed-package type fixtures"]
Operations --> Package
Callbacks --> Package
Reviews (3): Last reviewed commit: "chore: prepare version 0.14.9" | Re-trigger Greptile |
|
@greptileai please review head 453acef. The new inference annotations use Actor, Pick<this, Keys>, and ignored callback return values. The existing effect-argument Record<string, unknown> contract is preserved as explained in the resolved thread; narrowing that input would violate the requested API compatibility. The separate legacy-override design decision remains pending and this PR remains a draft. |
Infer concrete staged operations inside actor methods and check effect callback literals independently. Keep registry names and explicit dynamic paths available. Cover inheritance, private members, packaged declarations, and the legacy override compatibility decision in compile-only tests. Refs #46
Combine operation and payload typing release notes after rebasing onto main. Keep the legacy override compatibility impact explicit.
453acef to
d41384d
Compare
|
@greptileai please review head d41384d after the rebase onto main and 0.14.9 release preparation. The conflict resolutions preserve both payload and operation typing docs and installed-package checks. The documented legacy schedule/transmit override annotation incompatibility remains explicit; please check the combined type surfaces and release metadata. |
Scheduled watchdogs currently need
.recoverIfStuck!and accept misspelled operation names or incorrect arguments. This adds actor-specific schedule/transmit inference and independent checks for literal effect callbacks, and prepares version 0.14.9. Runtime staging and validation remain unchanged.Addresses #46. Ruby counterpart: solid-objects-ruby#66. Rebased onto
mainat00f3929, preserving the payload contracts and documentation merged in #48. The release notes include both typing improvements.Before:
After:
Type compatibility: this retains strict scheduling on the existing methods. Subclasses explicitly overriding
scheduleortransmitwith the broadScheduledOperationsreturn type must update their override signatures to match the generic Actor methods. The compile-only fixture records that diagnostic; this is a compile-time compatibility change. Normal callers, generic actor/reference use, existing emit overrides, and deliberately dynamic names retain their supported paths.Receiver inference handles calls inside actor methods, inherited operations, private members, and lifecycle overrides. Both callback literals are checked independently; deliberately widened strings retain runtime validation. Effect and commit-action names remain strings because their registries are runtime-wide. Per-actor registry inference is deferred. The parameter-style checker ignores TypeScript's erased
thisparameter.Validation after rebase and version bump:
pnpm run format:checkandpnpm run checkpass, including source/type fixtures, examples, documentation, and Cloudflare declarations.pnpm test: 377 passed, 21 environment-gated skips.pnpm run build,pnpm run test:cloudflare, andpnpm run check:cloudflarepass, including the Wrangler dry run.pnpm run test:packagepasses against the built 0.14.9 tarball, checking both operation and payload contracts through root/core entry points.node scripts/release-notes.mjs 0.14.9produces the combined release notes; package and exported runtime versions match.The rebase preserves both merged payload examples and operation-reference guidance in
docs/api.md. Release preparation updates the PR branch; publishing remains a separate step.