跳转到内容

RFC-0009:Phase 1 Exact Revolve Operation Module

字段 值
状态 Accepted — contract/product Gate 通过;production activation 独立裁决
文档版本 0.2.0
日期 2026-08-31
决策范围 exact.revolve@1.0.0、AMIR/Core 0.4 首个 Operation Module、SemanticRef survival、产品 Gate 与独立激活边界
上位路线 Aira 长期架构计划 Phase 1
架构依赖 ADR-CORE-002、RFC-0006、RFC-0008

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

Phase 1 首个模块化工业 authoring capability 选择并验收:

exact.revolve@1.0.0
cap:model.exact.revolve@1

它是 AMIR/Core 0.4 模块化信封的首个证明模块,不修改 Exact 0.2 或 Field 0.3。顶层仍使用九元 Aira Interface;AI 通过 catalog.search/describe 获得完整 module-derived contract,再用 model.proposePatch → preview → validate → commit 操作 task branch。

Revolve 先于 fillet:它复用已验证的 Profile2D→ExactSolid 与事务/证据管线,可以独立验证 Operation Module; fillet 需要稳定 edge SemanticRef 选择与 selector evolution,必须在 edge read profile 独立 Gate 后进入,不能 与本 RFC 捆绑。

名称 类型 Binding 约束
profile Profile2D port 同一 Evaluation DAG 可达、simple、正向、有效区域
axis Axis3D literal 与 profile plane 共面、方向非零、canonical normalized
angle Angle literal / parameter 0 < angle <= 2π,canonical unit 为 rad 或 deg

轴方向采用 Aira 右手坐标系;正角按右手法则。v1 禁止负角、多周旋转、helical pitch、thin feature、 自交 profile 和跨平面 axis。方向由 axis 明示,不用负角暗示。

axis 可以与 profile 边界相接,但不得穿过 profile interior。共面和相交判断使用锁定 tolerance profile; 接触轴产生的退化/seam topology 必须被 adapter 与 checker 明确报告,不能靠视觉结果接受。

名称 类型 Role
solid ExactSolid body.main

完整 2π 旋转不产生 authoring cap faces;部分旋转必须产生 cap.start 与 cap.end。每个 profile boundary role 通过 direct OCCT history 产生 side(profile-role) 候选集合。seam edge 是 evaluator topology,不自动成为 稳定 authoring role。

稳定 Diagnostic code:

Code 含义 可恢复动作
REVOLVE_PROFILE_INVALID Profile2D 缺失、非 simple 或方向错误 修复上游 sketch/profile
REVOLVE_AXIS_INVALID axis 非有限、非归一或退化 提供合法 canonical Axis3D
REVOLVE_AXIS_NOT_COPLANAR axis 与 profile plane 不共面 投影/重建轴,需用户或 AI 明示
REVOLVE_AXIS_INTERSECTS_INTERIOR axis 穿过 profile interior 移轴或修改 profile
REVOLVE_ANGLE_OUT_OF_RANGE angle 不在 (0,2π] 收窄到合法范围
REVOLVE_SELF_INTERSECTION sweep 自交或产生不可接受拓扑 减小角度或修改 profile/axis
REVOLVE_RESULT_NOT_SOLID OCCT 未产生 valid closed solid 不发布,返回内核与 checker 证据
REVOLVE_HISTORY_INCOMPLETE 结果 face 无完整来源映射 不发布,不按 face index 猜测

Diagnostic 的 at 必须定位 Node/input/parameter/SemanticRef;fixes 只能是受限 typed Patch proposal,不能 直接修改用户 head。

module 固定:

  • moduleId = aira.op/exact.revolve@1.0.0;
  • operationRef = exact.revolve@1.0.0;
  • capability cap:model.exact.revolve@1;
  • node schema/hash、applicability、roles、diagnostic codes 与 assurance requirements;
  • evaluator profile aira.eval.exact.revolve/1.0.0;
  • naming algorithm aira.semantic-ref.exact-revolve/1.0.0。

module 不记录 BRepPrimAPI_MakeRevol、C++ symbol、WASM export 或 worker 文件名。runtime adapter manifest 单独把 evaluator profile 绑定到经过验证的实现与 artifact hash;更换实现不能改变 authoring semantics。

实现使用真实 OCCT revolve,并消费上游 materialized face/profile。发布前至少证明:

  1. Build 完成且产生单一 ExactSolid;
  2. B-Rep serialization/content hash 确定;
  3. valid、closed、positive-volume;
  4. bounds 与 axis/angle/profile 一致;
  5. Generated/Modified/IsDeleted history 覆盖全部结果 face;
  6. full/partial angle 的条件性 cap role 正确;
  7. Exact→Mesh translation、Manifold closed/oriented 检查与 RenderPacket 成功;
  8. certificate、ArtifactGraph、SemanticRef snapshot 与 task Revision binding 一致。

OCCT history 是 kernel-derived evidence,不能自签最终正确。required checker 为 fail/unknown 时用户 head 不移动。

