Files
osmWorkflow/.trellis/tasks/archive/2026-08/08-25-rc-p1-package-boundary/research/traffic-signals-split-matrix.md

1.9 KiB

Traffic Signals Split Matrix

Evidence gathered from scripts/lib/traffic-signals.js and repository-wide call-site search on 2026-08-25.

Export Current users Owner after P1 Migration
SIGNAL_LAYOUT buildTrafficSignalsFromFeatures compiler package Export from @osm-asset/road-compiler/traffic-signals
signalNodeKey buildTrafficSignalsFromFeatures compiler package No host caller today; preserve public export for runtime identity contract
buildTrafficSignalFeatures native-traffic-signals, readTrafficSignalFeatures compiler package Host QGIS adapter imports it from the package
validateTrafficSignalFeatures native-traffic-signals, signal tests compiler package Tests import package entrypoint
validateTrafficSignalSourceReferences native-traffic-signals, reimport-gpkg, readTrafficSignals compiler package Reimport adapter imports package function
buildTrafficSignalsFromFeatures native-traffic-signals, readTrafficSignals, buildTrafficSignals compiler package Host preview adapter imports package function
buildTrafficSignals test-preview-assets compiler package Test imports package function; it is geometry/schema behavior, not host I/O
readTrafficSignalFeatures build-osm2streets-qgis host adapter Keep a thin file-reading wrapper under scripts/lib/traffic-signals.js; it imports package functions
readTrafficSignals build-area host adapter Keep a thin file-reading wrapper under scripts/lib/traffic-signals.js; it imports package functions

scripts/lib/traffic-signals.js must not retain a second implementation of the schema or geometry. Its only P1 responsibility is host file I/O for the legacy QGIS / preview paths. This preserves the one-way dependency: host -> compiler package; the package never imports the host.