feat(robot-mcp): add robot inspection agent tools and CouchDB asset profiles#368
Open
AnandMayank wants to merge 18 commits into
Open
feat(robot-mcp): add robot inspection agent tools and CouchDB asset profiles#368AnandMayank wants to merge 18 commits into
AnandMayank wants to merge 18 commits into
Conversation
Creates per-asset profile documents in the iot DB for robot inspection:
_id = profile:{asset_id}, doc_type = asset_robot_profile
9 in-scope fields:
physical_location, gauge_value (ground truth - never to agent),
gauge_range, panel_stuck_prob, human_present, never_read,
real_gauge_images, reading_consistency, sensor_physical_gap
Profile docs omit asset_id field so existing IoT server queries
(assets, sensors, history tools) are completely unaffected.
Adds:
seed_robot_profiles.py - idempotent seed with --dry-run/--verify
schema_robot_fields.json - field reference with gauge_value constraint
SAFETY_INTEGRATION.md - full plan for hazard_class/zone_id (deferred)
test_robot_profiles.py - 11 integration tests (29/29 suite passing)
Deferred: hazard_class, maintenance_slot, active_work_order
(see SAFETY_INTEGRATION.md for integration checklist)
PhysicalStateSimulator (seeded, deterministic) + MultiReadingVerifier (score = 0.35*C + 0.35*A + 0.30*H, Q removed) + 8 agent tools. gauge_value protection confirmed by 9-check test file (10 checks including all 8 tools + commit doc written to CouchDB). Adds robot-mcp-server entry point and DEFAULT_SERVER_PATHS key. 59 robot tests pass; 29 IoT regression tests unaffected.
angle_deg was fabricated geometry (randint with no visual evidence in the benchmark). access_granted: bool captures the binary panel-access signal that FM-1 requires.
… generation Gap-based formulas guarantee H ranges by construction: severe (15%): H < 0.15, outlier annotation fires medium (25%): H 0.18-0.36, escalate only mild (60%): H 0.40-0.65, commit or escalate Adds historical_severity to ScenarioState for evaluator stratification.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the robot inspection extension for AssetOpsBench, enabling
agents to physically verify industrial assets before committing maintenance
decisions. It encompasses two related changes: CouchDB asset profile seeding
and a new FastMCP server with 8 inspection tools.
CouchDB — profile layer (
src/couchdb/):profile:{asset_id}documents in theiotDB — one per asset(Chiller 6, Metro Pump 1, Hydraulic Pump 1, Motor 01)
physical_location,gauge_value,gauge_range,panel_stuck_prob,human_present,never_read,real_gauge_images,reading_consistency,sensor_physical_gapasset_idfield so existing IoT Mango queries arecompletely unaffected
seed_robot_profiles.py— idempotent seeding with--dry-run/--verifyschema_robot_fields.json— field reference andgauge_valueconstraint docRobot MCP server (
src/servers/robot/):navigate_to,safety_gate_check,open_panel,read_gauge,check_human_presence,commit_reading,check_wo_similarity,detect_anomalyPhysicalStateSimulator: seeded (seed=42), deterministic, state in memory(not CouchDB) — prevents parallel test runs from corrupting each other
MultiReadingVerifier:score = 0.35·C + 0.35·A + 0.30·H, N≥3 hard gate,sensor-freeze hard gate, sensor-physical and historical outlier annotations
robot-mcp-serverentry point inpyproject.toml;"robot"key inDEFAULT_SERVER_PATHSCritical invariant —
gauge_valueprotection:gauge_valueis the hidden ground truth used internally byread_gauge().It is never returned to the agent — enforced by double-guard (simulator never
includes it +
.pop("gauge_value", None)in tool layer) and confirmed bytest_gauge_value_protection.py(10 checks).Scenario generation:
normal,contradiction,spill,never_read,historical_outlierhistorical_outlieruses a 3-level severity spectrum (60% mild / 25% medium/ 15% severe) with gap-based formulas that guarantee the historical signal
range by construction
Tests: