feat: carry VedAstro raw archive manifest in evidence packets

This commit is contained in:
732642856
2026-07-08 21:15:04 +08:00
parent 09dcfb9bcc
commit beaabe4e6a
7 changed files with 36 additions and 0 deletions
+6
View File
@@ -2161,6 +2161,11 @@ def test_high_rigor_workflow_reuses_existing_rectification_backtest_and_vedastro
return _load_local_module(name)
monkeypatch.setattr(jyotish_api_server, '_load_local_module', fake_loader)
monkeypatch.setattr(handler, '_compute_vedastro_gateway_archives', lambda: {
'scope': 'vedastro_official_raw_response_archive_manifest',
'archive_count': 1,
'archives': [{'job_id': 'job_1955', 'official_raw_response_available': True}],
})
result = handler._compute_high_rigor_workflow({
'question': '请高严谨分析我的事业、婚恋和财富',
@@ -2199,6 +2204,7 @@ def test_high_rigor_workflow_reuses_existing_rectification_backtest_and_vedastro
assert result['unified_orchestrator']['name'] == 'UnifiedConsultationOrchestrator'
assert result['unified_orchestrator']['surface'] == 'api_web'
assert result['unified_orchestrator']['route']['question_type'] == 'career'
assert result['machine_evidence_packet']['sections']['vedastro_official_raw_archive_manifest']['status'] == 'used'
def test_consultation_workflow_uses_unified_orchestrator_contract(monkeypatch) -> None:
+1
View File
@@ -177,6 +177,7 @@ def test_mcp_strict_workflow_returns_runtime_evidence_log(monkeypatch) -> None:
assert result["runtime_evidence_log"]["route"]["question_type"] == "career"
assert result["runtime_evidence_log"]["vedastro_cloud_state"] == "official_verified"
assert result["machine_evidence_packet"]["status"] == "partial"
assert "vedastro_official_raw_archive_manifest" in result["machine_evidence_packet"]["sections"]
assert result["real_case_calibration"]["status"] == "partial_scored"
assert result["runtime_evidence_log"]["evidence_packet_contract"]["status"] == "partial"
assert result["runtime_evidence_log"]["real_case_calibration"]["status"] == "partial_scored"
@@ -311,3 +311,20 @@ def test_real_case_calibration_catalog_exposes_local_sources_without_claiming_ma
assert catalog["scored_candidates"][0]["event_trigger_match"]["checks"]["recorded_trigger_keywords"]
assert catalog["scored_candidates"][0]["outcome_validation"]["status"] == "local_outcome_recorded_trigger_not_replayed"
assert "D9" in catalog["scored_candidates"][0]["similarities"]["evidence_section_overlap"]
def test_machine_evidence_packet_carries_vedastro_raw_archive_manifest() -> None:
orchestrator = UnifiedConsultationOrchestrator()
packet = orchestrator.machine_evidence_packet(
chart={"chart": {"ascendant": {"sign": "Leo"}, "planets": {"Sun": {"sign": "Aquarius"}}}},
route_packet={"question_type": "career", "primary_theme": "career"},
vedastro_archive_manifest={
"scope": "vedastro_official_raw_response_archive_manifest",
"archive_count": 1,
"archives": [{"job_id": "job_1955", "official_raw_response_available": True}],
},
)
section = packet["sections"]["vedastro_official_raw_archive_manifest"]
assert section["status"] == "used"
assert section["source_path"] == "vedastro_gateway.archives"