Complete services org admission consumer#163
Merged
aidankhogg merged 1 commit intoJun 29, 2026
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.
Motivation
Description
EventEnvelopeand process onlyorg.admittedevents, extracting an org identifier and an optional per-orgservice_configoverride._provision_org_services,_provision_org_mail_domain, and_provision_org_storagewhich call existingMailHandler/StorageHandler/PKIHandlerAPIs to create DNS records, buckets, credentials, and certificates and to track issued cert metadata inRuntimeState.runtime_state.world_services_outputand to Supabase tablesmail_domains,storage_buckets, andservice_provisioningvia_persist_org_service_provisioning(with safe failure logging if DB is unavailable).archive_to_dlq, and log if DLQ archiving itself fails._service_enabledto resolve per-org enabled overrides from admission payloads.tests/test_phase_services_consumer.pycovering success, ignored event types, malformed messages, provisioning failures, DLQ archiving failures, handler invocation, and persistence.Testing
ruff formatandruff checkon the modified files, which completed without issues.pytest -q tests/test_phase_services_consumer.py, which passed (7 tests).tests/test_event_queue_dlq_mapping.pyand the integration mail suitetests/integration/test_m8_mail.pytogether with the new tests, all of which passed in the CI run reported bypytest.Codex Task