-
Notifications
You must be signed in to change notification settings - Fork 187
feat(shared-data): command annotations schema v2 #20324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: edge
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## edge #20324 +/- ##
==========================================
+ Coverage 25.63% 26.82% +1.19%
==========================================
Files 3628 3636 +8
Lines 302060 302892 +832
Branches 42321 42334 +13
==========================================
+ Hits 77429 81247 +3818
+ Misses 224607 221615 -2992
- Partials 24 30 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| @@ -0,0 +1,104 @@ | |||
| { | |||
| "$id": "opentronsCommandAnnotationSchemaV2#", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you give me an example? so like this? has 3 commands
{
"annotationId": "id",
"annotationType": "secondOrderCommand",
"parentAnnotation": "parentId",
"commandKeys": [
"commandKey1",
"commandKey2",
"commandKey3"
],
"params": {}
"machineReadableName": "transfer",
"userSpecifiedName": "Transfer Sample from A1 to B1",
"userSpecifiedDescription": "Perform a transfer"
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not going to have commandKeys anymore. There were a couple references to them in the schema at the time of this comment but those have been removed. I'm not sure if we'll be using the second order type for PD or the user command ones I've added, but it'll look like they above except without commandKeys (and a userCommand wouldn't have machineReadableName). Then the commands themselves would have a command annotation field like:
{
"id": "commandID,
"createdAt": "2025-11-20T19:22:16.078608Z",
"commandType": "dropTip",
"status": "succeeded",
...
"startedAt": "2025-11-20T19:22:16.078608Z",
"completedAt": "2025-11-20T19:22:16.078894Z",
"notes": [],
"commandAnnotations": ["commandAnnotationID"]
}
Overview
Closes AUTH-2549
This PR adds a new command annotation schema to shared data, adds this type to the existing protocol schema v8, and makes a small change in the previous and mostly unused version of command annotations to not break if it somehow encounters the new command annotations.
The major changes in V2 are removing
commandKeysas a property (commands will now have reference to the annotation within them, this will be done in a future PR), adding anannotationIdproperty that will be used by commands and potentially other annotations to reference the annotation, and creating a newuserCommandtype of annotation to represent annotations created by the user, so we can differentiate them if we ever automatically generate them.In #15737 an earlier version of command annotations was implemented in analysis. This was not ever used in production, and was only supported in JSON protocols. This version of it would just cleanly translate any command annotations used in a JSON protocol and include that in the analysis. Although this was never made public and new JSON protocols are deprecated, this code is being left in with the change to keep the current behavior if the schema still has the V1 of command annotations.
Test Plan and Hands on Testing
Ensured this does not break any machine that happens to have a JSON protocol with command annotations, though this is most likely zero out in the field. Otherwise this is just a schema change so not much testing needed.
Changelog
opentronsCommandAnnotationSchemaV2which removescommandKeys, addsannotationIdand adds a newuserCommandtypeopentronsCommandAnnotationSchemaV2Review requests
Am I forgetting anywhere else I need to update this? Future PRs will implement the pydantic objects for the new schema.
Risk assessment
Low, small change to an unused feature and still kept backwards compatibility for it.