62 lines
2.6 KiB
Python
62 lines
2.6 KiB
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
def test_runtime_modules_no_longer_keep_legacy_business_heuristic_helpers() -> None:
|
|
repo_root = Path(__file__).resolve().parents[1]
|
|
expectations = {
|
|
"app/services/signal/signal_capture_service/mixin_capture_entry.py": (
|
|
"_is_question_like",
|
|
),
|
|
"app/services/signal/signal_capture_service/mixin_analysis_normalize.py": (
|
|
"_is_question_like",
|
|
),
|
|
"app/services/signal/signal_capture_service/mixin_pipeline_cache.py": (
|
|
"_is_question_like",
|
|
),
|
|
"app/services/integrations/feishu_signal_pipeline/mixin_message_utils_a.py": (
|
|
"_is_water_talk_message",
|
|
"_is_requirement_like_question",
|
|
"_extract_requirement_statement_from_question",
|
|
"_convert_requirement_question_to_signal_text",
|
|
),
|
|
"app/services/integrations/feishu_signal_pipeline/mixin_lookup_and_block.py": (
|
|
"_is_project_lookup_question",
|
|
),
|
|
"app/services/ai_pmo/ai_pmo_kernel/mixins/intent/ai_pmo_kernel_mixins_intent_rules.py": (
|
|
"_has_question_structure",
|
|
),
|
|
"app/services/reply_iteration/service.py": (
|
|
"EXECUTION_CLAIM_TOKENS",
|
|
),
|
|
"app/services/integrations/feishu_integration_service/mixin_reply_llm_core.py": (
|
|
"_is_capability_question",
|
|
),
|
|
}
|
|
|
|
for relative_path, forbidden_tokens in expectations.items():
|
|
source = (repo_root / relative_path).read_text(encoding="utf-8")
|
|
for token in forbidden_tokens:
|
|
assert token not in source, f"{relative_path} still contains {token}"
|
|
|
|
|
|
def test_runtime_modules_no_longer_reference_classify_intent_complex() -> None:
|
|
repo_root = Path(__file__).resolve().parents[1]
|
|
runtime_files = (
|
|
"app/core/startup/model_probe.py",
|
|
"app/services/ai_pmo/ai_pmo_typed_executor_discovery/mixin_context.py",
|
|
"app/services/ai_pmo/ai_pmo_kernel_common_core/env.py",
|
|
"app/services/llm_service/mixin_guardrails_prompt.py",
|
|
"app/services/llm_service/mixin_generate_db_structured.py",
|
|
"app/services/llm_service/mixin_structured_candidates.py",
|
|
"app/services/llm_service/shared_part_01.py",
|
|
"app/services/model/model_routing/service.py",
|
|
"app/services/model/model_context_bundle/shared.py",
|
|
"app/services/model/model_context_bundle/mixin_core.py",
|
|
)
|
|
|
|
for relative_path in runtime_files:
|
|
source = (repo_root / relative_path).read_text(encoding="utf-8")
|
|
assert "classify_intent_complex" not in source, relative_path
|