Zin299 commited on
Commit
2a601b6
·
1 Parent(s): 98d071c

Deploy v4.5.3 date default fix

Browse files
README.md CHANGED
@@ -10,7 +10,7 @@ pinned: false
10
 
11
  # Global Marine Foundation Data Agent
12
 
13
- Current UI release: **v4.5.2**.
14
 
15
 
16
  ## v3.4.0 稳定性重构(第一阶段)
 
10
 
11
  # Global Marine Foundation Data Agent
12
 
13
+ Current UI release: **v4.5.3**.
14
 
15
 
16
  ## v3.4.0 稳定性重构(第一阶段)
VERSION CHANGED
@@ -1 +1 @@
1
- 4.5.2
 
1
+ 4.5.3
services/chat_runtime.py CHANGED
@@ -880,6 +880,61 @@ def _reset_optional_slots_for_new_query(prompt: str) -> dict:
880
  return out
881
 
882
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
883
  def _ocean_surface_only_depth_conflict(spec) -> str:
884
  spec=spec if isinstance(spec,dict) else {}
885
  depth=str(spec.get("depth") or "").strip()
@@ -1079,9 +1134,16 @@ async def dispatch_chat_stream(tid,prompt):
1079
  "spec":merged_spec,
1080
  }
1081
 
 
 
 
 
 
 
 
 
1082
  # Product capability preflight. Catch impossible depth requests before
1083
  # hitting the school Ocean server.
1084
- current_spec=thread_compressed_contexts.get(tid) or {}
1085
  depth_conflict=_ocean_surface_only_depth_conflict(current_spec)
1086
  if depth_conflict and _needs_ocean_mcp(prompt):
1087
  yield out("done",{"text":depth_conflict})
 
880
  return out
881
 
882
 
883
+ def _ocean_prompt_explicitly_requests_current_or_latest(prompt: str) -> bool:
884
+ q=str(prompt or "")
885
+ return bool(re.search(
886
+ r"(今天|今日|当前|现在|最新|最近可用|latest|current|today)",
887
+ q,
888
+ re.I,
889
+ ))
890
+
891
+
892
+ def _ocean_missing_date_guidance(spec, prompt: str) -> str:
893
+ """Do not silently substitute the server/current date.
894
+
895
+ A source/variable/region-only request is treated as a discovery request.
896
+ The platform returns the resolved parameters and asks for a date/date
897
+ range before any date-bound Ocean query/export call is made.
898
+ """
899
+ spec=spec if isinstance(spec,dict) else {}
900
+ if spec.get("date"):
901
+ return ""
902
+ if _ocean_prompt_explicitly_requests_current_or_latest(prompt):
903
+ return ""
904
+
905
+ variables=[str(x).upper() for x in (spec.get("variables") or [])]
906
+ datasets=[str(x) for x in (spec.get("dataset") or [])]
907
+ region=str(spec.get("region") or "").strip()
908
+
909
+ lines=[
910
+ "已识别这是 Ocean 数据查询,但你没有指定日期。",
911
+ "平台不会再把“今天”自动作为默认日期,以免把尚未更新到当天的数据产品误判为无数据。",
912
+ ]
913
+ if datasets:
914
+ lines.append("数据源/产品:"+"、".join(datasets))
915
+ if variables:
916
+ lines.append("变量:"+"、".join(variables))
917
+ if region:
918
+ lines.append("区域:"+region)
919
+ bbox=spec.get("region_bbox") or {}
920
+ if bbox and all(k in bbox for k in ("lon_min","lon_max","lat_min","lat_max")):
921
+ lines.append(
922
+ "平台固定范围:"
923
+ f"{bbox['lon_min']}°E–{bbox['lon_max']}°E, "
924
+ f"{bbox['lat_min']}°N–{bbox['lat_max']}°N"
925
+ )
926
+ lines.extend([
927
+ "",
928
+ "请补充日期或日期范围,例如:",
929
+ "- 2002-08-15",
930
+ "- 2002年8月(平台会自动拆成单日任务)",
931
+ "- 2002-08-01 至 2002-08-31",
932
+ "",
933
+ "如果你想查“最新数据”,直接说“查询最新可用的西北太平洋 SST”,平台会按“最新可用”意图处理,而不是固定使用系统当天日期。",
934
+ ])
935
+ return "\n".join(lines)
936
+
937
+
938
  def _ocean_surface_only_depth_conflict(spec) -> str:
