human hand off

This commit is contained in:
debu-2 2026-10-06 07:12:55 +05:30
parent d0fee5c8f7
commit 7af776196a
34 changed files with 2941 additions and 195 deletions

View file

@ -99,6 +99,26 @@ def test_html_reply_preserves_nested_quoted_history():
assert "> > sender: C" in result["quoted_content"]
def test_apple_mail_attribution_is_treated_as_quote():
body = """Approved.
On 6 Oct 2026, at 04:48, Suyash Dixit <suyash@gentic.email> wrote:
sender: C"""
result = extract_new_reply_content(body_text=body)
assert result["new_reply_content"] == "Approved."
assert "sender: C" in result["quoted_content"]
def test_private_handoff_subject_fingerprint_is_blocked():
from app.services.reply_extractor import validate_external_reply_body
leaked = (
"Finance approvals · handoff · customer@example.com · Invoice 42\n"
"Please approve"
)
assert validate_external_reply_body(leaked) is False
def test_outlook_original_message_split():
body = """Thanks for the update.