NOWTHE
BIGGEST
CHANGE.
config/build.ts
types.ts
allocate.ts
1import type { Snapshot, Config } from "./types";
2
3// pure: same snapshot in → same config out
4export function buildConfig(snapshot: Snapshot): Config {
5  const sensors = snapshot.sensors.map(toSensor);
6  const slots = allocate(snapshot.ports, sensors);
7  const config = { version: 2, sensors, slots };
8  return config;
9}
100% PURE
build.ts:4 — input
4buildConfig(
   snapshot: Snapshot
 )
IN →
→ OUT
~/api $ grep -rn "db\." src/config/build.ts
0 RESULTS
NO DB
~/api $ grep -rnE "prev|history" src/config/build.ts
0 RESULTS
NO HISTORY
IN → OUT. THAT'S IT.