939
  spec=spec if isinstance(spec,dict) else {}
940
  depth=str(spec.get("depth") or "").strip()
 
1134
  "spec":merged_spec,
1135
  }
1136
 
1137
+ # Missing-date preflight. Never substitute the current system date for
1138
+ # a date-bound Ocean query when the user did not ask for today/latest.
1139
+ current_spec=thread_compressed_contexts.get(tid) or {}
1140
+ missing_date_guidance=_ocean_missing_date_guidance(current_spec,prompt)
1141
+ if missing_date_guidance and _needs_ocean_mcp(prompt):
1142
+ yield out("done",{"text":missing_date_guidance})
1143
+ return
1144
+
1145
  # Product capability preflight. Catch impossible depth requests before
1146
  # hitting the school Ocean server.
 
1147
  depth_conflict=_ocean_surface_only_depth_conflict(current_spec)
1148
  if depth_conflict and _needs_ocean_mcp(prompt):
1149
  yield out("done",{"text":depth_conflict})
tests/test_chat_lifecycle_progress_v393.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_393():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_frontend_lifecycle_progress():
9
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_393():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_frontend_lifecycle_progress():
9
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
tests/test_context_and_multitask_finalize_v451.py CHANGED
@@ -2,7 +2,7 @@ from pathlib import Path
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
6
 
7
  def test_new_query_slot_reset():
8
  rt=(ROOT/"services"/"chat_runtime.py").read_text(encoding="utf-8")
 
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
6
 
7
  def test_new_query_slot_reset():
8
  rt=(ROOT/"services"/"chat_runtime.py").read_text(encoding="utf-8")
tests/test_download_progress_v391.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_391():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_p1_label_removed():
9
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_391():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_p1_label_removed():
9
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
tests/test_download_resilience_v422.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_refresh_route_registered():
9
  t=(ROOT/"routes"/"ocean_batch.py").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_refresh_route_registered():
9
  t=(ROOT/"routes"/"ocean_batch.py").read_text(encoding="utf-8")
tests/test_history_sidebar_v373.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_373():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_project_history_backend():
9
  route=(ROOT/"routes"/"project_package.py").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_373():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_project_history_backend():
9
  route=(ROOT/"routes"/"project_package.py").read_text(encoding="utf-8")
tests/test_large_download_jobs_v400.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_400():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_download_job_backend():
9
  route=(ROOT/"routes"/"downloads.py").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_400():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_download_job_backend():
9
  route=(ROOT/"routes"/"downloads.py").read_text(encoding="utf-8")
tests/test_merged_health_v433.py CHANGED
@@ -3,7 +3,7 @@ from services.ocean_batch import parse_ocean_batch_request
3
  ROOT=Path(__file__).resolve().parents[1]
4
 
5
  def test_merged_version():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_ocean_month_batch_survives_merge():
9
  p=parse_ocean_batch_request("查询 2002 年 8 月西北太平洋的 SST 数据,并导出为 CSV 文件供我下载")
 
3
  ROOT=Path(__file__).resolve().parents[1]
4
 
5
  def test_merged_version():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_ocean_month_batch_survives_merge():
9
  p=parse_ocean_batch_request("查询 2002 年 8 月西北太平洋的 SST 数据,并导出为 CSV 文件供我下载")
tests/test_multitask_observability_v442.py CHANGED
@@ -2,7 +2,7 @@ from pathlib import Path
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
6
 
7
  def test_frontend_sends_multitask_trace_headers():
8
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
 
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
6
 
7
  def test_frontend_sends_multitask_trace_headers():
8
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
tests/test_multitask_sse_finalize_v452.py CHANGED
@@ -2,7 +2,7 @@ from pathlib import Path
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
6
 
7
  def test_parallel_sse_uses_real_blank_line_separator():
