Skip to content

Feature/ab#2111 add shutdown inhibit endpoint#27

Merged
flonix8 merged 8 commits intomainfrom
feature/AB#2111-add-shutdown-inhibit-endpoint
Apr 9, 2026
Merged

Feature/ab#2111 add shutdown inhibit endpoint#27
flonix8 merged 8 commits intomainfrom
feature/AB#2111-add-shutdown-inhibit-endpoint

Conversation

@flonix8
Copy link
Copy Markdown
Contributor

@flonix8 flonix8 commented Mar 26, 2026

Description

This adds an http endpoint to inhibit HCU-triggered shutdowns (e.g. to complete a maintenance task).
Also adds HTTP API tests and refactors existing hcu related tests.

Motivation and Context

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

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

Adds a shutdown inhibition feature to the HCU subsystem, exposing new HTTP endpoints to inhibit an in-progress (or future) HCU-triggered shutdown and to query shutdown status. This is supported by introducing a dedicated shutdown timer model and reorganizing/refactoring HCU-related tests.

Changes:

  • Add ShutdownModel for tracking shutdown timing, inhibition, and remaining time.
  • Extend HCU HTTP API with /shutdown/inhibit/{seconds} and /shutdown/status, plus new API tests using httpx.
  • Refactor/move existing HCU monitor tests into a dedicated tests/hcu/ package with shared fixtures.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/test_hcu_monitor.py Removes old top-level HCU monitor tests (moved/refactored under tests/hcu/).
tests/hcu/test_shutdown.py Adds unit tests for the new shutdown timing/inhibition model.
tests/hcu/test_hcu_monitor.py Adds refactored async integration tests for shutdown/resume behavior.
tests/hcu/test_hcu_api.py Adds FastAPI route tests for shutdown inhibit and status endpoints.
tests/hcu/conftest.py Introduces shared HCU test fixtures (serial socket, default skill, tmp file).
tests/hcu/init.py Establishes tests.hcu as a package.
pyproject.toml Adds httpx to dev dependencies for ASGI/API testing.
poetry.lock Updates lockfile to include httpx and dependency group metadata changes.
msu_manager/hcu/skill.py Adds shutdown inhibit and shutdown status endpoints to the HCU API routes.
msu_manager/hcu/shutdown.py Introduces ShutdownModel and ShutdownError.
msu_manager/hcu/controller.py Integrates ShutdownModel into shutdown scheduling/cancel flow and exposes status/inhibit helpers.
msu_manager/config.py Adds shutdown_inhibit_max_s configuration setting.

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

Comment thread tests/hcu/test_hcu_monitor.py Outdated
Comment thread msu_manager/hcu/controller.py Outdated
Comment thread msu_manager/hcu/controller.py
Comment thread msu_manager/hcu/skill.py Outdated
Comment thread tests/hcu/conftest.py Outdated
@flonix8 flonix8 merged commit 8abdb94 into main Apr 9, 2026
2 checks passed
@flonix8 flonix8 deleted the feature/AB#2111-add-shutdown-inhibit-endpoint branch April 9, 2026 10:22
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