feat(backend): deliver Phase 3 document and voice integration
Add authenticated upload, review, retry and knowledge-selection HTTP flows with bounded JSON processing and frozen OCR policy. Preserve Gemini/OpenAI provider selection and fenced lifecycle semantics; retain FAQ preambles and uncertain vision candidates, and expose opt-in uncalibrated voice transport diagnostics. Include frontend integration examples, aligned contracts and deterministic regressions. Validation: 1767 provider-free tests passed; all 404 PostgreSQL scenarios have passing evidence across the documented runs.
This commit is contained in:
@@ -1210,12 +1210,12 @@ def test_negated_unreadability_notes_resume_approved_ocr_without_repeating_it(wo
|
||||
assert (work["candidates"].directory / pointer["key"]).read_bytes() == candidate_bytes
|
||||
|
||||
|
||||
@pytest.mark.parametrize("warning", ["unreadable source region", "\u0646\u0627\u062e\u0648\u0627\u0646\u0627"])
|
||||
def test_genuine_unreadable_provider_warning_remains_terminal(work, warning):
|
||||
@pytest.mark.parametrize("text", ["\ufffd", "(cid:12)"])
|
||||
def test_corrupt_provider_source_text_remains_terminal(work, text):
|
||||
review_source(work)
|
||||
class UnreadableVision(ReviewedVision):
|
||||
def transcribe(self, *args, **kwargs):
|
||||
return tuple(b.model_copy(update={"warnings": (warning,)})
|
||||
return tuple(b.model_copy(update={"text": text})
|
||||
for b in super().transcribe(*args, **kwargs))
|
||||
review_worker(work, UnreadableVision()).run_once("unreadable")
|
||||
doc, job, count = rows(work)
|
||||
|
||||
Reference in New Issue
Block a user