Files
cdsl-cad/cadfs_to_cdsl/WEEKLY_REPORT_2026-09-11.md

157 lines
18 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CADFS → CDSL Engine 周报
**周期:2026-09-07 ~ 2026-09-11**
**数据集:** `data/cadfs-sample/CADFS_test`,共 9,347 个样本
**最新全量工件:** `cadfs_to_cdsl/output`,报告生成于 `2026-09-11 18:28:01`
**历史工件:** `cadfs_to_cdsl/output-history/*`
**能力依据:** `cadfs_to_cdsl/ENGINE_CAPABILITY_GAPS_PROGRESS.local.md`、`CADFS_FULL_CAPABILITY_TARGET.md`
## 1. 本周结论
1. **CADFS → CDSL 的转换覆盖继续提升。** 最新全量结果中,`converted_complete` 为 6,626 个(70.89%),`converted_partial` 为 2,325 个(24.87%);无可执行特征的样本降至 366 个(3.92%),解析/降级失败 30 个(0.32%)。
2. **转换完整不等于可执行,也不等于几何相似。** 最新结果有 8,126 个 STEP 工件,但其中包含失败样本保留的可执行前缀;真正完成一次 rebuild 的样本为 4,597 个,其中 RP 接受 1,781 个、strict 接受 744 个。
3. **最新快照的 RP/strict 接受数低于 2026-09-09 快照。** 这与本周 selector provenance、single-session replay 和 fallback 收紧同步发生;`selector_query_unsupported` 成为主要 rebuild 失败层。该变化不能只按百分比判定为几何能力退化,应结合失败 feature、前缀 STEP 和诊断逐层分析。
4. **本周 engine 的主要增量集中在 provenance、拓扑历史和有界 source contract。** 已落地的多数是窄范围、可证明的 contract;没有把单个样本的通过结果升级为通用 CADFS feature 完成。
## 2. 当前 CADFS → CDSL 数据转换情况
### 2.1 最新全量结果
| 层级 | 状态 | 数量 | 占 9,347 样本 | 说明 |
| --- | --- | ---: | ---: | --- |
| 转换 | `converted_complete` | 6,626 | 70.89% | FeatureScript history 全部有 CDSL 表达,仍需单独看 runtime/comparison |
| 转换 | `converted_partial` | 2,325 | 24.87% | 保留可转换前缀,后续 feature 有 deferred/unsupported 等诊断 |
| 转换 | `deferred_no_executable_feature` | 366 | 3.92% | 没有可执行 feature checkpoint |
| 转换 | `parse_failed` | 30 | 0.32% | parser/lowering 层失败 |
| rebuild/比较 | `rebuilt_strict` | 744 | 7.96% | CDSL、STEP rebuild 和 strict comparison 均通过 |
| rebuild/比较 | `rebuilt_approximate` | 1,037 | 11.09% | RP 工程相似通过,strict 未通过 |
| rebuild/比较 | `rebuilt_rejected` | 2,778 | 29.72% | 有 rebuild/comparison,但不满足 RP 验收 |
| 执行 | `rebuild_failed` | 3,932 | 42.07% | runtime/selector/OCC 在完整或增量 replay 中失败 |
| 执行 | `runtime_ineligible` | 408 | 4.37% | CDSL 已产生,但能力预检拒绝完整 runtime execution |
| 基础设施 | `comparison_timeout` | 38 | 0.41% | 比较 worker 超过 60 秒 |
| 基础设施 | `rebuild_timeout` | 14 | 0.15% | rebuild 超时 |
接受口径:RP 接受 = `rebuilt_strict + rebuilt_approximate` = **1,781(19.05%)**;strict 接受 = **744(7.96%)**。当前 4,559 个样本有 comparison report,其中 strict 占 16.32%,RP 占 39.07%;这个分母与全量样本不同,不能混用。
### 2.2 CDSL、STEP、比较工件覆盖
| 工件 | 数量 | 占全量 | 位置/说明 |
| --- | ---: | ---: | --- |
| candidate CDSL | 8,951 | 95.76% | `output/samples/<sample_id>/candidate.cdsl.json` |
| bound CDSL | 8,485 | 90.78% | 已完成 selector/body binding 的候选 |
| STEP | 8,126 | 86.94% | 包含完整 rebuild 和失败时保留的最佳 executable prefix |
| comparison | 4,559 | 48.77% | `comparison.json` 和 `comparison_summary.csv` |
| GLB | 0(全量目录扫描) | 0% | 最新全量 `output` 未生成 GLB;专项回归工件中的 GLB 不计入全量统计 |
所有样本的本地 annotation、FeatureScript、image、STEP、STL modality 均存在;JSONL 对齐 fallback 为 0。每个失败样本仍按当前流程保留 `diagnostics.json`、`history.json`、`rebuild.json` 以及可用的 `rebuild.step` 前缀。
### 2.3 历史快照对比
以下数据按各快照的 `full_run_report.md` 汇总。旧快照的 manifest 状态命名曾使用 `rebuilt`/`rebuilt_approximate` 等不同字段,因此不把旧 manifest 与最新 manifest 直接拼接;比较时以各自报告的 conversion、RP、strict 和工件计数为准。
| 报告时间(快照目录) | complete | partial | deferred | RP accepted | strict accepted | STEP | candidate | bound | comparison |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| 2026-09-02 (`20260907-185128`) | 2,427 | 4,315 | 2,602 | 1,159(12.40%) | 578(6.18%) | 1,812 | 8,108 | 1,773 | 1,719 |
| 2026-09-07 (`20260907-235209`) | 2,829 | 4,283 | 2,235 | 1,358(14.53%) | 654(7.00%) | 5,554 | 7,112 | 5,554 | 5,250 |
| 2026-09-08 (`20260908-215959`) | 5,367 | 3,266 | 693 | 2,031(21.73%) | 905(9.68%) | 6,134 | 8,633 | 6,134 | 6,090 |
| 2026-09-09 (`20260909-191531`) | 6,232 | 2,710 | 396 | 2,253(24.10%) | 989(10.58%) | 8,176 | 8,942 | 8,364 | 6,007 |
| 2026-09-11(最新 `output`) | **6,626** | **2,325** | **366** | **1,781(19.05%)** | **744(7.96%)** | **8,126** | **8,951** | **8,485** | **4,559** |
从 2026-09-02 到最新快照,完整转换增加 4,199 个(+44.92 个百分点),deferred 减少 2,236 个(-23.92 个百分点),candidate/bound CDSL 覆盖明显扩大。最新快照相较 2026-09-09 的 strict/RP 和 comparison 数下降,应归因到当前代码的更严格 provenance/selector gate、runtime 分类和本次全量执行边界,不能仅凭接受率得出“本周 engine 几何能力整体下降”的结论。
与 2026-09-09 快照逐项比较:`converted_complete` **+394**、`converted_partial` **-385**、deferred **-30**、candidate CDSL **+9**、bound CDSL **+121**;STEP **-50**、comparison **-1,448**、RP accepted **-472**、strict accepted **-245**。后四项反映本次全量执行的 replay/比较覆盖和 provenance gate 变化,需与保留的 prefix STEP、diagnostics 和 comparison 工件一起解读。
### 2.4 FeatureScript 操作覆盖与主要缺口
最新 source history 中的操作出现次数如下,说明当前回归集已覆盖较宽的 operation 分布:
| 操作 | 次数 | 操作 | 次数 |
| --- | ---: | --- | ---: |
| `newSketch` | 20,857 | `extrude` | 18,168 |
| `fillet` | 5,210 | `revolve` | 2,087 |
| `chamfer` | 1,818 | `cPlane` | 1,620 |
| `hole` | 1,203 | `shell` | 729 |
| `mirror` | 483 | `transform` | 468 |
| `sweep` | 378 | `loft` | 377 |
| `circularPattern` | 252 | `booleanBodies` | 228 |
| `deleteBodies` | 142 | | |
按受影响样本统计的主要 capability gaps(一个样本可能同时命中多个 gap)为:
| Gap | 受影响样本 | Gap | 受影响样本 |
| --- | ---: | --- | ---: |
| `fillet` | 928 | `extrude` | 888 |
| `chamfer` | 264 | `revolve` | 201 |
| `shell_face_selector` | 162 | `mirror` | 139 |
| `extrude_profile_topology:cap_face` | 112 | `extrude_profile_topology:swept_face` | 94 |
| `cPlane` | 92 | `extrude_profile_topology:cap_edge` | 88 |
| `sweep_path` | 71 | `hole_location_vertex` | 70 |
| `loft` | 65 | `circularPattern` | 50 |
| `hole_scope_body_source` | 44 | `shell` | 42 |
| `sweep` | 40 | `booleanBodies` | 36 |
当前共记录 5,095 条 diagnostic record,分布为 `feature_deferred` 3,449、`unsupported_engine_capability` 1,004、`sketch_deferred` 612、`parse_or_lowering_failed` 30;这些是诊断条数,不是互斥样本数。主要 runtime 失败包括:`selector_query_unsupported`(F2 904、F4 593、F3 380、F6 278、F5 204)、OCC union invalid shape(157)、`BRep_API: command not done`(151)和 planar IMPRINT region 无界(116)。
## 3. 本周 engine 新增和完善的能力
### 3.1 Selector source preservation 与 query 语义
| 能力 | 本周新增/完善 | 已验证边界与证据 | 仍未覆盖 |
| --- | --- | --- | --- |
| 版本化 query AST | `selector_intent` 同时保留带行号的原始 `source_query.ast` 和 `query_expr@1.0`;递归保存 `qUnion`、`qIntersection`、`qSubtraction`、`qAdjacent`、`qOwnerBody`、`qBodyType`、`qConstructionFilter`、`qCreatedBy` 以及未知调用,未知语义保留为 `opaque_call`。schema/semantic validation 校验 expression 与 intent version 一致。 | parser/lowering/selector/runtime 回归已覆盖;未知 query 不再被改写成近似 selector。 | 这是 source-preservation foundation,不等于这些 query family 已可 runtime 执行;通用 filter、created/modified/generated/deleted 关系仍 deferred。 |
| Provenance query set | `fillet/chamfer` 增加窄 `QUERY_SET` contract;direct `qUnion`、`qIntersection`、`qSubtraction` 通过 exact active record ID 做 union/intersection/subtraction,递归 set 在 9 月 11 日补齐;空集、partial、inactive、mixed kind/version、geometry/stable-ID/output-role 混用均拒绝。 | `backend.tests.test_selector_provenance_contract` 35 passed;`cadfs_to_cdsl.tests.test_lowering` 117 passed;`backend.tests.test_engine_runtime_foundation` 140 passed、1 skipped。`00000715` 的变体证明 intersection 空集诊断和 subtraction left-only 语义。 | 全量 corpus 未发现 native `qIntersection`/`qSubtraction` call;仍仅限 FeatureScript 1511、direct provenance child、fillet/chamfer,不能称通用 query-set 能力。shell 对 nested/intersection/subtraction 仍拒绝。 |
| `qOwnerBody` 精确 owner bridge | 为 `UP_TO_BODY` 增加递归 `query_input` 和 `owner_body_contract: exact_input_owner`;先解析唯一 proven topology child,再以完全相同 body ID 投影到唯一 active body record。 | 合成 `00694309` 变体完成 rebuilt;38 项 selector provenance 测试及 lowering 联跑 156 passed。 | 全量 corpus 暂无 native `qOwnerBody`;不支持多 member、multi-solid、later successor、其它 consumer 或 current aggregate/geometry fallback。 |
| fallback 与 replay 收紧 | `selector_intent.version` 成为唯一 canonical version;production `rebuild_candidate` 改为 single-session incremental replay;普通 context selector 只在 active context 中存在唯一同 kind record 时回退,COPY/instance selector 不回退。 | 失败统一保留 selector diagnostic 和 prefix checkpoint;`selector_query_unsupported`、`selector_kernel_history_missing`、`selector_body_member_inactive` 分层可归因。 | 仍缺通用 CAP/SWEPT/OFFSET/COPY/INTERSECT lineage,不能以 stable ID、最终 STEP 或 current body 补齐 source 语义。 |
### 3.2 OCC topology history、output role 与 body provenance
| 能力 | 本周新增/完善 | 已验证边界与证据 | 仍未覆盖 |
| --- | --- | --- | --- |
| 多 builder final-history bridge | planar IMPRINT 多区域 blind prism 先分别保留 `BRepPrimAPI_MakePrism` history,再用 `BRepAlgoAPI_Fuse(SetToFillHistory)` 映射到 final snapshot;只登记 `IsSame` 可证明的 source→final relation,deleted/missing branch 保留 `partial/unknown`。 | `00354246` 的 7 个 `SWEPT_FACE` 由 native lineage 解析后在 OCC fillet feasibility 处失败;`00403485` 的 deleted side branch 正确报告 `selector_kernel_history_missing` 并保留 F1 STEP。最终聚合回归为 293 passed、1 skipped。 | 仅限 planar IMPRINT、至少两个 bounded region、无 draft、单向 blind;一般 fuse N:M、draft/trim/multi-body、boolean/COPY/pattern 后继仍未完成。 |
| output-role / all-fragments | direct prism/sweep/loft/shell 的 start/end cap、side、swept edge、offset/closing/wall 等 role 继续以 operation history 保存;`all_fragments` 要求每个 source fragment 都有 complete/proven final relation,不再返回部分集合冒充成功。 | 既有 direct CAP_FACE/CAP_EDGE/SWEPT_FACE/SWEPT_EDGE、shell、loft 回归均按 final snapshot 和 active member 绑定。 | 一般 CAP/SWEPT/OFFSET/MID_CAP、split/merge、复杂 dress-up 后继仍无完整 N:M resolver。 |
| body member / COPY provenance | boolean target/tool 现在接受 `{pattern_feature_id, source_feature_id, instance_index}`;direct surviving `new_body` 的 mirror/circular/transform COPY、single-body successor、fused sole-body circular COPY 和 multi-source transform copy 均增加显式 member/provenance 校验。 | `00000385` F6、`00293508` UNION 及 body graph/runtime 回归证明 target/tool 不再回退到 pattern aggregate;专项 GLB 由同一 rebuild STEP 生成,仅作预览。 | 第二个 `new_body`、aggregate/linear/nested pattern、excluded instance、multi-body boolean/delete/copy 的完整生命周期仍未完成;不能宣称完整 `booleanBodies`/`circularPattern`/`mirror`。 |
### 3.3 CADFS feature/source contract 扩展
| 能力 | 本周新增/完善 | 已验证边界与证据 | 仍未覆盖 |
| --- | --- | --- | --- |
| source-only segmented sweep path | 同一 source sketch 的 ordered line/arc/non-periodic B-spline 多段路径,及跨 source sketch 的 global 3D spatial path;要求 explicit source identity、connected/open/non-branching、无重复/退化段,runtime 用 `BRepBuilderAPI_MakeWire` + pipe-shell。circular pattern 会同步旋转 spatial points/normal/tangent。 | `00376556` 为 executable approximate,`00786708` 的 filtered line/arc/line path 可执行但完整 history rejected;`00610979` 跨 sketch F4 prefix 可执行;`00034285` 的空消息 `AssertionError` 被稳定翻译为 `OCC sweep operation raised while building the native sweep`。 | 仍是 source-only lowering,不是 runtime `qBodyType` selector;closed/branched wire、guide/surface/profile consumer、sweep output lineage、一般 multi-sketch path 未完成。 |
| planar IMPRINT dispatch | 修正多 face `IMPRINT FACE` lowering 的 dispatch,避免把合法多区域 profile 错降成普通 analytic contour;保留 source entities、face side 和 fragment intent。 | `00354246` F1 现在保持 typed `planar_imprint`,F2 的 selector request 不再丢失,失败停在可归因 selector/OCC 层并保留 F1 STEP。 | 不增加 IMPRINT/SWEPT/INTERSECT family 的通用 success coverage;unbounded region、different sketch、trim/copy/pattern successor 仍拒绝。 |
| direct prism topology consumers | 扩展 direct `CAP_FACE` immediate `UP_TO_SURFACE`、`SWEPT_FACE` continuation、`SWEPT_BODY` immediate `UP_TO_BODY`、`CAP_EDGE` fillet/chamfer、CAP_FACE shell removal,以及 direct hole profile 的 `SWEPT_EDGE`/`CAP_EDGE` exact source anchors。 | `00835610` drafted CAP_FACE pipeline RP 通过;`00694309` body target contract 有完整 history;`00039669`、`00151159` 等 direct prism hole lineage matrix 有 strict/RP 证据;未证明的 selector 继续拒绝。 | 复杂 profile、draft 内环、fused/multi-region、boolean/COPY/pattern 后继和通用 CAP/SWEPT selector 仍不在 allow-list。 |
| reference/semantic details | 完善 `LINE_ANGLE` direct `skCircle` axis 与 source gate、`cPlane` `oppositeDirection` signed offset、direct sketch-vertex hole location/sole scoped body、shell `OFFSET_FACE`/`parts` source-qualified contract 和 `INTERSECT EDGE` source-qualified section relation/transient tool history。 | 相关原子、selector/runtime suite 和受控 core/shard 回归已记录;`INTERSECT` 未证明的 SectionEdges 不会直接升级为 lineage。 | 任意曲线/面/connector axis、multi-body hole host、generic OFFSET、复杂 shell、primary/copy/pattern intersection 仍未完成。 |
### 3.4 诊断和离线工具完善
- native sweep 的空 `AssertionError` 现在转成稳定、可归因的 OCC 诊断,不以 geometry fallback 伪造实体。
- single-session selector replay 和 prefix retention 使失败点、最后可执行 STEP、`history.json`/`rebuild.json`/`diagnostics.json` 保持一致;当前全量报告中的 F2/F4/F3 selector failures 可直接定位到 feature。
- engine 执行边界继续收敛到显式 schema/capability contract、按 family 的 executor/runtime 路径和 topology evidence export;这使 selector、body lifecycle 和 OCC failure 可以在同一条 replay history 上归因,而不是依赖旧的平行 runtime 路径。
- 新增 `selector_candidate_demo.py` 的 geometry probe、strict replay、bounded branch search 和 query-group recovery。它只在隔离的 copied CDSL 上实验,并要求唯一 strict branch 后再 fresh replay;**不改变 production resolver、RP 阈值或 capability matrix,因此不计为 engine selector 能力完成。**
## 4. 本周能力边界与下周重点
### 已能对外说明的结果
- 转换器可以为大多数样本生成 candidate/bound CDSL,并在失败时保留 prefix STEP;完整转换率已达到 70.89%。
- selector source AST、版本和 body/provenance policy 不再被静默抹平;一部分 direct prism、IMPRINT、sweep、shell、boolean/pattern/transform 场景能够以 exact kernel history 执行。
- RP 与 strict comparison 已独立报告;source STEP 精度、拓扑不一致、比较超时和 OCC/runtime failure 不再混为 converter 失败。
### 不能宣称已经完成的范围
- 不能把 `fillet`、`extrude`、`chamfer`、`revolve`、`shell`、`mirror`、`sweep`、`booleanBodies` 或 `circularPattern` 的单个窄 contract 说成整个 feature family 完成。
- 不能把 2026-09-10 的 query-group strict winner、专项 GLB 或单个 RP/strict 样本当作通用 selector mapping。
- 当前最大未覆盖面仍是 selector query unsupported、复杂 profile/拓扑后继、body lifecycle、OCC invalid shape/unbounded IMPRINT 以及 comparison timeout;这些都需要继续保持有界拒绝和可执行前缀。
### 建议下周优先级
1. 先处理全量 runtime 中占比最高的 `selector_query_unsupported`,按 query family、producer history 和 consumer 分层推进,不用 geometry/current-body fallback 换取通过。
2. 扩展 planar IMPRINT、CAP/SWEPT/OFFSET 和 boolean/pattern 的多实体 relation component,至少补齐多个真实 source/lifecycle 的 RP 回归后再升级 capability matrix。
3. 针对 OCC union invalid shape、`BRep_API: command not done`、unbounded IMPRINT 和 comparison timeout 分别建立 kernel/input/infrastructure 证据,继续保留每个失败样本的 STEP/diagnostic/compare 工件。
## 5. 证据入口
- 最新汇总:`cadfs_to_cdsl/output/full_run_report.md`、`summary.json`、`manifest.jsonl`、`capability_gaps.json`、`comparison_summary.csv`
- 最新样本工件:`cadfs_to_cdsl/output/samples/<sample_id>/`
- 历史汇总:`cadfs_to_cdsl/output-history/<snapshot>/full_run_report.md`
- 能力进度台账(本地,不提交):`cadfs_to_cdsl/ENGINE_CAPABILITY_GAPS_PROGRESS.local.md`
- 全量能力目标:`cadfs_to_cdsl/CADFS_FULL_CAPABILITY_TARGET.md`