argo-search 2.14.1 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/AGENTS.md +8 -6
  2. package/README.es.md +57 -813
  3. package/README.ja.md +56 -814
  4. package/README.ko.md +56 -812
  5. package/README.md +160 -754
  6. package/README.zh.md +152 -872
  7. package/SKILL.md +22 -23
  8. package/assets/readme/counts.json +1 -1
  9. package/assets/readme/hero.svg +23 -23
  10. package/backends/concept_vectors.bin +0 -0
  11. package/backends/domain_profiles.json +149 -6
  12. package/backends/engine_concept_vectors.json +1525 -1525
  13. package/backends/engine_registry.yaml +139 -30
  14. package/backends/quota_profiles.json +83 -3
  15. package/bin/argo +33 -17
  16. package/config.yaml +189 -33
  17. package/docs/ADDING_NEW_ENGINE.md +10 -0
  18. package/docs/ARGO_INTRO.md +1 -1
  19. package/docs/CHANGELOG.md +38 -0
  20. package/docs/ENGINE_CATALOG.md +102 -89
  21. package/docs/MCP_SETUP.md +10 -1
  22. package/docs/RELEASE_NOTES_v2.14.1.md +4 -4
  23. package/docs/RELEASE_NOTES_v2.15.0.md +50 -0
  24. package/docs/RELEASE_NOTES_v2.16.0.md +58 -0
  25. package/docs/RELEASING.md +1 -1
  26. package/engines/specs/ai_labs.yaml +89 -0
  27. package/engines/specs/archive_org.yaml +1 -1
  28. package/engines/specs/bilibili_hot.yaml +11 -1
  29. package/engines/specs/brave.yaml +3 -3
  30. package/engines/specs/carbon_intensity.yaml +1 -1
  31. package/engines/specs/cisa_alerts.yaml +40 -0
  32. package/engines/specs/cn_ai_news.yaml +10 -8
  33. package/engines/specs/crates.yaml +1 -1
  34. package/engines/specs/crossref.yaml +4 -2
  35. package/engines/specs/crt_sh.yaml +1 -1
  36. package/engines/specs/dblp.yaml +1 -1
  37. package/engines/specs/devto.yaml +1 -1
  38. package/engines/specs/digup.yaml +11 -6
  39. package/engines/specs/docker_hub.yaml +1 -1
  40. package/engines/specs/douyin_hot.yaml +11 -1
  41. package/engines/specs/dw_news.yaml +4 -2
  42. package/engines/specs/eng_blogs.yaml +63 -0
  43. package/engines/specs/europeana.yaml +3 -4
  44. package/engines/specs/europepmc.yaml +1 -1
  45. package/engines/specs/felo.yaml +3 -3
  46. package/engines/specs/firecrawl.yaml +3 -0
  47. package/engines/specs/fourget.yaml +5 -2
  48. package/engines/specs/france24.yaml +6 -4
  49. package/engines/specs/fxtwitter.yaml +30 -7
  50. package/engines/specs/gbfs_nyc.yaml +1 -1
  51. package/engines/specs/gleif.yaml +1 -1
  52. package/engines/specs/gov_regulations.yaml +1 -1
  53. package/engines/specs/grepapp_mcp.yaml +62 -0
  54. package/engines/specs/guardian_rss.yaml +6 -4
  55. package/engines/specs/hf_datasets.yaml +1 -1
  56. package/engines/specs/huggingface.yaml +1 -1
  57. package/engines/specs/itotii.yaml +13 -1
  58. package/engines/specs/keenable.yaml +7 -1
  59. package/engines/specs/linux_do.yaml +63 -0
  60. package/engines/specs/lobsters.yaml +41 -0
  61. package/engines/specs/local_crossref.yaml +3 -1
  62. package/engines/specs/local_github.yaml +1 -1
  63. package/engines/specs/local_npm.yaml +6 -0
  64. package/engines/specs/local_openstreetmap.yaml +1 -1
  65. package/engines/specs/local_seek.yaml +6 -0
  66. package/engines/specs/maven.yaml +1 -1
  67. package/engines/specs/mdn.yaml +1 -1
  68. package/engines/specs/musicbrainz.yaml +1 -1
  69. package/engines/specs/nasa_images.yaml +1 -1
  70. package/engines/specs/nhtsa_vpic.yaml +6 -3
  71. package/engines/specs/npm.yaml +1 -1
  72. package/engines/specs/nuget.yaml +1 -1
  73. package/engines/specs/nvd.yaml +1 -1
  74. package/engines/specs/open_meteo.yaml +1 -1
  75. package/engines/specs/openalex.yaml +4 -2
  76. package/engines/specs/openreview.yaml +1 -1
  77. package/engines/specs/polymarket.yaml +1 -1
  78. package/engines/specs/redskill.yaml +2 -0
  79. package/engines/specs/searxng.yaml +4 -2
  80. package/engines/specs/sec_edgar.yaml +9 -4
  81. package/engines/specs/steam.yaml +1 -1
  82. package/engines/specs/tinyfish.yaml +2 -0
  83. package/engines/specs/tinyfish_news.yaml +2 -0
  84. package/engines/specs/tinyfish_paper.yaml +2 -0
  85. package/engines/specs/toutiao_hot.yaml +11 -1
  86. package/engines/specs/train.yaml +3 -0
  87. package/engines/specs/twitter.yaml +4 -0
  88. package/engines/specs/unpaywall.yaml +6 -0
  89. package/engines/specs/vam.yaml +17 -3
  90. package/engines/specs/weibo_hot.yaml +11 -1
  91. package/engines/specs/wikidata.yaml +1 -1
  92. package/engines/specs/wikipedia.yaml +1 -1
  93. package/engines/specs/wolframalpha.yaml +3 -3
  94. package/engines/specs/xiaohongshu.yaml +2 -0
  95. package/engines/specs/zhihu.yaml +3 -18
  96. package/engines/specs/zhihu_hot_app.yaml +1 -1
  97. package/engines/specs/zhihu_kb.yaml +18 -0
  98. package/engines/specs/zhihu_questions.yaml +19 -0
  99. package/package.json +4 -2
  100. package/packages/dsh-plugin/README.md +9 -14
  101. package/packages/dsh-plugin/dsh/client.js +481 -1037
  102. package/packages/dsh-plugin/dsh/diagnostics.js +71 -20
  103. package/packages/dsh-plugin/dsh/index.js +6 -0
  104. package/packages/dsh-plugin/dsh/runner.js +3 -1
  105. package/packages/dsh-plugin/dsh/workbench-client.js +796 -0
  106. package/packages/dsh-plugin/dsh/workbench-md.js +386 -0
  107. package/packages/dsh-plugin/dsh/workbench-suggestions.js +148 -0
  108. package/packages/dsh-plugin/dsh/workbench.js +966 -0
  109. package/packages/dsh-plugin/icon.svg +23 -0
  110. package/packages/dsh-plugin/package.json +10 -3
  111. package/packages/dsh-plugin/scripts/sync-local.mjs +87 -0
  112. package/packages/dsh-plugin/scripts/sync-local.sh +13 -1
  113. package/packages/dsh-plugin/test/diagnostics.test.js +38 -1
  114. package/packages/dsh-plugin/test/size-gate.test.js +2 -9
  115. package/packages/dsh-plugin/test/workbench.test.js +92 -0
  116. package/scripts/adaptive.py +7 -1
  117. package/scripts/archive_run.py +112 -53
  118. package/scripts/argo_paths.py +42 -5
  119. package/scripts/badcase_ledger.py +117 -9
  120. package/scripts/build_concept_table.py +112 -55
  121. package/scripts/cache.py +6 -2
  122. package/scripts/caliber_isolation.py +60 -23
  123. package/scripts/circuit_breaker.py +72 -11
  124. package/scripts/cli_io.py +20 -2
  125. package/scripts/config_cache.py +44 -1
  126. package/scripts/daemon.py +151 -51
  127. package/scripts/dormant_ledger.py +23 -9
  128. package/scripts/engine_dispatch.py +8 -5
  129. package/scripts/engine_env.py +191 -1
  130. package/scripts/engine_families.py +50 -7
  131. package/scripts/engine_states.py +3 -50
  132. package/scripts/engine_validate.py +13 -45
  133. package/scripts/engines.py +15 -31
  134. package/scripts/engines_base.py +66 -61
  135. package/scripts/engines_builders.py +0 -15
  136. package/scripts/engines_builders_archive.py +4 -3
  137. package/scripts/engines_builders_batch10.py +346 -100
  138. package/scripts/engines_builders_batch11.py +4 -76
  139. package/scripts/engines_builders_batch13.py +4 -3
  140. package/scripts/engines_builders_batch14.py +2 -1
  141. package/scripts/engines_builders_batch15.py +2 -1
  142. package/scripts/engines_builders_batch9.py +16 -25
  143. package/scripts/engines_builders_cn.py +7 -201
  144. package/scripts/engines_builders_data.py +12 -11
  145. package/scripts/engines_builders_data_macro.py +5 -4
  146. package/scripts/engines_builders_dsh.py +2 -1
  147. package/scripts/engines_builders_feeds.py +76 -11
  148. package/scripts/engines_builders_finance.py +2 -1
  149. package/scripts/engines_builders_intl.py +18 -117
  150. package/scripts/engines_builders_media.py +59 -12
  151. package/scripts/engines_builders_pixiv.py +2 -16
  152. package/scripts/engines_builders_science.py +8 -7
  153. package/scripts/engines_builders_search.py +7 -14
  154. package/scripts/engines_builders_skill.py +2 -1
  155. package/scripts/engines_builders_tech.py +8 -17
  156. package/scripts/engines_builders_weather.py +241 -0
  157. package/scripts/engines_fields.py +91 -0
  158. package/scripts/engines_http.py +184 -0
  159. package/scripts/engines_mcp.py +405 -0
  160. package/scripts/engines_parsers.py +13 -369
  161. package/scripts/engines_schema_drift.py +260 -0
  162. package/scripts/evidence.py +13 -0
  163. package/scripts/evidence_loop.py +19 -4
  164. package/scripts/extend_route_labels.py +6 -0
  165. package/scripts/fetch_jina.py +98 -0
  166. package/scripts/fetch_jsrun.py +15 -11
  167. package/scripts/fetch_v3.py +79 -120
  168. package/scripts/fulltext_store.py +42 -1
  169. package/scripts/fxtwitter_api.py +8 -7
  170. package/scripts/gen_engine_catalog.py +2 -2
  171. package/scripts/general_pool.py +15 -4
  172. package/scripts/health_check.py +1 -1
  173. package/scripts/image_vision/vision_probe +0 -0
  174. package/scripts/install.sh +2 -0
  175. package/scripts/link_source.py +65 -24
  176. package/scripts/local_seek_adapter.py +57 -17
  177. package/scripts/matrix_search_eval.py +8 -10
  178. package/scripts/mcp_handlers.py +53 -31
  179. package/scripts/mcp_handlers_surface.py +6 -18
  180. package/scripts/mcp_transport.py +10 -5
  181. package/scripts/min_version_scan.py +7 -3
  182. package/scripts/network_aware.py +7 -13
  183. package/scripts/numeric_verify.py +3 -2
  184. package/scripts/output_transparency.py +3 -0
  185. package/scripts/pre-commit +45 -43
  186. package/scripts/query_understanding.py +30 -6
  187. package/scripts/quota.py +36 -30
  188. package/scripts/rank_signals.py +9 -0
  189. package/scripts/recompute.py +15 -5
  190. package/scripts/recovery.py +38 -29
  191. package/scripts/recovery_runner.py +29 -10
  192. package/scripts/redskill/redskill_engine.py +2 -1
  193. package/scripts/release.py +14 -26
  194. package/scripts/release_check.py +5 -25
  195. package/scripts/replay_eval.py +2 -2
  196. package/scripts/research_cli.py +40 -0
  197. package/scripts/research_notes.py +368 -0
  198. package/scripts/route.py +40 -70
  199. package/scripts/route_audit.py +259 -0
  200. package/scripts/route_combo.py +21 -6
  201. package/scripts/route_domains.py +150 -23
  202. package/scripts/route_lang.py +20 -7
  203. package/scripts/route_log.py +26 -9
  204. package/scripts/route_policy.py +85 -6
  205. package/scripts/route_telemetry_export.py +199 -0
  206. package/scripts/rrf_classic.py +5 -22
  207. package/scripts/search.py +2 -1
  208. package/scripts/search_attribution.py +53 -10
  209. package/scripts/search_entry.py +32 -1
  210. package/scripts/search_output.py +23 -11
  211. package/scripts/search_pipeline.py +15 -3
  212. package/scripts/search_rank.py +21 -11
  213. package/scripts/semantic_evidence.py +394 -178
  214. package/scripts/serp_guard.py +13 -1
  215. package/scripts/settings_page.py +4 -3
  216. package/scripts/single_flight.py +1 -1
  217. package/scripts/social_engines/hackernews_engine.py +2 -1
  218. package/scripts/social_engines/reddit_engine.py +2 -1
  219. package/scripts/social_engines/xiaohongshu_engine.py +2 -1
  220. package/scripts/social_engines/zhihu_engine.py +252 -43
  221. package/scripts/sogou_weixin_browser.py +5 -6
  222. package/scripts/source_audit.py +44 -9
  223. package/scripts/source_ledger.py +2 -15
  224. package/scripts/source_selection.py +45 -20
  225. package/scripts/straggler_policy.py +1 -2
  226. package/scripts/sync_backends.py +17 -0
  227. package/scripts/tfidf_router.py +23 -11
  228. package/scripts/time_utils.py +54 -1
  229. package/scripts/train.py +68 -2
  230. package/scripts/usage_log.py +50 -10
  231. package/scripts/watch.py +3 -3
  232. package/scripts/zhihu_quota.py +2 -1
  233. package/sub-skills/argo-wide-research/SKILL.md +70 -0
  234. package/sub-skills/ego-search/{SKILL.md → README.md} +15 -47
  235. package/sub-skills/ego-search/scripts/ego_search.py +13 -4
  236. package/sub-skills/js-run/{SKILL.md → README.md} +3 -20
  237. package/sub-skills/local-search/{SKILL.md → README.md} +3 -8
  238. package/sub-skills/local-search/engine_registry.py +32 -7
  239. package/sub-skills/local-seek/SKILL.md +20 -22
  240. package/sub-skills/local-seek/scripts/seek_fts.py +58 -3
  241. package/scripts/caliber_dedupe.py +0 -66
  242. package/scripts/engines_builders_batch16.py +0 -13
  243. package/scripts/health_probe.py +0 -253
  244. package/scripts/social_engines/twitter_engine.py +0 -514
  245. package/scripts/sync_installs.py +0 -29
