跳转到内容

RFC-0007:Lane F Field capability 与生产边界

状态:Accepted(0.3 namespace integration) 日期:2026-08-31 适用版本:Aira Interface/Core 0.3.0、AMIR 0.3.0、amir.ops/0.3.0、Field IR 0.2.0 前置证据:Lane F 研究基线

2026-09-14 对齐:本文早期版本迁移、兼容 fixture 与历史 Gate 描述仅保留原设计依据,不是当前实现或待办。当前项目仅维护单一契约,按产品宪法 §10及工作进度执行;不恢复迁移器或已删除测试。

Lane F 以工业隐式(晶格、gyroid/TPMS、平滑连接)为产品假设。Field 不通过独立执行逃逸口进入 系统,而是作为 AMIR 的一种权威表示,由既有九元 Meta-operation 完成发现、Patch、预览、验证和提交。

本 RFC 冻结以下决策:

  1. Field authoring 使用新的 AMIR 0.3.0 与 amir.ops/0.3.0;AMIR 0.1.0 Mesh-only 与 Phase 1 Exact 0.2.0 合同逐字节保留,均不得承载 Field operation;
  2. 输出端口是显式表示 union。Field3D 端口必须声明 fieldKind,不能只靠 descriptor 文本或 evaluator 推测;
  3. 首批 protocol capability 是 TPMS/gyroid、beam-graph lattice、smooth union 与 Field→Mesh;具体 runtime 可以只发布其真实支持的子集;
  4. Runtime Snapshot 明示 Field evaluator/mesher build、kind、profile 与资源上限;Session Grant 可以 进一步收紧 representation、profile 和 cell budget;
  5. Field3D source artifact 与 MeshSolid target artifact 分开定址。转换证据绑定两者,不覆盖源 Field 身份;
  6. 基础产品 profile 允许几何误差和 isotopy 为 unknown,但必须显式记录。只有 Lane R 已关闭的 claim 才能进入 certified profile;
  7. GPU 只可用于 preview,不能产生 authoritative validation token。
文档版本 Operation catalog 允许的表示与 operation
0.1.0 amir.ops/0.1.0 现有 Mesh-only 子集
0.2.0 amir.ops/0.2.0 Mesh 子集加 Phase 1 Sketch2D/Profile2D/ExactSolid
0.3.0 amir.ops/0.3.0 完整保留 0.2 Exact surface,并增加本 RFC 的 Field/转换子集

解析器可以同时读取三版,但 authoring runtime 只能提交与其 active authoring lock 一致的版本。0.2→0.3 迁移只更新协议身份和 revision migration record;它不得改变既有 Exact/Mesh 几何参数、节点依赖或表示, 因此迁移前后的既有几何投影应相同,但 modelHash 因 amirVersion 是语义字段而改变。

工业 Field IR 不再原地改写 https://aira.local/schema/field-ir.schema.json。spike-local 0.1.0 保持历史 身份;Lane F 使用新的公开 https://schemas.aira.dev/field/0.2/field-ir.schema.json。这是 contracts/spike 晋升边界,而不是把实验 $id 偷换成生产身份。

PortDefinition 是以下闭合 union:

  • MeshSolid;
  • ExactSolid(协议保留,本 Lane 不启用 evaluator);
  • Field3D,并带 fieldKind = TrueSDF | ConservativeDistance | GeneralImplicit。

所有具体 operation 的静态检查都必须核验端口名、表示类型和 Field kind 下界。Field kind 的降级必须由 operation contract 决定,不能由 backend 在运行时静默更改。

Capability Operation 输入摘要 输出 F1 runtime 状态
cap:model.field.gyroid@1 field.gyroid@1.0.0 period、level、band、finite size、closure、rigid transform Field3D<GeneralImplicit> protocol-only
cap:model.field.beamLattice@1 field.beamLattice@1.0.0 canonical beam graph、closure Field3D<GeneralImplicit> protocol-only
cap:model.field.smoothUnion@1 field.smoothUnion@1.0.0 two Field ports、blend radius Field3D<GeneralImplicit> protocol-only
cap:model.field.mesh@1 convert.fieldToMesh@1.0.0 Field port、cell size/cell budget、named profile MeshSolid protocol-only

protocol-only 表示 descriptor/contract 可被离线校验,但 F1 Runtime Snapshot 不把 operation 放入 supportedOperationRefs。catalog.search 只返回当前 Snapshot 与 Grant 均可用的 capability;对显式 catalog.describe 请求返回 CAPABILITY_NOT_AVAILABLE。F2/F3 逐项通过 Gate 后才启用对应 operation。

首版采用各向同性 period 和有限、轴对齐 material domain。输入包括:

  • period: Length > 0;
  • level: Real 与 bandHalfWidth: Ratio > 0;
  • sizeX/sizeY/sizeZ: Length > 0;
  • closurePolicy: FieldClosurePolicy;
  • transform: Transform3D,只接受刚体。

