mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-26 05:29:45 +00:00
cccb43ecdf
In mock mode the websocket broadcast and /api/state serve a view of the fixture graph, and the fixture graph was built in a registry with no store, so it never loaded the operator's manual links. The resources API seeds its own store-backed registry from that list and applied them, so a standalone agent linked into a VM showed merged in /api/resources and stayed a separate row in the broadcast, even after a restart. Peers verifying link UI on mock stacks had to block the websocket to see it. The mock view now builds the fixture graph with the links the monitor adapter's current registry generation loaded (MonitorAdapter.ManualLinks), through NewRegistryWithManualLinks: a registry with those links and no store, so fixture ingest cannot persist identity pins, successions or change rows. The links apply at each ingest stage, as in the live rebuild, so an availability check that names the folded resource by source still projects onto the primary. Without links the shared memoized snapshot is used as before. The cached view is keyed on the fixture version and the link list, so a link change rebuilds it without a fixture tick. Its freshness, which the resources API keys its registry cache on, is assigned in publication order: a view with the published fixture freshness and links keeps the published value, and any other view gets a later one than every view before it. The fence view behind currentModeReadState still omits links; it only covers the window after leaving mock mode, before the registry rebuilds.