目录文档-技术白皮书(V5.05)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):在注明作者与来源的前提下,允许复制、转载、节选、改编与再分发。
署名格式(建议):作者:屠广林|作品:《能量丝理论》|来源:energyfilament.org|许可证:CC BY 4.0
验证召集: 作者独立自费、无雇主无资助;下一阶段将优先在最愿意公开讨论、公开复现、公开挑错的环境中推进落地,不限国家。欢迎各国媒体与同行抓住窗口组织验证,并与我们联系。
版本信息: 首次发布:2025-11-11 | 当前版本:v6.0+5.05