-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
⚠️ Issue: Missing Conduit Keys (KeyError Regression)
The current telemetry pipeline only initializes and appends to deques when the floodgate_is_open and a collection_point is valid. This causes "Silent Crashes" (KeyError) in downstream consumers—like the VTC Display—that expect every conduit defined in the manifest to exist in bin["glob"], regardless of the current data-flow state.
🎯 Location:
robot/vtc/pump.py -> trace_thru_conduit()
robot/vtc/display.py -> display_tick() glob_bin storage initialization
🦠 Symptoms:
- KeyError: Downstream consumers calling
max(vital_manifest["p_unit.system"])or similar keys fail immediately if a module hasn't reported data yet. - UI Flickering: Vitals disappear and reappear based on transient reservoir readiness.
- Startup Race Condition: If the Display starts before the Reservoir is fully "primed," the system crashes because the expected dictionary keys were never initialized.
- Inconsistent State: There is no way to distinguish between a "Sensor that doesn't exist" and a "Sensor that is currently offline."
🩺 Diagnosis:
- The system has moved from a Fixed Schema to a Conditional Schema. In a real-time monitoring system, the structure of the data (the keys) should be static and defined by the manifest, while the content (the values) is dynamic. By making key creation conditional on the floodgate state, we broke the contract with the data consumers.
💡 Proposal:
Standardized Key Initialization & Null-Padding Pattern
- Initialize on Load: Ensure every conduit defined in the configuration/manifest is initialized with an empty
dequeinbin["glob"]during the Pump's startup sequence, regardless of whether the reservoir is ready. - Append None for Missed Cycles: If the
floodgateis closed or thecollection_pointreturns no data, the Pump should appendNoneto the deque. This preserves the temporal integrity of the data stream (keeping the "timeline" aligned). - Safe Consumption: Downstream consumers (Regulator/Display) should continue to use the Null-Aware filtering pattern established in previous fixes (e.g.,
[v for v in values if v is not None]) to handle these gaps without crashing. - Placeholder Support: Initializing with
Noneallows the UI to show a "STALE" or "OFFLINE" status rather than simply failing to render the entire dashboard.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Projects
Status
Todo