解析场使用 Length 归一化,但不是 True SDF。bandHalfWidth 是 dimensionless level band,不得在 UI 或 export certificate 中改写为精确壁厚。

输入 BeamGraph3D 是 canonical literal:稳定 vertex/edge ID、mm 坐标、圆截面半径和无悬空引用。它保留 直接映射 3MF Beam Lattice 的 provenance。F2 在完整 graph validator 与 bounded material domain 就绪前 不启用 runtime。

输入必须是两个 Field3D port 与正的 Length blend radius。首版无条件输出 Field3D<GeneralImplicit>;即使输入是 TrueSDF 也不得保留该标签。

转换是显式派生,不切换源 Body 的 authority。输入包括有限 domain 已绑定的 Field、正的 max cell size、 正的 max cell count 和具名 FieldMeshProfile。输出只在 topology Gate 通过后成为 MeshSolid。

standard profile 的含义是资源有界、deterministic、闭合定向 2-manifold 检查;它不声称 Hausdorff、 self-intersection 或 isotopy。certified-isotopy 必须在 Lane R 对具体输入关闭所需义务且 assurance graph 绑定证据后才可用;不得回退为 standard 后保留 certified 名称。

有 Field operation 的 Snapshot 必须包含:

  • evaluator build 与 mesher build;
  • supported Field kinds;
  • supported authoritative profiles;
  • maxFieldNodes、maxFieldDepth 与 maxFieldCells;
  • activationState = protocolOnly | production。

Grant 可以用 allowedRepresentations、allowedFieldProfiles 与 maxFieldCells 收紧 Snapshot。执行端按 两者交集判定;越权或超预算在 Patch/plan 边界返回 typed diagnostic,不能进入 WASM 后才失败。

每个 committed Field output 产生 representation-local Field3D artifact,至少绑定:

  • Field IR content ID 与 contract hash;
  • Revision/model/authoring lock;
  • Evaluation 与 ExecutionManifest;
  • Field node provenance 与 continuous Region identity。

Field→Mesh 新建 target artifact 和 translation evidence。证书 precondition graph 至少记录 schema/contract、 finite domain、kind/gradient eligibility、requested resource budget、实际 sampler/mesher build、mesh topology, 以及仍为 unknown 的 geometric error、Hausdorff、self-intersection 和 isotopy。Region 不被重命名为 sampled cell 或 mesh Face;没有来源证据时不得为 triangle 编造 Field face provenance。

Lane F 向 Lane R 提供 immutable Field IR、domain、regularity/interval evidence、sampling policy 与 artifact hash。Lane R 返回按 claim 拆分的 assurance node。F1/F2 不依赖 Lane R;F3 standard profile 与 F5 格式 conformance 也不依赖。只有 certified-isotopy profile 消费 Lane R 已关闭的具体 claim。

当前 certified Lane R companion proof matrix 为 18 satisfied / 0 blocked / 0 out-of-scope:在发布的 Field IR 0.2 smooth subset 内,具体结果可获得 isotopy/self-intersection、数值 Hausdorff 上界与 adaptive-octree claim。但这不会把所有 Field 自动升级为 certified。静态 F3 manifest 继续 standard-only;只有满足版本化 constructor 前提且经 independent checker 重放的具体证书,才返回 certificate-bound certified-isotopy snapshot/grant。hard min/max CSG、任意 affine transform、未列入的 primitive 或未满足预算/证明前提的输入仍拒绝。

F1 关闭条件:

  1. 本 RFC Accepted;
  2. schema/generated types 表达 AMIR/Core 0.3、公开 Field IR 0.2、表示 union、Field kind、Snapshot/Grant 限制;
  3. 四个 capability contract 可验证,并有 supported/unsupported 与 Grant deny corpus;
  4. AMIR 0.1 Mesh-only 与 Exact 0.2 corpus 零回归,0.1/0.2 Field mutation 均被拒绝;
  5. 一个 0.3 Field Patch 可通过 decode/apply/static validation;protocol-only runtime 必须在执行前拒绝;
  6. ArtifactGraph/translation 既有 mutation tests 保持通过;
  7. F2/F3 未通过前不启用 production Field。

F2、F3、F4、F5 分别负责 IR 实现、production evaluator/mesher、浏览器产品闭环和出口,不能用本 RFC 通过替代后续 Gate。

0.3 namespace integration 已关闭上述 F1 条件:冻结合同字节、0.2→0.3 迁移 fixture、11-operation catalog lock、Rust strict decoder/validator/transaction、浏览器 WASM transaction 与 Field IR 晋升边界均 可重放。原 F1–F5 报告作为独立轨历史收据保留,其 AMIR 0.2 身份不再作为当前合同解释。

  • 验证记录
  • 机器报告