57 lines
2.4 KiB
Python
57 lines
2.4 KiB
Python
from copy import deepcopy
|
|
|
|
from yuqei_sdk.prompt_source_baseline import (
|
|
DOMAIN_REVIEW_RUNTIME_IDENTITIES,
|
|
NEW_REVIEW_RUNTIME_IDENTITIES,
|
|
prompt_source_baseline,
|
|
scene_prompt_source_identity,
|
|
)
|
|
from yuqei_sdk.review_routing import SCENE_REVIEW_ROUTES
|
|
|
|
|
|
def test_current_source_baseline_resolves_all_scene_identities_without_claiming_publication():
|
|
baseline = prompt_source_baseline()
|
|
|
|
assert baseline["module_baseline"]["module_count"] == 14
|
|
assert len(baseline["module_baseline"]["drafting"]) == 6
|
|
assert len(baseline["module_baseline"]["review"]) == 8
|
|
assert len(NEW_REVIEW_RUNTIME_IDENTITIES) == 8
|
|
assert len(DOMAIN_REVIEW_RUNTIME_IDENTITIES) == 5
|
|
assert baseline["runtime_targets"]["identity_count"] == 14
|
|
assert set(baseline["scenes"]) == set(SCENE_REVIEW_ROUTES)
|
|
assert baseline["summary"] == {
|
|
"scenes": 30,
|
|
"source_identities_resolved": 30,
|
|
"technical_drafting_coverage_represented": 30,
|
|
"technical_review_coverage_represented": 30,
|
|
"published_runtime_verified": 0,
|
|
"real_model_results": 0,
|
|
"authorizes_publication": 0,
|
|
}
|
|
assert baseline["not_runtime_publication_evidence"] is True
|
|
assert baseline["not_legal_approval"] is True
|
|
assert baseline["authorizes_publication"] is False
|
|
|
|
|
|
def test_scene_source_identity_keeps_new_modules_and_existing_domain_dependencies_distinct():
|
|
new_module = scene_prompt_source_identity("TPL-CONSTRUCTION-PROJECT-001")
|
|
domain = scene_prompt_source_identity("TPL-TECHNICAL-CONSULTING-001")
|
|
|
|
assert new_module["review_route_kind"] == "new_review_module"
|
|
assert new_module["review_module_keys"] == ["contract_review_construction"]
|
|
assert domain["review_route_kind"] == "existing_domain_prompt"
|
|
assert domain["review_module_keys"] == []
|
|
assert len(new_module["drafting_module_keys"]) == len(domain["drafting_module_keys"]) == 6
|
|
assert new_module["published_runtime_verified"] is False
|
|
assert domain["published_runtime_verified"] is False
|
|
|
|
|
|
def test_source_identity_lookups_are_defensive_and_unknown_scenes_do_not_resolve():
|
|
first = scene_prompt_source_identity("TPL-TRANSPORT-ORDINARY-001")
|
|
original = deepcopy(first)
|
|
first["drafting_module_keys"].clear()
|
|
second = scene_prompt_source_identity("TPL-TRANSPORT-ORDINARY-001")
|
|
|
|
assert second == original
|
|
assert scene_prompt_source_identity("unknown") is None
|