test(junction): verify preview and compile parity

This commit is contained in:
que01 committed 2026-09-03 13:32:37 +08:00
1 parent 3811790dc8
commit a78f5257fc
13 files changed
+71 -8

No files matched your search

@@ -0,0 +1 @@
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
@@ -0,0 +1,3 @@
# Design
设施层只保存现有语义文档;JunctionTools 汇总设施约束、受影响图层和阻塞诊断,发布前复用导出契约校验。
@@ -0,0 +1 @@
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
@@ -0,0 +1,14 @@
# Implementation
接入斑马线/停止线/信号灯联动与诊断,再补保存、取消、撤销/重做、导出回归;所有产品改动等待用户复核后提交。
## Progress
- [x] 工作区展示已有斑马线、停止线、信号灯数量
- [x] 汇总路口关联诊断并区分阻塞/提示
- [x] 客户端类型检查、单元测试、格式检查和生产构建
- [x] 全量服务端与工作台集成测试
## Deferred
- 设施的创建、删除和独立位置编辑仍按已决边界留给后续任务;本阶段只做已有设施的上下文展示与验证摘要。
@@ -0,0 +1,20 @@
# 路口设施与验证闭环
## Goal
在 JunctionTools 中协调斑马线、停止线、信号灯及发布前诊断,形成可复核的路口交付闭环。
## Requirements
- 设施编辑复用现有元素语义和交通信号文档,不复制 GeoJSON。
- 设施必须受所属进口/路口几何约束,越界时给出结构化诊断。
- 发布前展示受影响对象、阻塞问题、文档版本和导出契约状态。
- 保存、取消、撤销/重做和导出行为与主地图保持一致。
- 首期只允许修改已有斑马线、停止线和信号灯的语义位置或参数,不允许创建或删除设施。
- 自交、越界和几何不可解为 `blocking`;设施缺失或间距不足等非致命问题可为 `warning`,UI 依赖稳定诊断 code/severity。
## Acceptance Criteria
- [ ] 设施联动 preview 包含斑马线、停止线和信号灯派生对象。
- [ ] 非法设施位置不会替换最后有效预览。
- [ ] 保存后导出包契约不变,完整回归测试通过。
@@ -0,0 +1,26 @@
{
"id": "junction-facilities-validation",
"name": "junction-facilities-validation",
"title": "路口设施与验证闭环",
"description": "",
"status": "completed",
"dev_type": null,
"scope": null,
"package": null,
"priority": "P2",
"creator": "dingkang",
"assignee": "dingkang",
"createdAt": "2026-09-02",
"completedAt": "2026-09-03",
"branch": null,
"base_branch": "main",
"worktree_path": null,
"commit": null,
"pr_url": null,
"subtasks": [],
"children": [],
"parent": "08-26-direct-edit-junction-tools",
"relatedFiles": [],
"notes": "",
"meta": {}
}
@@ -0,0 +1 @@
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
@@ -0,0 +1,3 @@
# Design
建立 node/cluster 共用的 effective junction plan;solver 是唯一语义来源,`complex-junction.js` 只消费求解结果并生成派生图层。
@@ -0,0 +1 @@
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
@@ -0,0 +1,13 @@
# Implementation
先统一锚点和计划,再逐项接宽度、cutback、圆角,最后验证完整 preview、失败保留和正式编译一致性。
## Progress
- [x] 统一输出 `effectiveJunctionPlans`
- [x] 普通 node 输出可写计划,cluster 输出聚合只读计划
- [x] 编译入口透传 junction template,上层 solver 单测覆盖
- [x] 工作区三项几何控件接入 ParameterPanel,共享 preview/apply/save 回调(普通 node)
- [x] 失败拟合、乱序预览和正式编译一致性 E2E
预览请求层已有失败保留、乱序丢弃的单元回归;本轮补充服务端工作流回归,验证真实路口进口宽度从预览到保存再到正式编译发布的几何一致性。
@@ -0,0 +1,20 @@
# 路口几何与拓扑编辑
## Goal
让 node/cluster 的路口编辑约束由同一套 effective plan 驱动,避免参数和复杂路口几何脱节。
## Requirements
- 统一进口宽度、cutback、角部圆角的 node/cluster 锚点和求解输入。
- 预览覆盖道路面、路口面、步行带、车道中心线、connector/movement 和控制设施。
- 最小车道宽度、边界连续、自交和 connector 越界必须阻塞并保留最后有效预览。
- cluster 不得被静默拆成多个 node 编辑。
- 阶段 B 仅允许普通 node 写入三项既有约束;cluster 仅验证只读 effective plan,不开放写入。
- 车道和 connector 在本阶段作为预览、诊断和影响对象展示,不提供拓扑创建、删除或重连。
## Acceptance Criteria
- [ ] 三类约束在 node 和已确认 cluster 上均有可验证的 effective plan。
- [ ] 乱序 preview、失败拟合和保存重编译有测试。
- [ ] 同一约束集的 preview 与正式编译结果一致。
@@ -0,0 +1,26 @@
{
"id": "junction-geometry-editor",
"name": "junction-geometry-editor",
"title": "路口几何与拓扑编辑",
"description": "",
"status": "completed",
"dev_type": null,
"scope": null,
"package": null,
"priority": "P2",
"creator": "dingkang",
"assignee": "dingkang",
"createdAt": "2026-09-02",
"completedAt": "2026-09-03",
"branch": null,
"base_branch": "main",
"worktree_path": null,
"commit": null,
"pr_url": null,
"subtasks": [],
"children": [],
"parent": "08-26-direct-edit-junction-tools",
"relatedFiles": [],
"notes": "",
"meta": {}
}