8
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
 
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
6
 
7
  def test_parallel_sse_uses_real_blank_line_separator():
8
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
tests/test_ocean_batch_downloads_v420.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_420():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_manifest_has_filename_and_sizes():
9
  svc=(ROOT/"services"/"ocean_batch.py").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_420():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_manifest_has_filename_and_sizes():
9
  svc=(ROOT/"services"/"ocean_batch.py").read_text(encoding="utf-8")
tests/test_ocean_batch_routing_v421.py CHANGED
@@ -4,7 +4,7 @@ from services.ocean_batch import parse_ocean_batch_request
4
  ROOT=pathlib.Path(__file__).resolve().parents[1]
5
 
6
  def test_version_421():
7
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
8
 
9
  def test_exact_user_month_query_routes_to_batch():
10
  p=parse_ocean_batch_request("查询 2002 年 8 月西北太平洋的 SST 数据,并导出为 CSV 文件供我下载")
 
4
  ROOT=pathlib.Path(__file__).resolve().parents[1]
5
 
6
  def test_version_421():
7
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
8
 
9
  def test_exact_user_month_query_routes_to_batch():
10
  p=parse_ocean_batch_request("查询 2002 年 8 月西北太平洋的 SST 数据,并导出为 CSV 文件供我下载")
tests/test_ocean_batch_v410.py CHANGED
@@ -4,7 +4,7 @@ from services.ocean_batch import parse_ocean_batch_request
4
  ROOT=pathlib.Path(__file__).resolve().parents[1]
5
 
6
  def test_version_410():
7
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
8
 
9
  def test_month_three_variable_batch_plan():
10
  p=parse_ocean_batch_request("查询并导出 2002 年 8 月西北太平洋 120°E–140°E、20°N–40°N 的 SST、SSH、CHL 数据,并打包下载")
 
4
  ROOT=pathlib.Path(__file__).resolve().parents[1]
5
 
6
  def test_version_410():
7
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
8
 
9
  def test_month_three_variable_batch_plan():
10
  p=parse_ocean_batch_request("查询并导出 2002 年 8 月西北太平洋 120°E–140°E、20°N–40°N 的 SST、SSH、CHL 数据,并打包下载")
tests/test_ocean_date_default_v453.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pathlib import Path
2
+ ROOT=Path(__file__).resolve().parents[1]
3
+
4
+ def test_version():
5
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
6
+
7
+ def test_missing_date_never_defaults_to_today():
8
+ rt=(ROOT/"services"/"chat_runtime.py").read_text(encoding="utf-8")
9
+ assert "def _ocean_missing_date_guidance" in rt
10
+ assert "平台不会再把“今天”自动作为默认日期" in rt
11
+ assert "missing_date_guidance" in rt
12
+
13
+ def test_latest_today_are_explicit_intents():
14
+ rt=(ROOT/"services"/"chat_runtime.py").read_text(encoding="utf-8")
15
+ assert "def _ocean_prompt_explicitly_requests_current_or_latest" in rt
16
+ assert "今天|今日|当前|现在|最新|最近可用" in rt
17
+
18
+ def test_system_prompt_forbids_implicit_today():
19
+ ui=(ROOT/"ui_server.py").read_text(encoding="utf-8")
20
+ assert "不得擅自使用系统当天日期" in ui
tests/test_p0_finish_v380.py CHANGED
@@ -3,7 +3,7 @@ import pathlib, re, subprocess, shutil
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_380():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_chat_runtime_extracted():
9
  ui=(ROOT/"ui_server.py").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_380():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_chat_runtime_extracted():
9
  ui=(ROOT/"ui_server.py").read_text(encoding="utf-8")
tests/test_p0_phase2_v371.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_frontend_feature_modules_exist():
9
  html=(ROOT/"app.html").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_frontend_feature_modules_exist():
9
  html=(ROOT/"app.html").read_text(encoding="utf-8")
tests/test_p0_phase3_v372.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_372():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_route_modules_exist():
9
  for name in ("datasets.py","user_state.py","project_package.py","data_health.py"):
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_372():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_route_modules_exist():
9
  for name in ("datasets.py","user_state.py","project_package.py","data_health.py"):
