Skip to content

Rename ENSDb-related symbols acorss codebase#1828

Draft
tk-o wants to merge 26 commits intomainfrom
refactor/1762-1763-rename-ensdb-related-symbols
Draft

Rename ENSDb-related symbols acorss codebase#1828
tk-o wants to merge 26 commits intomainfrom
refactor/1762-1763-rename-ensdb-related-symbols

Conversation

@tk-o
Copy link
Copy Markdown
Contributor

@tk-o tk-o commented Mar 25, 2026

Lite PR

Tip: Review docs on the ENSNode PR process

Summary

  1. Replacements applied:
  • databaseSchemaName to ensIndexerSchemaName
  • databaseUrl to ensDbUrl
  • DATABASE_SCHEMA to ENSINDEXER_SCHEMA_NAME
  • DATABASE_URL to ENSDB_URL
  • DatabaseUrlSchema to EnsDbUrlSchema
  • DatabaseSchemaNameSchema to EnsIndexerSchemaNameSchema
  1. ENSIndexer dev and start commands have been updated to pass ENSINDEXER_SCHEMA_NAME value with --schema Ponder CLI param. The serve command was removed.

  2. Connection view in ENSAdmin: updated tooltip contents.

  3. Updated code docs in several places to match the current state of reality.


Why

  • We wanted to replace the generic "database schema" and "database URL" references with ones related to ENSDb: "ENSIndexer Schema Name" and "ENSDb URL"
  • We plan to enhance ENSDb SDK, and for that, we need ENSApi and ENSIndexer to use the same names for ENSDb-related symbols.

Testing

  • Ran static code analysis (lint, typecheck)
  • Ran full testing suite
  • Ran ENSNode locally, using Docker Compose setup
  • Ran ENSNode locally, directly on the host system

Notes for Reviewer (Optional)

  • Please review this PR commit-by-commit. There's a separate commit capturing all mechanical updates, followed by more commits focused on various smaller updates, including docs updates.

Pre-Review Checklist (Blocking)

  • This PR does not introduce significant changes and is low-risk to review quickly.
  • Relevant changesets are included (or are not required)

Resolves #1762, #1763.

tk-o added 2 commits March 25, 2026 18:41
Replacements applied:
- `databaseSchemaName` to `ensIndexerSchemaName`
- `databaseUrl` to `ensDbUrl`
- `DATABASE_SCHEMA` to `ENSINDEXER_SCHEMA_NAME`
- `DATABASE_URL` to `ENSDB_URL`
- `DatabaseUrlSchema` to `EnsDbUrlSchema`
- `DatabaseSchemaNameSchema` to `EnsIndexerSchemaNameSchema`
@tk-o tk-o requested a review from a team as a code owner March 25, 2026 17:46
Copilot AI review requested due to automatic review settings March 25, 2026 17:46
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 25, 2026

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

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Apr 1, 2026 6:51am
ensnode.io Ready Ready Preview, Comment Apr 1, 2026 6:51am
ensrainbow.io Ready Ready Preview, Comment Apr 1, 2026 6:51am

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 25, 2026

🦋 Changeset detected

Latest commit: 8978d7f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@ensnode/ensnode-sdk Major
ensapi Major
ensadmin Major
ensindexer Major
ensrainbow Major
fallback-ensapi Major
@namehash/ens-referrals Major
@ensnode/ensdb-sdk Major
@ensnode/ensnode-react Major
@ensnode/ensrainbow-sdk Major
@ensnode/integration-test-env Patch
@namehash/namehash-ui Major
@docs/ensnode Major
@docs/ensrainbow Major
enssdk Major
enscli Major
enskit Major
ensskills Major
@ensnode/datasources Major
@ensnode/ponder-sdk Major
@ensnode/ponder-subgraph Major
@ensnode/shared-configs Major
@docs/mintlify Major

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 25, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Repository-wide rename of ENS DB and schema identifiers: DATABASE_URLENSDB_URL, DATABASE_SCHEMA / databaseSchemaNameENSINDEXER_SCHEMA_NAME / ensIndexerSchemaName, with corresponding updates to types, Zod schemas, tests, mocks, docs, infra, CI, and runtime singletons.

Changes

