Skip to content

❤️ (VCS/VTC) None vs Value Consistency #22

@OppaAI

Description

@OppaAI

⚠️ Issue: Semantic Ambiguity (None vs. Zero Inconsistency)

The current telemetry pipeline does not consistently distinguish between a valid numerical zero and a missing data point (None). This leads to "Silent Failures" where a disconnected sensor is averaged into the vitals as a 0.0, artificially lowering the perceived load/temperature and preventing the Regulator from triggering safety protocols.

🎯 Location:

robot/vtc/pump.py -> trace_thru_conduit()
robot/vtc/regulator.py -> normalize()
glob_bin storage structure

🦠 Symptoms:

  • A failed CPU temperature sensor returns None, which is then treated as 0.0 by unguarded max() calls, making the robot think it's "Ice Cold" when it might be melting.
  • A missing sensor returns -256 to indicate non-availability, but is then treated as value or error.
  • Mathematical operations (like calculating an average) throw TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'.
  • The UI displays 0% for sensors that are actually offline, providing a false sense of security.

🩺 Diagnosis:

  • The system lacks a Null-Aware Data Policy. In real-time systems, a None value is a "Control Signal" indicating a hardware fault, whereas 0.0 is a "Data Signal" indicating a resting state, while -256 indicates sensor not installed or missing. Combining these into a single numerical stream without filtering creates Data Corruption.

💡 Proposal:

Explicit Sentinel Value & Filter Pattern

  • Standardize how the Pump reports and how the Regulator consumes non-numerical data.
  • The Pump's Responsibility: If a conduit path is broken or jtop returns an error, the Pump must return None. It should never "guess" a number like -1 or 0.
  • The Deque's Responsibility: Deques will store None to preserve the temporal record of the failure (showing "gaps" in the data).
  • The Consumer's Responsibility: The Regulator and Display must use Truthiness Filtering (e.g., [v for v in deque if v is not None]) before performing any math.
  • The Alert Trigger: If a deque's "Null Ratio" exceeds 50%, the node state should transition to DEGRADED.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions