Skip to content

feat(robot-server, api): Serpent serialization for all layers and coverage enforcement testing#21396

Draft
CaseyBatten wants to merge 24 commits into
edgefrom
serialization_test_branch
Draft

feat(robot-server, api): Serpent serialization for all layers and coverage enforcement testing#21396
CaseyBatten wants to merge 24 commits into
edgefrom
serialization_test_branch

Conversation

@CaseyBatten
Copy link
Copy Markdown
Contributor

@CaseyBatten CaseyBatten commented Apr 29, 2026

Overview

Covers EXEC-2435, EXEC-2465, and EXEC-2609

THIS IS EXTREMELY DRAFT EARLY VERSION -- EXPECT IT TO BE VERY BROKEN, IT WILL BE BETTER SOON I PROMISE :)

NOTE TO REVIEWERS:
I used an LLM to generate the majority of the PARAMETERS_MOCK_TABLE data given the sheer amount of parameters that were found by scraping our interface layer for our three processes. This generated table was based off a small sample size table I hand built. I have combed through the mock and dummy data introduced throughout the table, and to my eyes it seems correct but PLEASE keep a keen eye on the data and how it's being tested against elsewhere. I built a substantial portion of the testing suite around this large data set, so it's important that we be scrutinous of it!


This PR adds in a large unit test suite that spins up each of our Pyro layers in a thread and does interface scraping and testing against each of them. It also adds in serialization for our missing libraries.

  • Add in proxy-return recursive testing and scraping (will cover things like file provider, attached modules, etc)
  • Add in all the backend mocking needed to actually make all these test calls not get internal errors
  • Split the single serialization test executor into six individual executors:
    - OT3API coverage tests: Methods test, attributes test
    - ROBOT-SERVER coverage tests: Methods test, attributes test
    - DIRECTED-RUN coverage tests: Methods test, attributes test
  • Add in missing serializations to make all these tests pass and give us 100% operational coverage

Test Plan and Hands on Testing

  • Gargantuan unit test

Changelog

  • large intergration testing suite under test_serialization_enforcement.py
  • new pyro_behavior convert_result_to_dict_of_proxies to give us coverage for things that are dictionaries of proxies
  • serializaiton for a bunch of OT3API types we were missing
  • PipetteConfigurations now have extended field validators for liquid classes and tip type keys that were getting turned into integer strings by model dumping form pydantic
  • PyroSynchronousObject class generator now has extended coverage for staticmethods

TBD

Review requests

TBD

Risk assessment

Low - this serializes the rest of our stuff and will make sure we future proof extending our libraries

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.67%. Comparing base (c16a5b3) to head (dfbc595).
⚠️ Report is 3 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #21396      +/-   ##
==========================================
+ Coverage   21.64%   21.67%   +0.02%     
==========================================
  Files        3896     3903       +7     
  Lines      326958   327033      +75     
  Branches    58072    58124      +52     
==========================================
+ Hits        70783    70876      +93     
+ Misses     253212   253189      -23     
- Partials     2963     2968       +5     
Flag Coverage Δ
app 46.01% <ø> (+0.06%) ⬆️
protocol-designer 39.84% <ø> (-0.01%) ⬇️
step-generation 60.95% <ø> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
...pentrons_shared_data/pipette/pipette_definition.py 94.44% <ø> (-0.08%) ⬇️

... and 12 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.

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.

1 participant