@startuml
skinparam backgroundColor white
skinparam defaultTextAlignment left
skinparam ArrowColor #111111
skinparam PackageBorderColor #111111
skinparam PackageBackgroundColor #F8F8F8
skinparam RectangleBorderColor #111111
skinparam RectangleFontColor #111111
skinparam RectangleBackgroundColor #EAF7EA
skinparam NoteBackgroundColor #EEF7FF
skinparam NoteBorderColor #111111

package "Runtime (server stack)" {
  rectangle "UserManagementPlugin\nGET /email/list\nGET /change-email/verify" as runtime_user #DFF2FF
  rectangle "AdminPlugin\n/admin/email*\n/admin/email-failure*\n/admin/email-template*" as runtime_admin #DFF2FF
}

package "Contracts (updated)" {
  rectangle "athena-auth.yaml\nIncludes /email/list\nIncludes /change-email/verify\nExpanded /change-email message enum" as spec_athena #E8FFE8
  rectangle "openapi.yaml\nIncludes user + admin email route set" as spec_openapi #E8FFE8
}

package "Tests (updated)" {
  rectangle "compat_coverage_tests\ncreate_server_binary_equivalent_memory_auth()" as test_cov #E8FFE8
  rectangle "compat_endpoint_tests\nValidates GET /email/list" as test_endpoint #E8FFE8
  rectangle "compatibility_tests\nEmail route presence + OpenAPI route assertions" as test_contract #E8FFE8
}

runtime_user --> spec_athena : aligned
runtime_admin --> spec_openapi : aligned
spec_athena --> test_cov : full route coverage
spec_athena --> test_endpoint : schema validated
runtime_user --> test_endpoint : 200 on /email/list
runtime_admin --> test_contract : presence asserted

note right of test_cov
Coverage now checks the same plugin stack as
server runtime for email-management endpoints.
end note

@enduml
