目录文档-技术白皮书51-管线卡 Template v1.0

第6章 阶段定义与控制式(Stage Specs)


I. 目的与范围(Purpose & Scope)


II. 前置条件与输入(Prerequisites & Inputs)


III. 阶段结构(Stage Structure)


IV. 控制式与规则(Control Equations & Rules)

  1. 括号与优先级:任何含除号/积分/复合算符的表达必须加括号;ln/exp/conv 函数式书写。
  2. 量纲闭合:控制式需通过 I70-dim_check;随附 check_dim_report.json;p_dim = 1.0 为发布前置。
  3. 路径积分口径(两种等价)
    • T_arr = ( 1 / c_ref ) * ( ∫ n_eff d ell )
    • T_arr = ( ∫ ( n_eff / c_ref ) d ell )
      相位:Phi = ( 2π / λ_ref ) * ( ∫ n_eff d ell )。
  4. 对齐顺序:时间对齐 → 路径对齐(gamma_ell/d_ell/n_eff 同步)→ 相位对齐(参考窗)。
  5. UQ 耦合:若阶段输出参与不确定度传播,提供 J=∂f/∂x|_{x̂} 与 Σ=Cov(x) 的来源(见误差预算卡 Ch.5/Ch.6)。

V. 质量门与停止(Gates & Stops)


VI. 错误语义与补偿(Errors & Compensation)


VII. 幂等、重试与回放(Idempotency, Retry & Replay)


VIII. 监控与指标(Monitoring & KPIs)


IX. 机读示例(Machine-Readable Examples)
A. 阶段规格 stage.yaml

version: "1.0.0"

stage:

id: "stage-30-arrival"

owner: "ptn.core"

inputs:

- "path.gamma_ell" # m

- "path.d_ell" # m

- "medium.n_eff_profile" # 1

- "ref.c_ref" # m/s

outputs:

- "obs.T_arr" # s

control:

form: "T_arr = ∫ ( n_eff / c_ref ) d ell"

delta_form: "general"

assumptions: ["paraxial","coherence_window"]

quality_gates: ["G1","G2","G3","G4","G5","G6","G7","G8"]

error_map:

E_INPUT: "reject_or_fix_contract"

E_DIM: "rollback_checkpoint"

E_GATE: "branch_or_degrade"

E_SYNC: "fallback_ptp_ntp"

E_UQ: "robust_surrogate_or_reject"

E_INTERNAL:"retry_then_alert"

idempotency_key: "run_id+partition+window"

retry_policy: { max_retries: 3, backoff: "exp", deadline: "10m" }

checkpoint: true

see:

- "EFT.WP.Core.Equations v1.1:S20-1"

- "EFT.WP.Core.Metrology v1.0:check_dim"

B. 控制式—相位阶段 stage-40-phase.yaml

version: "1.0.0"

stage:

id: "stage-40-phase"

inputs: ["path.gamma_ell","path.d_ell","medium.n_eff_profile","ref.lambda_ref"]

outputs: ["obs.Phi"]

control:

form: "Phi = ( 2π / lambda_ref ) * ∫ n_eff d ell"

delta_form: "factored"

quality_gates: ["G1","G3","G4","G6","G7"]

see:

- "EFT.WP.Core.Equations v1.1:S21-2"


C. 验证报告 validate_report.json

JSON json
{
  "stage_id": "stage-30-arrival",
  "gates": {
    "G1": true,
    "G2": 0.94,
    "G3": true,
    "G4": true,
    "G5": true,
    "G6": true,
    "G7": true,
    "G8": true
  },
  "stops_triggered": [  ]
}

X. 反例与修正(Anti-Patterns & Fixes)


XI. 发布与目录结构(Release & Layout)

PTN_EXPORT/

stages/

stage-30-arrival.yaml

stage-40-phase.yaml

reports/

check_dim_report.json

validate_report.json

audit.jsonl

figs/

stage_dag.svg

path_alignment.pdf

report_manifest.yaml

SIGNATURE.asc


XII. 交叉引用(Cross-References)


XIII. 执行勾选清单(Checklist)


版权与许可(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/