@@ -13,6 +13,7 @@ from __future__ import annotations
13
13
  import hashlib
14
14
  import json
15
15
  import os
16
+ import re
16
17
  import threading
17
18
  import time
18
19
  from pathlib import Path
@@ -54,6 +55,13 @@ OPEN_SECONDS = 60 # 熔断冷却
54
55
  EMPTY_NEGATIVE_TTL = 45 # 空结果负缓存(秒)
55
56
  ERROR_NEGATIVE_TTL = 30 # 错误负缓存(秒)
56
57
  HALF_OPEN_PROBE = True # 冷却后允许一次探测
58
+ # 限流/封锁类源站行为的指数冷却阶梯(秒):不改变 closed 态、不累计 opens、不触发 auto_disabled,
59
+ # 仅通过 cooldown_until 阻止同类 429/WAF 引擎每 60s 内无效空转。
60
+ RATE_LIMIT_COOLDOWNS = (60, 300, 900)
61
+ _COOLDOWN_KINDS = frozenset({
62
+ engine_states.BREAKER_KIND_RATE_LIMITED,
63
+ engine_states.BREAKER_KIND_BLOCKED,
64
+ })
57
65
 
58
66
  # 自适应禁用(v2.7)
59
67
  DISABLE_AFTER_OPENS = 3 # 连续 open 达此次数 → 自动禁用(持久跳过)
