chore: enforce public release evidence boundaries

This commit is contained in:
732642856
2026-07-08 18:34:13 +08:00
parent 9e46a4814a
commit 07fb5a5f7b
60 changed files with 1475 additions and 573 deletions
@@ -153,7 +153,7 @@ def test_chart_async_submit_returns_job_id(monkeypatch: pytest.MonkeyPatch) -> N
'scope': 'api_chart_response',
})
result = handler._compute_chart({'async': True, 'year': REDACTED_YEAR, 'month': 4, 'day': 17, 'hour': 14, 'minute': 49, 'lat': 36.42, 'lon': 114.2, 'tz': 8})
result = handler._compute_chart({'async': True, 'year': 1955, 'month': 2, 'day': 24, 'hour': 19, 'minute': 15, 'lat': 37.7749, 'lon': -122.4194, 'tz': 8})
assert result['mode'] == 'async_submitted'
assert result['job_id'] == 'chart_test_job_1'
@@ -258,7 +258,7 @@ def test_chart_async_job_executes_in_background(monkeypatch: pytest.MonkeyPatch)
monkeypatch.setattr(jyotish_api_server, '_write_async_job_record', fake_write)
monkeypatch.setattr(handler, '_compute_chart_sync', fake_sync)
result = handler._enqueue_chart_job({'async': True, 'year': REDACTED_YEAR, 'month': 4, 'day': 17, 'hour': 14, 'minute': 49, 'lat': 36.42, 'lon': 114.2, 'tz': 8})
result = handler._enqueue_chart_job({'async': True, 'year': 1955, 'month': 2, 'day': 24, 'hour': 19, 'minute': 15, 'lat': 37.7749, 'lon': -122.4194, 'tz': 8})
assert result['endpoint'] == 'chart_async'
assert result['status'] == 'queued'
@@ -134,7 +134,7 @@ def test_vedastro_orchestrator_surfaces_daily_windows_by_domain(monkeypatch) ->
)
result = orchestrator.orchestrate_vedastro_evidence(
{"year": REDACTED_YEAR, "month": 4, "day": 17, "hour": 14, "minute": 49, "lat": 36.42, "lon": 114.2, "tz": 8},
{"year": 1955, "month": 2, "day": 24, "hour": 19, "minute": 15, "lat": 37.7749, "lon": -122.4194, "tz": 8},
route="career",
reference_date="2026-06-30",
)
@@ -343,13 +343,13 @@ git commit -m "feat: show official vedastro day windows in life event graph"
def test_full_reading_preserves_official_daily_window_fields_in_range_scan_result() -> None:
result = run_engine(
"full-reading",
"--year", "REDACTED_YEAR",
"--month", "4",
"--day", "17",
"--hour", "14",
"--minute", "49",
"--lat", "36.42",
"--lon", "114.2",
"--year", "1955",
"--month", "2",
"--day", "24",
"--hour", "19",
"--minute", "15",
"--lat", "37.7749",
"--lon", "-122.4194",
"--tz", "8",
"--today", "2026-06-30",
"--transit-date", "2026-06-30",
@@ -244,7 +244,7 @@ def test_vedastro_orchestrator_surfaces_official_section_statuses_and_theme_requ
"evidence_ledger": [],
})
result = orchestrator.orchestrate_vedastro_evidence({"year": REDACTED_YEAR, "month": 4, "day": 17, "hour": 14, "minute": 49, "lat": 36.42, "lon": 114.2, "tz": 8}, route="relationship", reference_date="2026-06-29")
result = orchestrator.orchestrate_vedastro_evidence({"year": 1955, "month": 2, "day": 24, "hour": 19, "minute": 15, "lat": 37.7749, "lon": -122.4194, "tz": 8}, route="relationship", reference_date="2026-06-29")
assert result["source_metadata"]["official_section_statuses"]["dasha_all"] == "ok"
assert result["source_metadata"]["theme_requirements"]["route"] == "relationship"
```
@@ -294,7 +294,7 @@ Expected: PASS for the new metadata contract.
def test_high_rigor_workflow_plan_only_exposes_official_hard_override_contract() -> None:
handler = _handler()
result = handler._high_rigor_workflow_plan_only(
{"year": REDACTED_YEAR, "month": 4, "day": 17, "hour": 14, "minute": 49, "lat": 36.42, "lon": 114.2, "tz": 8},
{"year": 1955, "month": 2, "day": 24, "hour": 19, "minute": 15, "lat": 37.7749, "lon": -122.4194, "tz": 8},
["career", "marriage", "wealth"],
[],
)
@@ -243,14 +243,14 @@ def test_gateway_run_packet_uses_user_entrypoint_and_marks_not_all_641(monkeypat
packet = vedastro_gateway.run_gateway_packet(
{
"year": REDACTED_YEAR,
"month": 4,
"day": 17,
"hour": 14,
"minute": 49,
"year": 1955,
"month": 2,
"day": 24,
"hour": 19,
"minute": 15,
"second": 0,
"lat": 36.42,
"lon": 114.2,
"lat": 37.7749,
"lon": -122.4194,
"tz": 8,
},
question="事业机会什么时候出现",
@@ -383,13 +383,13 @@ def test_vedastro_gateway_run_route_returns_gateway_packet(monkeypatch):
monkeypatch.setenv("VEDASTRO_GATEWAY_MODE", "cn_gateway")
result = handler._compute_vedastro_gateway_run({
"year": REDACTED_YEAR,
"month": 4,
"day": 17,
"hour": 14,
"minute": 49,
"lat": 36.42,
"lon": 114.2,
"year": 1955,
"month": 2,
"day": 24,
"hour": 19,
"minute": 15,
"lat": 37.7749,
"lon": -122.4194,
"tz": 8,
"question": "事业机会什么时候出现",
"themes": ["career"],
@@ -499,13 +499,13 @@ def test_professional_reading_endpoint_reuses_existing_high_rigor_layers(monkeyp
})
result = handler._compute_professional_reading({
"year": REDACTED_YEAR,
"month": 4,
"day": 17,
"hour": 14,
"minute": 49,
"lat": 36.42,
"lon": 114.2,
"year": 1955,
"month": 2,
"day": 24,
"hour": 19,
"minute": 15,
"lat": 37.7749,
"lon": -122.4194,
"tz": 8,
"question": "事业机会什么时候出现",
"theme": ["career"],
@@ -976,8 +976,8 @@ Run:
```bash
python3 scripts/vedastro_user_entrypoint.py \
--year REDACTED_YEAR --month 4 --day 17 --hour 14 --minute 49 \
--lat 36.42 --lon 114.2 --tz 8 \
--year 1955 --month 2 --day 24 --hour 19 --minute 15 \
--lat 37.7749 --lon -122.4194 --tz -8 \
--question "事业机会什么时候出现" \
--themes career,marriage,wealth \
--reference-date 2026-07-02 \