@@ -172,7 +172,6 @@ func specK8sObjects() []runtime.Object {
172172 "instructions" : `instructions:
173173 move_joint:
174174 readWrite: W
175- safe: false
176175 description: |
177176 Move a specific joint to a target angle.
178177 ## Topic
@@ -186,7 +185,6 @@ func specK8sObjects() []runtime.Object {
186185 - ` + "`speed`" + `: 1-100 (% of max speed)
187186 gripper:
188187 readWrite: W
189- safe: false
190188 description: |
191189 Open or close the gripper.
192190 ## Topic
@@ -197,15 +195,13 @@ func specK8sObjects() []runtime.Object {
197195 ` + "```" + `
198196 joint_positions:
199197 readWrite: R
200- safe: true
201198 description: |
202199 Real-time joint positions. Subscribe to receive continuous updates.
203200 ## Topic
204201 ` + "`robot-arm/status/joint_positions`" + `
205202 Published every 100ms. Array is [J1..J6] in degrees.
206203 emergency_stop:
207204 readWrite: W
208- safe: false
209205 description: |
210206 Immediately halt all motion.
211207 ## Topic
@@ -261,20 +257,17 @@ func specK8sObjects() []runtime.Object {
261257 "instructions" : `instructions:
262258 temperature:
263259 readWrite: R
264- safe: true
265260 description: |
266261 Temperature readings. Subject: ` + "`sensors.<node_id>.temperature`" + `
267262 Wildcard: ` + "`sensors.*.temperature`" + ` for all nodes.
268263 Published every 5 seconds per node.
269264 vibration:
270265 readWrite: R
271- safe: true
272266 description: |
273267 Vibration readings. Subject: ` + "`sensors.<node_id>.vibration`" + `
274268 Values above 0.5g indicate potential failure.
275269 configure_interval:
276270 readWrite: W
277- safe: false
278271 description: |
279272 Change reporting interval. Uses NATS request/reply.
280273 Subject: ` + "`sensors.<node_id>.config.interval`" + `
@@ -329,20 +322,17 @@ func specK8sObjects() []runtime.Object {
329322 "instructions" : `instructions:
330323 get_temperature:
331324 readWrite: R
332- safe: true
333325 description: |
334326 GET /get_temperature
335327 Response: {"temperature": 36.5, "unit": "celsius"}
336328 Updates every 3 seconds.
337329 set_unit:
338330 readWrite: W
339- safe: false
340331 description: |
341332 POST /set_unit {"unit": "fahrenheit"}
342333 Response: {"status": "ok", "unit": "fahrenheit"}
343334 status:
344335 readWrite: R
345- safe: true
346336 description: |
347337 GET /status — returns plain text: ` + "`running`" + ` or ` + "`error: <message>`" + `.
348338` ,
@@ -466,34 +456,26 @@ func TestE2ESpecRobotArmMQTT(t *testing.T) {
466456 interactionMap [intr .Name ] = intr
467457 }
468458
469- // move_joint: W, unsafe, topic info
459+ // move_joint: W, topic info
470460 moveJoint := interactionMap ["move_joint" ]
471461 assert .Equal (t , "W" , moveJoint .ReadWrite )
472- require .NotNil (t , moveJoint .Safe )
473- assert .False (t , * moveJoint .Safe )
474462 assert .Contains (t , moveJoint .Description , "robot-arm/commands/move_joint" )
475463 assert .Contains (t , moveJoint .Description , "joint" )
476464 assert .Contains (t , moveJoint .Description , "angle" )
477465
478- // gripper: W, unsafe
466+ // gripper: W
479467 gripper := interactionMap ["gripper" ]
480468 assert .Equal (t , "W" , gripper .ReadWrite )
481- require .NotNil (t , gripper .Safe )
482- assert .False (t , * gripper .Safe )
483469 assert .Contains (t , gripper .Description , "robot-arm/commands/gripper" )
484470
485- // joint_positions: R, safe
471+ // joint_positions: R
486472 jointPos := interactionMap ["joint_positions" ]
487473 assert .Equal (t , "R" , jointPos .ReadWrite )
488- require .NotNil (t , jointPos .Safe )
489- assert .True (t , * jointPos .Safe )
490474 assert .Contains (t , jointPos .Description , "robot-arm/status/joint_positions" )
491475
492- // emergency_stop: W, unsafe
476+ // emergency_stop: W
493477 eStop := interactionMap ["emergency_stop" ]
494478 assert .Equal (t , "W" , eStop .ReadWrite )
495- require .NotNil (t , eStop .Safe )
496- assert .False (t , * eStop .Safe )
497479 assert .Contains (t , eStop .Description , "robot-arm/commands/emergency_stop" )
498480}
499481
@@ -536,26 +518,20 @@ func TestE2ESpecSensorArrayNATS(t *testing.T) {
536518 interactionMap [intr .Name ] = intr
537519 }
538520
539- // temperature: R, safe, NATS subject pattern
521+ // temperature: R, NATS subject pattern
540522 temp := interactionMap ["temperature" ]
541523 assert .Equal (t , "R" , temp .ReadWrite )
542- require .NotNil (t , temp .Safe )
543- assert .True (t , * temp .Safe )
544524 assert .Contains (t , temp .Description , "sensors." )
545525 assert .Contains (t , temp .Description , "temperature" )
546526
547- // vibration: R, safe
527+ // vibration: R
548528 vib := interactionMap ["vibration" ]
549529 assert .Equal (t , "R" , vib .ReadWrite )
550- require .NotNil (t , vib .Safe )
551- assert .True (t , * vib .Safe )
552530 assert .Contains (t , vib .Description , "vibration" )
553531
554- // configure_interval: W, unsafe, request/reply
532+ // configure_interval: W, request/reply
555533 cfgInterval := interactionMap ["configure_interval" ]
556534 assert .Equal (t , "W" , cfgInterval .ReadWrite )
557- require .NotNil (t , cfgInterval .Safe )
558- assert .False (t , * cfgInterval .Safe )
559535 assert .Contains (t , cfgInterval .Description , "request/reply" )
560536}
561537
@@ -593,25 +569,19 @@ func TestE2ESpecThermometerHTTP(t *testing.T) {
593569 interactionMap [intr .Name ] = intr
594570 }
595571
596- // get_temperature: R, safe, GET endpoint
572+ // get_temperature: R, GET endpoint
597573 getTemp := interactionMap ["get_temperature" ]
598574 assert .Equal (t , "R" , getTemp .ReadWrite )
599- require .NotNil (t , getTemp .Safe )
600- assert .True (t , * getTemp .Safe )
601575 assert .Contains (t , getTemp .Description , "GET /get_temperature" )
602576
603- // set_unit: W, unsafe, POST endpoint
577+ // set_unit: W, POST endpoint
604578 setUnit := interactionMap ["set_unit" ]
605579 assert .Equal (t , "W" , setUnit .ReadWrite )
606- require .NotNil (t , setUnit .Safe )
607- assert .False (t , * setUnit .Safe )
608580 assert .Contains (t , setUnit .Description , "POST /set_unit" )
609581
610- // status: R, safe
582+ // status: R
611583 status := interactionMap ["status" ]
612584 assert .Equal (t , "R" , status .ReadWrite )
613- require .NotNil (t , status .Safe )
614- assert .True (t , * status .Safe )
615585 assert .Contains (t , status .Description , "GET /status" )
616586}
617587
@@ -760,7 +730,6 @@ func TestE2ESpecGracefulDegradation(t *testing.T) {
760730 for _ , intr := range desc .Interactions {
761731 interactionNames [intr .Name ] = true
762732 assert .Equal (t , "" , intr .ReadWrite , "legacy instructions have no readWrite" )
763- assert .Nil (t , intr .Safe , "legacy instructions have no safe field" )
764733 assert .Equal (t , "" , intr .Description , "legacy instructions have no description" )
765734 }
766735 assert .True (t , interactionNames ["read_value" ])
0 commit comments