RFC-0012:Phase 1 Exact Chamfer Operation Module
| 项目 | 值 |
|---|---|
| 状态 | Accepted |
| 文档版本 | 1.0.0 |
| 创建/最后修改 | 2026-09-01 |
| Operation | exact.chamfer@1.0.0 |
| Module | aira.op/exact.chamfer@1.0.0 |
| Capability | cap:model.exact.chamfer@1 |
| Catalog Snapshot | aira.catalog/exact.phase1@0.4.2 |
| 依赖 | RFC-0006、RFC-0008、RFC-0010、RFC-0011、ADR-CORE-002 |
| Production activation | false |
1. 决策摘要
Section titled “1. 决策摘要”Aira 增加独立的 Exact Chamfer 候选能力:AI 以语义意图选择边,Core 将意图编译为 RFC-0010 的
canonical ExactEdgeSelectorSet,并只在 Revision、ArtifactGraph、ExactSolid artifact 与 read receipt
完全一致时执行等距对称倒角。该能力不是 raw OCCT API,不接受 edge/face index、Three.js object、隐式
support-face 顺序、角度模式、第二距离或由 AI 自报的稳定 ID。
本 RFC 当前为 Accepted。Operation Module、公共 node schema、不可变 catalog 0.4.2、
TypeScript/Rust 共享合同语料、AMIR 0.4 transaction strict boundary、真实 OCCT/history、独立
Exact→Mesh/Manifold Gate、operation-scoped Face SemanticRef survival、九元浏览器事务、IndexedDB reload 与
Google Chrome/Three.js identity read-back 已成立;committed fresh detached checkout 是剩余的 Accepted 前置
Gate 均已关闭。production activation 继续为 false。
2. 为什么 Chamfer 是下一项
Section titled “2. 为什么 Chamfer 是下一项”Fillet 已证明 receipt-bound edge selection 能驱动一个拓扑变化 feature。Chamfer 复用相同的稳定选择、 ExactSolid、OCCT history 与 ArtifactGraph 边界,但引入不同的工业语义和失败域:倒角距离、平面生成面、 相邻面裁切与等距/不等距模式区分。因此它能检验 Operation Module 是否真的可扩展,而不是只为 Fillet 写出的特例。
本阶段选择 Chamfer,而不是一次性暴露 sweep/loft/shell 或全部 OCCT surface,是为了遵守长期计划的 规则:每个 authoring operation 都必须有独立 capability、typed contract、诊断、SemanticRef corpus、 真实内核证据和 Chrome Gate。
3. 固定合同
Section titled “3. 固定合同”3.1 Node
Section titled “3.1 Node”exact.chamfer@1.0.0 只有三个输入:
solid:同一 evaluation DAG 中的一个有效、闭合ExactSolidport;edges:Core 已编译的ExactEdgeSelectorSetliteral,至少一项、最多 32 项;distance:正的 canonicalLengthliteral 或 parameter reference。
输出固定为 solid: ExactSolid / body.main。v1 不提供 angle、secondDistance、face-order、
propagateTangent、corner style 或 raw kernel option。新增不等距或 distance-angle 语义必须发布新的
operation/module 版本,不得静默扩宽 v1。
3.2 AI Intent 与 canonical node 分层
Section titled “3.2 AI Intent 与 canonical node 分层”AI-facing request 可使用 incident-semantic-refs 或 producer module 发布的 authoring role。Core 负责
canonical 排序、definition hash、selector ID、authoring witness 与 read receipt。持久 AMIR node 只保存
编译后的 selector definition;AI 不能直接填充 hash 来绕过编译或 receipt 验证。
这保持 Aira Interface 的原生原则:模型理解“对这些语义边做 2 mm 等距倒角”,而不是理解
BRepFilletAPI_MakeChamfer 的构造器、重载、对象生命周期或 OCCT 枚举。
3.3 v1 认证接受集
Section titled “3.3 v1 认证接受集”v1 只认证一个或多个互不重复、孤立、线性、凸的 Exact Edge,以及单一等距对称距离。每项 selector
必须在当前输入 Revision 中解析为 exactly one 且 publishable=true。执行器必须确认显式选择没有被
扩张为未请求的相切边链。
圆弧/样条边、相切链、非对称双距离、distance-angle、跨 body 选择与复杂多边交汇不是永久否决,但不在 v1 接受集中。
4. 执行与权威边界
Section titled “4. 执行与权威边界”执行器按以下顺序运行,任一步失败都不得发布部分 artifact:
- 验证 distance、Operation Module、node schema 与 catalog hash;
- 验证 RFC-0010 read result/receipt,确认其绑定输入 Revision、ArtifactGraph 与 ExactSolid artifact;
- 用 artifact-local stable sub-entity ID 反解真实
TopoDS_Edge,禁止 explorer index fallback; - 对每条显式边调用 OCCT 的等距重载
BRepFilletAPI_MakeChamfer::Add(distance, edge); - Build 后用
BRepCheck_Analyzer验证一个有效闭合 ExactSolid; - 读取
Modified/Generated/IsDeletedhistory,建立 source→chamfer ArtifactGraph; - 所有输出 face 都有 lineage 后才生成 result hash;否则销毁临时 shape 并失败关闭。
OCCT V8_0_1 的公开 API 同时提供 Add(distance, edge) 与需要 support face 的双距离重载;v1 固定前者,
避免将 face 参数顺序泄漏进权威合同。API 依据:
BRepFilletAPI_MakeChamfer reference。
Three.js 仍只消费派生 DisplayMesh/RenderPacket,不参与选择身份、B-Rep 验证、history 或 Revision hash。
5. Diagnostic 合同
Section titled “5. Diagnostic 合同”Module 锁定以下 evaluator 公开错误:
CHAMFER_SELECTION_EMPTY/CHAMFER_SELECTION_DUPLICATE_EDGE;CHAMFER_SELECTION_UNRESOLVED/CHAMFER_SELECTION_BINDING_MISMATCH;CHAMFER_EDGE_GEOMETRY_UNSUPPORTED/CHAMFER_TANGENT_PROPAGATION_UNSUPPORTED;CHAMFER_DISTANCE_OUT_OF_RANGE/CHAMFER_DISTANCE_TOO_LARGE;CHAMFER_KERNEL_FAILED/CHAMFER_RESULT_INVALID/CHAMFER_HISTORY_INCOMPLETE。
Core strict boundary 另外固定 EXACT_CHAMFER_* schema/module 错误与
CHAMFER_SELECTOR_* canonical selector 错误。实现内部可提供更窄调试信息,但公开错误不得退化为自然
语言异常、自动减小距离或静默修改选择集。
6. 已完成 Candidate 证据
Section titled “6. 已完成 Candidate 证据”- 公共
exact-chamfer-node-v1.schema.json只接受solid、canonical selector set 和distance; exact-chamfer-v1.module.json锁定输入、输出、适用域、诊断、assurance 与 SemanticRef policy;- additive
exact.phase1@0.4.2保留0.4.0/0.4.1原字节,并按 canonical operationRef 顺序加入 Chamfer; - TypeScript 与 Rust 共同消费
exact-chamfer-v1.corpus.json:2 个合法样例和 13 个非法样例使用相同 stable Diagnostic code;raw edge index、空选择、number distance、零/负/非 canonical distance、重复/ 宽 cardinality/source mismatch/hash tamper、angle 与 second-distance widening 全部失败关闭; - Rust Core 只在 catalog
0.4.2接受 Chamfer,catalog0.4.1返回AMIR_V04_OPERATION_NOT_IN_CATALOG;AMIR transaction bootstrap 与 authoring lock 绑定0.4.2; - receipt 锁定 45-binding OCCT V8_0_1 WASM(11,512,559 bytes,gzip 4,223,987 bytes,SHA-256
379fb1e71c9df2e57ea03336f1a2badb6703079849ad9518ac5c896a620a6152),link 阶段网络关闭且运行时字节不入库; - 10 × 8 × 20 mm ExactSolid 上,2 mm 单边倒角产生 1 个 contour、7 个输出 face;1 mm 两条隔离边 原子倒角产生 2 个 contour、8 个输出 face;两者 OCCT history 均为零 unmapped output face;
- 单边结果经独立 Exact→Mesh 与
manifold-3d 3.5.1检查为NoError,16 triangles、10 vertices, 7/7 source face mappings 可追溯;不可能距离由真实 OCCT 返回CHAMFER_KERNEL_FAILED,artifact、Revision 与 user-head publication 均为 0; - 机器证据结论见Exact Chamfer kernel 验证记录; 原机器报告保留在验证提交历史中;
- provider 调用为 0,backend service 未启动。
SemanticRef Survival Gate 进一步关闭:
- 公共
exact-chamfer-semantic-ref/1.0schema 与 naming algorithmaira.semantic-ref.exact-chamfer/1.0.0独立注册,不借用 Fillet identity; - 真实 45-binding OCCT runtime 覆盖 distance
1 → 2 mm、source extrude20 → 30 mm、双边 distance0.75 → 1.25 mm,inherited face 与每个 selector 的 generated chamfer surface 全部解析为resolved / modified / publishable; - 真实 selector delete、stale receipt、隐式 tangent-chain expansion,以及合同级 split/history/hash/scope/ witness fault probe 全部失败关闭,失败 publication 计数为 0;
- 机器证据结论见Exact Chamfer survival 验证记录; 原机器报告保留在验证提交历史中。
浏览器产品 Gate 进一步关闭:
- additive
exact.phase1@0.4.2通过冻结的九元 meta-operation surface 完成 create、distance edit、revert、 authoritative validation、CAS commit 与 read-back; - Candidate 与 committed Revision 双证据、selector receipt、ArtifactGraph、validation 和四条 Revision 原子 保存;真实页面 reload 从 IndexedDB 恢复后全部 identity 不变;
- Google Chrome 中 Three.js 只消费派生 DisplayMesh/RenderPacket,稳定 EdgeId 与 generated Face SemanticRef/display sub-entity pair 均可读回;屏幕坐标、triangle/object index 不作为身份权威;
- 50 mm 真实失败返回
CHAMFER_KERNEL_FAILED且 head 不变;user-head publication、production activation、 provider 与 backend service 均保持关闭; - 机器证据:Exact Chamfer Chrome report。
7. Candidate → Accepted Gate
Section titled “7. Candidate → Accepted Gate”只有同时满足以下条件,RFC 才能改为 Accepted:
- TypeScript/Rust module/schema/catalog/selector binding parity;已关闭;
- 真实 OCCT 单边与多边等距 Chamfer,且不可能距离原子失败、head/publication 不变;已关闭;
- OCCT history 覆盖 inherited face 与每个 selector 对应的 generated chamfer surface,零 unmapped face;已关闭;
- 成功结果通过独立 Exact→Mesh/Manifold closed-oriented 检查;已关闭;
- distance edit、source edit、multi-edge 与 selector delete 的 Face SemanticRef survival corpus 通过,silent wrong rebind 为零;已关闭;
- 九元 Aira Interface 完成 create/edit/revert/read-back,Candidate 与 committed Revision 双证据成立;已关闭;
- Revision、selector、receipt、ArtifactGraph 与 evidence 原子持久化,真实 reopen identity 不变;已关闭;
- Google Chrome 中 Three.js 只按稳定 EdgeId/Face SemanticRef 显示和高亮,console error 为 0;已关闭;
- committed fresh detached checkout 使用 receipt-matching sealed runtime 离线重放全部 Gate;已关闭;
- production capability 继续由独立 activation 变更控制,不因 Accepted 自动启用;已关闭。
8. 当前裁决
Section titled “8. 当前裁决”接受 exact.chamfer@1.0.0 的合同状态为 Accepted,但不接受其作为生产能力。Candidate commit
23a579c 已在独立 detached worktree 中以 frozen/offline 依赖和 receipt-matching sealed runtime 重放全部
targeted、workspace 与 global evidence Gate;tracked worktree 前后 clean。Accepted 收据见
Exact Chamfer acceptance v0.1。
typed authoring 语义、0.4.2 catalog snapshot、独立真实内核、SemanticRef Survival、浏览器九元事务、
IndexedDB reload、Three.js identity read-back 与 fresh checkout 证据由此冻结。production Runtime
Snapshot/Session Grant 仍须独立 activation 变更;Accepted 不自动发布到 user head,也不启动 provider 或
backend service。