@@ -182,11 +190,15 @@ class CircuitBreaker:
182
190
  "suspected_stale": self._suspected_stale_locked(st),
183
191
  "auth_disabled": bool(st.get("auth_disabled")),
184
192
  "auth_streak": int(st.get("auth_streak") or 0),
193
+ "cooldown_streak": int(st.get("cooldown_streak") or 0),
185
194
  # 用 time.time()(墙钟)而非 time.monotonic():熔断状态持久化到文件,
186
195
  # 跨进程恢复时 opened_at 必须可比较。monotonic 在不同进程间基准不同,
187
196
  # 换用会导致跨进程冷却判断错误。时钟回拨风险可控(只会让冷却提前结束)。
188
- "cooldown_remain": max(0, int(OPEN_SECONDS - (time.time() - opened_at)))
189
- if state == engine_states.BREAKER_OPEN else 0,
197
+ "cooldown_remain": max(
198
+ max(0, int(OPEN_SECONDS - (time.time() - opened_at)))
199
+ if state == engine_states.BREAKER_OPEN else 0,
200
+ max(0, int(float(st.get("cooldown_until") or 0) - time.time())),
201
+ ),
190
202
  }
191
203
 
192
204
  @staticmethod
@@ -237,20 +249,33 @@ class CircuitBreaker:
237
249
  self._mutate_locked(_key_healed)
238
250
  return True, "auth_key_changed"
239
251
  disabled_at = float(st.get("disabled_at") or 0)
240
- if disabled_at == 0 or \
241
- (time.time() - disabled_at) >= DISABLE_COOLDOWN_SECONDS:
252
+ last_probe = float(st.get("reenable_probed_at") or 0)
253
+ if max(disabled_at, last_probe) == 0 or \
254
+ (time.time() - max(disabled_at, last_probe)) >= DISABLE_COOLDOWN_SECONDS:
242
255
  def _reenable_probe() -> None:
243
256
  # 锁内重读后再改:_reload_engines 刚整体替换过
244
257
  # self._engines,闭包里的旧 st 会把另一进程刚落盘的
245
258
  # 状态盖回去(017b01a 修的那类丢更新在 allow() 的漏网处)。
246
259
  fresh = self._engines.get(engine) or {}
247
260
  fresh["state"] = engine_states.BREAKER_HALF_OPEN
248
- fresh["disabled_at"] = time.time() # 本次探测起点,失败则重新计冷却
261
+ fresh["reenable_probed_at"] = time.time() # 不覆盖 disabled_at,防探测失败后 1h 内无法再 disabled
262
+ fresh["half_open_probe_at"] = time.time()
249
263
  self._engines[engine] = fresh
250
264
  self._mutate_locked(_reenable_probe)
251
265
  return True, "half_open_reenable"
252
266
  return False, "auto_disabled"
253
267
 
268
+ if state == engine_states.BREAKER_HALF_OPEN:
269
+ probe_at = float(st.get("half_open_probe_at") or 0)
270
+ if probe_at > 0 and (time.time() - probe_at) < min(OPEN_SECONDS, 30):
271
+ return False, "half_open_probe_busy"
272
+ def _claim_probe() -> None:
273
+ fresh = self._engines.get(engine) or {}
274
+ fresh["half_open_probe_at"] = time.time()
275
+ self._engines[engine] = fresh
276
+ self._mutate_locked(_claim_probe)
277
+ return True, engine_states.BREAKER_HALF_OPEN
278
+
254
279
  if state == engine_states.BREAKER_OPEN:
255
280
  # 冷却期已过 → half-open 探测(除非已连续多次 open 触发自动禁用)
256
281
  if time.time() - opened_at >= OPEN_SECONDS:
@@ -277,6 +302,10 @@ class CircuitBreaker:
277
302
  return True, "half_open_probe"
278
303
  remain = int(OPEN_SECONDS - (time.time() - opened_at))
279
304
  return False, f"circuit_open:{remain}s"
