Skip to content

❤️ (VCS/VTC) YAML Fail-Fast: check during init if yaml file is loading properly #24

@OppaAI

Description

@OppaAI

⚠️ Issue: Delayed Failure via YAML Misconfiguration

Currently, a typo in the robot_spec.yaml (e.g., writing tempurature instead of temperature) might not be detected until the Pump attempts to harvest that specific conduit. If this happens mid-mission, the Regulator receives None or an error, causing unexpected behavior or "Zombie" states.

🎯 Location:

robot/vtc/pump.py -> __init__
robot/vcs/robot_spec.yaml

🦠 Symptoms:

  • Node starts successfully but logs constant KeyError warnings during runtime.
  • Critical vitals (like Battery) remain at 0.0 or None because the path was incorrect from the start.
  • "Silent" configuration errors that are only discovered during high-stress maneuvers.

🩺 Diagnosis:

  • The system is currently Optimistic. It assumes the YAML matches the hardware. A "Fail-Fast" architecture replaces this with Validation-First logic, where the configuration is treated as an untrusted input that must be "proven" before the mission begins.

💡 Proposal:

The YAML "Smoke Test" (Fail-Fast)
Implement a strict validation sequence during the INIT state. If any "Active" conduit fails the smoke test, the node must abort or stay in DEGRADED.

  • Structural Validation: Check that every entry has the required keys (path, flow, active).
  • Path Existence (The Smoke Test): Attempt to traverse every active: true path once during __init__.
  • Strict Mode: If a path is missing, use self.get_logger().error() and set self.state = "STOPPED" or raise a SystemExit.
  • No Ghosting: Don't let a bad config "limp along." If the heart can't see the CPU temp, the heart shouldn't beat.
  • Can be fixed together with ❤️ (VCS/VTC) None vs Value Consistency #22 and ❤️ (VCS/VTC) Add Lifestream Guard for failures #23.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions