Skip to content

Improve interface details - #3794

Merged
EmilyRagan merged 3 commits into
mainfrom
improve-details
Sep 8, 2026
Merged

Improve interface details#3794
EmilyRagan merged 3 commits into
mainfrom
improve-details

Conversation

@EmilyRagan

@EmilyRagan EmilyRagan commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What changed

  • timestamp format alignment
  • report/log error from calling details instead of crashing script
  • add return details of interface_details to documentation (Claude generated)
  • add details to "Custom Interfaces" documentation

Why it changed

Support email about custom interface crashing when calling interface_details on it, digging deeper into how this function works and what it calls

Testing strategy

  • Ruby and Python unit tests
  • Manual testing on main vs on this branch
    1. check out main, edit simulated_target_interface.py to have the implementation of details method
def details(self):
    super().details()
    Logger.info("Simulated Target Interface Details:")
    raise NotImplementedError("details() not implemented for SimulatedTargetInterface")
  1. openc3.sh start
  2. click "details" on INST2

Result

on main: interface crashes and reboots, see logs and connected status of INST2
on this branch: error logged, interface does not crash/reboot

Review notes

A lot was added to the documentation detailing the return format of interface_details with both common keys and interface-specific keys. They are tabbed so that not all information is shown at once, but it is a lot of lines and still a fairly large section on the docs page. Details about what is returned is a big hole in the documentation, and it is possible that this opens a can of worms, but this feels like one of the most complex returns of methods that are offered to users.

@EmilyRagan EmilyRagan self-assigned this Aug 31, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.77778% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.21%. Comparing base (758a8a8) to head (a5cfacf).
⚠️ Report is 130 commits behind head on main.

Files with missing lines Patch % Lines
openc3/lib/openc3/interfaces/protocols/protocol.rb 0.00% 4 Missing ⚠️
...lib/openc3/microservices/interface_microservice.rb 50.00% 3 Missing ⚠️
openc3/lib/openc3/interfaces/interface.rb 0.00% 2 Missing ⚠️
...b/openc3/interfaces/protocols/template_protocol.rb 0.00% 2 Missing ⚠️
openc3/lib/openc3/topics/router_topic.rb 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3794      +/-   ##
==========================================
+ Coverage   79.13%   79.21%   +0.08%     
==========================================
  Files         894      894              
  Lines       66865    66984     +119     
  Branches     2551     2600      +49     
==========================================
+ Hits        52911    53061     +150     
+ Misses      13293    13263      -30     
+ Partials      661      660       -1     
Flag Coverage Δ
frontend 66.06% <ø> (+0.01%) ⬆️
python 79.34% <ø> (+0.05%) ⬆️
ruby-api 82.32% <ø> (+0.27%) ⬆️
ruby-backend 84.53% <27.77%> (+0.09%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@EmilyRagan
EmilyRagan marked this pull request as ready for review September 8, 2026 13:36
@jmthomas jmthomas changed the title Improve details Improve interface details Sep 8, 2026
| port | Integer | Port the server listens on |
| request_queue_length | Integer | Number of requests queued to be read |
</TabItem>
</Tabs>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think all this info is great, I just worry about it becoming out of date with changes to the underlying protocols. Luckily we rarely change these so there's not much chance for drift but we have to remember to update this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It would probably be good to add a line to our AI instructions file (which we should probably migrate to agents.md) to check if there is documentation and update it, at least when modifying any of the functions that can be used in scripts or microservices

@EmilyRagan
EmilyRagan merged commit c2581a8 into main Sep 8, 2026
36 of 40 checks passed
@EmilyRagan
EmilyRagan deleted the improve-details branch September 8, 2026 15:52
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