tests/test_platform_reliability_v450.py CHANGED
@@ -6,7 +6,7 @@ from services.ocean_batch import parse_ocean_batch_request
6
  ROOT=Path(__file__).resolve().parents[1]
7
 
8
  def test_version():
9
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
10
 
11
  def test_squid_center_uses_repository_membership():
12
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
 
6
  ROOT=Path(__file__).resolve().parents[1]
7
 
8
  def test_version():
9
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
10
 
11
  def test_squid_center_uses_repository_membership():
12
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
tests/test_quality_center_v362.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT = pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_371():
6
- assert (ROOT / "VERSION").read_text(encoding="utf-8").strip() == "4.5.2"
7
 
8
  def test_native_health_backend():
9
  text = (ROOT / "routes" / "data_health.py").read_text(encoding="utf-8")
 
3
  ROOT = pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_371():
6
+ assert (ROOT / "VERSION").read_text(encoding="utf-8").strip() == "4.5.3"
7
 
8
  def test_native_health_backend():
9
  text = (ROOT / "routes" / "data_health.py").read_text(encoding="utf-8")
tests/test_quality_trust_v361.py CHANGED
@@ -2,7 +2,7 @@ from pathlib import Path
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version_current():
5
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
6
 
7
  def test_quality_confidence_is_now_native_api_metric():
8
  text=(ROOT/"routes"/"data_health.py").read_text(encoding="utf-8")
 
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version_current():
5
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
6
 
7
  def test_quality_confidence_is_now_native_api_metric():
8
  text=(ROOT/"routes"/"data_health.py").read_text(encoding="utf-8")
tests/test_release_stability.py CHANGED
@@ -7,7 +7,7 @@ def test_version_is_single_source():
7
  version = (ROOT / "VERSION").read_text(encoding="utf-8").strip()
8
  ui = (ROOT / "ui_server.py").read_text(encoding="utf-8")
9
  html = (ROOT / "app.html").read_text(encoding="utf-8")
10
- assert version == "4.5.2"
11
  assert 'with_name("VERSION")' in ui
12
  assert "__APP_VERSION__" in html
13
 
 
7
  version = (ROOT / "VERSION").read_text(encoding="utf-8").strip()
8
  ui = (ROOT / "ui_server.py").read_text(encoding="utf-8")
9
  html = (ROOT / "app.html").read_text(encoding="utf-8")
10
+ assert version == "4.5.3"
11
  assert 'with_name("VERSION")' in ui
12
  assert "__APP_VERSION__" in html
13
 
tests/test_runtime_hotfix_v376.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_376():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_no_stray_async_before_sidebar_toggle():
9
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_376():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_no_stray_async_before_sidebar_toggle():
9
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
tests/test_sidebar_collapse_v374.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_374():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_sidebar_toggle_markup():
9
  html=(ROOT/"app.html").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_374():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_sidebar_toggle_markup():
9
  html=(ROOT/"app.html").read_text(encoding="utf-8")
tests/test_sidebar_partial_collapse_v375.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_375():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_sidebar_order_and_groups():
9
  html=(ROOT/"app.html").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_375():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_sidebar_order_and_groups():
9
  html=(ROOT/"app.html").read_text(encoding="utf-8")
tests/test_smart_progress_avatar_sync_v441.py CHANGED
@@ -2,7 +2,7 @@ from pathlib import Path
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
6
 
7
  def test_simple_chat_hides_progress_until_needed():
8
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
 
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
6
 
7
  def test_simple_chat_hides_progress_until_needed():
8
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
tests/test_sse_heartbeat_v401.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_401():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_chat_has_independent_heartbeat_wrapper():
9
  route=(ROOT/"routes"/"chat.py").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_401():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_chat_has_independent_heartbeat_wrapper():
9
  route=(ROOT/"routes"/"chat.py").read_text(encoding="utf-8")
tests/test_ui_avatar_multitask_v440.py CHANGED
@@ -2,7 +2,7 @@ from pathlib import Path
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
6
 
