Skip to content

fix: minor fixes from copilot after big pr#1932

Merged
shrugs merged 1 commit intomainfrom
hotfix/minor-fixes-from-copilot-after-big-pr
Apr 15, 2026
Merged

fix: minor fixes from copilot after big pr#1932
shrugs merged 1 commit intomainfrom
hotfix/minor-fixes-from-copilot-after-big-pr

Conversation

@shrugs
Copy link
Copy Markdown
Member

@shrugs shrugs commented Apr 15, 2026

via these comments #1908 (review)

Copilot AI review requested due to automatic review settings April 15, 2026 15:50
@shrugs shrugs requested a review from a team as a code owner April 15, 2026 15:50
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 15, 2026

⚠️ No Changeset found

Latest commit: 526e794

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
admin.ensnode.io Skipped Skipped Apr 15, 2026 3:50pm
ensnode.io Skipped Skipped Apr 15, 2026 3:50pm
ensrainbow.io Skipped Skipped Apr 15, 2026 3:50pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f2761570-f44d-4d43-bcb9-9ef3d73e0d52

📥 Commits

Reviewing files that changed from the base of the PR and between 1782b56 and 526e794.

📒 Files selected for processing (2)
  • apps/ensapi/src/lib/resolution/forward-resolution.ts
  • apps/ensapi/src/omnigraph-api/builder.ts

📝 Walkthrough

Walkthrough

These changes add validation for ENS root node queries and normalize GraphQL address input typing. A guard in forward-resolution prevents resolver-resolution flow for root records, while the Address scalar type now enforces consistent NormalizedAddress typing for both input and output.

Changes

Cohort / File(s) Summary
Root Node Validation
apps/ensapi/src/lib/resolution/forward-resolution.ts
Added guard that throws an error when the normalized name equals ENS_ROOT_NAME, preventing resolution of root-record queries before nodehash computation and record resolution.
GraphQL Schema Type Consistency
apps/ensapi/src/omnigraph-api/builder.ts
Updated Address scalar's Input type from Address to NormalizedAddress for consistency with the Output type, removing the unused Address import.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Root records beware, there's a guard at the gate,
No more shall the root node's resolver state!
Input and output, now matching in form,
Address types dance in their NormalizedForm. ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/minor-fixes-from-copilot-after-big-pr

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@shrugs shrugs merged commit 8c62ff1 into main Apr 15, 2026
19 of 20 checks passed
@shrugs shrugs deleted the hotfix/minor-fixes-from-copilot-after-big-pr branch April 15, 2026 15:50
@shrugs
Copy link
Copy Markdown
Member Author

shrugs commented Apr 15, 2026

merged as hotfix

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 15, 2026

Greptile Summary

Two minor defensive fixes: adds an explicit guard in _resolveForward rejecting resolution requests for the ENS root name (""), and corrects the Address scalar's Input type in BuilderScalars from Address to NormalizedAddress to match both its Output type and the normalization enforced by the scalar's parseValue implementation.

Confidence Score: 5/5

Safe to merge — both changes are small, correct, and well-scoped with no functional regressions.

The root-name guard is placed in the right order (after the normalization check, which the existing test suite confirms returns true for the empty string), and the Address type alignment is a no-op structurally since Address = NormalizedAddress in the SDK. No P0 or P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
apps/ensapi/src/lib/resolution/forward-resolution.ts Adds an explicit guard rejecting ENS root name resolution, placed correctly after the normalization check (the root name "" passes isNormalizedName per existing tests, so the ordering is sound).
apps/ensapi/src/omnigraph-api/builder.ts Removes unused Address import and aligns the Address scalar's Input type with its Output type — both are now NormalizedAddress. Since Address = NormalizedAddress = ViemAddress structurally, this is a semantic-only correction that matches the parseValue implementation in scalars.ts.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[resolveForward name] --> B[asInterpretedName name]
    B --> C[_resolveForward]
    C --> D{isNormalizedName?}
    D -- No --> E[throw: must be normalized]
    D -- Yes --> F{name === ENS_ROOT_NAME?}
    F -- Yes --> G[throw: root node not supported]
    F -- No --> H[namehashInterpretedName]
    H --> I{isSelectionEmpty?}
    I -- Yes --> J[return empty response]
    I -- No --> K[makeResolveCalls & continue resolution]
Loading

Reviews (1): Last reviewed commit: "fix: minor fixes from copilot after big ..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Small follow-up adjustments in ensapi after the larger enssdk refactor, tightening scalar typing and adding an explicit guard against unsupported forward-resolution input.

Changes:

  • Update omnigraph Address scalar typing to use NormalizedAddress for both input and output.
  • Add an explicit runtime error when attempting forward-resolution for the ENS root name ("").

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/ensapi/src/omnigraph-api/builder.ts Aligns Address scalar type mapping with the GraphQL scalar implementation that parses/returns normalized lowercase addresses.
apps/ensapi/src/lib/resolution/forward-resolution.ts Rejects forward-resolution for the ENS root name to avoid edge-case behavior until explicitly supported.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants