codex/supervaizer-registration-refresh - #32
Merged
Conversation
…docs/CHANGE.md that records the test suite for the current release. entrydocuments the `just test` command includes a small table withstatus (passed skipped, failed and total runtime. This improves release transparency surfacing CI/testresults directly in theelog so readers can quicklytest health for the.
Review Summary by QodoAdd registration refresh endpoint with comprehensive tests
WalkthroughsDescription• Add registration refresh endpoint for asynchronous server re-registration • Endpoint requires write-scope API key and supervisor account configuration • Comprehensive test coverage for authentication, authorization, and functionality • Update CHANGELOG with endpoint details and test suite results Diagramflowchart LR
A["Studio Request"] -->|POST /registration/refresh| B["refresh_controller_registration"]
B -->|validate supervisor account| C{Account exists?}
C -->|yes| D["Background Task"]
C -->|no| E["503 Service Unavailable"]
D -->|_send_registration_refresh| F["register_server"]
F -->|log result| G["Completion"]
File Changes1. src/supervaizer/contracts.py
|
Code Review by Qodo
1.
|
…_registration_refresh returns early when no supervisor account is configured, avoiding attribute access errors. - Wrap supervisor call in try/except catch and log any exceptions from register_server (including http connection errors) and prevent background propagation. - Add detailed log message on failure reason and requested_at for observability. - Update tests: import asyncio and http, expose RegistrationRefreshRequest and __registration_refresh for testing, and add a test that simulates register_server raising httpx.Connect to assert the failure is logged and not propagate. Motivation: make background registration refresh resilient to missingsupervisor configuration and network/HTTP errors, and add coverage toprevent regressions.
…s and to Python3.+ styleand native collection types to simplify type hints and reduceredundant typing imports. - Replace typing.List/Dict/Optional/AsyncGenerator built-in listict/Type | None and P604 union syntax (X | None). - Use dict[str, str] queues and listeners and update annotated return types accordingly. - Normalize OptionalRequest] -> Request | None across helper APIs. - unused AsyncGenerator import and collections.abc import for AsyncGenerator where needed- Keep runtime behavior unchanged; changes are purely type annotation modernizations to improve readability and align with Python conventions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add registration refresh endpoint)feat(changelog): summary to CHANGELOG)