fix(documents): keep an incomplete extraction on the document

A long document read in parts can end with a part cut at the provider's
output limit, a part never read, or more facts than one review takes.
That was told once, as a notice when the run finished; a review opened
later looked complete.

InboundDocument.extractionIncomplete (migration 0483) is written with
the facts by both stagings, the extract route or run and lab
auto-staging. The document detail publishes it and the review shows the
same note whenever it is opened. The disaster-recovery backup carries
it; an older file restores it as false.

Refs #1257
This commit is contained in:
Marc-André Bombeck committed 2026-10-25 01:01:13 +02:00
1 parent 5cfaf4869d
commit 958d230b9f
15 files changed
+233 -44

No files matched your search

+10
View File
@@ -43911,6 +43911,8 @@ components:
- type: "null"
aiReadDeferred:
type: boolean
extractionIncomplete:
type: boolean
summary:
type:
- string
@@ -80342,6 +80344,13 @@ components:
- READY
- WITHHELD
- UNAVAILABLE
extractionIncomplete:
type: boolean
description: "Whether the staged facts may leave part of the document out: a part of a long document was cut at the
provider's output limit or not read, the text or pages ran past what the reads take, or the document held
more facts than one review takes. Kept from the last extraction (the extract route, its background run, or
automatic lab staging) until the next one replaces the facts; false for a document never extracted. A review
shows it whenever it is opened, not only when the run ends."
required:
- id
- kind
@@ -80373,6 +80382,7 @@ components:
- summary
- summaryGeneratedAt
- summaryState
- extractionIncomplete
additionalProperties: false
description: 'A stored document plus its staged facts. `summary` is a short (3-4 sentence) plain-language description of
WHAT the document is, generated once and then served from storage; it is descriptive only, never a diagnosis.