File tree Expand file tree Collapse file tree
rivetkit-rust/packages/rivetkit-core/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1160,6 +1160,7 @@ impl ActorTask {
11601160 }
11611161
11621162 fn dispatch_lifecycle_error ( & self ) -> Option < anyhow:: Error > {
1163+ // TODO: Share admission policy with RegistryDispatcher::active_actor.
11631164 if self . ctx . destroy_requested ( ) {
11641165 self . ctx . warn_work_sent_to_stopping_instance ( "dispatch" ) ;
11651166 return Some ( ActorLifecycleError :: Destroying . build ( ) ) ;
Original file line number Diff line number Diff line change @@ -625,6 +625,19 @@ pub(super) fn normalize_actor_request_path(path: &str) -> String {
625625 }
626626}
627627
628+ #[ cfg( test) ]
629+ pub ( super ) fn is_actor_request_path ( path : & str ) -> bool {
630+ let Some ( stripped) = path. strip_prefix ( "/request" ) else {
631+ return false ;
632+ } ;
633+
634+ stripped. is_empty ( )
635+ || stripped
636+ . as_bytes ( )
637+ . first ( )
638+ . is_some_and ( |byte| matches ! ( byte, b'/' | b'?' ) )
639+ }
640+
628641pub ( super ) fn build_envoy_response ( response : Response ) -> Result < HttpResponse > {
629642 let ( status, headers, body) = response. to_parts ( ) ;
630643
Original file line number Diff line number Diff line change @@ -808,6 +808,7 @@ impl RegistryDispatcher {
808808 match instance. get ( ) {
809809 ActorInstanceState :: Active ( instance) => {
810810 let instance = instance. clone ( ) ;
811+ // TODO: Share admission policy with ActorTask::dispatch_lifecycle_error.
811812 if instance. ctx . started ( ) {
812813 if instance. ctx . destroy_requested ( ) {
813814 instance
You can’t perform that action at this time.
0 commit comments