跳转到内容

RFC-0014:Phase 1 Exact Boolean Difference Operation Module

项目 值
状态 Accepted
文档版本 0.2.0
创建/最后修改 2026-09-02 / 2026-09-02
Operation exact.boolean.difference@1.0.0
Module aira.op/exact.boolean.difference@1.0.0
Capability cap:model.exact.boolean.difference@1
Catalog Snapshot aira.catalog/exact.phase1@0.4.4
依赖 RFC-0006、RFC-0008、RFC-0010、RFC-0011、RFC-0012、RFC-0013、ADR-CORE-002
Production activation false

Aira 增加独立的 Exact Boolean Difference 候选能力。AI 只连接两个不同的 ExactSolid port:base 与 tool。Core 在同一 evaluation DAG 中验证输入,固定执行精确差集,并原子地产生一个新的 ExactSolid / body.main。

这不是底层布尔 API 的远程包装。AI 不接触 fuzzy tolerance、glue、parallel、simplify、mesh fallback、 kernel option 或原地修改。Union 与 Intersection 也不通过 mode 字段伪装成同一个操作;它们若进入产品, 必须拥有独立的 operation identity、合同和 Gate。

现有真实 OCCT ArtifactGraph 证据已用 BRepAlgoAPI_Cut 完成过通槽差集、确定性 B-Rep 与 base/tool 双侧拓扑 history;但 exact.boolean.difference@1.0.0 尚未成为可发现、可 hash 锁定、可由 TS/Rust 一致拒绝非法输入的 Operation Module。Difference 又是 hole、pocket、slot 与大量工业特征的共同底座, 因此这是复用已证算法、补齐产品语义的最短路径。

v1 只有两个输入:

  • base:一个有效、闭合、单一的 ExactSolid port;
  • tool:同一 DAG 中另一个有效、闭合、单一的 ExactSolid port。

两个 port 地址必须不同。输出固定为 solid: ExactSolid / body.main。输入节点不会被原地修改;可回溯性 来自不可变 DAG,而不是 keepTools 开关。

成功不仅要求 kernel 返回 shape,还要求:确实移除材料;结果非空;结果恰好是一个连通、有效、闭合 solid;base/tool 的输出 Face 都能由直接 history 或明确的删除证据解释;独立 Exact→Mesh/Manifold 检查通过。disjoint、空结果、lower-dimensional、compound、多 solid、无效 shape 或 history 不完整均失败关闭。

Module 锁定 BOOLEAN_BASE_INVALID、BOOLEAN_TOOL_INVALID、BOOLEAN_INPUT_ALIAS、 BOOLEAN_NO_INTERSECTION、BOOLEAN_EMPTY_RESULT、BOOLEAN_NON_SOLID_RESULT、 BOOLEAN_RESULT_DISCONNECTED、BOOLEAN_RESULT_INVALID、BOOLEAN_KERNEL_FAILED 与 BOOLEAN_HISTORY_INCOMPLETE。Core strict boundary 另用 EXACT_BOOLEAN_DIFFERENCE_*。

失败不得自动交换 base/tool、扩大 tolerance、改做 union/common、保留原 base 当成功结果、转为 mesh 布尔或发布部分 history。Candidate、Revision 与 user head 必须保持不变。

  1. TypeScript/Rust module、node schema、catalog 0.4.4 与共享 corpus parity;
  2. receipt-matching sealed OCCT runtime 完成单工具 Difference,验证 build、材料移除、单一有效闭合 solid;
  3. disjoint、全覆盖、alias、无效输入、多 solid 与 history 不完整均原子失败;
  4. base/tool Face 的 modified/generated/deleted/split/merge history 全覆盖,输出 Face 零静默 unmapped;
  5. 成功结果通过独立 Exact→Mesh/Manifold closed-oriented Gate;
  6. base/tool source edit 与 feature edit 的 SemanticRef Survival corpus 通过,silent wrong rebind 为零;
  7. 共享九元 Aira Interface 完成 create/edit/revert/read-back,Candidate 与 committed Revision 双证据成立;
  8. IndexedDB reopen 后 Revision、PortRef、ArtifactGraph、receipt 与 evidence identity 不变;
  9. Google Chrome 中 Three.js 只按稳定 SemanticRef/Display sub-entity 高亮,固定 viewport/DPR/backend 视觉与 console Gate 通过;
  10. committed fresh detached checkout 使用 receipt-matching sealed runtime 离线重放全部 Gate;
  11. production capability 继续由独立 activation 变更控制,Accepted 不自动发布。

Gate 1–5 已由 catalog 0.4.4、TypeScript/Rust parity、receipt-matching 36-binding OCCT runtime、 BRepAlgoAPI_Cut 完整 history 与独立 Manifold 检查关闭:成功结果为 10 个 Face、零静默 unmapped, 材料体积 64 → 48 mm³;disjoint、全覆盖、alias、无效输入、多 solid 和 history 缺失均失败关闭。 机器收据结论见Exact Boolean Difference 验证记录; 原 v0.1/v0.2 报告及哈希前驱保留在验证提交历史中,不覆盖历史字节。

Gate 6 已由 base resize、tool resize、tool translate、combined edit 四条真实 OCCT Survival 路径和 delete、 split、tool replacement 三条负向路径关闭;全部 10 个 base/tool Face binding 无 silent wrong rebind,失败路径 发布计数为零。机器收据结论同见上述验证记录;原 survival v0.1/v0.2 报告及哈希前驱保留在验证提交历史中。

Gate 7–9 已由共享 Exact operation session/interface 与真实 Google Chrome 产品 Gate 关闭:九元 interface 在 完整合同 discovery 后完成 create、tool-width edit、revert、CAS read-back 与 IndexedDB reopen;四条 Revision、 三笔 transaction、Exact result、runtime receipt、Face SemanticRef 与 Display sub-entity 在 reload 前后保持一致。 disjoint tool 返回 BOOLEAN_NO_INTERSECTION 且 head 不变;Three.js r185/WebGLRenderer、固定 canvas/DPR、 no-post 与近/设计/远 camera envelope 通过,console warning/error 为零。机器收据见 Chrome Gate v0.1和 验证记录。

Gate 10 已由 committed Candidate 6523f593976968f1c30666548dd433083a5a325f 的 detached fresh checkout 关闭:428 packages frozen/offline install、网络下载 0;7/7 receipt-matching sealed runtime restore; Difference kernel 14/14、Survival 12/12 与 Google Chrome lifecycle Gate 全部通过;完整 pnpm check、 45 个 verifier / 178 份 report / 873 个 workspace evidence path 的全局重放,以及 release tier 35/35 全部通过,前后 tracked worktree 均 clean。Gate 11 持续满足:production、provider、backend、cloud mutation 与 user-head publication 均保持关闭。

接受 Gate 1–10 的合同、内核、SemanticRef、浏览器产品与 committed fresh-checkout 证据,将 RFC-0014 升为 Accepted。该裁决只接受 exact.boolean.difference@1.0.0 的固定 AI 合同,不接受 production activation、user-head 自动发布、backend、真实 provider 或 cloud mutation;这些仍须独立、显式、可回滚 的后续裁决。