From 8b3365a24981e58578503c41b3c99579a5e40f0f Mon Sep 17 00:00:00 2001 From: goodboy Date: Wed, 11 Mar 2026 10:29:07 -0400 Subject: [PATCH] Check for a `.hist` suffix in shm file names That is, in-mem history buffer files should have a `.hist` suffix (which was added back instead of the weird `.h` change from the rebased 8352d89e, initially providing the macos support fix). I'm pretty sure we can afford the 3 extra chars if we're already truncating to a max 16 char `key: str = f'{uuid[:8]}_{fqme_hash}'`, per @goodboy's edit from the original key-truncation approach in the original original @dnks patch: 75d8582b). --- piker/ui/_display.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/piker/ui/_display.py b/piker/ui/_display.py index 9cedcc63..1b28312c 100644 --- a/piker/ui/_display.py +++ b/piker/ui/_display.py @@ -214,7 +214,8 @@ async def increment_history_view( hist_chart: ChartPlotWidget = ds.hist_chart hist_viz: Viz = ds.hist_viz # viz: Viz = ds.viz - assert 'hist' in hist_viz.shm.token['shm_name'] + # Ensure the "history" shm-buffer is what's reffed. + assert hist_viz.shm.token['shm_name'].endswith('.hist') # name: str = hist_viz.name # TODO: seems this is more reliable at keeping the slow