Modernize internals: registration contract, APNs client cleanup, cert auth - #7
Merged
Conversation
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.
Summary
Registration contract (bug fix + API hygiene)
DeviceRegistrationrequest model;Device(with server-assignedid/timestamps) is now response-only. Server-managed fields sent by clients are ignored instead of trustedidsent the IntegrityError retry into infinite recursion, wedging the worker thread. Reproduced by test firstCertificate auth is now supported and tested
APNS_CERT_PATH/APNS_CERT_PASSWORDswitch the handler to certificate credentials; token (.p8) auth remains the defaultVendored APNs client cleanup
proto,proxy_*,heartbeat_period) and the unusedtopicparam on JWT header generation_send), explicit request timeout,StrEnum/NamedTuple, no name mangling, push-type inference as a data tablePushConfigclass-attribute caching removed (the handler is already a process singleton)Entrypoint + docs
python main.pyhonorsHOST/PORT; integration tests now launch the server exactly as the README documents/docspointer, Swift device-token snippet, production notes, current feature listTest plan
python main.py); ruff, format check, and mypy cleanInvalidProviderTokenfor the throwaway key).env, Dockerized Postgres, registration and auth verified over HTTP