Bind renewal dates to renewal clauses
This commit is contained in:
@@ -21,7 +21,7 @@ def test_full_stack_product_contract():
|
||||
frontend = (ROOT / "frontend" / "src" / "App.jsx").read_text(encoding="utf-8")
|
||||
browser_client = (ROOT / "frontend" / "src" / "a2a.js").read_text(encoding="utf-8")
|
||||
|
||||
assert "version: 0.1.3" in manifest
|
||||
assert "version: 0.1.5" in manifest
|
||||
assert "public: false" in manifest
|
||||
assert "frontend:" in manifest and "mount: /app" in manifest
|
||||
assert "resources:" in manifest and "databases:" in manifest
|
||||
@@ -84,6 +84,24 @@ def test_success_and_failure_extraction_are_explicit_date_only():
|
||||
}
|
||||
|
||||
|
||||
def test_renewal_date_is_bound_to_the_renewal_clause():
|
||||
result = agent._analyze_text(
|
||||
contract_id="multi-date-contract",
|
||||
title="Multi-date contract",
|
||||
text=(
|
||||
"This Agreement is effective on 2025-01-01. "
|
||||
"It renews automatically on 2026-12-31 unless either party gives "
|
||||
"at least 60 days written notice."
|
||||
),
|
||||
)
|
||||
|
||||
assert result["ok"] is True
|
||||
assert result["deadlines"] == [
|
||||
{"kind": "renewal", "date": "2026-12-31"},
|
||||
{"kind": "notice", "date": "2026-11-01"},
|
||||
]
|
||||
|
||||
|
||||
def test_browser_upload_validation():
|
||||
doc = agent.BrowserDocument(
|
||||
filename="contract.txt",
|
||||
|
||||
Reference in New Issue
Block a user