From ff38a9d7ee8a271f9c38be5d34266195b9b90604 Mon Sep 17 00:00:00 2001 From: "juancarlos.cavero" Date: Fri, 17 Jul 2026 21:46:23 +0200 Subject: [PATCH] fix(cloud): compare job owner as string so recovered jobs pass the guard User.id is a uuid.UUID; live jobs store that object, but jobs recovered from the .owner sidecar store its string form. 'UUID(x) != str(x)' is always True, so after a restart the legitimate owner got 404 on /status, /transcript, /hook etc. for their own recovered jobs. Compare str(user.id) != str(owner). --- app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 32dd885..1d67be5 100644 --- a/app.py +++ b/app.py @@ -232,7 +232,9 @@ async def _assert_job_owner(request, record): if owner is None: return user = await _user_from_request(request) - if user is None or user.id != owner: + # Compare as strings: live jobs store a uuid.UUID, but jobs recovered from + # the .owner sidecar store its string form — UUID != str is always True. + if user is None or str(user.id) != str(owner): raise HTTPException(status_code=404, detail="Not found") # Application State