Skip to main content

Module coherence

Module coherence 

Source
Expand description

frame.toml port-coherence rules.

frame check runs these immediately after the config loads, so a partial hand-edit — the classic “I bumped [frame].bind but forgot [bus.websocket].allowed_origins” — fails loudly here rather than as an Origin-refused page in the browser, or as a mid-boot bind error. The rules are a pure function over the four addresses and the allow-list so they are provable in isolation and reusable wherever a loaded FrameConfig is in hand.

There is coherence to check ONLY when the operator stated the topology verbatim (FrameConfig::ports_explicit): a portless config (2026-07-22 ruling) has its page port chosen by prefer-and-walk, its internal ports OS-assigned, and its allowed_origins DERIVED from the real page address at boot — so it is coherent by construction and there is nothing static to check. That path returns no violations, which is a clean pass.

Functions§

coherence_violations
Every port-coherence violation in config, each naming the exact frame.toml keys involved. An empty vector means the config is coherent.