Cohort / File(s) Summary
Changesets
.changeset/*.md
Added changesets declaring minor releases and documenting public API / env var renames.
ENSApi — config & runtime
apps/ensapi/src/config/..., apps/ensapi/src/lib/..., apps/ensapi/src/handlers/subgraph/subgraph-api.ts, apps/ensapi/.env.local.example
Replaced DATABASE_URLENSDB_URL, databaseUrlensDbUrl; updated env/type schemas, redaction output, singletons, tests, and removed makeDrizzle.
ENSIndexer — config, types & runtime
apps/ensindexer/src/config/..., apps/ensindexer/src/lib/..., apps/ensindexer/.env.local.example, apps/ensindexer/package.json, apps/ensindexer/src/ponder/config.ts
Renamed databaseUrlensDbUrl, databaseSchemaNameensIndexerSchemaName; updated Zod schemas, types, serialization, redaction, singletons, scripts, tests, and added explicit Ponder DB config.
ENSAdmin UI & mocks
apps/ensadmin/src/...
Updated mock public-config JSON and UI labels to use ensIndexerSchemaName / “ENSIndexer Schema Name”.
SDKs & shared types/schemas
packages/ensnode-sdk/src/..., packages/ensdb-sdk/src/..., packages/ensnode-sdk/src/shared/...
Renamed public config field databaseSchemaNameensIndexerSchemaName; updated schema factories, Zod types, serialization, compatibility types, shared env/types, mocks, and tests.
Tests & fixtures
**/*.{test,mock}.ts, **/*mock*.ts
Aligned fixtures and assertions to ENSDB_URL, ENSINDEXER_SCHEMA_NAME, ensDbUrl, ensIndexerSchemaName.
Infra / CI / Terraform / Orchestration
docker-compose.yml, .github/workflows/*, terraform/**, packages/integration-test-env/src/orchestrator.ts
Rewired env vars and Terraform/module inputs from DATABASE_* / database_schema to ENSDB_URL / ENSINDEXER_SCHEMA_NAME / ensindexer_schema_name; adjusted Terraform locals and Render env_vars merging.
Docs & OpenAPI
docs/**, docs/docs.ensnode.io/ensapi-openapi.json
Updated docs and OpenAPI examples/schemas to require/emit ensIndexerSchemaName and reference ENSINDEXER_SCHEMA_NAME.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through code to change each name,
ENSDB_URL and schema hopped into frame.
Mocks and tests fetched carrots in a line,
Docs and infra followed—everything in time.
A tiny rabbit cheers: rename done, sublime!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title mentions renaming ENSDb-related symbols but contains a typo ('acorss' instead of 'across'), which reduces clarity.
Linked Issues check ✅ Passed All code changes comprehensively implement the objectives from #1762: replacing generic database terminology (databaseSchema, databaseSchemaName, DATABASE_SCHEMA, DATABASE_URL) with precise ENSDb/ENSIndexer terms (ensIndexerSchemaName, ensDbUrl, ENSINDEXER_SCHEMA_NAME, ENSDB_URL) throughout the codebase.
Out of Scope Changes check ✅ Passed All changes are strictly scoped to renaming ENSDb-related symbols and updating related documentation, with no unrelated modifications introduced.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Description check ✅ Passed The PR description comprehensively follows the template with all required sections: Summary (6 replacements + 3 additional changes), Why (clear motivation), Testing (4 testing methods), Notes for Reviewer, and Pre-Review Checklist both completed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/1762-1763-rename-ensdb-related-symbols

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.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 25, 2026

Greptile Summary

This PR performs a systematic rename of ENSDb-related symbols across the entire ENSNode codebase, replacing generic database terms (DATABASE_URL, DATABASE_SCHEMA, databaseUrl, databaseSchemaName, etc.) with ENSDb-specific equivalents (ENSDB_URL, ENSINDEXER_SCHEMA_NAME, ensDbUrl, ensIndexerSchemaName, etc.). It also unifies two previously separate environment interfaces (EnsApiDatabaseEnvironment and EnsIndexerDatabaseEnvironment) into a single DatabaseEnvironment, and updates the ENSIndexer dev/start scripts to pass --schema explicitly to the Ponder CLI.

  • 46 files changed with purely mechanical renames — changeset files, config schemas, environment interfaces, types, Zod schemas, tests, mock data, and docs are all consistently updated.
  • The EnsApiDatabaseEnvironment and EnsIndexerDatabaseEnvironment interfaces are merged into a single DatabaseEnvironment, which makes sense now that both apps share the same env var names.
  • In apps/ensapi/src/config/redact.ts, the redactEnsApiConfig function was refactored from a ...config spread to an explicit field list, but ensIndexerSchemaName (non-sensitive) and theGraphApiKey (sensitive) are no longer included in the returned object, affecting startup log output.
  • The ENSIndexer start script now passes --schema $ENSINDEXER_SCHEMA_NAME to ponder, bridging the renamed env var to ponder's expected CLI argument.

Confidence Score: 5/5

  • This PR is safe to merge — all renames are consistent across 46 files with no functional logic changes.
  • The change is a purely mechanical rename confirmed by the author to have passed linting, typechecking, full test suite, and local end-to-end runs. Every occurrence of the old symbols is updated consistently. The one noted issue (missing ensIndexerSchemaName from startup logs in the ENSApi redact function) is a non-blocking P2 that affects only observability, not correctness or runtime behavior.
  • apps/ensapi/src/config/redact.ts — ensIndexerSchemaName is absent from the startup log output after the explicit-field refactor.

Important Files Changed

Filename Overview
apps/ensapi/src/config/redact.ts Refactored from ...config spread to explicit fields; ensIndexerSchemaName and theGraphApiKey are now absent from startup logs
packages/ensnode-sdk/src/shared/config/environments.ts Merged two separate environment interfaces (EnsApiDatabaseEnvironment, EnsIndexerDatabaseEnvironment) into a single unified DatabaseEnvironment using the renamed env vars
packages/ensnode-sdk/src/ensindexer/config/zod-schemas.ts Renamed makeDatabaseSchemaNameSchemamakeEnsIndexerSchemaNameSchema and makeSerializedEnsIndexerPublicConfigSchema field from databaseSchemaNameensIndexerSchemaName
packages/ensnode-sdk/src/shared/config/types.ts Renamed DatabaseSchemaName type to EnsIndexerSchemaName, derived from the renamed EnsIndexerSchemaNameSchema
apps/ensindexer/package.json Updated dev and start scripts to pass --schema flag to ponder CLI using the new env var name; start uses shell expansion $ENSINDEXER_SCHEMA_NAME which is safe given the env var is required
apps/ensindexer/src/config/types.ts Renamed databaseSchemaName: DatabaseSchemaNameensIndexerSchemaName: EnsIndexerSchemaName and databaseUrl: DatabaseUrlensDbUrl: DatabaseUrl in EnsIndexerConfig
apps/ensapi/src/config/ensdb-config.schema.ts Renamed DatabaseUrlSchemaEnsDbUrlSchema and field databaseUrlensDbUrl in EnsDbConfigSchema; updated error messages to mention ENSDb
docker-compose.yml Updated env var names DATABASE_URLENSDB_URL and DATABASE_SCHEMAENSINDEXER_SCHEMA_NAME in both ensindexer and ensapi service definitions
apps/ensapi/src/handlers/subgraph/subgraph-api.ts Correctly maps config.ensDbUrl to databaseUrl parameter of subgraphGraphQLMiddleware (external API unchanged)

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph ENV["Environment Variables (renamed)"]
        E1["DATABASE_URL → ENSDB_URL"]
        E2["DATABASE_SCHEMA → ENSINDEXER_SCHEMA_NAME"]
    end

    subgraph SDK["@ensnode/ensnode-sdk (shared)"]
        S1["EnsIndexerDatabaseEnvironment\nEnsApiDatabaseEnvironment\n→ DatabaseEnvironment"]
        S2["DatabaseSchemaNameSchema\n→ EnsIndexerSchemaNameSchema"]
        S3["DatabaseSchemaName type\n→ EnsIndexerSchemaName type"]
        S4["makeDatabaseSchemaNameSchema()\n→ makeEnsIndexerSchemaNameSchema()"]
    end

    subgraph INDEXER["ENSIndexer App"]
        I1["EnsIndexerConfig\ndatabaseUrl → ensDbUrl\ndatabaseSchemaName → ensIndexerSchemaName"]
        I2["EnsIndexerPublicConfig\ndatabaseSchemaName → ensIndexerSchemaName"]
        I3["package.json scripts\n--schema ENSINDEXER_SCHEMA_NAME"]
    end

    subgraph API["ENSApi App"]
        A1["EnsDbConfigSchema\ndatabaseUrl → ensDbUrl"]
        A2["EnsApiConfig\ndatabaseUrl → ensDbUrl"]
        A3["redactEnsApiConfig()\n(explicit fields)"]
    end

    ENV --> INDEXER
    ENV --> API
    SDK --> INDEXER
    SDK --> API
    INDEXER --> |"EnsIndexerPublicConfig\nensIndexerSchemaName"| API
Loading

Reviews (1): Last reviewed commit: "docs(changeset): Updated the Connection ..." | 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

This PR standardizes ENSDb-related naming across the monorepo by renaming env vars and config fields away from generic DATABASE_* / database* terminology toward ENSDB_* / ensDb* and ENSINDEXER_SCHEMA_NAME / ensIndexerSchemaName, and updates related docs, mocks, and UI text.

Changes:

  • Renamed env vars and config fields (e.g. DATABASE_URLENSDB_URL, DATABASE_SCHEMAENSINDEXER_SCHEMA_NAME, databaseSchemaNameensIndexerSchemaName).
  • Updated ENSIndexer Ponder scripts to pass schema via --schema.
  • Updated docs/examples and ENSAdmin connection UI to reflect the new naming.

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/ensnode-sdk/src/shared/config/zod-schemas.ts Rename schema-name zod schema + update required error messages to ENSINDEXER_SCHEMA_NAME.
packages/ensnode-sdk/src/shared/config/types.ts Rename DatabaseSchemaName type to EnsIndexerSchemaName (leaves DatabaseUrl).
packages/ensnode-sdk/src/shared/config/environments.ts Replace app-specific DB env interfaces with shared DatabaseEnvironment using ENSDB_URL/ENSINDEXER_SCHEMA_NAME.
packages/ensnode-sdk/src/ensindexer/config/zod-schemas.ts Rename public config field + schema builder to ensIndexerSchemaName.
packages/ensnode-sdk/src/ensindexer/config/zod-schemas.test.ts Update schema tests and expected error messages for renamed field.
packages/ensnode-sdk/src/ensindexer/config/types.ts Rename EnsIndexerPublicConfig.databaseSchemaNameensIndexerSchemaName + update docstring.
packages/ensnode-sdk/src/ensindexer/config/serialize.ts Serialize renamed public config field.
packages/ensnode-sdk/src/ensindexer/config/conversions.test.ts Update conversions tests to use ensIndexerSchemaName.
packages/ensnode-sdk/src/ensindexer/config/compatibility.ts Update compatibility check omit list to new field name.
packages/ensnode-sdk/src/ensindexer/client.mock.ts Update mocked public config field name.
packages/ensnode-sdk/src/ensapi/config/conversions.test.ts Update ENSApi config conversion tests for renamed field.
packages/ensnode-sdk/src/ensapi/client.test.ts Update client test fixture to use ensIndexerSchemaName.
packages/ensdb-sdk/src/client/ensdb-client.mock.ts Update ENSDb SDK mock public config to new field name.
docs/ensnode.io/src/content/docs/docs/usage/api.mdx Update Config API example response to ensIndexerSchemaName.
docs/ensnode.io/src/content/docs/docs/contributing/releases.mdx Update release guidance to reference ENSINDEXER_SCHEMA_NAME.
docker-compose.yml Switch docker-compose env vars to ENSDB_URL / ENSINDEXER_SCHEMA_NAME.
apps/ensindexer/src/lib/public-config-builder/public-config-builder.ts Build immutable public config with ensIndexerSchemaName.
apps/ensindexer/src/lib/public-config-builder/public-config-builder.test.ts Update mocks/assertions for renamed field.
apps/ensindexer/src/lib/ensdb/singleton.ts Use ensDbUrl + ensIndexerSchemaName from config.
apps/ensindexer/src/lib/ensdb-writer-worker/ensdb-writer-worker.mock.ts Update test fixture public config field.
apps/ensindexer/src/lib/test/mockConfig.ts Update test env inputs to new env var names.
apps/ensindexer/src/config/types.ts Rename config fields (databaseSchemaNameensIndexerSchemaName, databaseUrlensDbUrl) and update docs.
apps/ensindexer/src/config/serialize.ts Serialize redacted config with new keys (ensDbUrl, ensIndexerSchemaName).
apps/ensindexer/src/config/redact.ts Redact ensDbUrl instead of databaseUrl.
apps/ensindexer/src/config/environment.ts Switch environment type composition to DatabaseEnvironment.
apps/ensindexer/src/config/config.test.ts Update tests to use ENSDB_URL / ENSINDEXER_SCHEMA_NAME and new config property names.
apps/ensindexer/src/config/config.schema.ts Parse env using ENSDB_URL / ENSINDEXER_SCHEMA_NAME and rename schema/url zod schema identifiers.
apps/ensindexer/package.json Update dev/start scripts to pass Ponder --schema and use new env vars.
apps/ensindexer/.env.local.example Update example env var names and explanatory comments.
apps/ensapi/src/lib/handlers/drizzle.ts Remove unused Drizzle helper (deleted).
apps/ensapi/src/lib/ensdb/singleton.ts Construct EnsDbReader using ensDbUrl.
apps/ensapi/src/handlers/subgraph/subgraph-api.ts Feed subgraph middleware with config.ensDbUrl.
apps/ensapi/src/config/redact.ts Redact ensDbUrl and reshape redacted output.
apps/ensapi/src/config/environment.ts Switch environment type composition to DatabaseEnvironment.
apps/ensapi/src/config/ensdb-config.schema.ts Rename url schema to EnsDbUrlSchema and read ENSDB_URL.
apps/ensapi/src/config/config.singleton.test.ts Update singleton bootstrap tests for new env var names.
apps/ensapi/src/config/config.schema.ts Build config using ensDbUrl and ensIndexerPublicConfig.ensIndexerSchemaName.
apps/ensapi/src/config/config.schema.test.ts Update config schema tests for new env var + field names.
apps/ensapi/.env.local.example Update ENSApi example env var names and wording.
apps/ensadmin/src/components/connection/cards/ensnode-info.tsx Update labels/tooltips and field access to ensIndexerSchemaName.
apps/ensadmin/src/app/mock/config-info/data.json Update mock config payloads to new field name.
apps/ensadmin/src/app/mock/config-api.mock.ts Update mock config deserialization input to new field name.
.changeset/wide-trams-rule.md Changeset: env var rename for ENSIndexer.
.changeset/slow-readers-pay.md Changeset: ENSAdmin UI wording update.
.changeset/slick-kings-travel.md Changeset: env var rename for ENSApi.
.changeset/metal-views-start.md Changeset: SDK public config field rename.

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

tk-o added 10 commits March 25, 2026 18:54
Ponder requires setting the database schema value with either `DATABASE_SCHEMA` evn var, or `--schema` CLI arg. We just stopped using the `DATABASE_SCHEMA` env var, so we need to use the `--schema` CLI arg and pass the selected ENSIndexer Schema Name value there.
Using lazy proxy for constructing `config` object does not allow for using `...config` spread operator. Instead, we have to list the `config` fields manually.
…rPublicConfig` type to `ensIndexerSchemaName`.
…SDB_URL`, and `DATABASE_SCHEMA` to `ENSINDEXER_SCHEMA_NAME`.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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/ensapi/src/config/ensdb-config.schema.ts (1)

7-23: 🧹 Nitpick | 🔵 Trivial

Consider extracting shared EnsDbUrlSchema to avoid duplication.

The EnsDbUrlSchema validation logic here is identical to the one in apps/ensindexer/src/config/config.schema.ts. Consider extracting this to a shared location (e.g., within @ensnode/ensnode-sdk/internal alongside EnsIndexerSchemaNameSchema) to maintain a single source of truth for PostgreSQL connection string validation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ensapi/src/config/ensdb-config.schema.ts` around lines 7 - 23, Extract
the duplicate PostgreSQL connection-string validator into a shared module and
replace local definitions with it: create a shared export (e.g., EnsDbUrlSchema)
under `@ensnode/ensnode-sdk/internal` (next to EnsIndexerSchemaNameSchema) that
encapsulates the current logic that uses parseConnectionString and the same
refine/error message, then update both
apps/ensapi/src/config/ensdb-config.schema.ts and
apps/ensindexer/src/config/config.schema.ts to import and reuse that shared
EnsDbUrlSchema instead of duplicating the refine logic.
🤖 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/ensindexer/package.json`:
- Around line 15-16: The start script is using shell variable expansion which is
inconsistent with the dev script and breaks on Windows; update the package.json
"start" script to set ENSINDEXER_SCHEMA_NAME inline like the "dev" script (for
example: ENSINDEXER_SCHEMA_NAME=public ponder --root ./ponder start --schema
$ENSINDEXER_SCHEMA_NAME) so both scripts use the same environment-variable
assignment style, or explicitly document that Windows development is unsupported
if you prefer not to change the script.

---

Outside diff comments:
In `@apps/ensapi/src/config/ensdb-config.schema.ts`:
- Around line 7-23: Extract the duplicate PostgreSQL connection-string validator
into a shared module and replace local definitions with it: create a shared
export (e.g., EnsDbUrlSchema) under `@ensnode/ensnode-sdk/internal` (next to
EnsIndexerSchemaNameSchema) that encapsulates the current logic that uses
parseConnectionString and the same refine/error message, then update both
apps/ensapi/src/config/ensdb-config.schema.ts and
apps/ensindexer/src/config/config.schema.ts to import and reuse that shared
EnsDbUrlSchema instead of duplicating the refine logic.
🪄 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: d62fd296-8c5e-434b-b08f-dc488ccb5154

📥 Commits

Reviewing files that changed from the base of the PR and between 756cce0 and 7887c69.

📒 Files selected for processing (46)
  • .changeset/metal-views-start.md
  • .changeset/slick-kings-travel.md
  • .changeset/slow-readers-pay.md
  • .changeset/wide-trams-rule.md
  • apps/ensadmin/src/app/mock/config-api.mock.ts
  • apps/ensadmin/src/app/mock/config-info/data.json
  • apps/ensadmin/src/components/connection/cards/ensnode-info.tsx
  • apps/ensapi/.env.local.example
  • apps/ensapi/src/config/config.schema.test.ts
  • apps/ensapi/src/config/config.schema.ts
  • apps/ensapi/src/config/config.singleton.test.ts
  • apps/ensapi/src/config/ensdb-config.schema.ts
  • apps/ensapi/src/config/environment.ts
  • apps/ensapi/src/config/redact.ts
  • apps/ensapi/src/handlers/subgraph/subgraph-api.ts
  • apps/ensapi/src/lib/ensdb/singleton.ts
  • apps/ensapi/src/lib/handlers/drizzle.ts
  • apps/ensindexer/.env.local.example
  • apps/ensindexer/package.json
  • apps/ensindexer/src/config/config.schema.ts
  • apps/ensindexer/src/config/config.test.ts
  • apps/ensindexer/src/config/environment.ts
  • apps/ensindexer/src/config/redact.ts
  • apps/ensindexer/src/config/serialize.ts
  • apps/ensindexer/src/config/types.ts
  • apps/ensindexer/src/lib/__test__/mockConfig.ts
  • apps/ensindexer/src/lib/ensdb-writer-worker/ensdb-writer-worker.mock.ts
  • apps/ensindexer/src/lib/ensdb/singleton.ts
  • apps/ensindexer/src/lib/public-config-builder/public-config-builder.test.ts
  • apps/ensindexer/src/lib/public-config-builder/public-config-builder.ts
  • docker-compose.yml
  • docs/ensnode.io/src/content/docs/docs/contributing/releases.mdx
  • docs/ensnode.io/src/content/docs/docs/usage/api.mdx
  • packages/ensdb-sdk/src/client/ensdb-client.mock.ts
  • packages/ensnode-sdk/src/ensapi/client.test.ts
  • packages/ensnode-sdk/src/ensapi/config/conversions.test.ts
  • packages/ensnode-sdk/src/ensindexer/client.mock.ts
  • packages/ensnode-sdk/src/ensindexer/config/compatibility.ts
  • packages/ensnode-sdk/src/ensindexer/config/conversions.test.ts
  • packages/ensnode-sdk/src/ensindexer/config/serialize.ts
  • packages/ensnode-sdk/src/ensindexer/config/types.ts
  • packages/ensnode-sdk/src/ensindexer/config/zod-schemas.test.ts
  • packages/ensnode-sdk/src/ensindexer/config/zod-schemas.ts
  • packages/ensnode-sdk/src/shared/config/environments.ts
  • packages/ensnode-sdk/src/shared/config/types.ts
  • packages/ensnode-sdk/src/shared/config/zod-schemas.ts
💤 Files with no reviewable changes (1)
  • apps/ensapi/src/lib/handlers/drizzle.ts

Comment on lines +15 to +16
"dev": "ENSINDEXER_SCHEMA_NAME=public ponder --root ./ponder dev --disable-ui --schema public",
"start": "ponder --root ./ponder start --schema $ENSINDEXER_SCHEMA_NAME",
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if cross-env is already a dependency or used elsewhere in the monorepo
rg -l 'cross-env' --type=json

Repository: namehash/ensnode

Length of output: 42


🏁 Script executed:

#!/bin/bash
# Check other npm scripts in the monorepo for comparison
find . -name "package.json" -type f | head -10 | while read f; do
  echo "=== $f ==="
  jq '.scripts' "$f" 2>/dev/null | head -20
done

Repository: namehash/ensnode

Length of output: 4402


🏁 Script executed:

#!/bin/bash
# Check for CI/GitHub Actions config that shows platform testing
fd -e "yml" -e "yaml" . .github/workflows 2>/dev/null | head -5 | while read f; do
  echo "=== $f ==="
  head -50 "$f"
done

Repository: namehash/ensnode

Length of output: 10284


🏁 Script executed:

#!/bin/bash
# Look for Windows or cross-platform documentation
fd -e "md" . -type f | xargs grep -l -i "windows\|cross.?platform\|cmd\|powershell" 2>/dev/null | head -10

Repository: namehash/ensnode

Length of output: 230


🏁 Script executed:

#!/bin/bash
# Search README files for Windows, WSL, or platform documentation
find . -maxdepth 3 -iname "readme*" -o -iname "contributing*" | while read f; do
  if [ -f "$f" ]; then
    if grep -qi "windows\|wsl\|platform\|setup\|development" "$f"; then
      echo "=== Found in $f ==="
      grep -i -A 2 -B 2 "windows\|wsl\|platform.*development" "$f" | head -30
    fi
  fi
done

Repository: namehash/ensnode

Length of output: 516


🏁 Script executed:

#!/bin/bash
# Check if there are any npm scripts that explicitly handle Windows (cmd/powershell alternatives)
rg "\.cmd|cmd\.exe|powershell|cross-env" --type=json --max-count=20

Repository: namehash/ensnode

Length of output: 42


🏁 Script executed:

#!/bin/bash
# Read the main README and CONTRIBUTING guide to check for platform/setup guidance
echo "=== README.md excerpt (setup section) ==="
head -200 ./README.md | tail -100

echo -e "\n=== CONTRIBUTING.md excerpt ==="
head -150 ./CONTRIBUTING.md

Repository: namehash/ensnode

Length of output: 4227


🏁 Script executed:

#!/bin/bash
# Check if there are any other npm scripts in ensindexer that might show patterns
cat ./apps/ensindexer/package.json | jq '.scripts'

Repository: namehash/ensnode

Length of output: 474


Inconsistent environment variable handling between dev and start scripts.

The start script uses shell variable expansion ($ENSINDEXER_SCHEMA_NAME) which is incompatible with Windows cmd/PowerShell, while the dev script uses an inline environment variable (ENSINDEXER_SCHEMA_NAME=public) that works cross-platform. Since the project has no Windows CI and doesn't document Windows as a supported development platform, either make the start script consistent with the dev script using inline variables, or document that Windows development is not supported.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ensindexer/package.json` around lines 15 - 16, The start script is using
shell variable expansion which is inconsistent with the dev script and breaks on
Windows; update the package.json "start" script to set ENSINDEXER_SCHEMA_NAME
inline like the "dev" script (for example: ENSINDEXER_SCHEMA_NAME=public ponder
--root ./ponder start --schema $ENSINDEXER_SCHEMA_NAME) so both scripts use the
same environment-variable assignment style, or explicitly document that Windows
development is unsupported if you prefer not to change the script.

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

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


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

Comment on lines 182 to 184
# Avoid using the `public` schema as we force that in the `dev` command. Using `public`
# cause conflicts as you interchange between dev and start commands so use literally
# anything else.
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The guidance here says the dev command forces the public schema, but apps/ensindexer/package.json now sets ENSINDEXER_SCHEMA_NAME=ensindexer_temp_dev and passes --schema ensindexer_temp_dev. Please update these comments to reflect the current dev/start behavior (and avoid suggesting public is forced if it no longer is).

Suggested change
# Avoid using the `public` schema as we force that in the `dev` command. Using `public`
# cause conflicts as you interchange between dev and start commands so use literally
# anything else.
# In development, the `dev` command uses a temporary schema (see apps/ensindexer/package.json,
# currently `ensindexer_temp_dev`), while the `start` command uses the schema configured via
# ENSINDEXER_SCHEMA_NAME. Choose a unique schema name that does not conflict with these and
# avoid using the shared `public` schema.

Copilot uses AI. Check for mistakes.
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

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


💡 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.

Replace databaseUrl with ensDbUrl Replace databaseSchema term with a more precise one

3 participants