Skip to content

fix(effect): forward all RivetKit actor options, not just name and icon - #5591

Open
AuthorOfTheSurf wants to merge 2 commits into
rivet-dev:mainfrom
AuthorOfTheSurf:effect-forward-actor-options
Open

fix(effect): forward all RivetKit actor options, not just name and icon#5591
AuthorOfTheSurf wants to merge 2 commits into
rivet-dev:mainfrom
AuthorOfTheSurf:effect-forward-actor-options

Conversation

@AuthorOfTheSurf

@AuthorOfTheSurf AuthorOfTheSurf commented Aug 23, 2026

Copy link
Copy Markdown

I was observing an actor that awaits an LLM gets killed by the 60s default actionTimeout and there was no way to raise it — the option is accepted by the type system and then discarded

  • Currently only name and icon get passed through. The intent of this PR is to properly pass through all config keys
  • Unknown keys fail loudly at compile time (ActorOptionsSchema is .strict())
  • Four tests added: instance options forwarded, display options (name/icon) still forwarded, RivetKit defaults
    intact when unset, and SDK-only options (state/db) kept out of the forwarded bag.
  • stagecraft (ergonomic layer over Rivet & Effect) works around this today by writing onto config.options after the layer builds. That workaround disappears if this lands. I was able to solve my own personal case by increasing the default 60 second timeout to 600 seconds. The p99 for my simulation was 53.8s, so I'd get a couple failures per run without the ability to increase

The change

Eight lines of source. Rather than widen the allowlist, I inverted the split:

const effectActorOptionsKeys = ["state", "db"] as const;
export type RivetkitActorOptions = NonNullable<Rivetkit.ActorOptionsInput>;
// splitOptions:
rivetkitOptions: Struct.omit(options, effectActorOptionsKeys),
effectOptions:   Struct.pick(options, effectActorOptionsKeys),
  • Widening the allow list is not the right approach, because developers that add config fields would need to remember to widen the allow list too. Failure to do so would result in the same exact bug of accepting config values and then silently doing nothing with them.

@AuthorOfTheSurf
AuthorOfTheSurf marked this pull request as ready for review August 27, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant