feat: add OCI Email Delivery integration#1440
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds Oracle Cloud Infrastructure Email Delivery as a transactional email integration. A new ChangesOCI Email Delivery Integration
Sequence DiagramsequenceDiagram
participant Hook as WordPress Domain Hook
participant Cap as OCI_Email_Transactional_Email
participant Int as OCI_Email_Integration
participant Signer as OCI_Signer
participant OCI as OCI Email Delivery API
Hook->>Cap: wu_domain_added(domain, site_id)
Cap->>Cap: verify_domain(domain)
Cap->>Int: oci_api_call(POST /emailDomains, payload)
Int->>Signer: sign(POST, url, json_payload)
Signer-->>Int: Authorization + Date headers
Int->>OCI: wp_remote_request(POST /emailDomains)
OCI-->>Int: email domain object
Int-->>Cap: decoded domain data or WP_Error
Cap->>Int: oci_api_call(POST /dkimRecords or GET, payload)
Int->>Signer: sign(POST/GET, url, payload)
Signer-->>Int: Authorization + Date headers
Int->>OCI: wp_remote_request(POST/GET /dkimRecords)
OCI-->>Int: DKIM record object
Int-->>Cap: decoded DKIM data or WP_Error
Cap->>Cap: build_dns_records(domain, dkim)
Cap-->>Hook: fire wu_domain_verified(domain, dns_records)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
inc/integrations/providers/oci-email/class-oci-email-transactional-email.php (1)
140-150: 💤 Low valueConsider renaming the action to reflect initiation rather than completion.
The
wu_domain_verifiedaction fires after domain/DKIM records are created in OCI, but before DNS records are published and propagated. The name could mislead consumers into thinking verification is complete. Considerwu_domain_verification_initiatedor document clearly that this action means "OCI resources created, DNS records returned for publishing."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@inc/integrations/providers/oci-email/class-oci-email-transactional-email.php` around lines 140 - 150, The action hook `wu_domain_verified` is misleading because it fires after OCI resources are created and DNS records are returned, but before actual DNS propagation and verification completion. Rename this action hook to `wu_domain_verification_initiated` to accurately reflect that domain verification has been initiated rather than completed. Ensure you update both the do_action call and any corresponding documentation or filter references that use this hook name to maintain consistency throughout the codebase.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@inc/integrations/providers/oci-email/class-oci-email-transactional-email.php`:
- Around line 140-150: The action hook `wu_domain_verified` is misleading
because it fires after OCI resources are created and DNS records are returned,
but before actual DNS propagation and verification completion. Rename this
action hook to `wu_domain_verification_initiated` to accurately reflect that
domain verification has been initiated rather than completed. Ensure you update
both the do_action call and any corresponding documentation or filter references
that use this hook name to maintain consistency throughout the codebase.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 495cf9fe-53fb-43b9-8fb6-eef6fd34ad8a
📒 Files selected for processing (4)
inc/helpers/class-oci-signer.phpinc/integrations/class-integration-registry.phpinc/integrations/providers/oci-email/class-oci-email-integration.phpinc/integrations/providers/oci-email/class-oci-email-transactional-email.php
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
Summary
Verification
Notes
aidevops.sh v3.20.85 plugin for OpenCode v1.17.7 with gpt-5.5 spent 2h 4m and 244,476 tokens on this with the user in an interactive session. Merged via PR #1440 to main. |
Summary
oracle-ociintegration alongside the existing Amazon SES transactional email provider.Verification
php -l inc/helpers/class-oci-signer.php && php -l inc/integrations/providers/oci-email/class-oci-email-integration.php && php -l inc/integrations/providers/oci-email/class-oci-email-transactional-email.php && php -l inc/integrations/class-integration-registry.phpvendor/bin/phpcs inc/helpers/class-oci-signer.php inc/integrations/providers/oci-email/class-oci-email-integration.php inc/integrations/providers/oci-email/class-oci-email-transactional-email.php inc/integrations/class-integration-registry.phpcomposer dump-autoload --classmap-authoritative --no-devNotes
msmtpdeployment pattern.p=none) so operators can advance policy after SPF/DKIM alignment is verified.aidevops.sh v3.20.85 plugin for OpenCode v1.17.7 with gpt-5.5 spent 2h 4m and 244,476 tokens on this with the user in an interactive session.
Summary by CodeRabbit
Release Notes