Conversation
…dexerStackInfo`, `EnsDbStackInfo`, `EnsNodeStackInfo`.
…nsNodeStackInfo*` pattern.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
🦋 Changeset detectedLatest commit: 7c11fc3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 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 |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 28 minutes and 45 seconds. ⌛ 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 (13)
📝 WalkthroughWalkthroughThe PR introduces a new Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Greptile SummaryThis PR extends the stack info data model by introducing Confidence Score: 5/5Safe to merge — all structural changes are consistent and the previously flagged P1 invariant gap has been explicitly resolved. The previous P1 finding (missing invariant_ensRainbowCompatibilityWithEnsIndexer in makeEnsNodeStackInfoSchema) is resolved: the check is now explicitly applied via .check(invariant_ensRainbowCompatibilityWithEnsIndexer) on line 75. All renames (labelSet → clientLabelSet/serverLabelSet, version → versionInfo, recordsCount removed from public config) are consistently applied across 68 files with matching test and changeset updates. No remaining P1 or P0 issues identified. No files require special attention — key schema validation logic in packages/ensnode-sdk/src/stack-info/zod-schemas/ has been verified correct. Important Files Changed
Class Diagram%%{init: {'theme': 'neutral'}}%%
classDiagram
class EnsIndexerStackInfo {
+EnsDbPublicConfig ensDb
+EnsIndexerPublicConfig ensIndexer
+EnsRainbowPublicConfig ensRainbow
}
class EnsNodeStackInfo {
+EnsApiPublicConfig ensApi
}
class EnsRainbowPublicConfig {
+EnsRainbowServerLabelSet serverLabelSet
+EnsRainbowVersionInfo versionInfo
}
class EnsRainbowVersionInfo {
+string ensRainbow
}
class EnsIndexerPublicConfig {
+EnsRainbowClientLabelSet clientLabelSet
+EnsIndexerVersionInfo versionInfo
+EnsRainbowPublicConfig ensRainbowPublicConfig
}
class EnsApiPublicConfig {
+EnsIndexerPublicConfig ensIndexerPublicConfig
+EnsApiVersionInfo versionInfo
}
class EnsApiVersionInfo {
+string ensApi
+string ensNormalize
}
EnsNodeStackInfo --|> EnsIndexerStackInfo : extends
EnsIndexerStackInfo *-- EnsRainbowPublicConfig : ensRainbow
EnsIndexerStackInfo *-- EnsIndexerPublicConfig : ensIndexer
EnsIndexerPublicConfig *-- EnsRainbowPublicConfig : ensRainbowPublicConfig
EnsRainbowPublicConfig *-- EnsRainbowVersionInfo
EnsNodeStackInfo *-- EnsApiPublicConfig : ensApi
EnsApiPublicConfig *-- EnsApiVersionInfo
Reviews (6): Last reviewed commit: "Apply AI PR feedback" | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts (1)
14-34: 🧹 Nitpick | 🔵 TrivialConsider composing via
makeEnsDbStackInfoSchemafor consistency.The serialize/deserialize layer and the
SerializedEnsNodeStackInfotype both compose via the newEnsDbStackInfohelpers. These Zod schemas still enumerate all fields directly. For consistency (and to pick up theinvariant_ensRainbowCompatibilityWithEnsIndexercheck thatmakeEnsDbStackInfoSchemaapplies), consider:♻️ Proposed refactor
export function makeSerializedEnsNodeStackInfoSchema(valueLabel?: string) { const label = valueLabel ?? "ENSNodeStackInfo"; - return z.object({ - ensApi: makeSerializedEnsApiPublicConfigSchema(`${label}.ensApi`), - ensDb: makeEnsDbPublicConfigSchema(`${label}.ensDb`), - ensIndexer: makeSerializedEnsIndexerPublicConfigSchema(`${label}.ensIndexer`), - ensRainbow: makeEnsRainbowPublicConfigSchema(`${label}.ensRainbow`), - }); + return makeSerializedEnsDbStackInfoSchema(label).extend({ + ensApi: makeSerializedEnsApiPublicConfigSchema(`${label}.ensApi`), + }); }Otherwise, tightening
ensRainbowto required is correct given the extended-type hierarchy.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts` around lines 14 - 34, Replace the explicit field enumeration in makeSerializedEnsNodeStackInfoSchema and makeEnsNodeStackInfoSchema with composition via the existing EnsDb stack helpers: use makeSerializedEnsDbStackInfoSchema(...) inside makeSerializedEnsNodeStackInfoSchema and makeEnsDbStackInfoSchema(...) inside makeEnsNodeStackInfoSchema (passing the same composed label) so the schemas pick up the shared structure and the invariant_ensRainbowCompatibilityWithEnsIndexer check applied by the EnsDb helpers instead of re-declaring ensApi, ensDb, ensIndexer, ensRainbow locally.packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts (1)
17-25:⚠️ Potential issue | 🟡 MinorKeep the builder documentation in sync with the expanded signature.
The function now also requires ENSIndexer and ENSRainbow configs, but the summary still says it builds only from ENSApi and ENSDb.
Proposed documentation update
/** * Build a complete {`@link` EnsNodeStackInfo} object from - * the given public configs of ENSApi and ENSDb. + * the given public configs of ENSApi, ENSDb, ENSIndexer, and ENSRainbow. */🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts` around lines 17 - 25, Update the JSDoc for buildEnsNodeStackInfo to reflect the expanded parameters: mention that it builds a complete EnsNodeStackInfo from the public configs of ENSApi, ENSDb, ENSIndexer, and ENSRainbow; update the `@param` list to include EnsIndexerPublicConfig and EnsRainbowPublicConfig and adjust the summary sentence accordingly so it no longer only references ENSApi and ENSDb.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/ensadmin/src/app/mock/stack-info/page.tsx`:
- Around line 27-32: The mock error case for "Loading Error" uses stale copy
referring to "ENSNodeConfigInfo" and "ENSIndexer Config"; update the returned
error object inside the case "Loading Error" (the error.title and
error.description strings) to reflect the stack info context — e.g., change
error.title to something like "StackInfo Error" and error.description to a
message about failing to fetch Stack Info — so the mock accurately matches the
stack info flow exercised by this page.tsx case.
In `@apps/ensadmin/src/app/mock/stack-info/stack-info.mock.ts`:
- Around line 7-413: The mock has large duplicated sub-objects
(ensRainbowPublicConfig, ensIndexerPublicConfig, ensIndexer, ensRainbow, ensDb,
versionInfo) inside mockSerializedEnsNodeStackInfo; extract shared fragments
like const baseVersionInfo, baseEnsDb, baseEnsRainbowPublicConfig, and
baseEnsIndexerPublicConfig and then build each variant by composing/spreading
those bases and only overriding the few fields that differ (e.g.
indexedChainIds, namespace, plugins, ensIndexerSchemaName); update
mockSerializedEnsNodeStackInfo to reference those constants so the four "happy
path" variants reuse the same base objects while preserving the final
"Deserialization Error" variant intact, and keep the overall export typed with
as const satisfies Record<string, SerializedEnsNodeStackInfo>.
In `@packages/ensnode-sdk/src/stack-info/deserialize/ensdb-stack-info.ts`:
- Around line 12-18: The JSDoc for the builder of EnsDbStackInfo contains a
redundant "@return" tag that merely repeats the summary; remove the "@return"
line from the JSDoc block that documents the function which constructs an
EnsDbStackInfo (referenced alongside makeEnsDbStackInfoSchema and
EnsDbStackInfo) so the doc only keeps the descriptive summary and parameter docs
without the duplicated return tag.
In `@packages/ensnode-sdk/src/stack-info/deserialize/ensindexer-stack-info.ts`:
- Around line 12-18: Remove the redundant JSDoc `@return` tag from the JSDoc block
that documents the function building an unvalidated EnsIndexerStackInfo (the doc
that references {`@link` EnsIndexerStackInfo} and {`@link`
makeEnsIndexerStackInfoSchema}); keep the summary and the `@param` but delete the
`@return` line so the comment no longer restates the method summary.
In `@packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts`:
- Around line 8-24: The label fallback is applied only to the ensDb subpath,
causing inconsistent error path prefixes because
makeSerializedEnsIndexerStackInfoSchema and makeEnsIndexerStackInfoSchema are
called with valueLabel rather than the resolved label; change both calls in
makeSerializedEnsDbStackInfoSchema and makeEnsDbStackInfoSchema to pass the
resolved label variable (label) instead of valueLabel so nested indexer/rainbow
errors use the same unified prefix as ensDb (and keep the rest of each function
unchanged).
---
Outside diff comments:
In `@packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts`:
- Around line 17-25: Update the JSDoc for buildEnsNodeStackInfo to reflect the
expanded parameters: mention that it builds a complete EnsNodeStackInfo from the
public configs of ENSApi, ENSDb, ENSIndexer, and ENSRainbow; update the `@param`
list to include EnsIndexerPublicConfig and EnsRainbowPublicConfig and adjust the
summary sentence accordingly so it no longer only references ENSApi and ENSDb.
In `@packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts`:
- Around line 14-34: Replace the explicit field enumeration in
makeSerializedEnsNodeStackInfoSchema and makeEnsNodeStackInfoSchema with
composition via the existing EnsDb stack helpers: use
makeSerializedEnsDbStackInfoSchema(...) inside
makeSerializedEnsNodeStackInfoSchema and makeEnsDbStackInfoSchema(...) inside
makeEnsNodeStackInfoSchema (passing the same composed label) so the schemas pick
up the shared structure and the invariant_ensRainbowCompatibilityWithEnsIndexer
check applied by the EnsDb helpers instead of re-declaring ensApi, ensDb,
ensIndexer, ensRainbow locally.
🪄 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: 16627062-6551-4ce9-97b8-14f89d71638f
📒 Files selected for processing (24)
.changeset/clear-rabbits-punch.md.changeset/fifty-games-smash.mdapps/ensadmin/src/app/@breadcrumbs/mock/stack-info/page.tsxapps/ensadmin/src/app/mock/config-info/data.jsonapps/ensadmin/src/app/mock/config-info/page.tsxapps/ensadmin/src/app/mock/page.tsxapps/ensadmin/src/app/mock/stack-info/page.tsxapps/ensadmin/src/app/mock/stack-info/stack-info.mock.tsapps/ensadmin/src/components/connection/cards/ensnode-stack-info.tsxapps/ensadmin/src/components/connection/index.tsxapps/ensapi/src/cache/stack-info.cache.tspackages/ensnode-sdk/src/stack-info/deserialize/ensdb-stack-info.tspackages/ensnode-sdk/src/stack-info/deserialize/ensindexer-stack-info.tspackages/ensnode-sdk/src/stack-info/deserialize/ensnode-stack-info.tspackages/ensnode-sdk/src/stack-info/ensdb-stack-info.tspackages/ensnode-sdk/src/stack-info/ensindexer-stack-info.tspackages/ensnode-sdk/src/stack-info/ensnode-stack-info.tspackages/ensnode-sdk/src/stack-info/index.tspackages/ensnode-sdk/src/stack-info/serialize/ensdb-stack-info.tspackages/ensnode-sdk/src/stack-info/serialize/ensindexer-stack-info.tspackages/ensnode-sdk/src/stack-info/serialize/ensnode-stack-info.tspackages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.tspackages/ensnode-sdk/src/stack-info/zod-schemas/ensindexer-stack-info.tspackages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts
💤 Files with no reviewable changes (2)
- apps/ensadmin/src/app/mock/config-info/page.tsx
- apps/ensadmin/src/app/mock/config-info/data.json
There was a problem hiding this comment.
Pull request overview
Extends @ensnode/ensnode-sdk’s “stack info” domain model into layered types (EnsIndexerStackInfo → EnsDbStackInfo → EnsNodeStackInfo), with corresponding zod schemas and (de)serialization helpers, and updates ENSApi + ENSAdmin to consume the updated model and renamed UI components/mocks.
Changes:
- Added new stack-info models for ENSIndexer and ENSDb, and refactored ENSNode stack info to extend them.
- Added serialize/deserialize + zod schemas for the new stack-info layers.
- Updated ENSApi stack-info cache builder and ENSAdmin UI/mocks/routes to use the new stack-info naming and structure.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts | Makes ensRainbow required in ENSNode stack-info zod schemas. |
| packages/ensnode-sdk/src/stack-info/zod-schemas/ensindexer-stack-info.ts | New zod schemas + invariant check for EnsIndexerStackInfo. |
| packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts | New zod schemas composing EnsIndexerStackInfo + ENSDb config. |
| packages/ensnode-sdk/src/stack-info/serialize/ensnode-stack-info.ts | Refactors ENSNode stack-info serialization to compose via ENSDb stack-info serializer. |
| packages/ensnode-sdk/src/stack-info/serialize/ensindexer-stack-info.ts | New serializer + serialized type for EnsIndexerStackInfo. |
| packages/ensnode-sdk/src/stack-info/serialize/ensdb-stack-info.ts | New serializer + serialized type for EnsDbStackInfo. |
| packages/ensnode-sdk/src/stack-info/index.ts | Exports new stack-info layers and their (de)serializers. |
| packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts | EnsNodeStackInfo now extends EnsDbStackInfo; builder signature updated. |
| packages/ensnode-sdk/src/stack-info/ensindexer-stack-info.ts | New EnsIndexerStackInfo interface + builder. |
| packages/ensnode-sdk/src/stack-info/ensdb-stack-info.ts | New EnsDbStackInfo interface + builder extending EnsIndexerStackInfo. |
| packages/ensnode-sdk/src/stack-info/deserialize/ensnode-stack-info.ts | EnsNodeStackInfo deserialization now composes through EnsDbStackInfo deserialization. |
| packages/ensnode-sdk/src/stack-info/deserialize/ensindexer-stack-info.ts | New deserializer for EnsIndexerStackInfo. |
| packages/ensnode-sdk/src/stack-info/deserialize/ensdb-stack-info.ts | New deserializer for EnsDbStackInfo. |
| apps/ensapi/src/cache/stack-info.cache.ts | Updates stack-info construction to pass explicit indexer/rainbow configs. |
| apps/ensadmin/src/components/connection/index.tsx | Switches connection details card to the renamed stack-info component. |
| apps/ensadmin/src/components/connection/cards/ensnode-stack-info.tsx | Renames ENSNodeConfig* components to EnsNodeStackInfo* and updates ENSRainbow field access. |
| apps/ensadmin/src/app/mock/stack-info/stack-info.mock.ts | Adds mock SerializedEnsNodeStackInfo variants for UI testing. |
| apps/ensadmin/src/app/mock/stack-info/page.tsx | Adds new UI mock page to render stack-info variants via deserialization. |
| apps/ensadmin/src/app/mock/page.tsx | Updates mock list link to the new /mock/stack-info page. |
| apps/ensadmin/src/app/mock/config-info/page.tsx | Removes old config-info mock page. |
| apps/ensadmin/src/app/mock/config-info/data.json | Removes old config-info mock data. |
| apps/ensadmin/src/app/@breadcrumbs/mock/stack-info/page.tsx | Adds breadcrumbs for the new stack-info mock route. |
| .changeset/fifty-games-smash.md | Changeset for SDK minor bump due to new stack-info models/exports. |
| .changeset/clear-rabbits-punch.md | Changeset for ENSAdmin minor bump due to component renames. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@greptile review |
lightwalker-eth
left a comment
There was a problem hiding this comment.
@tk-o Nice updates! Reviewed and shared some feedback. Please take the lead to merge when ready 🫡
|
|
||
| type LoadingVariant = "Loading" | "Loading Error"; | ||
| type Variants = keyof typeof mockSerializedEnsNodeStackInfo | LoadingVariant; | ||
|
|
There was a problem hiding this comment.
Unfortunately it seems if we have a breaking change to related data models that it won't be possible to open the /mock page at all inside ENSAdmin Vercel Previews.
If there's an easy fix for this, great!
If not, and a fix for this would need more effort or investigation, then please don't worry about it now. Instead:
- Could you please verify the mock UIs look ok in your own local ENSAdmin?
- Could you please create a follow-up issue for this?
Thanks!
There was a problem hiding this comment.
@lightwalker-eth please connect to api.alpha-sepolia.blue.ensnode.io as it serves ENSApi v1.10.1 which already includes the stackInfo object in the Indexing Status response 👍
Here's the exact connection link for ENSAdmin:
https://adminensnodeio-git-feat-extend-stack-info-data-model-namehash.vercel.app/mock/stack-info?connection=https%3A%2F%2Fapi.alpha-sepolia.blue.ensnode.io%2F
Apply more precise language
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 65 out of 66 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
docs/ensnode.io/src/content/docs/ensrainbow/usage/client-sdk.mdx:37
- The TypeScript usage snippet uses
baseUrlandhealLabel(...), butEnsRainbowApiClientexpectsendpointUrl: URLand the method isheal(...). Update the docs example to match the actual SDK API so copy-paste usage typechecks and runs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (9)
packages/ensnode-sdk/src/ensindexer/config/conversions.test.ts (1)
93-102:⚠️ Potential issue | 🟡 MinorRedundant assignment makes this test a duplicate of the baseline round-trip.
correctSerializedConfig.isSubgraphCompatibleis alreadytrue(Line 68), so Line 98 is a no-op and this case degenerates into re-testing the happy path already covered by the firstitblock. Either flip it tofalsewith a plugin set that is subgraph-compatible to actually exercise a distinct invariant path, or remove this case.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/ensnode-sdk/src/ensindexer/config/conversions.test.ts` around lines 93 - 102, The test "can enforce invariants: expected subgraph-compatibility" is redundant because correctSerializedConfig.isSubgraphCompatible is already true; change the test to exercise the alternate path by setting serializedConfig.isSubgraphCompatible = false and ensure the serializedConfig.plugins (or whichever field denotes plugin set) contains a plugin that is subgraph-compatible so deserializeEnsIndexerPublicConfig(serializedConfig) hits the distinct invariant branch, or delete the test if you prefer not to cover that case separately; update only the serializedConfig mutation in this test (referencing serializedConfig, correctSerializedConfig, isSubgraphCompatible, and deserializeEnsIndexerPublicConfig).docs/ensnode.io/ensapi-openapi.json (1)
802-991:⚠️ Potential issue | 🟡 Minor
EnsIndexerPublicConfigis now duplicated acrossstackInfo.ensIndexerandstackInfo.ensApi.ensIndexerPublicConfig.The flattened
stackInfo.ensIndexer(lines 802–881) and the nestedstackInfo.ensApi.ensIndexerPublicConfig(lines 909–991) describe the same underlyingEnsIndexerPublicConfigfields (ensIndexerSchemaName,ensRainbowPublicConfig,indexedChainIds,isSubgraphCompatible,clientLabelSet,namespace,plugins,versionInfo). In addition,stackInfo.ensIndexer.ensRainbowPublicConfig(806–831) duplicates the newstackInfo.ensRainbow(882–905).Two risks this introduces for consumers:
- Divergence — Nothing in the schema constrains the two copies to be equal, so clients can receive conflicting values for the same logical config and won't know which is authoritative.
- Payload bloat / ambiguity — Documentation no longer has a single source of truth for the connected indexer's config.
Given the PR description notes this is transitional (ENSApi still relies on
ensIndexerPublicConfig.ensIndexerPublicConfigbeing present), please at least document the canonical source in the schemadescriptionfields, and track removal of the nested copies fromstackInfo.ensApiin the promised follow-up. Otherwise OpenAPI consumers generating typed clients will end up with two parallel types for the same concept.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/ensnode.io/ensapi-openapi.json` around lines 802 - 991, The schema duplicates the same EnsIndexerPublicConfig across stackInfo.ensIndexer and stackInfo.ensApi.ensIndexerPublicConfig (and also duplicates ensRainbow in stackInfo.ensIndexer.ensRainbowPublicConfig vs stackInfo.ensRainbow); replace these inline copies with a single reusable component (e.g., components.schemas.EnsIndexerPublicConfig and components.schemas.EnsRainbow) and reference it via $ref from both stackInfo.ensIndexer and stackInfo.ensApi.ensIndexerPublicConfig, and update the description fields on stackInfo.ensApi.ensIndexerPublicConfig and on the duplicated ensRainbow to explicitly state the canonical source (stackInfo.ensIndexer / components.schemas.EnsIndexerPublicConfig) and mark the nested copy as transitional/deprecated pending removal in the follow-up so generated clients know which is authoritative.apps/ensindexer/src/config/types.ts (1)
151-154:⚠️ Potential issue | 🟡 MinorStale reference to
labelSetin JSDoc after rename.Now that the field has been renamed to
clientLabelSet(Line 36), the invariant doc on Line 153 should reflect the new name for consistency.📝 Proposed doc fix
* If {`@link` isSubgraphCompatible} is true, the following invariants are true for the ENSIndexerConfig: * 1. only the 'subgraph' plugin is enabled, and - * 2. the labelSet must be { labelSetId: 'subgraph', labelSetVersion: 0 } + * 2. the clientLabelSet must be { labelSetId: 'subgraph', labelSetVersion: 0 }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/ensindexer/src/config/types.ts` around lines 151 - 154, The JSDoc invariant mentions the old field name "labelSet" but the config now uses clientLabelSet; update the comment under isSubgraphCompatible/ENSIndexerConfig to reference clientLabelSet (and the expected value { labelSetId: 'subgraph', labelSetVersion: 0 } if still valid) so the doc matches the renamed property.packages/ensnode-sdk/src/ensindexer/config/types.ts (1)
128-131:⚠️ Potential issue | 🟡 MinorStale reference to
labelSetin JSDoc after rename.The field was renamed to
clientLabelSet(Line 81), but the invariant doc on Line 130 still refers tolabelSet.📝 Proposed doc fix
* If {`@link` isSubgraphCompatible} is true, the following invariants are true for the ENSIndexerConfig: * 1. only the 'subgraph' plugin is enabled, and - * 2. the labelSet must be { labelSetId: 'subgraph', labelSetVersion: 0 } + * 2. the clientLabelSet must be { labelSetId: 'subgraph', labelSetVersion: 0 }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/ensnode-sdk/src/ensindexer/config/types.ts` around lines 128 - 131, The JSDoc for ENSIndexerConfig still refers to the old field name "labelSet" in the invariant for isSubgraphCompatible; update that text to refer to the renamed field "clientLabelSet" (and the expected value { clientLabelSet: { labelSetId: 'subgraph', labelSetVersion: 0 } }) so the doc matches the actual config shape and the isSubgraphCompatible contract; check the comment block containing isSubgraphCompatible and ENSIndexerConfig to replace all occurrences of "labelSet" with "clientLabelSet".apps/ensadmin/src/app/mock/indexing-status-api.mock.ts (1)
19-19: 🧹 Nitpick | 🔵 TrivialNit: import
SerializedEnsRainbowPublicConfigastype.It is only used as a type annotation (line 80,
satisfies SerializedEnsRainbowPublicConfig), so it should be a type-only import like the other sibling imports in this block.Proposed fix
- SerializedEnsRainbowPublicConfig, + type SerializedEnsRainbowPublicConfig,🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/ensadmin/src/app/mock/indexing-status-api.mock.ts` at line 19, The import of SerializedEnsRainbowPublicConfig is only used as a type (used in the `satisfies SerializedEnsRainbowPublicConfig` annotation around line 80), so change its import to a type-only import to avoid runtime inclusion; update the import statement that currently lists SerializedEnsRainbowPublicConfig with the other imports to use the `import type { SerializedEnsRainbowPublicConfig }` form (matching the style of the sibling type imports) and ensure no runtime usage remains..changeset/fifty-games-smash.md (1)
1-6:⚠️ Potential issue | 🟡 MinorChangeset omits breaking SDK field renames/removals.
This PR isn't just additive — on
@ensnode/ensnode-sdkit also:
- renames
EnsIndexerPublicConfig.labelSet→clientLabelSet,- renames
EnsRainbowPublicConfig.labelSet→serverLabelSet,- replaces
EnsRainbowPublicConfig.versionwithversionInfo,- removes
EnsRainbowPublicConfig.recordsCount.These are breaking for external SDK consumers and should be called out in the release notes (and, depending on this package's semver policy for 0.x, may warrant
majorrather thanminor).✍️ Suggested changeset expansion
--- "@ensnode/ensnode-sdk": minor --- -Introduced a set of "stack info" data models: `EnsIndexerStackInfo`, `EnsNodeStackInfo`. +Introduced a set of "stack info" data models: `EnsIndexerStackInfo`, `EnsNodeStackInfo`. + +Breaking changes: +- `EnsIndexerPublicConfig.labelSet` renamed to `clientLabelSet`. +- `EnsRainbowPublicConfig.labelSet` renamed to `serverLabelSet`. +- `EnsRainbowPublicConfig.version` replaced with `versionInfo`. +- `EnsRainbowPublicConfig.recordsCount` removed.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.changeset/fifty-games-smash.md around lines 1 - 6, The changeset .changeset/fifty-games-smash.md currently lists only additive model additions but omits breaking SDK field renames/removals; update the changeset to explicitly document the breaking changes: rename EnsIndexerPublicConfig.labelSet → clientLabelSet, rename EnsRainbowPublicConfig.labelSet → serverLabelSet, replace EnsRainbowPublicConfig.version with versionInfo, and remove EnsRainbowPublicConfig.recordsCount; state that these are breaking for external SDK consumers and adjust the release type from minor to major if your semver policy for 0.x requires it, and include short migration notes for each symbol (EnsIndexerPublicConfig, EnsRainbowPublicConfig) so consumers know how to update.packages/ensnode-sdk/src/ensindexer/config/compatibility.test.ts (1)
70-70:⚠️ Potential issue | 🟡 MinorStale test description still references
labelSetinstead ofclientLabelSet.The body of this test now mutates
clientLabelSet.labelSetIdand asserts against a'clientLabelSet.labelSetId'error, but theit(...)title still reads'configA.labelSet.labelSetId'/'configB.labelSet.labelSetId'. The sibling test at line 86 was updated — align this one for consistency.📝 Proposed description fix
- it("throws error when 'configA.labelSet.labelSetId' is not same as 'configB.labelSet.labelSetId'", () => { + it("throws error when 'configA.clientLabelSet.labelSetId' is not same as 'configB.clientLabelSet.labelSetId'", () => {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/ensnode-sdk/src/ensindexer/config/compatibility.test.ts` at line 70, The test description is stale: update the it(...) title that currently says "'configA.labelSet.labelSetId' / 'configB.labelSet.labelSetId'" to reference clientLabelSet (e.g., "'configA.clientLabelSet.clientLabelSetId' is not same as 'configB.clientLabelSet.clientLabelSetId'") so it matches the test body which mutates clientLabelSet.labelSetId and asserts the "'clientLabelSet.labelSetId'" error; ensure the new title mirrors the sibling test's wording for consistency and clarity.apps/ensrainbow/src/commands/server-command.test.ts (1)
131-146:⚠️ Potential issue | 🟡 MinorStale test description after removing the
/v1/config.recordsCountcross-check.The test's
ittitle says "(same as /v1/config)", but per this PRrecordsCountwas removed fromEnsRainbowPublicConfig, and the cross-endpoint consistency assertion was dropped. The title now implies a relationship that no longer exists and is likely to confuse future readers.📝 Proposed title tweak
- it("should return count snapshot from startup (same as /v1/config)", async () => { + it("should return count snapshot from startup (from dbConfig.recordsCount)", async () => {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/ensrainbow/src/commands/server-command.test.ts` around lines 131 - 146, The test title for the "GET /v1/labels/count" spec still says "(same as /v1/config)" even though the cross-check against /v1/config.recordsCount was removed; update the it(...) title to accurately reflect the test behavior (e.g., change the string in the it call to "should return count snapshot from startup" or similar) so the description no longer implies a relationship to /v1/config; locate the spec under the describe("GET /v1/labels/count") block in server-command.test.ts and edit the it(...) title accordingly.docs/ensnode.io/src/content/docs/ensrainbow/concepts/typescript-interfaces.mdx (1)
34-34:⚠️ Potential issue | 🟡 MinorStale
labelSetreference in the intro sentence.The prose still shows
new EnsRainbowApiClient({ labelSet: … }), but the constructor option was renamed toclientLabelSet(see the updated examples on lines 66 and 72, and the SDK change inpackages/ensrainbow-sdk/src/client.ts).📝 Proposed fix
-Provided when constructing `new EnsRainbowApiClient({ labelSet: … })` to pin client expectations: +Provided when constructing `new EnsRainbowApiClient({ clientLabelSet: … })` to pin client expectations:🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/ensnode.io/src/content/docs/ensrainbow/concepts/typescript-interfaces.mdx` at line 34, The intro sentence currently references the old constructor option name labelSet; update that prose to use the new option name clientLabelSet so it matches the SDK and the examples (ensure the sentence reads something like "Provided when constructing new EnsRainbowApiClient({ clientLabelSet: … })" and replace any remaining occurrences of labelSet in this section with clientLabelSet to keep the docs consistent with the EnsRainbowApiClient constructor.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/ensadmin/src/app/mock/stack-info/page.tsx`:
- Around line 19-21: DEFAULT_VARIANT is currently an untyped string and can
drift out of sync with mockSerializedEnsNodeStackInfo keys; explicitly type it
as the Variants/key type used by mockSerializedEnsNodeStackInfo so the compiler
will catch renames/removals. Change the declaration of DEFAULT_VARIANT to use
the same key type (e.g., keyof typeof mockSerializedEnsNodeStackInfo or
Variants) referenced by useState<Variants>, so MockConfigPage (and calls like
mockSerializedEnsNodeStackInfo[selectedConfig] and deserializeEnsNodeStackInfo)
cannot receive an invalid key at compile time.
- Line 20: Rename the stale default exported component function MockConfigPage
to MockStackInfoPage so the component name matches the route and page content;
update the function declaration (export default function MockConfigPage() ->
export default function MockStackInfoPage()) and any internal/local references
or test imports that reference MockConfigPage to use MockStackInfoPage instead.
In `@apps/ensindexer/src/ponder/indexing-behavior-injection-contract.ts`:
- Around line 49-55: Update the JSDoc to reference the renamed property: replace
the stale `labelSet` mention with `clientLabelSet` in the comment above the
clientLabelSet property (the comment block that describes clientLabelSet and
references "healing" results), so the description and any inline code formatting
match the actual field name `clientLabelSet` and its type
EnsIndexerConfig["clientLabelSet"].
In `@docs/ensnode.io/ensapi-openapi.json`:
- Line 5: The OpenAPI spec version field needs to be updated to reflect the
breaking schema changes to /api/indexing-status: change the "version" value in
ensapi-openapi.json from "1.10.1" to at least "1.11.0" (or "2.0.0" if you decide
to mark this as a major breaking change) so downstream clients and release
tooling see the schema bump; ensure this update accompanies the documented
changes to stackInfo (new top-level children ensDb, ensIndexer, ensRainbow), the
renaming of labelSet → clientLabelSet inside ensIndexerPublicConfig, and the new
ensRainbow shape (serverLabelSet + versionInfo.ensRainbow).
In
`@docs/ensnode.io/src/content/docs/ensrainbow/concepts/typescript-interfaces.mdx`:
- Around line 45-47: Change the inconsistent single-word "labelset" occurrences
in the three bullet points to the two-word form "label set" to match the rest of
the document and glossary, while leaving code identifiers like `labelSetId`
unchanged; update the three bullets so they read "label set" (e.g., "accept any
client label set", "insist on a specific client label set") and ensure
surrounding punctuation/capitalization remains consistent.
In `@packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts`:
- Around line 13-57: The Zod issue paths in
invariant_ensApiCompatibilityWithEnsIndexerAndEnsRainbow are using dotted-string
segments (e.g., path: ["ensIndexer.versionInfo.ensDb"]) which breaks Zod v4 path
handling; update each ctx.issues.push call to use an array of individual
property keys instead (e.g., ["ensIndexer","versionInfo","ensDb"],
["ensIndexer","versionInfo","ensIndexer"],
["ensRainbow","versionInfo","ensRainbow"],
["ensIndexer","versionInfo","ensNormalize"]) so Zod treats them as nested path
segments.
---
Outside diff comments:
In @.changeset/fifty-games-smash.md:
- Around line 1-6: The changeset .changeset/fifty-games-smash.md currently lists
only additive model additions but omits breaking SDK field renames/removals;
update the changeset to explicitly document the breaking changes: rename
EnsIndexerPublicConfig.labelSet → clientLabelSet, rename
EnsRainbowPublicConfig.labelSet → serverLabelSet, replace
EnsRainbowPublicConfig.version with versionInfo, and remove
EnsRainbowPublicConfig.recordsCount; state that these are breaking for external
SDK consumers and adjust the release type from minor to major if your semver
policy for 0.x requires it, and include short migration notes for each symbol
(EnsIndexerPublicConfig, EnsRainbowPublicConfig) so consumers know how to
update.
In `@apps/ensadmin/src/app/mock/indexing-status-api.mock.ts`:
- Line 19: The import of SerializedEnsRainbowPublicConfig is only used as a type
(used in the `satisfies SerializedEnsRainbowPublicConfig` annotation around line
80), so change its import to a type-only import to avoid runtime inclusion;
update the import statement that currently lists
SerializedEnsRainbowPublicConfig with the other imports to use the `import type
{ SerializedEnsRainbowPublicConfig }` form (matching the style of the sibling
type imports) and ensure no runtime usage remains.
In `@apps/ensindexer/src/config/types.ts`:
- Around line 151-154: The JSDoc invariant mentions the old field name
"labelSet" but the config now uses clientLabelSet; update the comment under
isSubgraphCompatible/ENSIndexerConfig to reference clientLabelSet (and the
expected value { labelSetId: 'subgraph', labelSetVersion: 0 } if still valid) so
the doc matches the renamed property.
In `@apps/ensrainbow/src/commands/server-command.test.ts`:
- Around line 131-146: The test title for the "GET /v1/labels/count" spec still
says "(same as /v1/config)" even though the cross-check against
/v1/config.recordsCount was removed; update the it(...) title to accurately
reflect the test behavior (e.g., change the string in the it call to "should
return count snapshot from startup" or similar) so the description no longer
implies a relationship to /v1/config; locate the spec under the describe("GET
/v1/labels/count") block in server-command.test.ts and edit the it(...) title
accordingly.
In `@docs/ensnode.io/ensapi-openapi.json`:
- Around line 802-991: The schema duplicates the same EnsIndexerPublicConfig
across stackInfo.ensIndexer and stackInfo.ensApi.ensIndexerPublicConfig (and
also duplicates ensRainbow in stackInfo.ensIndexer.ensRainbowPublicConfig vs
stackInfo.ensRainbow); replace these inline copies with a single reusable
component (e.g., components.schemas.EnsIndexerPublicConfig and
components.schemas.EnsRainbow) and reference it via $ref from both
stackInfo.ensIndexer and stackInfo.ensApi.ensIndexerPublicConfig, and update the
description fields on stackInfo.ensApi.ensIndexerPublicConfig and on the
duplicated ensRainbow to explicitly state the canonical source
(stackInfo.ensIndexer / components.schemas.EnsIndexerPublicConfig) and mark the
nested copy as transitional/deprecated pending removal in the follow-up so
generated clients know which is authoritative.
In
`@docs/ensnode.io/src/content/docs/ensrainbow/concepts/typescript-interfaces.mdx`:
- Line 34: The intro sentence currently references the old constructor option
name labelSet; update that prose to use the new option name clientLabelSet so it
matches the SDK and the examples (ensure the sentence reads something like
"Provided when constructing new EnsRainbowApiClient({ clientLabelSet: … })" and
replace any remaining occurrences of labelSet in this section with
clientLabelSet to keep the docs consistent with the EnsRainbowApiClient
constructor.
In `@packages/ensnode-sdk/src/ensindexer/config/compatibility.test.ts`:
- Line 70: The test description is stale: update the it(...) title that
currently says "'configA.labelSet.labelSetId' / 'configB.labelSet.labelSetId'"
to reference clientLabelSet (e.g., "'configA.clientLabelSet.clientLabelSetId' is
not same as 'configB.clientLabelSet.clientLabelSetId'") so it matches the test
body which mutates clientLabelSet.labelSetId and asserts the
"'clientLabelSet.labelSetId'" error; ensure the new title mirrors the sibling
test's wording for consistency and clarity.
In `@packages/ensnode-sdk/src/ensindexer/config/conversions.test.ts`:
- Around line 93-102: The test "can enforce invariants: expected
subgraph-compatibility" is redundant because
correctSerializedConfig.isSubgraphCompatible is already true; change the test to
exercise the alternate path by setting serializedConfig.isSubgraphCompatible =
false and ensure the serializedConfig.plugins (or whichever field denotes plugin
set) contains a plugin that is subgraph-compatible so
deserializeEnsIndexerPublicConfig(serializedConfig) hits the distinct invariant
branch, or delete the test if you prefer not to cover that case separately;
update only the serializedConfig mutation in this test (referencing
serializedConfig, correctSerializedConfig, isSubgraphCompatible, and
deserializeEnsIndexerPublicConfig).
In `@packages/ensnode-sdk/src/ensindexer/config/types.ts`:
- Around line 128-131: The JSDoc for ENSIndexerConfig still refers to the old
field name "labelSet" in the invariant for isSubgraphCompatible; update that
text to refer to the renamed field "clientLabelSet" (and the expected value {
clientLabelSet: { labelSetId: 'subgraph', labelSetVersion: 0 } }) so the doc
matches the actual config shape and the isSubgraphCompatible contract; check the
comment block containing isSubgraphCompatible and ENSIndexerConfig to replace
all occurrences of "labelSet" with "clientLabelSet".
🪄 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: 8feecd32-3b92-4fa6-85cd-a11467e3cf38
📒 Files selected for processing (59)
.changeset/fifty-games-smash.mdapps/ensadmin/src/app/mock/indexing-status-api.mock.tsapps/ensadmin/src/app/mock/stack-info/page.tsxapps/ensadmin/src/app/mock/stack-info/stack-info.mock.tsapps/ensadmin/src/components/connection/cards/ensnode-stack-info.tsxapps/ensadmin/src/components/require-ensadmin-feature.tsxapps/ensapi/src/config/config.schema.test.tsapps/ensapi/src/config/validations.tsapps/ensindexer/src/config/config.schema.tsapps/ensindexer/src/config/config.test.tsapps/ensindexer/src/config/environment-defaults.test.tsapps/ensindexer/src/config/serialize.tsapps/ensindexer/src/config/serialized-types.tsapps/ensindexer/src/config/types.tsapps/ensindexer/src/lib/ensdb-writer-worker/ensdb-writer-worker.mock.tsapps/ensindexer/src/lib/ensrainbow/singleton.tsapps/ensindexer/src/lib/public-config-builder/public-config-builder.test.tsapps/ensindexer/src/lib/public-config-builder/public-config-builder.tsapps/ensindexer/src/ponder/indexing-behavior-injection-contract.tsapps/ensrainbow/src/commands/server-command.test.tsapps/ensrainbow/src/commands/server-command.tsapps/ensrainbow/src/config/config.schema.test.tsapps/ensrainbow/src/config/public.tsapps/ensrainbow/src/config/types.tsapps/ensrainbow/src/lib/api.tsapps/ensrainbow/src/lib/database.tsapps/ensrainbow/src/lib/server.tsdocs/ensnode.io/ensapi-openapi.jsondocs/ensnode.io/src/content/docs/ensrainbow/concepts/typescript-interfaces.mdxdocs/ensnode.io/src/content/docs/ensrainbow/usage/client-sdk.mdxpackages/ensdb-sdk/src/client/ensdb-client.mock.tspackages/ensnode-sdk/src/ensapi/config/conversions.test.tspackages/ensnode-sdk/src/ensdb/zod-schemas/config.tspackages/ensnode-sdk/src/ensindexer/client.mock.tspackages/ensnode-sdk/src/ensindexer/config/compatibility.test.tspackages/ensnode-sdk/src/ensindexer/config/compatibility.tspackages/ensnode-sdk/src/ensindexer/config/conversions.test.tspackages/ensnode-sdk/src/ensindexer/config/is-subgraph-compatible.test.tspackages/ensnode-sdk/src/ensindexer/config/is-subgraph-compatible.tspackages/ensnode-sdk/src/ensindexer/config/serialize.tspackages/ensnode-sdk/src/ensindexer/config/types.tspackages/ensnode-sdk/src/ensindexer/config/zod-schemas.test.tspackages/ensnode-sdk/src/ensindexer/config/zod-schemas.tspackages/ensnode-sdk/src/ensnode/client.test.tspackages/ensnode-sdk/src/ensrainbow/config.tspackages/ensnode-sdk/src/ensrainbow/zod-schemas/config.tspackages/ensnode-sdk/src/stack-info/deserialize/ensindexer-stack-info.tspackages/ensnode-sdk/src/stack-info/deserialize/ensnode-stack-info.tspackages/ensnode-sdk/src/stack-info/ensindexer-stack-info.tspackages/ensnode-sdk/src/stack-info/ensnode-stack-info.tspackages/ensnode-sdk/src/stack-info/index.tspackages/ensnode-sdk/src/stack-info/serialize/ensindexer-stack-info.tspackages/ensnode-sdk/src/stack-info/serialize/ensnode-stack-info.tspackages/ensnode-sdk/src/stack-info/validate/ensindexer-stack-info.tspackages/ensnode-sdk/src/stack-info/validate/ensnode-stack-info.tspackages/ensnode-sdk/src/stack-info/zod-schemas/ensindexer-stack-info.tspackages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.tspackages/ensrainbow-sdk/src/client.test.tspackages/ensrainbow-sdk/src/client.ts
…d UI on the _Connection_ page.
|
@greptile review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 67 out of 68 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Lite PR
Tip: Review docs on the ENSNode PR process
Summary
EnsIndexerStackInfodata model which includesensDbPublicConfig,ensIndexerPublicConfigandensRainbowPublicConfig.EnsNodeStackInfodata model which extendsEnsIndexerStackInfo, and includesensApiPublicConfig.ensRainbow: EnsRainbowPublicConfigis now required field across all stack info data modelsEnsNodeStackInfoobject into ENSNode Metadata table in ENSDb yet, so we while creatingEnsNodeStackInfoobject in ENSApi runtime, we leverege the fact thatensIndexerPublicConfig.ensIndexerPublicConfigis always present.recordsCountfield fromEnsRainbowPublicConfigdata model.versionfield withversionInfo.Why
Testing
Notes for Reviewer (Optional)
IndexingMetadataContextdata model.IndexingMetadataContextdata model).ensIndexerPublicConfigfield fromEnsApiPublicConfigdata model.ensRainbowPublicConfigfield fromEnsIndexerPublicConfigdata model.Pre-Review Checklist (Blocking)