Files
road-compiler/.trellis/tasks/08-26-direct-manipulation-road-editor/task.json
que01 c7425f5ed4 feat: make crosswalk and stop-line offsets solvable
Step 1 of the control-marking task, and deliberately server-only: no handle is
drawn yet. This project already shipped a range handle for `profile.interval`,
which compileGeometry ignores, so the control dragged and changed nothing. The
consumer comes first now.

Two kinds join the taxonomy — `junction-crosswalk-inset` and
`junction-stop-line-offset`, both on the existing `junction-approach` anchor. The
solver writes them onto the approach entry, `applyDirectJunctionPlans` carries
them onto the compiled approach, and `compileControlMarkings` reads them in place
of the module constants it used for every junction. They move markings without
reshaping the junction, so unlike width and cutback they deliberately do not
trigger a boundary recompute.

`applyJunctionConstraint` becomes an explicit switch. Its trailing `else` had
meant every kind that was not approach-width fell through to the cutback
validator, so a new kind would have been silently validated and written as a
cutback. The same non-exhaustive shape in the test fixture's `valueFor` is fixed
the same way, and now throws for an unnamed kind rather than answering with a
corner radius.

design.md's taxonomy is updated with it — a test asserts the two cannot drift,
which is what caught the omission.

Measured on a 41-road workspace with 8 crossings: both constraints change their
marking geometry, neither drags the other, and out-of-range blocks instead of
clamping. That measurement is not in the suite: the synthetic junction resolves
`junction_inset_m` to 0 because its crossing never binds to a plan, and the
committed OSM fixture has no crossings at all. The tests assert the wiring the
handles will depend on — values reaching the approach entry, distinct branches,
blocking diagnostics — and the gap is recorded in the test itself.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 15:01:36 +08:00

48 lines
1.5 KiB
JSON
Raw 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.
{
"id": "direct-manipulation-road-editor",
"name": "direct-manipulation-road-editor",
"title": "直接操纵道路编辑工作台",
"description": "探索类似 Drawtonomy 的直接操纵道路编辑,保持结构化 overrides、可审计性和可重编译性",
"status": "planning",
"dev_type": "feature",
"scope": "road-editor",
"package": null,
"priority": "P2",
"creator": "dingkang",
"assignee": "dingkang",
"createdAt": "2026-08-26",
"completedAt": null,
"branch": null,
"base_branch": "main",
"worktree_path": null,
"commit": null,
"pr_url": null,
"subtasks": [],
"children": [
"08-26-direct-edit-documents",
"08-26-direct-edit-solver-api",
"08-26-direct-edit-map-editor",
"08-26-direct-edit-junction-tools",
"08-27-junction-dominated-roads",
"08-28-edit-interaction-polish",
"08-28-junction-control-offsets"
],
"parent": null,
"relatedFiles": [
"src/compile/compiler.js",
"src/compile/native-road.js",
"src/compile/complex-junction.js",
"src/compile/layer-manifest.js",
"src/geometry/lane-geometry.js",
"workbench/server.js",
"workbench/client/src/App.tsx",
"workbench/client/src/components/MapCanvas.tsx",
"workbench/client/src/map/layers.ts",
"workbench/client/src/lib/api.ts",
"workbench/client/src/types/state.ts",
"test/index.js",
"test/fixtures.js"
],
"notes": "父任务持有需求集、design.md 权威合约、跨子任务验收与第 8 步集成验证。实现落在三个子任务。",
"meta": {}
}