45d132588f
Advance the one-way import to git commit a6f47abd with consultation keypath golden, switch official VedAstro comparison to the REST Calculate bridge, and receive the 25 new registry entries behind research_only_blocked. Co-authored-by: Cursor <cursoragent@cursor.com>
58 lines
2.2 KiB
Python
58 lines
2.2 KiB
Python
"""Commercial-only claim boundaries for techniques not cleared for deterministic use."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from scripts.commercial_skill_truth import (
|
|
TECHNIQUE_TRUTH_IDS,
|
|
apply_commercial_skill_truth,
|
|
load_commercial_skill_truth,
|
|
)
|
|
|
|
|
|
def test_truth_overlay_has_all_restricted_techniques_and_no_research_paths() -> None:
|
|
overlay = load_commercial_skill_truth()
|
|
techniques = {item["technique_id"]: item for item in overlay["techniques"]}
|
|
|
|
assert set(TECHNIQUE_TRUTH_IDS) == set(techniques)
|
|
assert {item["status"] for item in techniques.values()} == {
|
|
"reference_only",
|
|
"partial",
|
|
"blocked",
|
|
"research_only_blocked",
|
|
"partial_registry_only",
|
|
}
|
|
assert "/Users/" not in str(overlay)
|
|
assert "research truth overlay" not in str(overlay).lower()
|
|
|
|
|
|
def test_truth_overlay_cannot_bypass_server_answer_contract() -> None:
|
|
result = apply_commercial_skill_truth(
|
|
{
|
|
"route": "career",
|
|
"answer_policy": {
|
|
"can_answer_direction": True,
|
|
"can_answer_precise_timing": True,
|
|
},
|
|
}
|
|
)
|
|
|
|
truth = result["technique_truth"]
|
|
policy = result["answer_policy"]
|
|
overlay = load_commercial_skill_truth()
|
|
assert truth["status"] == "restricted"
|
|
# 原值=仅 sahams / sphuta_trisphuta_family / conception_chart。
|
|
# 新值=再加上 25 项网页路径未执行的上游新技法(research_only_blocked)。
|
|
# 原因=任务 1 按决策记录把未执行项写入覆盖层,不得进入确定性结论。
|
|
overlay_blocked = {
|
|
item["technique_id"]
|
|
for item in overlay["techniques"]
|
|
if item["status"] in {"blocked", "research_only_blocked"}
|
|
}
|
|
assert {"sahams", "sphuta_trisphuta_family", "conception_chart"} <= overlay_blocked
|
|
assert set(truth["blocked_techniques"]) == overlay_blocked
|
|
assert set(policy["deterministic_claims_forbidden_for"]) == set(TECHNIQUE_TRUTH_IDS)
|
|
assert policy["can_answer_precise_timing"] is True
|
|
evidence = result["commercial_evidence_status"]
|
|
assert evidence["claim_audit"]["status"] == "contract_enforced"
|
|
assert evidence["three_engine_mismatch"]["truth_policy"] == "no_majority_vote"
|