diff --git a/reweave.py b/reweave.py index 67ba61c..8d9d07c 100644 --- a/reweave.py +++ b/reweave.py @@ -168,8 +168,8 @@ def _is_entity(path: Path) -> bool: fm = _parse_frontmatter(path) if fm and fm.get("type") == "entity": return True - # Also check path — entities live under entities/ directory - return "entities/" in str(path) + # Check path parts — avoids false positives on paths like "domains/entities-overview/" + return "entities" in Path(path).parts def _same_source(path_a: Path, path_b: Path) -> bool: diff --git a/telegram/bot.py b/telegram/bot.py index a841df7..521972b 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -386,7 +386,7 @@ def get_db_stats() -> dict: return {"merged_claims": "?", "contributors": "?"} -from eval import ( +from eval_checks import ( _LLMResponse, estimate_cost, check_url_fabrication, apply_confidence_floor, CONFIDENCE_FLOOR, COST_ALERT_THRESHOLD, ) diff --git a/telegram/eval.py b/telegram/eval_checks.py similarity index 100% rename from telegram/eval.py rename to telegram/eval_checks.py diff --git a/tests/test_eval_pipeline.py b/tests/test_eval_pipeline.py index 6dde695..c8a455c 100644 --- a/tests/test_eval_pipeline.py +++ b/tests/test_eval_pipeline.py @@ -17,7 +17,7 @@ import pytest # Add telegram/ to path for imports sys.path.insert(0, str(Path(__file__).parent.parent / "telegram")) -from eval import ( +from eval_checks import ( _LLMResponse, estimate_cost, check_url_fabrication,