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:
@@ -154,9 +154,11 @@ def test_rejected_direct_reading_order_falls_back_without_guessing(profile):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("warning", ["unreadable region/right/2", "ناخوانا: گروه 2"])
|
||||
def test_image_unreadable_regions_fail_before_chunks(profile, warning):
|
||||
with pytest.raises(ExtractionError, match="unreadable"):
|
||||
def test_image_region_warnings_retain_candidate_without_chunks(profile, warning):
|
||||
with pytest.raises(ReviewRequired) as pending:
|
||||
extract(image_bytes(), profile, "image/jpeg", vision=FakeVision(warnings=(warning,)))
|
||||
assert any(warning in b.warnings for b in pending.value.blocks)
|
||||
assert all(b.text.strip() for b in pending.value.blocks)
|
||||
|
||||
|
||||
def test_infographic_parent_children_and_order(profile):
|
||||
|
||||
Reference in New Issue
Block a user