Skip to content

Conversation

@jerader
Copy link
Collaborator

@jerader jerader commented Nov 14, 2025

closes AUTH-2486

Overview

clean up the invariant context construct for PV utility by grabbing the analysis and using the completed protocol analysis labware, modules, and pipettes. and then the staging areas, waste chute and trash bins are all generated based off of the commands still

also fixed a few bugs with generating the trash and waste chute entities and pipette entities with multiple tipracks assigned

Test Plan and Hands on Testing

review the code and smoke test that all the deck setup information is properly rendering on the deck map

Changelog

refactor the util and rename to say its from the analysis instead of just commands

Risk assessment

low

@jerader jerader requested review from koji and ncdiehl11 November 14, 2025 20:46
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 1.21951% with 162 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.29%. Comparing base (3ef89b5) to head (8546f61).
⚠️ Report is 19 commits behind head on edge.

Files with missing lines Patch % Lines
...src/utils/constructInvariantContextFromAnalysis.ts 1.24% 159 Missing ⚠️
...cols/ProtocolVisualization/VisualizerContainer.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             edge   #20168       +/-   ##
===========================================
- Coverage   56.85%   24.29%   -32.57%     
===========================================
  Files        3572     3573        +1     
  Lines      297865   297999      +134     
  Branches    42200    41988      -212     
===========================================
- Hits       169363    72387    -96976     
- Misses     128272   225590    +97318     
+ Partials      230       22      -208     
Flag Coverage Δ
protocol-designer 19.16% <1.21%> (+<0.01%) ⬆️
step-generation 5.48% <1.21%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
step-generation/src/utils/index.ts 100.00% <ø> (ø)
...cols/ProtocolVisualization/VisualizerContainer.tsx 0.00% <0.00%> (-61.07%) ⬇️
...src/utils/constructInvariantContextFromAnalysis.ts 1.24% <1.24%> (ø)

... and 1874 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

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

left a few minor style comments

Comment on lines +101 to +108
const otherEntities = commands.reduce(
(
acc: Omit<
InvariantContext,
'labwareEntities' | 'moduleEntities' | 'pipetteEntities'
>,
command: RunTimeCommand
) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const otherEntities = commands.reduce(
(
acc: Omit<
InvariantContext,
'labwareEntities' | 'moduleEntities' | 'pipetteEntities'
>,
command: RunTimeCommand
) => {
const otherEntities = commands.reduce<
Omit<
InvariantContext,
'labwareEntities' | 'moduleEntities' | 'pipetteEntities'
>
>(
(acc, command: RunTimeCommand) => {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the opposite of the other suggestions lol. i'm gonna leave as is

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hm what do you mean? Typing the return of the reduce rather than the acc is consistent above, no?

Fine with me to leave as is though

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ooooo i definitely didn't read clearly. my bad. ya i'll address this! thanks!

Comment on lines +169 to +177
if (addressableAreaName.includes('WasteChute')) {
wasteChuteEntities = {
[id]: {
pythonName: 'waste_chute',
id,
location,
},
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

don't we have the same if statement above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nah the other one is for trash bin

Copy link
Collaborator

Choose a reason for hiding this comment

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

looking at L143

@jerader jerader requested a review from ncdiehl11 November 18, 2025 15:05
Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

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

just replied to one comment re: what I think is a redundant if statement, but will unblock you! thanks a lot

@jerader jerader merged commit 89747d1 into edge Nov 19, 2025
32 of 35 checks passed
@jerader jerader deleted the sg_clean-up-pv-ic branch November 19, 2025 21:46
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.

3 participants