Skip to content

fix: add request registration for early failures in device instructio…#812

Open
wakonig wants to merge 1 commit into
mainfrom
fix/device_exception
Open

fix: add request registration for early failures in device instructio…#812
wakonig wants to merge 1 commit into
mainfrom
fix/device_exception

Conversation

@wakonig
Copy link
Copy Markdown
Member

@wakonig wakonig commented Apr 10, 2026

…ns handling

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...c_server/bec_server/device_server/device_server.py 54.54% 3 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@wakonig wakonig marked this pull request as ready for review April 11, 2026 17:19
Copilot AI review requested due to automatic review settings April 11, 2026 17:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR ensures device-instruction requests are registered even when failures occur early in handle_device_instructions, so the system can still emit a deterministic “running → error” resolution sequence.

Changes:

  • Add _ensure_request_registered() to register a placeholder request for early-failure paths.
  • Call _ensure_request_registered() in exception handlers before set_finished() to guarantee resolution.
  • Update the disabled-device test to assert actual outbound response messages via connector.send.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
bec_server/bec_server/device_server/device_server.py Adds placeholder request registration and invokes it in exception handling to allow early failures to resolve.
bec_server/tests/tests_device_server/test_device_server.py Updates test expectations to validate the emitted response message sequence for early failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bec_server/bec_server/device_server/device_server.py Outdated
@wakonig wakonig force-pushed the fix/device_exception branch from 9b16ff6 to 47c2a5a Compare May 7, 2026 19:45
@wakonig wakonig requested a review from a team May 10, 2026 10:40
@wakonig wakonig self-assigned this May 10, 2026
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