7
  def test_assistant_avatar_removed_user_avatar_customizable():
8
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
 
2
  ROOT=Path(__file__).resolve().parents[1]
3
 
4
  def test_version():
5
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
6
 
7
  def test_assistant_avatar_removed_user_avatar_customizable():
8
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
tests/test_unified_download_manager_v392.py CHANGED
@@ -3,7 +3,7 @@ import pathlib
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_392():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_download_proxy_route_registered():
9
  route=(ROOT/"routes"/"downloads.py").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_392():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_download_proxy_route_registered():
9
  route=(ROOT/"routes"/"downloads.py").read_text(encoding="utf-8")
tests/test_unified_query_v390.py CHANGED
@@ -4,7 +4,7 @@ from services.unified_query import plan_unified_query
4
  ROOT=pathlib.Path(__file__).resolve().parents[1]
5
 
6
  def test_version_390():
7
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
8
 
9
  def test_joint_squid_environment_plan():
10
  p=plan_unified_query("查询 2002 年 8 月西北太平洋柔鱼记录,并匹配 SST、SSH、CHL")
 
4
  ROOT=pathlib.Path(__file__).resolve().parents[1]
5
 
6
  def test_version_390():
7
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
8
 
9
  def test_joint_squid_environment_plan():
10
  p=plan_unified_query("查询 2002 年 8 月西北太平洋柔鱼记录,并匹配 SST、SSH、CHL")
tests/test_v381_navigation_ocean_intent.py CHANGED
@@ -3,7 +3,7 @@ import pathlib, ast
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_381():
6
- assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.2"
7
 
8
  def test_recent_conversation_switches_to_chat():
9
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
 
3
  ROOT=pathlib.Path(__file__).resolve().parents[1]
4
 
5
  def test_version_381():
6
+ assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.5.3"
7
 
8
  def test_recent_conversation_switches_to_chat():
9
  js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
ui_server.py CHANGED
@@ -317,6 +317,7 @@ Marine MCP 真正调用失败时再说明失败。
317
  5. 渔业聚合规则:catch 求和;effort 仅在单位兼容时求和;CPUE 必须使用聚合后总catch÷总effort重算,禁止直接平均月CPUE。
318
  6. GFW apparent fishing hours 是AIS/模型推断的表观作业努力量,不等同于捕捞量或资源丰度;VIIRS 夜光变量是船舶活动证据,cvg 是观测机会/质量控制。
319
  7. 不得把年/月尺度数据伪装成逐日数据,缺失月份必须明确说明。
 
320
 
321
  HF live inventory 判定规则:当 [HF_FISHERIES_LIVE_CONTEXT] 含 SOURCE_LEVEL_RESULTS 时,必须以其中对完整 live tree 计算出的 PRESENT / NOT_FOUND_IN_LIVE_TREE 为准;不要依据 raw path preview 是否展示某来源来判断该来源是否存在。"""
322
 
 
317
  5. 渔业聚合规则:catch 求和;effort 仅在单位兼容时求和;CPUE 必须使用聚合后总catch÷总effort重算,禁止直接平均月CPUE。
318
  6. GFW apparent fishing hours 是AIS/模型推断的表观作业努力量,不等同于捕捞量或资源丰度;VIIRS 夜光变量是船舶活动证据,cvg 是观测机会/质量控制。
319
  7. 不得把年/月尺度数据伪装成逐日数据,缺失月份必须明确说明。
320
+ 8. Ocean 查询若用户没有提供日期,不得擅自使用系统当天日期。只有用户明确说“今天/当前/最新”时才按相应意图处理;普通无日期查询应先说明已识别的数据源、变量和区域,并要求补充日期或日期范围。
321
 
322
  HF live inventory 判定规则:当 [HF_FISHERIES_LIVE_CONTEXT] 含 SOURCE_LEVEL_RESULTS 时,必须以其中对完整 live tree 计算出的 PRESENT / NOT_FOUND_IN_LIVE_TREE 为准;不要依据 raw path preview 是否展示某来源来判断该来源是否存在。"""
323