fix(consult): race a bounded VedAstro gateway on the chat path
Foreground still skips the heavy overview stack, but overlaps a timed gateway so official evidence can merge when it finishes in budget. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -20,6 +20,7 @@ from jyotish_api_server import ( # noqa: E402
|
||||
JyotishAPIHandler,
|
||||
_attach_local_consultation_layers,
|
||||
_build_consumer_context,
|
||||
_compact_vedastro_cross_check,
|
||||
)
|
||||
from unified_consultation_orchestrator import UnifiedConsultationOrchestrator # noqa: E402
|
||||
|
||||
@@ -700,3 +701,35 @@ def test_failed_vedastro_raw_packet_is_not_marked_as_used() -> None:
|
||||
)
|
||||
|
||||
assert packet['sections']['vedastro_official_raw_response']['status'] == 'received_unverified'
|
||||
|
||||
|
||||
def test_compact_vedastro_cross_check_keeps_signs_and_drops_coordinates() -> None:
|
||||
compact = _compact_vedastro_cross_check(
|
||||
{'official_closure_state': 'official_verified', 'status': 'ok'},
|
||||
{
|
||||
'official_raw_response': {
|
||||
'natal': {'sun': 'Leo', 'moon': 'Taurus', 'ascendant': 'Cancer'},
|
||||
'lat': 25.03,
|
||||
'lon': 121.56,
|
||||
'hour': 3,
|
||||
'minute': 4,
|
||||
},
|
||||
},
|
||||
)
|
||||
assert compact['status'] == 'executed'
|
||||
assert compact['natal'] == {'sun': 'Leo', 'moon': 'Taurus', 'ascendant': 'Cancer'}
|
||||
assert 'lat' not in compact
|
||||
assert 'lon' not in compact
|
||||
assert 'hour' not in compact
|
||||
|
||||
|
||||
def test_compact_vedastro_cross_check_marks_timeout_blocked() -> None:
|
||||
compact = _compact_vedastro_cross_check(
|
||||
{},
|
||||
{
|
||||
'official_closure_state': 'official_blocked',
|
||||
'official_closure_reason': 'foreground_optional_evidence_timeout',
|
||||
},
|
||||
)
|
||||
assert compact['status'] == 'blocked'
|
||||
assert compact['official_closure_reason'] == 'foreground_optional_evidence_timeout'
|
||||
|
||||
Reference in New Issue
Block a user