Serverless listener forwards /start to the application when basePath is "/"
I maintainer di solito rispondono entro 1 giorno
@Saisharathchandranandnetha ci sta già lavorando.
Dal 19/9/2026.
- #5756 di @Saisharathchandranandnetha — aperta
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 90/100
Direzione di ricerca
Inizia in rivetkit-rust/packages/rivetkit-core/src/serverless.rs, in handles_listener_request, quindi esamina route_path e i test serverless correlati. Esegui il cargo test indicato con la riproduzione del percorso di base root; è completato quando /, /start, /health, /metadata e /metrics sono riservati, mentre /application viene inoltrato all'applicazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
With serverless.basePath: "/" and an application passed to registry.listen(), the Rust listener forwards the engine's POST /start to the application instead of handling it. Same for /health, /metadata and /metrics. Actors on that pool never start. The same config works through registry.handler().
Where
handles_listener_request in rivetkit-rust/packages/rivetkit-core/src/serverless.rs:
let request_path = parsed.path();
if request_path != base_path && !request_path.starts_with(&format!("{base_path}/")) {
return false;
}
Why it happens
normalize_base_path(Some("/")) returns "/", so the prefix check looks for "//". No request path starts with //, so everything except / itself returns false. serverless_http.rs only hands a request to the runtime when this returns true or when there's no application, so /start ends up in the user's handler.
route_path already handles a root base path correctly. It's only this check. The TypeScript side special-cases it in isServerlessStartRequest (basePath === "/" ? "" : ...), which is why registry.handler() works.
Reproduction
Add to rivetkit-rust/packages/rivetkit-core/tests/serverless.rs:
#[test]
fn listener_reserves_framework_routes_for_root_base_path() {
let base_path = normalize_base_path(Some("/"));
for path in ["/", "/start", "/health", "/metadata", "/metrics"] {
assert!(
handles_listener_request(&base_path, &format!("http://internal{path}")),
"root base path should reserve {path}"
);
}
assert!(!handles_listener_request(&base_path, "http://internal/application"));
}
cargo test -p rivetkit-core --lib listener_reserves_framework_routes_for_root_base_path fails with root base path should reserve /start.
Expected behaviour
With a root base path the listener handles /, /start, /health, /metadata and /metrics itself and forwards everything else to the application.
Suggested fix
Treat base_path == "/" as matching every request path before the prefix check. route_path already returns the right route in that case. Happy to open a PR.
Environment
- upstream/main at
78336a1a0 - Linux 7.2.5-3-omarchy
- rustc 1.98.1 (48a229cea 2026-09-01), cargo 1.98.1 (797e8a9bc 2026-08-05)
- Lingua principale
- Rust
- Stelle
- 6.3k
- Fork
- 271
- Merge medio
- 2g 16h
- PR unite (30g)
- 89
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rivet-dev/rivet
-
Rust client drops connection-level errors when actionId is null (JSON/CBOR)Forse già presa @DibbayajyotiRoy l’ha presa 6 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rivet-dev/rivet#5819 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Queue docs say completable messages are removed on receive, but they stay stored until complete()Forse già presa @Saisharathchandranandnetha l’ha presa 17 giorni fa. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 91/100
rivet-dev/rivet#5762 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
rivet-dev/rivet#5850 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
rivet-dev/rivet#5837 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
rivetkit-core: a failed scheduled dispatch pass drops due one-shot actions and strands recurring jobsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
rivet-dev/rivet#5833 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rivet-dev/rivet
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
element-hq/lk-jwt-service#248 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pact-foundation/pact-cli#154 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
antithesishq/bombadil#361 ·
I maintainer di solito rispondono entro 1 giorno
-
test(executor_l0): assert execute() TaskOutcome, not only bus events / 断言 execute() 返回的 TaskOutcomeApertatype:debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
skaiy/wild_agentos#425 ·
I maintainer di solito rispondono entro 1 giorno