305
+ cooldown_until = float(st.get("cooldown_until") or 0)
306
+ soft_remain = cooldown_until - time.time()
307
+ if soft_remain > 0:
308
+ return False, f"rate_limit_cooldown:{max(1, int(soft_remain))}s"
280
309
  return True, engine_states.BREAKER_CLOSED
281
310
 
282
311
  def _mutate_locked(self, mutator) -> None:
@@ -340,6 +369,8 @@ class CircuitBreaker:
340
369
  and not st.get("empty_streak")
341
370
  and not st.get("empty_recent")
342
371
  and not st.get("auth_streak")
372
+ and not st.get("cooldown_streak")
373
+ and not st.get("cooldown_until")
343
374
  and st.get("ever_nonempty")):
344
375
  # 已健康且无任何待清理状态:内存短路,零写盘。
345
376
  # ever_nonempty 必须参与短路判定:升级前落盘的存量干净条目没有
@@ -380,15 +411,16 @@ class CircuitBreaker:
380
411
  「跨 ≥2 个不同查询」的去重(同一查询反复空不构成引擎失效证据)。
381
412
 
382
413
  empty 语义是「该查询无结果」——查询级信号,不是引擎级故障。
383
- 它仍可触发 60s 短冷却(防止重复打无效源),但不累计 opens,
384
- 因此永远不会驱动 auto-disable(否则聚合引擎/local 源等易空
385
- 引擎会被误判为持续故障而静默禁用)。
414
+ 它只进 45s 负缓存(EMPTY_NEGATIVE_TTL,防止重复打无效源),
415
+ 不设 cooldown、不累计 opens,因此永远不会驱动 auto-disable
416
+ (否则聚合引擎/local 源等易空引擎会被误判为持续故障而静默禁用)。
386
417
 
387
418
  blocked / rate-limited 语义是「源站行为,不是引擎坏了」——前者是
388
419
  请求在到达内容前被拦截(反爬/指纹/挑战页),后者是源端限流。
389
- 同样只做 60s 短冷却、不累计 opens:把封锁/限流当引擎故障累计到
390
- auto-disable 是封错人——引擎实现没有问题,换客户端形态、
391
- 等冷却或等源站策略变化即可恢复。
420
+ 走指数冷却阶梯(RATE_LIMIT_COOLDOWNS,60/300/900s,经 cooldown_until
421
+ 拒绝探测)、不累计 opens:把封锁/限流当引擎故障累计到 auto-disable
422
+ 是封错人——引擎实现没有问题,换客户端形态、等冷却或等源站策略
423
+ 变化即可恢复。
392
424
  """
393
425
  self._mutate_locked(
394
426
  lambda: self._mutate_failure(engine, kind, attribution, query))
@@ -447,11 +479,17 @@ class CircuitBreaker:
447
479
  st["last_kind"] = kind
448
480
  if attribution:
449
481
  st["last_attribution"] = dict(attribution)
482
+ self._apply_flat_observation(st, attribution)
450
483
  # empty(无结果)与 blocked(被拦截)都是查询级/源站级信号,不驱动
451
484
  # open 熔断:否则「空结果→open 60s→half_open→再 open」无效 churn,
452
485
  # 还占主位阻塞 6s。仅 error/timeout 驱动稳定 state 切换(空结果由
453
486
  # 负缓存短 TTL 保底)。2026-08 修复;blocked 2026-09 并入同语义。
454
487
  # 已因 auth 直达 disabled 的不再被 opens 块盖回 open(禁用优先)。
488
+ if kind in _COOLDOWN_KINDS:
489
+ streak = int(st.get("cooldown_streak") or 0) + 1
490
+ st["cooldown_streak"] = streak
491
+ dur = RATE_LIMIT_COOLDOWNS[min(streak - 1, len(RATE_LIMIT_COOLDOWNS) - 1)]
492
+ st["cooldown_until"] = time.time() + dur
455
493
  if (drives_opens and st.get("state") != engine_states.BREAKER_DISABLED
456
494
  and (st["failures"] >= FAILURE_THRESHOLD
457
495
  or st.get("state") == engine_states.BREAKER_HALF_OPEN)):
@@ -525,10 +563,33 @@ class CircuitBreaker:
525
563
  def _m() -> None:
526
564
  st = self._engines.get(engine) or {"failures": 0, "state": engine_states.BREAKER_CLOSED}
527
565
  st["last_attribution"] = dict(attribution)
566
+ self._apply_flat_observation(st, attribution)
528
567
  self._engines[engine] = st
529
568
 
530
569
  self._mutate_locked(_m)
531
570
 
571
+ @staticmethod
572
+ def _apply_flat_observation(st: dict[str, Any],
573
+ attribution: dict[str, Any] | None) -> None:
574
+ """把归因平铺成状态文件里可直接读的 last_http/last_error。
575
+
576
+ HTTP 码在 engine_failure.classify 的输出里编在 reason/evidence 字符串
577
+ (http-403 形态),诊断时得解析嵌套 dict——平铺后 403/401/402 一眼可见
578
+ (2026-11-14 运行时审计 C 类:bocha 欠费 403 只能碰巧从 quota.json
579
+ 看到,熔断台账自己答不了「为什么」)。缺码或无归因时不写字段。
580
+ """
581
+ if not attribution:
582
+ return
583
+ blob = " ".join(str(attribution.get(k) or "")
584
+ for k in ("reason", "evidence"))
585
+ m = re.search(r"http-(\d{3})", blob)
586
+ if m:
587
+ st["last_http"] = int(m.group(1))
588
+ err = (str(attribution.get("reason") or "")
589
+ or str(attribution.get("evidence") or "")).strip()
590
+ if err:
591
+ st["last_error"] = err[:120]
592
+
532
593
  def auto_disabled(self) -> list[str]:
533
594
  """返回所有处于自动禁用状态的引擎。"""
534
595
  with self._lock:
package/scripts/cli_io.py CHANGED
@@ -55,8 +55,8 @@ import sys
55
55
  import time
56
56
  from typing import Any
57
57
 
58
- __all__ = ["stdin_is_piped", "read_stdin_if_piped", "dumps", "dumps_pretty",
59
- "ensure_utf8_stdio"]
58
+ __all__ = ["stdin_is_piped", "stdin_is_memory_stream", "read_stdin_if_piped",
59
+ "dumps", "dumps_pretty", "ensure_utf8_stdio"]
60
60
 
61
61
  # stdout 的紧凑分隔符(无冗余空格):与 mcp_handlers._dumps 的默认计算方式一致。
62
62
  _COMPACT = (",", ":")
@@ -143,6 +143,24 @@ def stdin_is_piped() -> bool:
143
143
  return mode is not None and (stat.S_ISFIFO(mode) or stat.S_ISREG(mode))
144
144
 
145
145
 
146
+ def stdin_is_memory_stream() -> bool:
147
+ """stdin 是否为无 OS fd 但仍打开的非 TTY 文本流(如单测 io.StringIO)。
148
+
149
+ ``stdin_is_piped()`` 依 ``fstat(fileno())`` 判定,对 ``io.StringIO`` 返回 False;
150
+ 调用方如需在无真实 fd 的单测里同样走读流路径而非打开 ``/dev/tty``(如
151
+ ``getpass.getpass``),可叠加本判据。"""
152
+ import io
153
+
154
+ stdin = getattr(sys, "stdin", None)
155
+ if not isinstance(stdin, io.TextIOBase) or getattr(stdin, "closed", False):
156
+ return False
157
+ try:
158
+ stdin.fileno()
159
+ return False
160
+ except (OSError, ValueError, AttributeError):
161
+ return not stdin.isatty()
162
+
163
+
146
164
  def _stdin_mode() -> int | None:
147
165
  """stdin 的 st_mode;取不到(已关闭 / 非法 fd)返回 None。
