feat: expand commercial astrology acceptance matrix

This commit is contained in:
732642856
2026-07-19 15:44:58 +08:00
parent 597b3ab50f
commit 0bb7dbfe42
4 changed files with 193 additions and 22 deletions
@@ -1,7 +1,7 @@
{
"contract_id": "commercial_astrology_e2e_acceptance_questions_2026_07_19",
"status": "acceptance_contract_not_runtime_claim",
"purpose": "Eight real-user commercial questions used to verify that synchronized astrology capabilities enter the answer context and preserve claim boundaries.",
"purpose": "Ten-domain commercial astrology acceptance matrix used to verify that synchronized astrology capabilities enter the answer context and preserve claim boundaries across marriage, career, wealth, health, migration, family, education, timing, rectification, and annual forecast flows.",
"questions": [
{
"id": "marriage_timing",
@@ -21,6 +21,12 @@
"required_layers": ["Vimshottari Dasha", "Narayana Dasha", "D2", "D11", "Ashtakavarga", "functional benefic/malefic"],
"must_not_claim": ["guaranteed financial outcome", "D2/D11 missing when present"]
},
{
"id": "health_risk_window",
"user_question": "我接下来一年健康上需要注意什么?",
"required_layers": ["Vimshottari Dasha", "Narayana Dasha", "D6", "D8", "6th/8th/12th house", "functional benefic/malefic", "health non-medical boundary"],
"must_not_claim": ["medical diagnosis", "guaranteed disease event", "exact day/month verified"]
},
{
"id": "foreign_migration",
"user_question": "我适合出国发展或长期迁移吗?",
@@ -28,10 +34,22 @@
"must_not_claim": ["visa/legal guarantee"]
},
{
"id": "relationship_compatibility",
"user_question": "我和这个人合不合",
"required_layers": ["D9", "UL", "Darakaraka", "Ashtakoot boundary", "gender interpretation boundary"],
"must_not_claim": ["relationship guarantee", "gender binary forced when not provided"]
"id": "family_home_children",
"user_question": "我的家庭、房产和子女缘分怎么看",
"required_layers": ["Vimshottari Dasha", "Narayana Dasha", "D4", "D7", "D12", "4th/5th/9th house", "functional benefic/malefic"],
"must_not_claim": ["guaranteed child outcome", "property/legal guarantee"]
},
{
"id": "education_learning_path",
"user_question": "我适合继续读书、考证或走什么学习方向?",
"required_layers": ["Vimshottari Dasha", "Narayana Dasha", "D5", "D24", "5th/9th house", "Mercury/Jupiter context", "functional benefic/malefic"],
"must_not_claim": ["exam result guarantee", "single-factor Mercury/Jupiter truth"]
},
{
"id": "precise_timing_boundary",
"user_question": "你能不能精确看某一天或某个月会发生什么?",
"required_layers": ["timing precision contract", "verified_window", "candidate_windows", "exact_triggers", "day-level holdout boundary"],
"must_not_claim": ["day/month prediction verified before holdout", "exact_triggers as guaranteed events"]
},
{
"id": "birth_time_uncertain",
@@ -40,16 +58,10 @@
"must_not_claim": ["auto-rectified exact birth time"]
},
{
"id": "engine_disagreement",
"user_question": "为什么不同软件算出来不一样",
"required_layers": ["Shadbala", "Ashtakavarga", "Shadbala/AV provenance registry", "VedAstro gateway boundary", "no_majority_vote"],
"must_not_claim": ["majority vote truth", "method variant as absolute error"]
},
{
"id": "precise_timing_boundary",
"user_question": "你能不能精确看某一天或某个月会发生什么?",
"required_layers": ["timing precision contract", "verified_window", "candidate_windows", "exact_triggers", "day-level holdout boundary"],
"must_not_claim": ["day/month prediction verified before holdout", "exact_triggers as guaranteed events"]
"id": "annual_forecast",
"user_question": "我未来一年整体运势重点是什么",
"required_layers": ["Vimshottari Dasha", "Narayana Dasha", "annual forecast boundary", "transit context", "Shadbala", "Ashtakavarga", "functional benefic/malefic", "timing precision contract"],
"must_not_claim": ["full-year certainty", "exact day/month verified", "majority vote truth"]
}
],
"pass_condition": "For each question, the commercial answer context includes required layers or explicitly reports a justified missing layer, and the answer avoids every must_not_claim item.",
@@ -0,0 +1,139 @@
{
"capture_instruction": "Run each user_question through the commercial consultation flow and save the answer context as <id>.json for this runner.",
"contract_id": "commercial_astrology_e2e_acceptance_questions_2026_07_19",
"questions": [
{
"context_filename": "marriage_timing.json",
"id": "marriage_timing",
"required_layers": [
"Vimshottari Dasha",
"Narayana Dasha",
"D9",
"UL",
"Darakaraka",
"timing precision contract",
"gender interpretation boundary"
],
"user_question": "我什么时候更适合结婚?"
},
{
"context_filename": "career_direction.json",
"id": "career_direction",
"required_layers": [
"Vimshottari Dasha",
"Narayana Dasha",
"D10",
"A10",
"functional benefic/malefic"
],
"user_question": "我的事业方向适合什么?"
},
{
"context_filename": "wealth_pattern.json",
"id": "wealth_pattern",
"required_layers": [
"Vimshottari Dasha",
"Narayana Dasha",
"D2",
"D11",
"Ashtakavarga",
"functional benefic/malefic"
],
"user_question": "我的财富模式和赚钱方式是什么?"
},
{
"context_filename": "health_risk_window.json",
"id": "health_risk_window",
"required_layers": [
"Vimshottari Dasha",
"Narayana Dasha",
"D6",
"D8",
"6th/8th/12th house",
"functional benefic/malefic",
"health non-medical boundary"
],
"user_question": "我接下来一年健康上需要注意什么?"
},
{
"context_filename": "foreign_migration.json",
"id": "foreign_migration",
"required_layers": [
"Vimshottari Dasha",
"Narayana Dasha",
"D4",
"D9",
"12th house",
"Rahu/Ketu context"
],
"user_question": "我适合出国发展或长期迁移吗?"
},
{
"context_filename": "family_home_children.json",
"id": "family_home_children",
"required_layers": [
"Vimshottari Dasha",
"Narayana Dasha",
"D4",
"D7",
"D12",
"4th/5th/9th house",
"functional benefic/malefic"
],
"user_question": "我的家庭、房产和子女缘分怎么看?"
},
{
"context_filename": "education_learning_path.json",
"id": "education_learning_path",
"required_layers": [
"Vimshottari Dasha",
"Narayana Dasha",
"D5",
"D24",
"5th/9th house",
"Mercury/Jupiter context",
"functional benefic/malefic"
],
"user_question": "我适合继续读书、考证或走什么学习方向?"
},
{
"context_filename": "precise_timing_boundary.json",
"id": "precise_timing_boundary",
"required_layers": [
"timing precision contract",
"verified_window",
"candidate_windows",
"exact_triggers",
"day-level holdout boundary"
],
"user_question": "你能不能精确看某一天或某个月会发生什么?"
},
{
"context_filename": "birth_time_uncertain.json",
"id": "birth_time_uncertain",
"required_layers": [
"birth-time uncertainty boundary",
"rectification boundary",
"candidate windows",
"not_auto_rectified"
],
"user_question": "我的出生时间不太准,还能看吗?"
},
{
"context_filename": "annual_forecast.json",
"id": "annual_forecast",
"required_layers": [
"Vimshottari Dasha",
"Narayana Dasha",
"annual forecast boundary",
"transit context",
"Shadbala",
"Ashtakavarga",
"functional benefic/malefic",
"timing precision contract"
],
"user_question": "我未来一年整体运势重点是什么?"
}
],
"scope": "commercial_astrology_e2e_question_manifest"
}
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Validate the commercial eight-question astrology acceptance contract.
"""Validate the commercial astrology acceptance matrix.
Default mode is deliberately blocked: the contract exists, but real E2E proof
requires captured answer-context JSON files for each question id.
@@ -24,6 +24,12 @@ LAYER_PATTERNS: dict[str, list[str]] = {
"D2": ["d2"],
"D11": ["d11"],
"D4": ["d4"],
"D5": ["d5"],
"D6": ["d6"],
"D7": ["d7"],
"D8": ["d8"],
"D12": ["d12"],
"D24": ["d24"],
"UL": ["ul", "upapada"],
"A10": ["a10"],
"Darakaraka": ["darakaraka", "dk"],
@@ -35,7 +41,11 @@ LAYER_PATTERNS: dict[str, list[str]] = {
"gender interpretation boundary": ["gender", "spouse", "supplement"],
"functional benefic/malefic": ["functional_benefic_malefic"],
"12th house": ["12th", "twelfth", "house_12"],
"6th/8th/12th house": ["6th", "8th", "12th"],
"4th/5th/9th house": ["4th", "5th", "9th"],
"5th/9th house": ["5th", "9th"],
"Rahu/Ketu context": ["rahu", "ketu"],
"Mercury/Jupiter context": ["mercury", "jupiter"],
"Ashtakoot boundary": ["ashtakoot"],
"birth-time uncertainty boundary": ["birth_time", "uncertain"],
"rectification boundary": ["rectification"],
@@ -46,6 +56,9 @@ LAYER_PATTERNS: dict[str, list[str]] = {
"candidate_windows": ["candidate_windows"],
"exact_triggers": ["exact_triggers"],
"day-level holdout boundary": ["holdout", "exploratory_unvalidated"],
"health non-medical boundary": ["health", "non_medical"],
"annual forecast boundary": ["annual", "forecast"],
"transit context": ["transit"],
}
FORBIDDEN_PATTERNS: dict[str, list[str]] = {
@@ -55,7 +68,13 @@ FORBIDDEN_PATTERNS: dict[str, list[str]] = {
"D10 missing when present": ["d10_missing_when_present"],
"guaranteed financial outcome": ["guaranteed_financial_outcome"],
"D2/D11 missing when present": ["d2_d11_missing_when_present"],
"medical diagnosis": ["medical_diagnosis"],
"guaranteed disease event": ["guaranteed_disease_event"],
"visa/legal guarantee": ["visa_guarantee", "legal_guarantee"],
"guaranteed child outcome": ["guaranteed_child_outcome"],
"property/legal guarantee": ["property_guarantee", "legal_guarantee"],
"exam result guarantee": ["exam_result_guarantee"],
"single-factor Mercury/Jupiter truth": ["single_factor_mercury_jupiter_truth"],
"relationship guarantee": ["relationship_guarantee"],
"gender binary forced when not provided": ["forced_binary_gender"],
"auto-rectified exact birth time": ["auto_rectified_exact_birth_time"],
@@ -63,6 +82,7 @@ FORBIDDEN_PATTERNS: dict[str, list[str]] = {
"method variant as absolute error": ["method_variant_absolute_error"],
"day/month prediction verified before holdout": ["day_month_verified_before_holdout"],
"exact_triggers as guaranteed events": ["exact_triggers_guaranteed_events"],
"full-year certainty": ["full_year_certainty"],
}
@@ -17,7 +17,7 @@ def test_runner_blocks_without_runtime_contexts() -> None:
report = runner.evaluate()
assert report["status"] == "blocked"
assert report["question_count"] == 8
assert report["question_count"] == 10
assert {row["status"] for row in report["rows"]} == {"blocked"}
assert report["runtime_context_required"] is True
@@ -39,17 +39,17 @@ def test_runner_passes_when_all_required_layers_are_present(tmp_path: Path) -> N
def test_runner_fails_on_forbidden_claim_hits(tmp_path: Path) -> None:
contract = json.loads(runner.DEFAULT_CONTRACT.read_text(encoding="utf-8"))
all_terms = sorted({term for patterns in runner.LAYER_PATTERNS.values() for term in patterns})
payload = {"context": " ".join(all_terms), "claim": "majority_vote_truth"}
payload = {"context": " ".join(all_terms), "claim": "full_year_certainty"}
for question in contract["questions"]:
(tmp_path / f"{question['id']}.json").write_text(json.dumps(payload), encoding="utf-8")
report = runner.evaluate(context_dir=tmp_path)
engine = next(row for row in report["rows"] if row["id"] == "engine_disagreement")
annual = next(row for row in report["rows"] if row["id"] == "annual_forecast")
assert report["status"] == "fail"
assert engine["status"] == "fail"
assert engine["forbidden_claim_hits"] == ["majority vote truth"]
assert annual["status"] == "fail"
assert annual["forbidden_claim_hits"] == ["full-year certainty"]
def test_runner_writes_question_manifest_for_context_capture(tmp_path: Path) -> None:
@@ -60,5 +60,5 @@ def test_runner_writes_question_manifest_for_context_capture(tmp_path: Path) ->
assert manifest == saved
assert saved["scope"] == "commercial_astrology_e2e_question_manifest"
assert len(saved["questions"]) == 8
assert len(saved["questions"]) == 10
assert saved["questions"][0]["context_filename"] == "marriage_timing.json"