v7 mech-2: split scorecard into code/production/product tables
(cherry picked from commit 67b7f5e42d001b655aef3e04e1d3c1d98166b98f) Reconcile-port: handler_admin.py hunks redirected into cloud/server.py _audit_scorecard (target keeps 6-mixin split; scorecard module itself applied cleanly).
This commit is contained in:
1 parent
19fe4fc7e1
commit
f8a6a9d258
3 files changed
+526
-33
No files matched your search
@@ -8592,6 +8592,9 @@ pid 须为整数、address 须为字符串,否则 400(注册表里的
|
||||
证据传给 cloud/audit_scorecard.py 的 build_scorecard(),
|
||||
端点本身绝不从测试文件、摘要文档、PR 描述里拼凑分数。
|
||||
阈值仍为测试默认值(``test_default_unapproved``),未拍板。
|
||||
响应同时带 ``code`` / ``production`` / ``product`` 三个子对象
|
||||
(三张表拆分,见 cloud/audit_scorecard.py;示例证据下三表
|
||||
均为 not_pass,产品表因无真实产品轮证据而恒 not_pass)。
|
||||
"""
|
||||
try:
|
||||
from cloud.audit_scorecard import (
|
||||
@@ -8608,6 +8611,26 @@ pid 须为整数、address 须为字符串,否则 400(注册表里的
|
||||
"evidence_as_of": "2026-10-31",
|
||||
"evidence_kind": "historical_example_snapshot",
|
||||
"not_current_system_score": True,
|
||||
# 三张表兜底形状:模块不可用时三表均为 not_pass。
|
||||
"code": {"dimensions": [], "average_score": None,
|
||||
"average_is_not_pass_criterion": True,
|
||||
"overall": "not_pass", "overall_pass": False,
|
||||
"missing_items": ["audit_scorecard_module_unavailable"],
|
||||
"untested_items": []},
|
||||
"production": {"dimensions": [], "average_score": None,
|
||||
"average_is_not_pass_criterion": True,
|
||||
"overall": "not_pass", "overall_pass": False,
|
||||
"missing_items": ["audit_scorecard_module_unavailable"],
|
||||
"untested_items": [],
|
||||
"user_side_items": [],
|
||||
"user_side_pending": [],
|
||||
"user_side_blocked": False},
|
||||
"product": {"dimensions": [], "average_score": None,
|
||||
"average_is_not_pass_criterion": True,
|
||||
"overall": "not_pass", "overall_pass": False,
|
||||
"missing_items": ["audit_scorecard_module_unavailable"],
|
||||
"untested_items": [],
|
||||
"product_gate_passed": False},
|
||||
}
|
||||
self._send_json(200, report)
|
||||
|
||||
|
||||
Reference in new issue
Block a user