Class UploadStatusService
java.lang.Object
ai.pipeline.connector.intake.status.UploadStatusService
Projects the intake lifecycle event stream —
DocumentAccepted,
DocumentRejected, DocumentError — into the UploadReceipt
read-model (upsert by doc_id) and resolves it for the status lookup.
The project* methods are invoked by the event consumer, not the
upload path — so the durable write happens off the request thread
(publish-then-write). ACCEPTED is sticky: a stale rejection/error
arriving after an acceptance never downgrades it, but a later acceptance (a
retry of the same deterministic doc_id) does upgrade an earlier failure.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordClient-safe status projection shared by the HTTP and gRPC status surfaces. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprojectAccepted(ai.pipestream.connector.intake.v1.DocumentAccepted event) voidprojectError(ai.pipestream.connector.intake.v1.DocumentError event) voidprojectRejected(ai.pipestream.connector.intake.v1.DocumentRejected event) resolve(UploadTokenClaims claims) Resolve the status a signed token points at.
-
Constructor Details
-
UploadStatusService
public UploadStatusService()
-
-
Method Details
-
projectAccepted
public void projectAccepted(ai.pipestream.connector.intake.v1.DocumentAccepted event) -
projectRejected
public void projectRejected(ai.pipestream.connector.intake.v1.DocumentRejected event) -
projectError
public void projectError(ai.pipestream.connector.intake.v1.DocumentError event) -
lookup
-
resolve
Resolve the status a signed token points at. The token already binds the doc_id; as defense in depth, a receipt is only reported if it also belongs to the datasource the token is scoped to. A valid token with no row yet (or a never-projected doc) reportsPENDING— never a not-found oracle.
-