Integration with Registry
Why Change Request is the right seam
End-to-end flow
Caller-staff submits a change Approvers act in Registry UI
│ │
▼ ▼
┌──────────────────────────┐ ┌──────────────────────────┐
│ POST /change-requests/ │ │ POST /change-requests/ │
│ create_change_request │ │ approve_change_request │
└──────────┬───────────────┘ └──────────┬───────────────┘
│ (existing) │ (rewire)
▼ ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ G2PRegisterService │
│ create_change_request() ──new──► AWE: create approval request │
│ approve_change_request() ──new──► AWE: record decision (forward JWT) │
│ reject_change_request() ──new──► AWE: record decision (forward JWT) │
└────────────────────────────────────────────────────────────────────────────┘
│
│ HTTPS (bearer = the user's JWT)
▼
┌──────────────────────────────┐
│ AWE │
└──────┬───────────────────────┘
│ webhook (HMAC) on terminal state
▼
┌──────────────────────────────────────────────────────────────────────────┐
│ NEW Registry controller: POST /awe/webhooks/decision │
│ request_approved → G2PRegisterService._approve_change_request_core() │
│ (skip_verification=True; AWE already gated it) │
│ request_rejected → G2PRegisterService._reject_change_request_core() │
│ request_cancelled → mark CR cancelled, no register write │
└──────────────────────────────────────────────────────────────────────────┘Mapping AWE concepts to Registry concepts
AWE concept
Registry concept
Source field
Code changes in the Registry
1. G2PRegisterChangeRequest model — one new column
G2PRegisterChangeRequest model — one new column2. New helper — AWEClient
AWEClient3. G2PRegisterService — wire AWE in three places
G2PRegisterService — wire AWE in three places4. New controller — G2PAWEWebhookController
G2PAWEWebhookController5. New table — AWEWebhookEventLog
AWEWebhookEventLog6. UI surface (Registry staff portal)
7. Config additions to Settings (staff-portal config.py)
Settings (staff-portal config.py)8. Permissions
9. Section-level toggle
What we explicitly do not touch
Open design choices to confirm before coding
Reference: Registry source-code pointers
Aspect
Location
Last updated
Was this helpful?