Merge remote-tracking branch 'origin/main' into codex/vp-jain-provenance

This commit is contained in:
732642856
2026-07-18 06:30:23 +08:00
6 changed files with 477 additions and 45 deletions
@@ -2,11 +2,14 @@ from pathlib import Path
PAGE = Path("frontend/src/app/page.tsx")
DAILY_ROUTE = Path("frontend/src/app/api/daily-starlanguage/route.ts")
RECTIFICATION_ROUTE = Path("frontend/src/app/api/birth-rectification/route.ts")
def test_daily_starlanguage_entrypoint_is_productized() -> None:
source = PAGE.read_text(encoding="utf-8")
assert "今日星语" in source
assert "fetchDailyStarlanguage" in source
assert "buildDailyStarlanguageCard" in source
assert "daily-starlanguage-card" in source
assert "今日趋势" in source
@@ -17,9 +20,30 @@ def test_daily_starlanguage_entrypoint_is_productized() -> None:
assert "不是确定预测" in source
def test_daily_starlanguage_api_declares_honest_source_boundary() -> None:
source = DAILY_ROUTE.read_text(encoding="utf-8")
assert "status: \"ok\"" in source
assert "/api/chart" in source
assert "/api/transit" in source
assert "jyotish_api_transit_lite" in source
assert "calculation_lite" in source
assert "exploratory_unvalidated" in source
assert "not_deterministic_prediction" in source
def test_birth_time_rectification_entrypoint_is_productized() -> None:
source = PAGE.read_text(encoding="utf-8")
assert "生时校正" in source
assert "fetchBirthRectificationPreview" in source
assert "birth-rectification-card" in source
assert "draftBirthTimeRectificationQuestion" in source
assert "候选出生时间段" in source
assert "不能直接改写默认星盘" in source
def test_birth_rectification_api_proxies_active_questionnaire_with_boundary() -> None:
source = RECTIFICATION_ROUTE.read_text(encoding="utf-8")
assert "/api/active_rectification_questions" in source
assert "candidate_scan" in source
assert "question_count" in source
assert "not_auto_rectified" in source
@@ -0,0 +1,28 @@
from pathlib import Path
PAGE = Path("frontend/src/app/page.tsx")
def test_chat_history_management_actions_are_exposed() -> None:
source = PAGE.read_text(encoding="utf-8")
for expected in (
"renameSession",
"deleteSession",
"togglePinnedSession",
"toggleArchivedSession",
"showArchivedSessions",
"shareSession",
"share_payload_version",
"messages.map",
"onContextMenu",
"session-menu-trigger",
'role="menu"',
"置顶",
"重命名",
"归档",
"恢复",
"删除",
"转发",
):
assert expected in source