Conversation
🦋 Changeset detectedLatest commit: b8f105f 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 |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughUpdated Referral Program default editions to match production: replaced prior entries with three editions ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ❌ 3❌ Failed checks (3 warnings)
✏️ 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
There was a problem hiding this comment.
Pull request overview
Updates the @namehash/ens-referrals v1 default referral program edition configuration set so local/default behavior matches the current production editions configuration used by ENS Awards.
Changes:
- Renamed and adjusted the default edition configs (updated slugs, display names, rule URLs, and parameters).
- Removed the prior “2026-03” default and added “2026-04” and “2026-05” rev-share-limit editions with updated pool/qualification values.
- Added a Changesets entry to publish the update.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/ens-referrals/src/v1/edition-defaults.ts | Updates the built-in default edition set (editions, dates, rule URLs, and award parameters). |
| .changeset/tough-sites-greet.md | Declares the release bump for the defaults update. |
💡 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
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/ens-referrals/src/v1/edition-defaults.ts`:
- Around line 75-79: Add a unit-level parity test that calls
buildReferralProgramEditionConfigSet with the production namespace editions
(e.g., december2025Edition, april2026Edition, may2026Edition) and compares the
resulting config set against a checked-in JSON fixture: assert slug,
startTimestamp, endTimestamp, award values, and rules URL(s) match exactly;
store the expected output as a fixture (committed) and fail the test on any
drift so changes to edition-defaults.ts can be verified locally and in CI
without deploying ENSApi.
🪄 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: dd812cf4-a8a2-411a-8dbd-032d75ff2ffa
📒 Files selected for processing (2)
.changeset/tough-sites-greet.mdpackages/ens-referrals/src/v1/edition-defaults.ts
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/ens-referrals/src/v1/edition-defaults.test.ts`:
- Around line 14-34: The test suite calls fetchProductionEditions which performs
a live HTTP fetch from PRODUCTION_EDITIONS_URL and hard-fails on network errors;
replace that live dependency with a pinned fixture: add a JSON fixture (e.g.,
test/fixtures/production-editions.json) and modify the suite to load that
fixture instead of calling fetchProductionEditions; keep fetchProductionEditions
for any separate integration check but move the live parity comparison into a
separate scheduled/integration test (or mark it with a tag like `@integration`)
and remove the top-level throw so unit tests use only the local fixture when
invoking getDefaultReferralProgramEditionConfigSet.
- Around line 29-31: The describe callback is async and awaits
fetchProductionEditions, which breaks Vitest collection; make the describe
callback synchronous, declare a top-level mutable variable (e.g., let
productionEditions) inside the describe, add a beforeAll hook that awaits
fetchProductionEditions and assigns its result to that variable, and update
existing tests to use the variable; specifically remove async/await from the
describe block that references fetchProductionEditions and move the async call
into beforeAll so fetchProductionEditions runs during setup instead of during
test collection.
- Line 20: Replace the unsafe cast to ReferralProgramEditionConfig[] by parsing
the JSON through the Zod-backed deserializer: import
deserializeReferralProgramEditionConfigSetArray from "./api/deserialize" (or
named import) and return deserializeReferralProgramEditionConfigSetArray(await
response.json()) from fetchProductionEditions (the location currently doing "as
ReferralProgramEditionConfig[]") so runtime validation and clear errors are
produced instead of an unchecked type cast.
🪄 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: 4d712c31-923d-4ef6-9a7e-46cc2b31844d
📒 Files selected for processing (2)
packages/ens-referrals/README.mdpackages/ens-referrals/src/v1/edition-defaults.test.ts
| describe("getDefaultReferralProgramEditionConfigSet", () => { | ||
| const configSet = getDefaultReferralProgramEditionConfigSet(ENSNamespaceIds.Mainnet); | ||
|
|
||
| describe("Should match production editions", () => { |
There was a problem hiding this comment.
Wouldn't this fail every time we introduce some changes to default editions or even the edition model? My concern is that for these tests to pass we need to modify the production setup. Or is it intended to be handled backwards? We first modify the production, and only then modify the defaults? What is the strategy here?
…/chore/update-referral-program-edition-defaults
Old description (for reference)Summary
Why
Testing
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Tip: Greploops — Automatically fix all review issues by running Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal. |
lightwalker-eth
left a comment
There was a problem hiding this comment.
@Y3drk Looks good 👍 Please take the lead to merge when ready
Lite PR → Update readme (previously → Update referral program edition defaults)
Summary
packages\ens-referrals\README.mdby adding a new section where we reference our own production setup of referral program editions on https://ensawards.org/production-editions.jsonWhy
Testing
test,typecheck&lintcommands locally to make sure that the changes didn't break anythingPre-Review Checklist (Blocking)