148
166
 
@@ -23,6 +23,7 @@ from __future__ import annotations
23
23
  import hashlib
24
24
  import json
25
25
  import os
26
+ import time
26
27
  from pathlib import Path
27
28
  from typing import Any
28
29
 
@@ -138,7 +139,7 @@ def _config_disk_cache_path() -> Path:
138
139
  override = os.environ.get(argo_paths.ENV_STATE_DIR, "").strip()
139
140
  root = (Path(os.path.expanduser(override)) if override
140
141
  else argo_paths.legacy_root())
141
- slot = hashlib.sha256(str(_config_path()).encode("utf-8")).hexdigest()[:16]
142
+ slot = hashlib.sha256(str(_config_path().resolve()).encode("utf-8")).hexdigest()[:16]
142
143
  return root / f"config-cache-{slot}.json"
143
144
 
144
145
 
@@ -366,6 +367,11 @@ def _save_config_disk_cache(st: os.stat_result, scan: tuple[float, int, int, str
366
367
  _sweep_orphan_cache_slots(path)
367
368
 
368
369
 
370
+ # 存活但陈旧 checkout 槽的回收阈值:槽 mtime = 该 checkout 最后一次加载配置(重建仅 16-50ms)。
371
+ _SLOT_STALE_S = 3 * 86400
372
+ _TMP_SLOT_STALE_S = 86400
373
+
374
+
369
375
  def _sweep_orphan_cache_slots(keep: Path) -> None:
370
376
  """回收「config_path 已不存在」的缓存槽;任何失败静默。
371
377
 
@@ -377,6 +383,12 @@ def _sweep_orphan_cache_slots(keep: Path) -> None:
377
383
  config 的旧摘要」来删——那会误删另一个 checkout 正在用的槽。只删 config_path
378
384
  在盘上已消失的槽,既不误伤活着的 checkout,又能自愈任何来源的临时副本。
379
385
 
386
+ 2026-11-14 补第三条:槽 7 天未写即回收。自愈机制曾被「还活着的 checkout」
387
+ 绕过——~/tmp 评测 checkout 与 argo-history 归档的 config.yaml 永久存在,
388
+ 它们的槽按旧判据永远够不着(生产库实测 6 槽约 1.4MB,4 槽属此类)。槽的
389
+ mtime 就是那个 checkout 最后一次加载配置的时刻,一周没写 = 一周没跑过
390
+ 搜索;缓存本可再生(重建一次 16-50ms),陈槽无保留价值。
391
+
380
392
  时机:只在写缓存时顺带扫(缓存未命中才写,属低频)。临时 checkout 自己写槽
381
393
  时就会回收上一批的遗留,所以污染源活跃时回收也随之发生。
382
394
  """
@@ -386,6 +398,21 @@ def _sweep_orphan_cache_slots(keep: Path) -> None:
386
398
  siblings = list(keep.parent.glob("config-cache-*.json"))
387
399
  except OSError:
388
400
  return
401
+ keep_cfg = ""
402
+ try:
403
+ keep_payload = json.loads(keep.read_text(encoding="utf-8"))
404
+ keep_cfg = str(((keep_payload.get("key") or {}).get("config_path")) or "").strip()
405
+ except Exception:
406
+ pass
407
+ def _norm_cfg(raw: str) -> str:
408
+ if not raw:
409
+ return ""
410
+ try:
411
+ return str(Path(raw).resolve())
412
+ except OSError:
413
+ return raw
414
+
415
+ keep_cfg = _norm_cfg(keep_cfg)
389
416
  for path in siblings:
390
417
  if path == keep:
391
418
  continue
@@ -395,8 +422,24 @@ def _sweep_orphan_cache_slots(keep: Path) -> None:
395
422
  except (OSError, ValueError, AttributeError):
396
423
  # 读不动或结构不认识:一律不动。判定不了就不删,是这里的保守选择。
397
424
  continue
425
+ norm_cfg = _norm_cfg(cfg_path)
398
426
  if cfg_path and not Path(cfg_path).exists():
399
427
  try:
400
428
  path.unlink()
401
429
  except OSError:
402
430
  continue
431
+ elif norm_cfg and keep_cfg and norm_cfg == keep_cfg:
432
+ # 同一物理仓库(含 symlink / .. 相对路径)的历史槽且超 2h 未动:安全回收
433
+ try:
434
+ if (time.time() - path.stat().st_mtime) > 7200:
435
+ path.unlink()
436
+ except OSError:
437
+ pass
438
+ elif cfg_path:
439
+ # 存活但陈旧的 checkout 槽(/tmp 或 ~/tmp 下 24h,其余 3 天)
440
+ ttl = _TMP_SLOT_STALE_S if ("/tmp/" in cfg_path or "\\tmp\\" in cfg_path) else _SLOT_STALE_S
441
+ try:
442
+ if (time.time() - path.stat().st_mtime) > ttl:
443
+ path.unlink()
444
+ except OSError:
445
+ pass
package/scripts/daemon.py CHANGED
@@ -207,29 +207,43 @@ def _pid_path() -> str:
207
207
  return str(state_path(PID_NAME + "-" + _tree_tag()))
208
208
 
209
209
 
210
- def _pid_is_daemon(pid: int) -> bool:
211
- """核实 pid 的命令行确实是本 daemon(macOS/Linux ps,Windows 视为不是)。
212
-
213
- 误杀的代价不对称:漏杀只是留一个下次 start 时 ping 不到、自己会空闲退出的
214
- 进程;错杀是 SIGTERM 一个无关进程。所以判据从紧——单独出现 "daemon.py"
215
- 子串不够(编辑器/别仓同名脚本都会中)。
216
-
217
- 必须识别两种启动形态(2026-10-13 实测发现第二种此前漏判):
218
- A. `python <本仓>/scripts/daemon.py start`——直接调用与 autostart 派生;
219
- B. `./bin/argo daemon start`——bin/argo 经 runpy 原地执行时,Python 层的
220
- sys.argv 被改写但**内核记录的 argv 不变**,ps 里始终是 bin/argo 形态。
221
- 此前只认 A,B 形态下 stop 的 pid 兜底补刀会漏判,留孤儿进程。
222
- """
210
+ def _pid_alive(pid: int) -> bool:
223
211
  if os.name == "nt":
224
- return False
225
- import subprocess
212
+ import subprocess
213
+ try:
214
+ r = subprocess.run(["tasklist", "/FI", f"PID eq {pid}", "/NH", "/FO", "CSV"],
215
+ capture_output=True, text=True, timeout=5,
216
+ encoding="utf-8", errors="replace")
217
+ return f'"{pid}"' in (r.stdout or "")
218
+ except OSError:
219
+ return False
226
220
  try:
227
- r = subprocess.run(["ps", "-p", str(pid), "-o", "command="],
228
- capture_output=True, text=True, timeout=5,
229
- encoding="utf-8", errors="replace")
230
- cmd = (r.stdout or "").strip()
231
- except Exception:
221
+ os.kill(pid, 0)
222
+ return True
223
+ except OSError:
232
224
  return False
225
+
226
+
227
+ def _pid_is_daemon(pid: int) -> bool:
228
+ """核实 pid 的命令行确实是本 daemon(POSIX ps / Windows PowerShell CIM)。"""
229
+ import subprocess
230
+ if os.name == "nt":
231
+ try:
232
+ ps_cmd = f"(Get-CimInstance Win32_Process -Filter 'ProcessId={pid}').CommandLine"
233
+ r = subprocess.run(["powershell", "-NoProfile", "-Command", ps_cmd],
234
+ capture_output=True, text=True, timeout=5,
235
+ encoding="utf-8", errors="replace")
236
+ cmd = (r.stdout or "").strip()
237
+ except OSError:
238
+ return False
239
+ else:
240
+ try:
241
+ r = subprocess.run(["ps", "-p", str(pid), "-o", "command="],
242
+ capture_output=True, text=True, timeout=5,
243
+ encoding="utf-8", errors="replace")
244
+ cmd = (r.stdout or "").strip()
245
+ except OSError:
246
+ return False
233
247
  if not cmd:
234
248
  return False
235
249
  toks = cmd.split()
@@ -247,6 +261,54 @@ def _log_path() -> str:
247
261
  return str(state_path(LOG_NAME + "-" + _tree_tag()))
248
262
 
249
263
 
264
+ # 日志轮转:daemon 生命周期短(空闲自杀),增长慢,启动时检查一次足够。
265
+ # 曾完全无轮转(只靠空闲自杀间接限速),18 天积 405 行属侥幸而非机制。
266
+ _LOG_MAX_BYTES = 1 * 1024 * 1024
267
+
268
+
269
+ def _rotate_log_if_needed() -> None:
270
+ """日志超 1MB 时轮转为 .1(旧的 .1 直接淘汰,不保多代)。
271
+
272
+ 轮转失败不拦启动:日志是观测件,写不进去也比起不来强。
273
+ """
274
+ p = _log_path()
275
+ try:
276
+ if os.path.exists(p) and os.path.getsize(p) > _LOG_MAX_BYTES:
277
+ old = p + ".1"
278
+ if os.path.exists(old):
279
+ os.unlink(old)
280
+ os.replace(p, old)
281
+ except OSError:
282
+ pass
283
+
284
+
285
+ class _TimestampedStdout:
286
+ """行级时间戳包装:daemon.log 曾零时间戳,重启频率与崩溃间隔无法回答
287
+ (2026-11-14 运行时审计 C 类实锤)。服务输出统一加 [ISO-8601] 前缀。
288
+
289
+ 只包装文本流;fd 重定向(dup2)不走这里,外部轮转不受影响。
290
+ """
291
+
292
+ def __init__(self, raw):
293
+ self._raw = raw
294
+ self._at_line_start = True
295
+
296
+ def write(self, s):
297
+ if not s:
298
+ return 0
299
+ now = time.strftime("%Y-%m-%dT%H:%M:%S")
300
+ out = []
301
+ for chunk in s.splitlines(keepends=True):
302
+ if self._at_line_start and chunk.strip():
303
+ out.append(f"[{now}] ")
304
+ out.append(chunk)
305
+ self._at_line_start = chunk.endswith("\n")
306
+ return self._raw.write("".join(out))
307
+
308
+ def flush(self):
309
+ self._raw.flush()
310
+
311
+
250
312
  def _atomic_write(path: str, text: str) -> None:
251
313
  d = os.path.dirname(path)
252
314
  if d:
@@ -479,6 +541,11 @@ class _Server:
479
541
  else:
480
542
  resp = {"ok": False, "error": f"未知 op: {op!r}"}
481
543
  except Exception as e:
544
+ # 错误级落日志:daemon.log 此前零错误行,进程级故障不可检
545
+ #(2026-11-18 可观测性审计盲区修复)。stdout 已被时间戳
546
+ # 包装器接住,print 即带 [ISO] 前缀落盘。
547
+ print(f"[ERROR] op={op!r} handler {type(e).__name__}: {e}",
548
+ file=sys.stderr)
482
549
  resp = {"ok": False, "error": f"{type(e).__name__}: {e}"}
483
550
  # sendall 用的超时与 recv 的那把(60s)分开,且以**客户端声明
484
551
  # 的预算**为准:一笔 run 超过 60s 时 sendall 抛 socket.timeout
@@ -640,6 +707,56 @@ def _quiet_stop(sp: str) -> bool:
640
707
  return False
641
708
 
642
709
 
710
+ def _terminate_pid(pid: int) -> None:
711
+ if os.name == "nt":
712
+ import subprocess
713
+ subprocess.run(["taskkill", "/PID", str(pid), "/F"],
714
+ capture_output=True, timeout=5)
715
+ return
716
+ os.kill(pid, signal.SIGTERM)
717
+
718
+
719
+ def _redirect_stdio_to_log() -> None:
720
+ log_dir = os.path.dirname(_log_path())
721
+ if log_dir:
722
+ os.makedirs(log_dir, exist_ok=True)
723
+ _rotate_log_if_needed()
724
+ log = open(_log_path(), "ab", buffering=0)
725
+ os.dup2(log.fileno(), 0)
726
+ os.dup2(log.fileno(), 1)
727
+ os.dup2(log.fileno(), 2)
728
+ with contextlib.suppress(OSError):
729
+ log.close()
730
+
731
+
732
+ def _wait_ready_and_report(args: argparse.Namespace) -> int:
733
+ deadline = time.time() + 10
734
+ while time.time() < deadline:
735
+ try:
736
+ info = ping(_sock_path(), 0.5)
737
+ msg = {"ok": True, "pid": info.get("pid")}
738
+ print(json.dumps(msg, ensure_ascii=False) if args.json
739
+ else f"argo daemon 已启动 pid={info.get('pid')} socket={_sock_path()}")
740
+ return 0
741
+ except Exception:
742
+ time.sleep(0.05)
743
+ print(json.dumps({"ok": False, "error": "启动超时", "log": _log_path()},
744
+ ensure_ascii=False) if args.json
745
+ else f"argo daemon 启动超时,看日志:{_log_path()}", file=sys.stderr)
746
+ return 1
747
+
748
+
749
+ def _start_detached_windows(args: argparse.Namespace) -> int:
750
+ import subprocess
751
+ flags = getattr(subprocess, "DETACHED_PROCESS", 0x00000008) | getattr(
752
+ subprocess, "CREATE_NEW_PROCESS_GROUP", 0x00000200)
753
+ cmd = [sys.executable, os.path.abspath(__file__), "start",
754
+ "--foreground", "--detached-log", "--idle-exit", str(args.idle_exit)]
755
+ subprocess.Popen(cmd, creationflags=flags, close_fds=True,
756
+ stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
757
+ return _wait_ready_and_report(args)
758
+
759
+
643
760
  def _start(args: argparse.Namespace) -> int:
644
761
  alive = _alive()
645
762
  if alive:
@@ -728,38 +845,18 @@ def _start(args: argparse.Namespace) -> int:
728
845
  except Exception:
729
846
  pass
730
847
 
731
- if args.foreground or os.name == "nt": # Windows 无 fork:只支持前台
848
+ if args.foreground:
849
+ if getattr(args, "detached_log", False):
850
+ _redirect_stdio_to_log()
732
851
  _serve_child(args)
733
852
  return 0
734
-
853
+ if os.name == "nt":
854
+ return _start_detached_windows(args)
735
855
  pid = os.fork()
736
856
  if pid > 0:
737
- # 父进程:等 socket 就绪后报告(子进程 bind 完成即视为成功)
738
- deadline = time.time() + 10
739
- while time.time() < deadline:
740
- try:
741
- info = ping(_sock_path(), 0.5)
742
- msg = {"ok": True, "pid": info.get("pid")}
743
- print(json.dumps(msg, ensure_ascii=False) if args.json
744
- else f"argo daemon 已启动 pid={info.get('pid')} socket={_sock_path()}")
745
- return 0
746
- except Exception:
747
- time.sleep(0.05)
748
- print(json.dumps({"ok": False, "error": "启动超时", "log": _log_path()},
749
- ensure_ascii=False) if args.json
750
- else f"argo daemon 启动超时,看日志:{_log_path()}", file=sys.stderr)
751
- return 1
857
+ return _wait_ready_and_report(args)
752
858
  os.setsid()
753
- # 重定向 stdio 到日志:daemon 不再依赖终端(日志目录同样可能还不存在)
754
- log_dir = os.path.dirname(_log_path())
755
- if log_dir:
756
- os.makedirs(log_dir, exist_ok=True)
757
- log = open(_log_path(), "ab", buffering=0)
758
- os.dup2(log.fileno(), 0)
759
- os.dup2(log.fileno(), 1)
760
- os.dup2(log.fileno(), 2)
761
- with contextlib.suppress(OSError):
762
- log.close()
859
+ _redirect_stdio_to_log()
763
860
  _serve_child(args)
764
861
  return 0
765
862
  finally:
@@ -768,6 +865,10 @@ def _start(args: argparse.Namespace) -> int:
768
865
 
769
866
 
770
867
  def _serve_child(args: argparse.Namespace) -> None:
868
+ # stdio 已 dup2 到日志文件;文本流再包一层时间戳,所有 print 落日志带
869
+ # [ISO-8601] 前缀(观测缺失收口:无时间戳的日志无法回答重启频率)。
870
+ sys.stdout = _TimestampedStdout(sys.stdout)
871
+ sys.stderr = _TimestampedStdout(sys.stderr)
771
872
  try:
772
873
  from engine_env import sync_envfile_to_environ
773
874
  sync_envfile_to_environ()
@@ -807,9 +908,7 @@ def _stop(args: argparse.Namespace) -> int:
807
908
  if pid:
808
909
  grace = time.time() + _STOP_GRACE_S
809
910
  while time.time() < grace:
810
- try:
811
- os.kill(pid, 0)
812
- except OSError:
911
+ if not _pid_alive(pid):
813
912
  break # 进程已退出:真停
814
913
  time.sleep(0.1)
815
914
  with contextlib.suppress(OSError):
@@ -826,7 +925,7 @@ def _stop(args: argparse.Namespace) -> int:
826
925
  with open(_pid_path(), encoding="utf-8") as f:
827
926
  pid = int(f.read().strip())
828
927
  if _pid_is_daemon(pid):
829
- os.kill(pid, signal.SIGTERM)
928
+ _terminate_pid(pid)
830
929
  killed = pid
831
930
  except (OSError, ValueError):
832
931
  pass
@@ -859,6 +958,7 @@ def _cli() -> int:
859
958
  sub = ap.add_subparsers(dest="cmd", required=True)
860
959
  p_start = sub.add_parser("start", help="启动 daemon(默认后台化)")
861
960
  p_start.add_argument("--foreground", action="store_true", help="前台运行(调试用)")
961
+ p_start.add_argument("--detached-log", action="store_true", help=argparse.SUPPRESS)
862
962
  p_start.add_argument("--idle-exit", type=float, default=1800.0,
863
963
  help="空闲 N 秒后自杀退出;0=常驻不退(默认 1800)")
864
964
  for p in (p_start, sub.add_parser("status"), sub.add_parser("stop")):
@@ -71,10 +71,14 @@ DORMANT_ALLOWLIST: dict[str, str] = {
71
71
  # 2026-10-14(7ca2f22):osv/cisa_kev 从 security_search combo 移出并改为
72
72
  # explicit_only(本地插件按需提供),crt_sh 回到位次 3(进 auto/balanced 预算窗),
73
73
  # 故 cisa_kev 与 crt_sh 均从休眠台账撤账。
74
+ # 2026-11-11 接入 cisa_alerts:声明在 crt_sh 之后(位次 4)并由
75
+ # _VERTICAL_NEW_SOURCE 加槽扩容,crt_sh(位次 3)与 cisa_alerts(位次 4)
76
+ # 均在 auto/balanced 预算窗内,crt_sh 维持活跃,无需登记本台账。
74
77
  "dblp": "待接线:academic 位次 7",
75
78
  "docker_hub": "待接线:package_search 位次 4",
76
79
  "europepmc": "待接线:academic 位次 6;tech_deep 位次 5",
77
- "eurostat": "待接线:macro_data 位次 4",
80
+ # 2026-11-11 撤账:macro_data 里摘掉已停用的 nbs_stats 后,eurostat
81
+ # 从位次 4 前移到位次 3,进入 auto/balanced 预算窗,不再是位置性休眠。
78
82
  # 2026-09-20:weather_query 域快源前置——weather_cn(国内城市实况两步
79
83
  # 直连 0.46s)提到位次 3,weather(CLI 子进程 wttr/open-meteo 双源
80
84
  # 1.5-4.3s)顺延到 4。fast 档 budget=2 下 weather 不参与自动路由;
@@ -82,9 +86,10 @@ DORMANT_ALLOWLIST: dict[str, str] = {
82
86
  # 城市 wttr 语义无替代源,保留在本域 + fallback 链/显式 --engine 触达。
83
87
  "weather": "weather_query 位次 4(快源前置让位 weather_cn):海外城市仍主用,fast 档靠 fallback 链兜底",
84
88
  "fxtwitter": "social 域位次 6:社交引擎另有专用通道,待核实是否真休眠",
85
- "keenable": "待接线:english_tech 位次 4",
86
- "jikan": "anime_encyclopedia 位次 4:上游 /anime?q= 检索端点持续 504,"
87
- "spec enabled=false 暂停启用;恢复后改回 true 并接入加槽表",
89
+ # 2026-11-12 撤账:english_tech 前置 keenable(位次 3),激活为免 key 补位源,不再休眠。
90
+ # 2026-11-11 撤账:jikan 已停用(上游 /anime?q= 持续 504),
91
+ # anime_encyclopedia 的 combo 引用本次摘除。恢复启用时按加槽表重新接线,
92
+ # 而不是把它放回「位置性休眠」台账。
88
93
  # 2026-09-19:local_pubmed 从本台账**撤销**——它此前不只是「位置性休眠」,
89
94
  # 而是根本不工作(请求被注入 format=json 而 NCBI 返回 400;output_map 又把
90
95
  # title/url/summary 全指向 pmid,且 esearch 的 idlist 是字符串数组、解析器
@@ -120,6 +125,12 @@ DORMANT_ALLOWLIST: dict[str, str] = {
120
125
  # local_pubmed 同属「开放获取全文」层,能力重叠,故让位给独特性更高的
121
126
  # cnii(本域唯一亚洲学术源);deep/research 与恢复链仍可达。
122
127
  "core": "academic 位次 8:让位 cnii(加槽 cap 取舍),与 local_pubmed 能力重叠,deep/research 可达",
128
+ # 2026-11-15:openaire 收编进 academic 尾部(位次 16,此前唯一入口是
129
+ # --engine)。加槽表已满(local_pubmed/cnii/hf_papers 共 3 槽,extra
130
+ # cap=4),排尾部不挤既有位次:auto/balanced 预算窗(base 3 + 4 = 7)
131
+ # 外,deep/research 与恢复链可达。与 openalex/hal/doaj 同属开放学术
132
+ # 聚合层,EU 开放科学口径(项目/数据集/软件产出)有差异化增量。
133
+ "openaire": "academic 位次 16:加槽 cap 已满排尾部,deep/research 可达",
123
134
  # mojeek 原登记在此(semantic_discovery 位次 8),2026-11-10 前移到第 3 位
124
135
  # 后落进基础预算,已撤账——保留注释记录这笔账的来龙去脉。
125
136
  "so": "chinese_general 位次 8:新增观察期(9044621),待可用性数据",
@@ -146,22 +157,25 @@ DORMANT_ALLOWLIST: dict[str, str] = {
146
157
  # 自动路由(评测 fe03 实测它作为 general_search 主源出结果),不再是位置性休眠
147
158
  "tavily": "semantic_discovery 位次 11(budget=3+加槽4=7,位次 8+ 不参与自动路由)",
148
159
  "firecrawl": "semantic_discovery 位次 12(budget=3+加槽4=7,位次 8+ 不参与自动路由)",
149
- "brave": "semantic_discovery 位次 13(budget=3+加槽4=7,位次 8+ 不参与自动路由)",
150
- "felo": "semantic_discovery 位次 14(budget=3+加槽4=7,位次 8+ 不参与自动路由)",
151
- "searxng": "semantic_discovery 位次 15(budget=3+加槽4=7,位次 8+ 不参与自动路由)",
160
+ # 2026-11-11 撤账:brave / felo / searxng 是已停用源却仍挂在
161
+ # semantic_discovery 的 combo 尾部(位次 13/14/15),本次连同另外四处
162
+ # 悬空引用一起从 config.yaml 摘除。它们不再出现在任何域里,也就不再是
163
+ # 「位置性休眠」,而是「已停用」,由 --list-engines --detail 的 disabled
164
+ # 口径管理。tests/test_p0_dangling_combo.py 拦截这类引用复发。
152
165
  # social 域(社交引擎另有专用通道)
153
166
  "hatena_bookmark": "social 域位次 10:社交引擎另有专用通道,待核实是否真休眠",
154
167
  "qiita": "social 域位次 11:社交引擎另有专用通道,待核实是否真休眠",
155
168
  # 其它域(均为位次超预算窗口)
156
169
  "devto": "cn_tech_community 位次 5(budget=2~3,位次 4+ 不参与自动路由)",
157
170
  "dnb": "book_search 位次 7(budget=2~3,位次 4+ 不参与自动路由)",
158
- "local_goodreads": "book_search 位次 9(budget=2~3,位次 4+ 不参与自动路由)",
171
+ # 2026-11-11 撤账:local_goodreads 已停用(enabled=false),book_search
172
+ # 的 combo 引用本次摘除,不再属于位置性休眠。
159
173
  "ndl": "book_search 位次 8(budget=2~3,位次 4+ 不参与自动路由)",
160
174
  "electricity_maps": "energy_grid 位次 4(budget=2~3,位次 4+ 不参与自动路由)",
161
175
  "eu_opendata": "law_text 位次 5(budget=2~3,位次 4+ 不参与自动路由)",
162
176
  "fr_opendata": "law_text 位次 6(budget=2~3,位次 4+ 不参与自动路由)",
163
177
  "gov_policy": "law_text 位次 7(budget=2~3,位次 4+ 不参与自动路由)",
164
- "europeana": "cn_encyclopedia 位次 4(budget=2~3,位次 4+ 不参与自动路由)",
178
+ # 2026-11-11 撤账:europeana 已停用,cn_encyclopedia 的 combo 引用本次摘除。
165
179
  "local_imdb": "film_search 位次 7(budget=2~3,位次 4+ 不参与自动路由)",
166
180
  "metaso": "chinese_general 位次 10(budget=2~3,位次 4+ 不参与自动路由)",
167
181
  "open_meteo": "weather_query 位次 5(budget=2~3,位次 4+ 不参与自动路由)",