Skip to content

Commit e142d37

Browse files
authored
Merge pull request #131 from QuantStrategyLab/codex/clarify-health-policy
fix: mark health policy evidence-only
2 parents ffc340b + 66cadcb commit e142d37

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

ops/quant-monitor/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ merge 或 deploy。成功记录策略劣化后,monitor 正常结束,不再
4242
因此健康卡片里的 `canary_eligible`
4343
`pause_request_pending_confirmation`**证据状态**,不是券商侧已执行的事实。
4444
只有日后接入并回传执行回执的预授权运行时,才能把暂停或 canary 推进标为已完成。
45+
当前 payload 的 policy mode 为 `evidence_only`:自动化仅限监控、工件校验和
46+
issue-only 研究任务,任何策略阶段、canary 或券商订单状态都不会被它自行改变。
4547

4648
| 变量 | 说明 |
4749
|------|------|

ops/quant-monitor/scripts/build_dashboard_snapshot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,9 @@ def build_payload(
303303
**counts,
304304
},
305305
"policy": {
306-
"mode": "read_only",
307-
"automatic_stages": ["research_backtest_only", "ai_monitored_candidate", "shadow_candidate"],
308-
"automatic_modes": ["bounded_canary_run"],
306+
"mode": "evidence_only",
307+
"automatic_stages": [],
308+
"automatic_modes": [],
309309
"human_gate_stages": ["live_candidate", "runtime_enabled"],
310310
"canary_requirements": ["预批准固定预算", "固定最长运行时间", "最大回撤熔断", "禁止自动加仓与加杠杆"],
311311
"machine_checks": [
@@ -314,7 +314,7 @@ def build_payload(
314314
"成本、OOS/WFA 与证据包(如已提供)",
315315
],
316316
"human_actions": ["批准正常 live", "批准提高资金/杠杆", "确认例外覆盖"],
317-
"notice": "研究、shadow、canary 可按固定规则自动推进;正常 live 与资金/杠杆变更必须人工确认。",
317+
"notice": "当前监控只自动生成研究与风险证据,不推进阶段、不运行 canary、不暂停券商订单;正常 live 与资金/杠杆变更必须人工确认。",
318318
},
319319
"strategies": strategies,
320320
}

ops/quant-monitor/tests/test_dashboard_snapshot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,15 @@ def test_redacts_untrusted_review_fields_and_keeps_missing_scores_null(self):
245245
self.assertNotIn("secret", strategy["review"])
246246
self.assertNotIn("token", strategy["review"]["validation"])
247247

248-
def test_policy_keeps_normal_live_as_human_gate(self):
248+
def test_policy_reports_evidence_only_until_runtime_is_bound(self):
249249
with tempfile.TemporaryDirectory() as tmp:
250250
payload = build_payload(health_file=Path(tmp) / "missing.json")
251251

252-
self.assertIn("bounded_canary_run", payload["policy"]["automatic_modes"])
252+
self.assertEqual(payload["policy"]["mode"], "evidence_only")
253+
self.assertEqual(payload["policy"]["automatic_stages"], [])
254+
self.assertEqual(payload["policy"]["automatic_modes"], [])
253255
self.assertEqual(payload["policy"]["human_gate_stages"], ["live_candidate", "runtime_enabled"])
256+
self.assertIn("不暂停券商订单", payload["policy"]["notice"])
254257

255258
def test_healthy_live_candidate_still_waits_for_human(self):
256259
with tempfile.TemporaryDirectory() as tmp:

0 commit comments

Comments
 (0)