Add graceful shutdown and dark-blue restore #12

Closed
opened 2026-05-05 02:10:56 -04:00 by JackFrostbyte · 1 comment

Title:
Add graceful shutdown and dark-blue restore

Description:
Ensure the aurora controller handles user interruption cleanly and restores active zones to dark blue.

Scope:

  • Handle Ctrl+C.
  • Handle normal script exit.
  • Restore only validated active zones.
  • Do not write to reserved zones.
  • Log what zones were restored.

Acceptance criteria:

  • Pressing Ctrl+C leaves active zones dark blue.
  • Normal exit leaves active zones dark blue when requested.
  • Errors during restore are reported clearly.
Title: Add graceful shutdown and dark-blue restore Description: Ensure the aurora controller handles user interruption cleanly and restores active zones to dark blue. Scope: - Handle Ctrl+C. - Handle normal script exit. - Restore only validated active zones. - Do not write to reserved zones. - Log what zones were restored. Acceptance criteria: - Pressing Ctrl+C leaves active zones dark blue. - Normal exit leaves active zones dark blue when requested. - Errors during restore are reported clearly.
Author
Owner

Implemented and merged.

Summary:

  • Added centralized shutdown cleanup for dark-blue restore.
  • Active RGB Aura zones are restored to dark blue from a shared shutdown path.
  • Ctrl+C interruption now exits cleanly while still restoring dark blue when --leave-dark-blue is enabled.
  • Normal --duration completion also restores dark blue before shutdown.
  • Shutdown restore failures are caught so they do not hide the original runtime exit path.
  • Reserved ARGB zone remains untouched.

Validation passed:

  • ruff format src/rgb_aura
  • ruff check src/rgb_aura scripts tests
  • PYTHONPATH=src python scripts/validate_device_mapping.py
  • rgb-aura --duration 10 --leave-dark-blue --seed 12345
  • rgb-aura --duration 120 --leave-dark-blue --seed 12345, interrupted with Ctrl+C

Result:

  • Normal completion restored active zones to dark blue before shutdown.
  • Ctrl+C interruption restored active zones to dark blue before shutdown.
  • Mapping validation passed.
  • No unintended RGB writes were made by the validation script.

Closing issue #12.

Implemented and merged. Summary: - Added centralized shutdown cleanup for dark-blue restore. - Active RGB Aura zones are restored to dark blue from a shared shutdown path. - Ctrl+C interruption now exits cleanly while still restoring dark blue when --leave-dark-blue is enabled. - Normal --duration completion also restores dark blue before shutdown. - Shutdown restore failures are caught so they do not hide the original runtime exit path. - Reserved ARGB zone remains untouched. Validation passed: - ruff format src/rgb_aura - ruff check src/rgb_aura scripts tests - PYTHONPATH=src python scripts/validate_device_mapping.py - rgb-aura --duration 10 --leave-dark-blue --seed 12345 - rgb-aura --duration 120 --leave-dark-blue --seed 12345, interrupted with Ctrl+C Result: - Normal completion restored active zones to dark blue before shutdown. - Ctrl+C interruption restored active zones to dark blue before shutdown. - Mapping validation passed. - No unintended RGB writes were made by the validation script. Closing issue #12.
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JackFrostbyte/rgb-aura#12
No description provided.