Skip to content

fix(testnet): use public DOS Name NFT links - #273

Merged
JOY (JOY) merged 2 commits into
mainfrom
codex/testnet-nft-policy-acceptance
Oct 25, 2026
Merged

JOY (JOY) merged 2 commits into
mainfrom
codex/testnet-nft-policy-acceptance

Conversation

@JOY

@JOY JOY (JOY) commented Oct 25, 2026 •

Copy link
Copy Markdown

Final implementation and scope

  • Supersedes the initial direct-public-URL approach and the older generated summaries below: official BENS must retain http://backend:4000 for transaction history. BENS 1.7.3 derives wrapped IDs from ENS namehash, which is not the ENSv2 ERC-1155 token ID.
  • Route Testnet Backend and same-origin Caddy BENS traffic through the approved read-only DOS Names metadata adapter. It corrects public explorer metadata and token IDs from canonical Graph Node state without changing contracts, official BENS, or Blockscout core.
  • Pin DOS Names merged commit 2d47fb77bb09dcbdc9d7bfeee77d12ddbebc2e4d (PR feat(testnet): adapt BENS metadata to canonical ENSv2 NFTs DOS-Names-Contracts#11). The adapter is an immutable Node image, no published ports/secrets, read-only mounts, non-root/capability-dropped runtime. Deploy forces recreation; rollback removes it before restoring prior configuration.
  • Mainnet configuration and its DOS Names pin remain unchanged. Only Testnet is authorized.

Final-head verification

  • Independent review of full DOScan diff f8ef09f45b1315e41e82c74a02731d22d30837fb..907cf02d87d2224b8bddc5d92545af97c1cc8808: CLEAN_PASS, no P0-P3 findings. Verified DOS Names merge tree matches final independently reviewed adapter source exactly.
  • 101/101 workflow tests pass on Linux. Git Bash on Windows hit the existing shell-startup timing assertion; it is not counted as a pass and the timeout was not relaxed.
  • 10/10 adapter tests pass in the exact pinned non-root/read-only Node Docker image, network disabled. Compose/Caddy validation, env parity, Testnet validator, UI syntax and diff checks pass.
  • All final-head required CI, Elixir compile and both image builds pass. Hosted Claude/Codex reviews were unavailable due provider usage limits, not counted as completed reviews; independent final-head review supplies actual source coverage.
  • Gemini template-restoration finding fixed and resolved with the test evidence.

Contract acceptance and remaining deployment gate

  • Reused verified Testnet policy claims for policy-smoke.dos and deployed smart-wallet fixture e2epolicy01.dos.
  • Paid policy renewal succeeded in transaction 0xce800d5b23a7eb1a0cf7318585af76b02e0e93e0b7ce468038ff941732c1094c (block 299): same token/owner, expiry extended exactly 365 days, WDOS payment observed. Wrong-wallet, invalid/expired voucher, price bound, consumed nonce and direct-registrar bypass checks return the expected custom errors.
  • Official BENS already indexes the policy renewal expiry and history; no registrar-mapping rewrite was needed.
  • DOS.Me service unit tests 11/11 pass, and unauthenticated Beta voucher requests return 401. These are not authenticated DOS.Me user E2E evidence. No DOS.Me writes, authorization bypass, or Mainnet actions.
  • After merge: verify Testnet deployment revision/artifact, health, canonical NFT ID/public link, preserved renewal history and the real browser NFT popup flow. Browser CI skipped by Cloudflare must not count as browser acceptance.

The generated sections below describe the earlier commit and are retained as review history, not the final architecture.

📌 TL;DR

This PR updates the Testnet BENS configuration to use the public https://test.doscan.io explorer URL instead of an internal backend address, ensuring NFT links are accessible externally. It adds validation logic and comprehensive tests (unit and E2E) to enforce this public origin and verify that the UI correctly resolves and displays NFT details.

🎯 Type of Change

  • 🚀 New feature
  • 🐛 Bugfix
  • 🧹 Refactor
  • ⚡ Performance
  • 📚 Documentation
  • ⚙️ CI / Configuration

🔍 Changes Walkthrough

File Summary of Changes
.github/scripts/testnet-bens-ui.spec.mjs Extends the Playwright E2E test to verify that token links in the UI point to the public origin (https://test.doscan.io), open in a new tab, and successfully load the "NFT details" page without errors.
.github/scripts/tests/test_validate_testnet_bens.py Adds unit tests to ensure the validator rejects internal/non-public explorer URLs and that the rendered configuration produces correct public URLs for token instances.
docker-compose/bens/config.template.json Updates the blockscout.url for network 3939 from the internal http://backend:4000 to the public https://test.doscan.io.
docs/superpowers/plans/2026-08-12-ensv2-bens-testnet.md Appends a "Testnet Acceptance Follow-up" section documenting the scope, acceptance criteria, and next steps for fixing public NFT links and verifying policy-registrar claims on Testnet.
scripts/validate-testnet-bens.py Adds a validation check to ensure the blockscout.url for network 3939 is exactly https://test.doscan.io, raising an error if it deviates.

📊 Architectural Flow

sequenceDiagram
    participant User
    participant UI as Testnet UI
    participant Validator as validate-testnet-bens.py
    participant Config as config.template.json
    participant DOScan as test.doscan.io

    Note over Validator, Config: CI / Validation Phase
    Validator->>Config: Read BENS Template
    Validator->>Validator: Check blockscout.url == "https://test.doscan.io"
    alt URL is internal/invalid
        Validator-->>CI: Fail Validation
    else URL is public
        Validator-->>CI: Pass Validation
    end

    Note over User, DOScan: E2E / User Interaction Phase
    User->>UI: Search DOS Name
    UI->>UI: Render Token Link (href: https://test.doscan.io/token/...)
    User->>UI: Click Token Link
    UI->>DOScan: Open New Tab (https://test.doscan.io/token/...)
    DOScan-->>UI: Load NFT Details Page
    UI-->>User: Display NFT Details
Loading

Summary by CodeRabbit

  • Bug Fixes
    • Corrected Testnet explorer links so token details open on the public explorer over HTTPS.
    • Added validation to flag an incorrect explorer URL.
  • Tests
    • Added checks for token links, NFT details pages, and explorer URL validation.
  • Documentation
    • Recorded Testnet acceptance criteria and follow-up verification steps.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-25T13:12:39.460487Z
We couldn’t complete this review. Comment @codex review to try again.
907cf02 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5b1feda8-465c-4077-9fcf-01b1be347aca
Commits

Reviewing files that changed from the base of the PR and between 1a1e06c and 907cf02.

Files selected for processing: 9
  • .github/scripts/testnet-bens-ui.spec.mjs
  • .github/scripts/tests/test_validate_testnet_bens.py
  • .github/workflows/dependency-build.yml
  • .github/workflows/deploy-config.yml
  • docker-compose/Caddyfile-gcp-testnet
  • docker-compose/docker-compose-testnet.yml
  • docker-compose/envs/common-blockscout-testnet.env
  • docs/superpowers/plans/2026-08-12-ensv2-bens-testnet.md
  • scripts/validate-testnet-bens.py

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 90898c2e-5519-46b4-aa1c-cc2cb463690d
Commits

Reviewing files that changed from the base of the PR and between f8ef09f and 1a1e06c.

Files selected for processing: 5
  • .github/scripts/testnet-bens-ui.spec.mjs
  • .github/scripts/tests/test_validate_testnet_bens.py
  • docker-compose/bens/config.template.json
  • docs/superpowers/plans/2026-08-12-ensv2-bens-testnet.md
  • scripts/validate-testnet-bens.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The Testnet BENS configuration now uses the public DOScan explorer URL. The validator enforces that URL for network 3939. Validator and browser tests check the rendered token path and NFT detail link.

Changes: Testnet explorer URL

Layer / File(s) Summary
Configure and validate the explorer origin
docker-compose/bens/config.template.json, scripts/validate-testnet-bens.py, .github/scripts/tests/test_validate_testnet_bens.py
The BENS template sets the Blockscout URL for network 3939 to https://test.doscan.io. The validator reports an error if the URL differs. Tests cover rejection of the internal URL and resolution of a token path against the rendered URL.
Check the NFT detail link
.github/scripts/testnet-bens-ui.spec.mjs, docs/superpowers/plans/2026-08-12-ensv2-bens-testnet.md
The browser test checks the token-instance link’s origin and HTTPS protocol, then checks the popup’s URL, NFT details heading, and error message. The plan records Testnet acceptance criteria, scope, and follow-up steps.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to 1a1e0

The reviewed change is mergeable after normal checks; live Testnet readback remains a deployment follow-up.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: using public DOS Name NFT links on Testnet.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

dos[bot]
dos Bot approved these changes Oct 25, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⏱️ Code Review completed (5 eligible files · 6,837 chars · 2 model call(s) · 1 PR unit(s))

Whole diff with bounded context at base f8ef09f / head 1a1e06c.

✅ CLEAN_PASS: Complete diff reviewed

Context investigation was bounded to the explicitly requested snapshot paths.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the BENS configuration to use the public Testnet explorer URL (https://test.doscan.io) instead of an internal backend URL, adds corresponding validation rules, updates documentation, and introduces integration and unit tests to verify these changes. Feedback is provided regarding a test in test_validate_testnet_bens.py that modifies a module-level variable without restoring it, which could lead to test flakiness; a try...finally block is suggested to ensure proper cleanup.

Comment thread .github/scripts/tests/test_validate_testnet_bens.py Outdated
@JOY
JOY (JOY) marked this pull request as draft October 25, 2026 12:36
@JOY
JOY (JOY) marked this pull request as ready for review October 25, 2026 13:12
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@JOY
JOY (JOY) merged commit b168649 into main Oct 25, 2026
15 checks passed
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.

1 participant