The unigraph plugin#2128
Conversation
🦋 Changeset detectedLatest commit: 04b1c22 The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR systematically renames the ChangesENSv2 Plugin Renamed to Unigraph
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Pull request overview
Renames the ENSIndexer ensv2 plugin to unigraph across the monorepo (SDK enum/constants, indexer plugin wiring, infra configs, and docs), aligning configuration and messaging with the new plugin name.
Changes:
- Renamed
PluginName.ENSv2→PluginName.Unigraphand updated Omnigraph API prerequisite checks accordingly. - Updated ENSIndexer plugin registration, validation invariants, and handler attachment order to use
unigraph. - Updated environment/config examples (Terraform, Docker env, docs) to reference
unigraph.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| terraform/main.tf | Updates Render instance plugin lists to use unigraph (and adjusts v2-sepolia plugin set). |
| packages/ponder-sdk/src/ponder-app-logger.ts | Updates logger docs/examples to reference Unigraph. |
| packages/ensnode-sdk/src/omnigraph-api/prerequisites.ts | Omnigraph API prereq now checks for PluginName.Unigraph. |
| packages/ensnode-sdk/src/ensindexer/config/types.ts | Renames the plugin enum value from ensv2 to unigraph. |
| packages/ensdb-sdk/src/ensindexer-abstract/migrated-nodes.schema.ts | Updates schema comment to reference Unigraph plugin dependency. |
| packages/ensdb-sdk/src/ensindexer-abstract/ensv2.schema.ts | Updates ENSv2 schema comments to reference Unigraph plugin. |
| docs/ensnode.io/src/content/docs/docs/services/ensdb/concepts/database-schemas.mdx | Updates docs wording from ENSv2 plugin to Unigraph plugin. |
| docs/ensnode.io/src/content/docs/docs/integrate/hosted-instances.mdx | Updates hosted instance plugin strings to unigraph. |
| docker/envs/.env.docker.devnet | Updates default devnet PLUGINS to include unigraph. |
| apps/ensindexer/src/plugins/unigraph/plugin.ts | Sets the plugin’s name to PluginName.Unigraph. |
| apps/ensindexer/src/plugins/unigraph/handlers/shared/Resolver.ts | Updates handler plugin name constant + docs wording. |
| apps/ensindexer/src/plugins/unigraph/handlers/ensv2/ETHRegistrar.ts | Updates handler plugin name constant. |
| apps/ensindexer/src/plugins/unigraph/handlers/ensv2/ENSv2Registry.ts | Updates handler plugin name constant. |
| apps/ensindexer/src/plugins/unigraph/handlers/ensv2/EnhancedAccessControl.ts | Updates namespaced contract key to PluginName.Unigraph. |
| apps/ensindexer/src/plugins/unigraph/handlers/ensv1/RegistrarController.ts | Updates handler plugin name constant. |
| apps/ensindexer/src/plugins/unigraph/handlers/ensv1/NameWrapper.ts | Updates handler plugin name constant. |
| apps/ensindexer/src/plugins/unigraph/handlers/ensv1/ENSv1Registry.ts | Updates handler plugin name constant. |
| apps/ensindexer/src/plugins/unigraph/handlers/ensv1/BaseRegistrar.ts | Updates handler plugin name constant and internal reference comment. |
| apps/ensindexer/src/plugins/unigraph/event-handlers.ts | New entrypoint attaching Unigraph plugin handlers. |
| apps/ensindexer/src/plugins/protocol-acceleration/handlers/node-migration.ts | Updates ordering comment to reference unigraph. |
| apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv1Registry.ts | Updates ordering comment to reference unigraph. |
| apps/ensindexer/src/plugins/index.ts | Replaces ensv2 plugin import with unigraph. |
| apps/ensindexer/src/lib/indexing-engines/ponder.ts | Updates comment mentioning plugin activation. |
| apps/ensindexer/src/config/validations.ts | Renames + updates invariant enforcing protocol-acceleration dependency for Unigraph. |
| apps/ensindexer/src/config/config.schema.ts | Wires the new invariant into config parsing. |
| apps/ensindexer/ponder/src/register-handlers.ts | Updates handler attachment to use Unigraph and preserves required ordering. |
| apps/ensindexer/ponder/ponder.config.ts | Updates dual-plugin warning to reference unigraph. |
| apps/ensapi/src/omnigraph-api/lib/get-domain-by-interpreted-name.ts | Updates comment about protocol-acceleration dependency wording. |
| apps/ensapi/src/middleware/can-accelerate.middleware.ts | Updates comment to reference Unigraph plugin. |
| apps/ensapi/src/lib/resolution/forward-resolution.ts | Updates comment to reference Unigraph plugin. |
| .changeset/forward-resolution-ensv2-datasource.md | Updates changeset text to reference unigraph plugin. |
Comments suppressed due to low confidence (1)
apps/ensindexer/src/plugins/unigraph/handlers/shared/Resolver.ts:14
- The updated doc comment reads as a run-on sentence ("handles most indexing behavior, these additional indexing functions"). Consider rephrasing to a complete sentence so it's clearer what this file is responsible for relative to
protocol-acceleration.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/ensindexer/src/config/config.schema.ts (1)
60-80:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winRemove stale
ensv2plugin references from PLUGINS configuration.The
PluginNameenum no longer includesensv2. Two configuration files still reference it:
packages/integration-test-env/src/orchestrator.ts:320— Removeensv2fromPLUGINS: "ensv2,protocol-acceleration"packages/integration-test-env/README.md:95— Removeensv2fromPLUGINS=ensv2,protocol-accelerationValid plugin names are:
subgraph,basenames,lineanames,threedns,protocol-acceleration,registrars,tokenscope,unigraph.🤖 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 `@apps/ensindexer/src/config/config.schema.ts` around lines 60 - 80, The PLUGINS config still references the removed plugin name "ensv2"; update all places that set PLUGINS (strings or defaults) to remove "ensv2" so they only include valid names per the PluginName enum (e.g., change PLUGINS: "ensv2,protocol-acceleration" to "protocol-acceleration" and PLUGINS=ensv2,protocol-acceleration to PLUGINS=protocol-acceleration), and verify PluginsSchema/PluginName validations continue to accept the remaining comma-separated values and error messages remain accurate.
🤖 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.
Inline comments:
In `@docker/envs/.env.docker.devnet`:
- Line 5: The devnet env enables Unigraph via the PLUGINS variable
(PLUGINS=subgraph,unigraph) but violates the new
invariant_unigraphRequiresProtocolAcceleration; update the PLUGINS value to also
include protocol-acceleration (or otherwise enable the protocol-acceleration
plugin) so that when unigraph is present the protocol-acceleration dependency is
satisfied; ensure the change is applied to the PLUGINS entry that currently
contains "subgraph,unigraph".
---
Outside diff comments:
In `@apps/ensindexer/src/config/config.schema.ts`:
- Around line 60-80: The PLUGINS config still references the removed plugin name
"ensv2"; update all places that set PLUGINS (strings or defaults) to remove
"ensv2" so they only include valid names per the PluginName enum (e.g., change
PLUGINS: "ensv2,protocol-acceleration" to "protocol-acceleration" and
PLUGINS=ensv2,protocol-acceleration to PLUGINS=protocol-acceleration), and
verify PluginsSchema/PluginName validations continue to accept the remaining
comma-separated values and error messages remain accurate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1d88512e-6d35-4f1c-ad48-0ec3eabc5dd2
📒 Files selected for processing (31)
.changeset/forward-resolution-ensv2-datasource.mdapps/ensapi/src/lib/resolution/forward-resolution.tsapps/ensapi/src/middleware/can-accelerate.middleware.tsapps/ensapi/src/omnigraph-api/lib/get-domain-by-interpreted-name.tsapps/ensindexer/ponder/ponder.config.tsapps/ensindexer/ponder/src/register-handlers.tsapps/ensindexer/src/config/config.schema.tsapps/ensindexer/src/config/validations.tsapps/ensindexer/src/lib/indexing-engines/ponder.tsapps/ensindexer/src/plugins/index.tsapps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv1Registry.tsapps/ensindexer/src/plugins/protocol-acceleration/handlers/node-migration.tsapps/ensindexer/src/plugins/unigraph/event-handlers.tsapps/ensindexer/src/plugins/unigraph/handlers/ensv1/BaseRegistrar.tsapps/ensindexer/src/plugins/unigraph/handlers/ensv1/ENSv1Registry.tsapps/ensindexer/src/plugins/unigraph/handlers/ensv1/NameWrapper.tsapps/ensindexer/src/plugins/unigraph/handlers/ensv1/RegistrarController.tsapps/ensindexer/src/plugins/unigraph/handlers/ensv2/ENSv2Registry.tsapps/ensindexer/src/plugins/unigraph/handlers/ensv2/ETHRegistrar.tsapps/ensindexer/src/plugins/unigraph/handlers/ensv2/EnhancedAccessControl.tsapps/ensindexer/src/plugins/unigraph/handlers/shared/Resolver.tsapps/ensindexer/src/plugins/unigraph/plugin.tsdocker/envs/.env.docker.devnetdocs/ensnode.io/src/content/docs/docs/integrate/hosted-instances.mdxdocs/ensnode.io/src/content/docs/docs/services/ensdb/concepts/database-schemas.mdxpackages/ensdb-sdk/src/ensindexer-abstract/ensv2.schema.tspackages/ensdb-sdk/src/ensindexer-abstract/migrated-nodes.schema.tspackages/ensnode-sdk/src/ensindexer/config/types.tspackages/ensnode-sdk/src/omnigraph-api/prerequisites.tspackages/ponder-sdk/src/ponder-app-logger.tsterraform/main.tf
…conveys the idea of a single unified data model used for indexing both, ENSv1 and ENSv2.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 33 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (2)
.changeset/quiet-streets-double.md:5
- The changeset text has a small grammatical issue: "indexing both, ENSv1 and ENSv2" reads awkwardly. Consider changing to "indexing both ENSv1 and ENSv2" (no comma) for clarity.
Renamed the `ensv2` plugin to `unigraph`. It better conveys the idea of a single unified data model used for indexing both, ENSv1 and ENSv2.
apps/ensindexer/src/plugins/unigraph/handlers/shared/Resolver.ts:13
- The doc comment sentence reads grammatically incorrect: "the 'protocol-acceleration' plugin handles most indexing behavior, these additional indexing functions:". Consider splitting into two sentences or using a semicolon/"and" to make it clear what the Unigraph plugin adds on top of protocol-acceleration.
Greptile SummaryThis PR renames the
Confidence Score: 5/5Safe to merge — the rename is fully mechanical and the newly-enforced invariant closes a pre-existing gap without altering indexing logic. The only functional change is wiring No files require special attention. The config test file has a minor gap (no coverage for the newly-activated invariant), but this does not affect correctness. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PLUGINS env var] --> B{Zod PluginsSchema}
B -->|unigraph| C[PluginName.Unigraph]
B -->|ensv2 deprecated| D[PluginName.ENSv2]
C --> E{invariant_unigraphRequiresProtocolAcceleration}
D --> F[getPlugin lookup in invariant_requiredDatasources]
F -->|throws: not in ALL_PLUGINS| G[Config parse error]
E -->|missing protocol-acceleration| H[Error: unigraph requires protocol-acceleration]
E -->|protocol-acceleration present| I[Config valid]
I --> J{hasOmnigraphApiConfigSupport}
J -->|plugins includes unigraph or ensv2| K[Omnigraph API supported]
J -->|neither present| L[Not supported]
Reviews (6): Last reviewed commit: "Apply AI PR feedback" | Re-trigger Greptile |
468b18f to
791cb0a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 34 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
apps/ensindexer/src/plugins/unigraph/handlers/shared/Resolver.ts:14
- The updated block comment has a grammar issue: “handles most indexing behavior, these additional indexing functions:” reads like a comma splice and is unclear about the relationship between the clauses.
Consider rephrasing (e.g., “handles most indexing behavior; this module adds…” or “handles most indexing behavior, but this module additionally…”).
791cb0a to
a5c8d42
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 34 out of 35 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
apps/ensindexer/src/plugins/unigraph/handlers/shared/Resolver.ts:14
- This JSDoc sentence is grammatically incorrect: "handles most indexing behavior, these additional indexing functions" reads like a run-on and is missing a conjunction/semicolon. Please rephrase to clearly separate the clauses (e.g., "handles most indexing behavior; these handlers additionally …").
apps/ensindexer/src/config/config.test.ts:551 - The
try/catchhere will silently swallow any error fromgetPlugin()and make the test pass, which can hide regressions (e.g., accidentally removing a non-deprecated plugin fromALL_PLUGINS). Instead of catching everything, explicitly skip only the deprecated plugin(s) (e.g.,PluginName.ENSv2) and rethrow for unexpected errors.
const allSet = new Set(plugin.allDatasourceNames);
for (const required of plugin.requiredDatasourceNames) {
expect(
allSet.has(required),
| config.plugins.includes(PluginName.Unigraph) && | ||
| !config.plugins.includes(PluginName.ProtocolAcceleration) | ||
| ) { | ||
| throw new Error( | ||
| `The '${PluginName.ENSv2}' plugin depends on the inclusion of '${PluginName.ProtocolAcceleration}' plugin.`, | ||
| `The '${PluginName.Unigraph}' plugin depends on the inclusion of '${PluginName.ProtocolAcceleration}' plugin.`, |
Lite PR
Tip: Review docs on the ENSNode PR process
Summary
ensv2plugin tounigraphEnsIndexerConfiginvariant:invariant_unigraphRequiresProtocolAccelerationEnsIndexerConfigobject validation.Why
Testing
Notes for Reviewer (Optional)
Pre-Review Checklist (Blocking)