至少覆盖:

  1. partial→partial angle edit:side 与两 cap role 均确定生存;
  2. 2π → partial:side 生存,新 cap 只在 target 出现;
  3. partial→2π:side 生存,旧 cap 明确 missing;
  4. profile width/height 参数变化:期望 side role 确定解析;
  5. axis 平移但不跨 profile:按 authoring policy 返回 resolved 或 explicit changed-kind,不静默沿用;
  6. axis 接触/离开边界导致 seam/degenerate topology 改变;
  7. axis 穿越 interior、角度非法、history 不完整与证据 tamper fail closed;
  8. split/merge/delete 候选全集保留,exactly-one 不满足时 ambiguous/missing。

所有 resolveAcross 继续返回集合;任何 face index、遍历顺序、pointer 或 triangulation index 均不进入 SemanticRef。

catalog.describe(cap:model.exact.revolve@1) 必须一次返回:

  • 完整 module/schema/catalog hash binding;
  • profile/axis/angle 输入及 canonical 编码;
  • applicability 与稳定 Diagnostic codes;
  • full/partial angle 的条件性 roles;
  • required evidence/checker 与不可发布状态;
  • 至少一个合法示例和关键负例。

小目录可内联该完整合同;大目录由 search→describe 按需获取。合法性由 module validator、Task Capsule、 Grant 和 runtime 强制,不由 prompt/examples 强制。

  1. ADR-CORE-002 的 0.4 module/catalog/core contract Gate 全部通过;
  2. 旧 0.1/0.2/0.3 bytes 与历史治理收据不变;
  3. TypeScript 与 Rust 对 module、Node、migration、hash 和负例 corpus 一致;
  4. OCCT full/partial revolve、history、B-Rep 与 independent checker 真实执行;
  5. parameter edit、cancel、stale CAS、kernel fail、checker fail、history incomplete、tamper 零用户 publication;
  6. SemanticRef corpus 零 silent wrong rebind;
  7. IndexedDB reopen 重放同一 Revision/module/catalog/evidence identity;
  8. Google Chrome 通过原生九元接口完成 create、angle edit、read-back、reopen 与 Three.js 显示,console 0;
  9. fresh checkout 可复现 contract、kernel、browser evidence;
  10. provider 调用为 0。

上述十项现已全部关闭,RFC 因而进入 Accepted。Accepted 表示 canonical module、AMIR/Core 0.4 模块化边界、真实内核实现和浏览器产品闭环已经成立;它不等价于默认生产激活。本 Gate 的收据明确记录 productionCapabilityEnabled=false,cap:model.exact.revolve@1 在独立 activation 变更完成前仍不得进入 默认 Runtime Snapshot 或 production capability search。

  • 不把 raw OCCT API 或任意 C++/JS eval 暴露给 AI;
  • 不把 exact.revolve 硬塞进冻结 amir-core-v0.2 或 v0.3 union;
  • 不用 $dynamicRef 冒充 module registry 或 trust policy;
  • 不顺带加入 fillet、chamfer、shell、sweep、loft、STEP direct edit 或 edge selector;
  • 不因浏览器显示正常就跳过 B-Rep/history/checker/SemanticRef Gate;
  • 不用“最新 module”解释历史 Revision。
  1. 固定 Operation Module、Catalog Snapshot 与 AMIR/Core 0.4 schema/hash;
  2. 建立 Exact 0.2 → 0.4 namespace-only/module-binding migration fixture;
  3. 实现 TypeScript/Rust 双端 module-aware validation 与 capability projection;
  4. 扩展 OCCT browser package/worker,关闭 full/partial revolve 本地 Gate;
  5. 接入 Candidate→preview→validate→commit→committed replay→CAS;
  6. 接入 SemanticRef definition/witness/snapshot/read profile;
  7. 关闭自动负例、IndexedDB reopen、真实 Chrome 与 fresh-checkout Gate;
  8. 更新 RFC 为 Accepted;默认 Exact 0.4 Runtime Snapshot 激活作为独立、可回滚的产品变更执行,不由 本 RFC 的验收状态自动触发。

2026-08-31 已完成:

  • AMIR/Core 0.4 module/catalog schema、canonical hash、TS/Rust 双端 validator 与迁移 fixture;
  • 46-binding sealed OCCT runtime 上的 270° partial revolve、完整 kernel history、Exact B-Rep、 ArtifactGraph、Exact→Mesh、Manifold 与 RenderPacket;
  • 六个 Exact face SemanticRef role 的 definition、snapshot、witness-set、跨 Revision resolution 与篡改拒绝;
  • 九元 Aira Interface 的 create、angle edit、read-back、reopen,以及 cancel、非法 axis、非法 angle、 snapshot tamper、checker fail、history incomplete 六项零 publication 负例;
  • Google Chrome 中可见 Three.js 结果、canvas 存在、console warning/error 为 0;
  • ad4a5bf detached fresh checkout:冻结离线安装 198/198、下载 0,注入两套逐字节匹配 sealed receipt 的 OCCT runtime 后完整 pnpm check 通过;323 项 JS/WASM 测试、45 项 Rust 测试和 production build 全通过;
  • provider 调用 0,production capability 未启用。

权威记录:

  • 验证报告
  • Chrome 机器收据
  • 当时的独立 sealed runtime 收据保留在该验证提交的不可变 Git 历史中;当前产品运行时见 核心内核运行时收据。