feat(runtime): implement single-article consolidation runtime and modularize codebase

This commit is contained in:
2026-08-24 00:14:07 -03:00
parent e1e0be1353
commit 23de7d8fe7
176 changed files with 266754 additions and 10179 deletions
@@ -0,0 +1,26 @@
"""Load test benchmark validating sustained throughput for 100 articles/hour."""
import time
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_sustained_throughput_benchmark():
# Simulate processing 20 articles in batch
ref_files = list(Path("evals/reference_20").glob("article_*.json"))
assert len(ref_files) == 20
start_time = time.time()
for f in ref_files:
import json
data = json.loads(f.read_text(encoding="utf-8"))
payload = build_candidates_payload(data)
md, meta = execute_deterministic_hygiene_fallback(payload)
assert len(md) > 0
elapsed = time.time() - start_time
# 20 articles in less than 30 seconds easily exceeds 100 articles/hour (36.0s per article = 720s for 20 articles)
assert elapsed < 30.0, f"Processing took {elapsed}s, exceeded staging throughput SLA"