que01 62795a97b9 fix: install the recompile hook on UI import
`/api/import` set `session.area` but never `session.context.compileFresh`, which
is only wired when the server starts with an area on the command line. Every
session imported through the browser therefore answered "请先导入 OSM 文件" to
`/api/compile`, even though the import had just succeeded.

This predates direct editing — it broke "保存并重新生成" for UI-imported
workspaces — but it surfaced now, because saving a direct edit recompiles and so
reported a failed regeneration after a save that had in fact succeeded.

Covered by a new HTTP-level test: import the fixture, then recompile twice. The
bug lived in the wiring between two handlers rather than in either one, so
nothing below the HTTP boundary could catch it. Verified by reverting the fix and
watching the test fail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 09:37:27 +08:00
2026-08-26 15:01:07 +08:00
2026-08-26 09:13:44 +08:00

Road Compiler

Compiles a native-road-package/v1 RoadCompilerInput JSON file into native-road GeoJSON, diagnostics, traffic-signal runtime assets, and a deterministic completion marker.

npx road-compiler --input /absolute/path/road-compiler.input.json

The compiler does not read host area configuration. The caller owns configuration normalization and creates the input JSON. Successful compilation writes exactly one NATIVE_ROAD_COMPILE_DONE JSON marker to stdout.

Run npm test after npm ci to validate the package and its two self-contained area fixtures without the host repository. The migrated baselines remain upgrade corpus; the host repository owns the strict path-normalized parity gate.

Description
No description provided
Readme 1.2 MiB
Languages
JavaScript 98.9%
HTML 1.1%