Skip to content
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

feat(api): Attach error recovery debug notes to commands #16608

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Oct 25, 2024

Overview

User interactions for error recovery are already "logged", as the run's actions. However, stuff that the robot does automatically is not. This closes that gap in a basic way. When a command fails, we'll append a human-readable note to it that mentions how Protocol Engine is basically treating it. (FAIL_RUN, WAIT_FOR_RECOVERY, CONTINUE_WITH_ERROR, or ASSUME_FALSE_POSITIVE_AND_CONTINUE.)

In particular, this means that when a user selects Ignore all errors of this type, the run log can show us all the commands that the robot auto-handled in that way.

Closes EXEC-780.

Test Plan and Hands on Testing

  • Run a protocol with some command errors. Download the run log and make sure these notes show up on any commands that failed.

Review requests

The existing CommandNote shape is just human-readable. So for simplicity, I'm matching that and just providing a human-readable string.

Would it be a good idea to also expand CommandNote with a Mapping[str, Any] field, like we have for errors? Then we could put stuff like StateUpdates in there without it being a gross monolithic string.

Risk assessment

Low.

@SyntaxColoring SyntaxColoring requested a review from a team October 25, 2024 17:56
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner October 25, 2024 17:56
@SyntaxColoring SyntaxColoring added the gen-analyses-snapshot-pr Generate a healing PR if the analyses snapshot test fails label Oct 25, 2024
Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: #16609

SyntaxColoring added a commit that referenced this pull request Oct 25, 2024
…hots (#16609)

This PR was requested on the PR
#16608

Co-authored-by: SyntaxColoring <[email protected]>
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner October 25, 2024 18:54
@SyntaxColoring SyntaxColoring removed the gen-analyses-snapshot-pr Generate a healing PR if the analyses snapshot test fails label Oct 25, 2024
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (false_positive_state_update@2a4d086). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                      Coverage Diff                       @@
##             false_positive_state_update   #16608   +/-   ##
==============================================================
  Coverage                               ?   92.43%           
==============================================================
  Files                                  ?       77           
  Lines                                  ?     1283           
  Branches                               ?        0           
==============================================================
  Hits                                   ?     1186           
  Misses                                 ?       97           
  Partials                               ?        0           
Flag Coverage Δ
g-code-testing 92.43% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, I'm glad we're using these

@SyntaxColoring
Copy link
Contributor Author

Will merge behind #16556.

@SyntaxColoring SyntaxColoring requested a review from a team as a code owner October 28, 2024 14:26
@SyntaxColoring SyntaxColoring requested review from mjhuff and removed request for a team October 28, 2024 14:26
@SyntaxColoring SyntaxColoring changed the base branch from false_positive_state_update to edge October 28, 2024 14:26
@SyntaxColoring SyntaxColoring merged commit e420916 into edge Oct 28, 2024
88 checks passed
@SyntaxColoring SyntaxColoring deleted the error_recovery_debug_notes branch October 28, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants