Skip to content

feat(domains): add forge activation methods - #262

Open
lucasfcosta wants to merge 3 commits into
mainfrom
feature/dev-2474-ruby-sdk-internal-squad-devtools
Open

lucasfcosta wants to merge 3 commits into
mainfrom
feature/dev-2474-ruby-sdk-internal-squad-devtools

Conversation

@lucasfcosta

@lucasfcosta lucasfcosta commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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_path is optional and uses the same name and validation as custom_return_path on Resend::Domains.create; when omitted, the API picks a free label. It is set once and cannot be changed afterwards. Only custom_return_path is ever sent in the body. Idempotent on the API side.
  • Resend::Domains.verify(domain_id, scope: ["forge"]) -> POST /domains/:id/verify with {"scope":["forge"]}. Scoped, only the Forge record is re-checked. The existing verify(domain_id) call still sends {} exactly as before.

Resend::Domains.update is unchanged: there is no Forge field on PATCH /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).
  • Specs assert the wire shapes: enable with and without custom_return_path (empty body asserted) and the scoped verify body.

Notes for reviewers

  • verify keeps its positional domain_id and takes the scope as a trailing params hash, so existing callers are untouched.
  • Forge.enable sends only custom_return_path (params.slice(:custom_return_path)), so the id used to build the path never leaks into the payload.

Part of DEV-2474.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread spec/domain_forge_spec.rb Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@lucasfcosta
lucasfcosta marked this pull request as ready for review November 11, 2026 21:25
@lucasfcosta lucasfcosta changed the title feat(domains): add forge activation methods and forge_status feat(domains): add forge activation methods Nov 11, 2026
@lucasfcosta
lucasfcosta marked this pull request as draft November 11, 2026 23:44
@lucasfcosta
lucasfcosta marked this pull request as ready for review November 11, 2026 23:45

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@lucasfcosta
lucasfcosta force-pushed the feature/dev-2474-ruby-sdk-internal-squad-devtools branch from 3fc2fc8 to 1b59b6e Compare November 11, 2026 23:50

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@lucasfcosta lucasfcosta changed the title feat(domains): add forge activation methods feat(domains): add forge activation methods and forge_status Nov 11, 2026
@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Nov 12, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lucasfcosta
lucasfcosta force-pushed the feature/dev-2474-ruby-sdk-internal-squad-devtools branch from 1b59b6e to 202a61c Compare November 12, 2026 12:45
@lucasfcosta lucasfcosta changed the title feat(domains): add forge activation methods and forge_status feat(domains): add forge activation methods Nov 12, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread spec/domains_spec.rb Resolved
Comment thread spec/domains_spec.rb Resolved
Drop forge_return_path from Domains.update: the return path is set once on
enable and cannot be changed afterwards.
@vieiralucas

Copy link
Copy Markdown
Member

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@vieiralucas I have started the AI code review. It will take a few minutes to complete.

klotty
klotty previously approved these changes Nov 17, 2026

@klotty klotty left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic analysis

1 issue found across 7 files

Confidence score: 5/5

  • The example in spec/domain_forge_spec.rb could pass even if documented domain fields are lost. Add assertions for representative fields such as name, 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

Comment thread spec/domain_forge_spec.rb
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")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

@cubic-dev-ai
cubic-dev-ai Bot dismissed klotty’s stale review November 17, 2026 19:30

Dismissed because Cubic found issues in a newer review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants