feat(pipeline): todos 补「因子晋级评审候选」源——触点②另一半上板(assessable 且近窗 t≥REVIEW_T_GATE=2,与评审页下拉同门);待办板「N 件等你决策」与评审页待办同口径,修三矛盾②(评审页等五问/待办却 0 件) [vps] [no-doc]
This commit is contained in:
@@ -78,6 +78,11 @@ def _monthly_dir() -> str:
|
||||
os.path.join("reports", "factor_monthly"))
|
||||
|
||||
|
||||
# 因子晋级评审门:近窗 t≥2 才值得人评五问(与前端 PromotionReview 的
|
||||
# promotionFilter.REVIEW_T_GATE 同值镜像,改门须两处同改+spec 注记)
|
||||
REVIEW_T_GATE = 2.0
|
||||
|
||||
|
||||
def _replay_view(doc: dict | None) -> dict:
|
||||
"""verdict_replay.json → 前端 replay 形状;无历史触发点 → 功课累积提示."""
|
||||
from sanguo_portfolio import verdict_records
|
||||
@@ -299,6 +304,29 @@ def todos() -> dict:
|
||||
"detail": f"周数 {weeks}/{shadow_total_weeks(e)}",
|
||||
"path": "/pipeline/incubation", "severity": "warn",
|
||||
"updatedAt": now})
|
||||
# ①′ 因子晋级评审候选(触点②另一半,10-08 补源):可判且近窗 t≥2
|
||||
# = 评审页下拉同门——待办板与评审页从此同口径,「N 件等你决策」说真话
|
||||
from sanguo_factor import version_registry as vr
|
||||
from sanguo_portfolio.strategy_registry import ensure_runtime_registry
|
||||
try:
|
||||
freg = vr.load_registry(ensure_runtime_registry(
|
||||
_factor_registry_path(),
|
||||
os.path.join("config", "factor_registry.yaml")))
|
||||
points, _ = _eval_latest_points()
|
||||
for fname, fe in freg["factors"].items():
|
||||
if fe.get("status") != "assessable":
|
||||
continue
|
||||
t = (points.get(fname) or {}).get("t")
|
||||
if t is None or t < REVIEW_T_GATE:
|
||||
continue
|
||||
items.append({"id": f"review-{fname}", "touchpoint": "promotion",
|
||||
"title": f"{fname} 待晋级评审(五问)",
|
||||
"detail": f"可判且近窗 t={t:.2f}≥{REVIEW_T_GATE:.0f},"
|
||||
"评审页等你判定",
|
||||
"path": "/pipeline/review", "severity": "warn",
|
||||
"updatedAt": now})
|
||||
except Exception: # noqa: BLE001 注册表/eval 库异常不拖垮待办聚合
|
||||
pass
|
||||
# ② 因子衰减告警+③ 集体水位(本机最新月度批评 JSON;最新有效 JSON,损坏跳过)
|
||||
from sanguo_factor.verdict_replay import load_latest_monthly
|
||||
rep = load_latest_monthly(_monthly_dir())
|
||||
|
||||
Reference in New Issue
Block a user