Repository navigation
feat(domains): add forge activation methods - #262
lucasfcosta wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
View guided diff | Re-trigger cubic
3fc2fc8 to
1b59b6e
Compare
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
View guided diff | Re-trigger cubic
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1b59b6e to
202a61c
Compare
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
View guided diff | Re-trigger cubic
Matches the reshaped API: Domains::Forge keeps only enable (return_path optional), Domains.verify gains an optional scope: ["forge"] that re-checks only the Forge record, and Domains.update accepts forge_return_path to move the Forge return path without starting verification. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Linked issue analysis
Linked issue: DEV-2474: Ruby SDK (internal, squad-devtools)
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Implement the Ruby Forge activation endpoint | Resend::Domains::Forge.enable posts to the Forge endpoint and tests cover requests with and without a custom return path. |
| ❌ | Update the Ruby code tab in the API reference | The diff adds no API reference changes, and the PR does not say this documentation update is deferred. |
Drop forge_return_path from Domains.update: the return path is set once on enable and cannot be changed afterwards.
|
@cubic-dev-ai review |
@vieiralucas I have started the AI code review. It will take a few minutes to complete. |
klotty
left a comment
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Adds Resend::Domains::Forge.enable and scoped domain verify with spec coverage, preserving existing verify calls and bumping the SDK version. The change is a bounded, backward-compatible addition matching the upstream API.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
cubic analysis
1 issue found across 7 files
Confidence score: 5/5
- The example in
spec/domain_forge_spec.rbcould pass even if documented domain fields are lost. Add assertions for representative fields such asname,region,capabilities, and tracking settings.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="spec/domain_forge_spec.rb">
<violation number="1" location="spec/domain_forge_spec.rb:61">
P2: This example does not verify the documented full domain response; add assertions for representative fields such as `name`, `region`, `capabilities`, and tracking settings so field loss cannot go unnoticed.</violation>
</file>
Linked issue analysis
Linked issue: DEV-2474: Ruby SDK (internal, squad-devtools)
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Implement the Ruby Forge activation endpoint | Resend::Domains::Forge.enable posts to the Forge endpoint and tests cover requests with and without a custom return path. |
| ❌ | Update the Ruby code tab in the API reference | The diff adds no API reference changes, and the PR does not say this documentation update is deferred. |
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| expect(domain[:object]).to eql("domain") | ||
| expect(domain[:id]).to eql(domain_id) | ||
| expect(domain[:status]).to eql("pending") | ||
| expect(domain[:records].first["record"]).to eql("SPF") |
There was a problem hiding this comment.
P2: This example does not verify the documented full domain response; add assertions for representative fields such as name, region, capabilities, and tracking settings so field loss cannot go unnoticed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At spec/domain_forge_spec.rb, line 61:
<comment>This example does not verify the documented full domain response; add assertions for representative fields such as `name`, `region`, `capabilities`, and tracking settings so field loss cannot go unnoticed.</comment>
<file context>
@@ -0,0 +1,76 @@
+ expect(domain[:object]).to eql("domain")
+ expect(domain[:id]).to eql(domain_id)
+ expect(domain[:status]).to eql("pending")
+ expect(domain[:records].first["record"]).to eql("SPF")
+ end
+
</file context>
Dismissed because Cubic found issues in a newer review.
Summary
Adds Forge activation, matching the public API shape (resend/resend-monorepo#14706). Ports resend/resend-node#1193 to Ruby.
Resend::Domains::Forge.enable(id:, custom_return_path:)->POST /domains/:id/forge. Returns the full domain response.custom_return_pathis optional and uses the same name and validation ascustom_return_pathonResend::Domains.create; when omitted, the API picks a free label. It is set once and cannot be changed afterwards. Onlycustom_return_pathis ever sent in the body. Idempotent on the API side.Resend::Domains.verify(domain_id, scope: ["forge"])->POST /domains/:id/verifywith{"scope":["forge"]}. Scoped, only the Forge record is re-checked. The existingverify(domain_id)call still sends{}exactly as before.Resend::Domains.updateis unchanged: there is no Forge field onPATCH /domains/:id.Bumps the version to 1.20.0.
Validation
bundle exec rubocop: 52 files inspected, no offenses detected.bundle exec rake spec: 483 examples, 0 failures (Ruby 3.4).custom_return_path(empty body asserted) and the scoped verify body.Notes for reviewers
verifykeeps its positionaldomain_idand takes the scope as a trailing params hash, so existing callers are untouched.Forge.enablesends onlycustom_return_path(params.slice(:custom_return_path)), so theidused to build the path never leaks into the payload.Part of DEV-2474.