feat(runtime): implement single-article consolidation runtime and modularize codebase
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
"""Multi-extractor golden-set quality tests across the 20 reference units."""
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from src.runtime.candidate.parser import build_candidates_payload
|
||||
from src.runtime.hygiene.harness import execute_deterministic_hygiene_fallback
|
||||
|
||||
|
||||
def test_golden_set_all_20_reference_cases_process_cleanly():
|
||||
ref_dir = Path("evals/reference_20")
|
||||
files = list(ref_dir.glob("article_*.json"))
|
||||
assert len(files) == 20, f"Expected 20 reference unit files, found {len(files)}"
|
||||
|
||||
for f in sorted(files):
|
||||
data = json.loads(f.read_text(encoding="utf-8"))
|
||||
payload = build_candidates_payload(data)
|
||||
|
||||
# Verify deterministic extraction works for all 20 units
|
||||
md, meta = execute_deterministic_hygiene_fallback(payload)
|
||||
assert len(md) > 0
|
||||
assert meta["title"] is not None
|
||||
assert meta["kept_block_count"] >= 1
|
||||
Reference in New Issue
Block a user