目录 / 文档-技术白皮书 / 56-报告级方法附录 Template v1.0
I. 章节目标与范围(强制)
- 定义风险分级—触发器—回滚路径—边界与非目标的统一规则,使方法条目在异常情形下可快速决策、可审计、可复原。
- 与第8章(评测协议与指标)、第9章(不确定度与统计检验)、第10章(消融与敏感性)、第11章(实现绑定)、第12章(可复现性与工件导出)对齐。
II. 风险分级(L1–L4,强制)
- L1 轻微:局部指标波动,短窗内自愈;不影响门禁判定。
- L2 中等:单一子系统/区域受影响;SLO 接近阈值;需人工干预。
- L3 严重:多子系统/跨区域受影响;硬门禁可能失效;需限流/降级或回滚。
- L4 致命:安全/合规或核心功能失效;立即停用/全量回滚并外部通告。
III. 触发器与检测(强制)
- 命名统一:<trigger> := <metric><comparator><threshold>@<window>。
- 最小触发器集:
- t_accuracy_low := gate_accuracy<0.98@7d
- t_latency_high := gate_latency>2h@7d
- t_compat_break := compat_rate<0.99@replay
- t_incident := incident_level>=2@24h
- t_drift := data_drift>0.03@14d
- 策略:instant / consecutive-k / moving_avg;触发后进入处置决策树。
IV. 回滚入口与决策树(强制)
- 判定级别:基于触发器与影响面,确定 L1–L4。
- 隔离性评估:可局部隔离则优先局部回滚,否则进入全量热/冷回滚。
- 执行序列:冻结写入 → 切换版本/特性开关 → 恢复快照(参数/模型/契约)→ 复原验证 → 窗口观察 → 解冻/放量。
- 复盘:生成 RollbackReport,记录复原门禁与再上线条件。
V. 到达时口径与边界(强制)
- 统一口径:
- 常量外提:T_arr = ( 1 / c_ref ) * ( ∫ n_eff d ell )
- 一般口径:T_arr = ( ∫ ( n_eff / c_ref ) d ell )
- 同段显式给出路径 gamma(ell) 与测度 d ell;check_dim=true。当 c_ref 剧烈波动时,仅使用一般口径判定门禁。
- 例外条款:若临时采用外提式,需在记录单写明适用域、期限与复评门禁。
VI. 复原验证与通过线(强制)
- 复原门禁(示例):
- gate_accuracy>=0.99@24h
- gate_latency<=2h@24h
- compat_rate>=0.995@replay
- gate_error_rate<=1e-3@24h
- 证据:数据来源、统计方法、CI_95%、脚本定位 script@commit、工件哈希。
VII. 非目标与边界项(强制)
- 非目标:组织人事流程、预算审批、法律解释。
- 边界:不涵盖长期路线争议与超出数据/契约范围的推断;此类应转交上位卷处理。
VIII. 人读 × 机读映射(强制)
人读段落 | 机读字段 | 校核要点 |
|---|---|---|
风险分级 | risk.levels.* | L1–L4 定义与处置一致 |
触发器 | triggers[].{name,rule,policy} | 表达式合法、策略明确 |
回滚入口/流程 | rollback_plan.* | 冻结→切换→恢复→验证→观察闭环 |
复原门禁 | success_gates[] | 全为硬门禁、可回放 |
到达时口径 | arrival_time.caliber.*, math.check_dim | 两口径+路径/测度+量纲 |
审计要素 | audit_trail.record[] | 证据可追溯、字段完整 |
IX. 字段与约束清单(可直接拷贝)
字段路径 | 类型 | 必填 | 约束 |
|---|---|---|---|
risk.levels.{L1..L4} | obj | 是 | 影响面/动作/通告 |
triggers[].rule | string | 是 | `^gate_[a-z0-9_]+(>= |
triggers[].policy | enum/obj | 是 | `instant |
rollback_plan.type[] | list | 是 | `hot |
rollback_plan.freeze_io | bool | 是 | 冻结写入 |
rollback_plan.steps[] | list | 是 | 可执行步骤 |
success_gates[] | list | 是 | 复原硬门禁 |
arrival_time.caliber.forms[] | list | 若含 T_arr 必填 | 两口径并列 |
arrival_time.caliber.path/measure | string | 若含 T_arr 必填 | gamma(ell)/d ell |
math.check_dim | bool | 若含 T_arr 必填 | true |
audit_trail.record[] | list | 是 | timestamp/actor/.../artifact_hash |
communication.* | obj | 建议 | 内外通告策略 |
X. 机读 Schema(YAML;JSON 等价,强制)
risk:
levels:
L1: { impact: "localized", action: "monitor", notify: ["oncall"] }
L2: { impact: "single-subsystem", action: "partial_rollback", notify: ["oncall","owner"] }
L3: { impact: "multi-subsystem/global", action: "full_rollback", notify: ["oncall","owner","release_mgr"] }
L4: { impact: "safety/compliance", action: "emergency_shutdown", notify: ["exec","legal","pr"] }
triggers:
- name: "t_accuracy_low"
rule: "gate_accuracy<0.98@7d"
policy: { mode: "consecutive", k: 2 }
- name: "t_latency_high"
rule: "gate_latency>2h@7d"
policy: { mode: "instant" }
- name: "t_compat_break"
rule: "compat_rate<0.99@replay"
policy: { mode: "instant" }
- name: "t_incident"
rule: "incident_level>=2@24h"
policy: { mode: "moving_avg", window: "24h" }
- name: "t_drift"
rule: "data_drift>0.03@14d"
policy: { mode: "instant" }
rollback_plan:
type: ["hot","partial"]
freeze_io: true
steps:
- "switch_traffic: release-stable"
- "restore_snapshot: schema@v2.2"
- "run_suite: restoration_smoke"
- "run_suite: restoration_regression"
- "observe: 24h"
artifacts:
snapshots: ["params@sha256:…","schema@v2.2","model@a1b2c3"]
scripts: ["restore.py@d4e5f6","smoke.sh@a1b2c3","regress.py@9f8e7d"]
success_gates:
- "gate_accuracy>=0.99@24h"
- "gate_latency<=2h@24h"
- "compat_rate>=0.995@replay"
- "gate_error_rate<=1e-3@24h"
arrival_time:
caliber:
forms:
- { name: "general", expr: "( ∫ ( n_eff / c_ref ) d ell )" }
- { name: "factored", expr: "( 1 / c_ref ) * ( ∫ n_eff d ell )" }
path: "gamma(ell)"
measure: "d ell"
check_dim: true
audit_trail:
record:
- "timestamp"
- "actor"
- "risk_level"
- "trigger"
- "action"
- "evidence_hash"
- "notes"
communication:
internal: ["oncall","owner","auditor","release_mgr"]
external: { policy: "as_needed", channels: ["status_page","mailing_list"] }
XI. 最小样稿(人读摘要 × 机读片段,强制)
- 人读摘要:检测到 t_accuracy_low 与 t_compat_break,判定 L3;执行热回滚 + 数据快照恢复;复原门禁全部通过(gate_accuracy>=0.99@24h、compat_rate>=0.995@replay)。
- 机读片段:
risk: { current_level: "L3", reason: ["t_accuracy_low","t_compat_break"] }
rollback_plan: { type: ["hot","data"], freeze_io: true }
success_gates: ["gate_accuracy>=0.99@24h","compat_rate>=0.995@replay"]
XII. 校验规则(正则/一致性,强制)
- 触发器表达:^gate_[a-z0-9_]+(>=|<=|==)[^@\s]+@[^@\s]+$ 或等价;incident_level、data_drift 接受同口径。
- 回滚步骤:rollback_plan.steps[] 非空且可执行;freeze_io=true 时必须包含“恢复验证”与“观察”。
- 到达时:若出现 T_arr,arrival_time.caliber.path/measure 必填,math.check_dim=true。
- 审计:audit_trail.record[] 字段齐全;如有对外通告,communication.external.* 必填。
XIII. 引用与交叉引用体例(强制)
;所有 EFT.WP.* 引用须显式版本与锚点,并在 references.see[] 提供机读清单。“见《<卷名> vX.Y》Ch.x S/P/M/I…”固定写法:版权与许可(CC BY 4.0)
版权声明:除另有说明外,《能量丝理论》(含文本、图表、插图、符号与公式)的著作权由作者(“屠广林”先生)享有。
许可方式:本作品采用 Creative Commons 署名 4.0 国际许可协议(CC BY 4.0)进行许可;在注明作者与来源的前提下,允许为商业或非商业目的进行复制、转载、节选、改编与再分发。
署名格式(建议):作者:“屠广林”;作品:《能量丝理论》;来源:energyfilament.org;许可证:CC BY 4.0。
首次发布: 2025-11-11|当前版本:v5.1
协议链接:https://creativecommons.org/licenses/by/4.0/