fix(documents): tell people when the document reader is busy, and attribute its work

A read a person started now runs as interactive work of their account, and
the document jobs as background work of theirs, so the reader's queue can
order and cap them. When the reader is busy or stopped before it answered,
a lab scan, label read or document read fails with aiRuns.readerBusy (503,
nothing read or charged) instead of a misleading unreadable-file error, and
the index and summary jobs throw so the queue runs them again rather than
recording an outcome about the document.
This commit is contained in:
Marc-André Bombeck committed 2026-10-25 17:38:25 +01:00
1 parent 4d970561fa
commit d3257a1b6b
29 files changed
+202 -35

No files matched your search

+9 -8
View File
@@ -38529,13 +38529,13 @@ components:
account.deletion.not_pending; activity — activity.calendar.future_date, activity.calendar.too_old; ai —
ai.budget.exceeded, ai.provider.none, ai.record.notPermitted, ai.unavailable, ai.usage.aboveCeiling,
ai.usage.defaultAboveCeiling, ai.usage.invalid, ai.usage.levelTooLow, ai.usage.rateLimited; ai_provider
— ai_provider.invalid, ai_provider.no_fields; aiRuns — aiRuns.failed, aiRuns.notFound, aiRuns.timedOut,
aiRuns.workerUnavailable; allergy — allergy.invalid; analytics — analytics.invalid_query; anamnesis —
anamnesis.auditC.invalid, anamnesis.auditC.notFound, anamnesis.auditC.rateLimited,
anamnesis.fact.conflict, anamnesis.fact.currentExists, anamnesis.fact.invalidValue,
anamnesis.lifeConfirm.invalid, anamnesis.lifeSections.invalid; auth — auth.account.deletion_pending,
auth.admin.required, auth.already_authenticated, auth.mfa.code_invalid, auth.missing,
auth.refresh.invalid, auth.refresh.reuse, auth.refresh.revoked, auth.reproof.failed,
— ai_provider.invalid, ai_provider.no_fields; aiRuns — aiRuns.failed, aiRuns.notFound,
aiRuns.readerBusy, aiRuns.timedOut, aiRuns.workerUnavailable; allergy — allergy.invalid; analytics —
analytics.invalid_query; anamnesis — anamnesis.auditC.invalid, anamnesis.auditC.notFound,
anamnesis.auditC.rateLimited, anamnesis.fact.conflict, anamnesis.fact.currentExists,
anamnesis.fact.invalidValue, anamnesis.lifeConfirm.invalid, anamnesis.lifeSections.invalid; auth —
auth.account.deletion_pending, auth.admin.required, auth.already_authenticated, auth.mfa.code_invalid,
auth.missing, auth.refresh.invalid, auth.refresh.reuse, auth.refresh.revoked, auth.reproof.failed,
auth.reproof.required, auth.reproof.too_weak, auth.scope.insufficient, auth.session.insecure_transport,
auth.session.unavailable, auth.stepup.required, auth.token.expired, auth.token.invalid; backup —
backup.foreign_reference, backup.key.missing, backup.payload.undecryptable, backup.restore.active,
@@ -75840,7 +75840,8 @@ components:
description: "Present once `status` is `FAILED`: the `meta.errorCode`, message and HTTP status the queuing route would
have answered with, or one of the run's own codes: `aiRuns.workerUnavailable` (no worker took the run within
fifteen minutes), `aiRuns.timedOut` (the read outlived the calls the AI response time allows),
`aiRuns.failed` (anything else)."
`aiRuns.readerBusy` (the server's document reader was busy past the wait a read gets, or stopped before it
answered; nothing was read or charged, try again in a minute), `aiRuns.failed` (anything else)."
createdAt:
type: string
startedAt: