Skip to content

chore: remove the today environment - #9885

Open
dalkia wants to merge 4 commits into
devfrom
chore/remove-today-environment
Open

chore: remove the today environment#9885
dalkia wants to merge 4 commits into
devfrom
chore/remove-today-environment

Conversation

@dalkia

@dalkia dalkia commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Description

What does this PR change?

Removes the today environment (decentraland.today) from the client. Today was a hybrid environment — a catalyst replicating org that served a handful of asset/comms hosts from .today and everything else from org — and it is no longer in use.

What goes away:

  • DecentralandEnvironment.Today and GatekeeperMode.Today (explicit values on the remaining GatekeeperMode members keep serialized data stable).
  • IDecentralandUrlsSource.TODAY_DOMAIN, and decentraland.today drops out of ALL_DOMAINS, so .today hosts are no longer trusted by deep-link host checks.
  • DecentralandUrlsSource: the constructor block that pre-resolved and pinned today's org/today host mixture, plus the isTodayEnvironment branches in the optimized-assets/abgen resolution. BaseDomain is now a get-only property — the today mixture was the only reason it was writable.
  • GatewayUrlsSource: the SUPPORTED_ENVS gate existed only to keep today off the gateway; with every remaining environment supported, the gate is dead code and gateway routing is now gated by the use-gateway feature flag alone (no behavior change for org/zone/custom).
  • ChatEnvironmentValidator: the "cannot change realms in Today" early return; that made its environment dependency dead, so the constructor parameter is removed too (callers updated).
  • One-line Today arms in ChainUtils.PinnedNetworkOf, WorldManifestProvider, LiveKitChatMessagesBus, and ChatReactionsFactory.
  • Today-specific tests and test cases, and mentions in docs/app-arguments.md, docs/custom-base-domain.md, and the perf-report docs.

Notes for reviewers:

  • --dclenv today now fails Enum.TryParse in MainSceneLoader.ParseEnvironment and is logged and ignored, like any other unknown value — the client falls back to the serialized default.
  • Removing the mid-enum Today shifts Custom's serialized index from 3 to 2 on MainSceneLoader.decentralandEnvironment. The checked-in Main.unity serializes 0 (Org), so no asset changes; only a local uncommitted scene tweaked to Today/Custom would be affected, one time.

Test Instructions

Steps (standard run):

metaforge explorer run XXXX  # ← replace with this PR number

Expected result: Client boots into org exactly as before — this PR only deletes the today path; org/zone/custom resolution, gateway routing, chain pinning, and chat teleport validation are unchanged for the remaining environments.

Additional Testing Notes

  • Edge case: launching with --dclenv today should log the ignored value at startup and continue on the default environment.
  • Unit coverage for the remaining environments lives in DecentralandUrlsSourceShould, ChainUtilsShould, and ChatEnvironmentValidatorShould.

Quality Checklist

  • Changes have been tested locally
  • Documentation has been updated (if required)
  • Performance impact has been considered
  • For SDK features: Test scene is included

Code Review Reference

Please review our Branch & PR Standards before submitting. It explains the automated review flow, QA/DEV approval requirements, and what each label does — especially useful for first-time contributors.

🤖 Generated with Claude Code

Removes DecentralandEnvironment.Today and everything that special-cased
it: the org/today host-mixture pinning in DecentralandUrlsSource, the
gateway environment gate (now flag-only), GatekeeperMode.Today,
TODAY_DOMAIN, the ChatEnvironmentValidator realm-change ban (and its
now-dead environment dependency), the chain/manifest/server-env
mappings, tests, and doc mentions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dalkia
dalkia requested review from a team as code owners August 27, 2026 13:21
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🚦 CI Status

Build

Windows and Mac build successful in Unity Cloud! You can find a link to the downloadable artifact below.

Name Link
Commit b9488b2
Logs https://github.com/decentraland/unity-explorer/actions/runs/33188306831
Download Windows https://github.com/decentraland/unity-explorer/suites/89945095913/artifacts/9693871053
Download Windows S3 https://explorer-artifacts.decentraland.org/@dcl/unity-explorer/branch/chore/remove-today-environment/pr-25652-b9488b2/Decentraland_windows64.zip
Download Mac https://github.com/decentraland/unity-explorer/suites/89945095913/artifacts/9693878099
Download Mac S3 https://explorer-artifacts.decentraland.org/@dcl/unity-explorer/branch/chore/remove-today-environment/pr-25652-b9488b2/Decentraland_macos.zip
Built on 2026-08-28T16:46:01Z

Lint

Warnings not reduced: 12215 => 12218 — remove at least 4 warnings to merge.

Warnings/errors in files changed by this PR (8)
Assets/DCL/Infrastructure/Global/Dynamic/WorldManifestProvider.cs:52  CSharpWarnings::CS0162  Code is unreachable
Assets/DCL/Infrastructure/Global/Dynamic/WorldManifestProvider.cs:65  CSharpWarnings::CS8600  Converting null literal or possible null value into non-nullable type
Assets/DCL/Infrastructure/Global/Dynamic/WorldManifestProvider.cs:110  CSharpWarnings::CS8600  Converting null literal or possible null value into non-nullable type
Assets/DCL/Infrastructure/Global/Dynamic/WorldManifestProvider.cs:66  CSharpWarnings::CS8604  Possible null reference argument for parameter 'dto' in 'ECS.WorldManifest.Create'
Assets/DCL/Infrastructure/Global/Dynamic/WorldManifestProvider.cs:111  CSharpWarnings::CS8604  Possible null reference argument for parameter 'dto' in 'ECS.WorldManifest.Create'
Assets/DCL/Infrastructure/Global/Dynamic/WorldManifestProvider.cs:52  EmptyStatement  Empty statement is redundant
Assets/DCL/Infrastructure/Global/Dynamic/WorldManifestProvider.cs:52  HeuristicUnreachableCode  Code is heuristically unreachable
Assets/DCL/Infrastructure/Global/Dynamic/WorldManifestProvider.cs:56  InconsistentNaming  Name 'worldURL' does not match rule 'parameters_should_be_camel_case'. Suggested name is 'worldUrl'.

Tests

⚠️ EditMode produced no results — the run likely crashed or timed out before finishing. Check the Unity Test / Test (editmode) job.

TESTS SUITE Result Passed Failed Skipped
EditMode ⚠️ No results
PlayMode ✅ Passed 248 0 37

@github-actions
github-actions Bot requested a review from anicalbano August 27, 2026 13:21
@decentraland-bot
decentraland-bot self-requested a review August 27, 2026 13:21

@decentraland-bot decentraland-bot left a comment

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.

STEP 1 — Context loaded

Scope: 21 files changed (+57 −213). Pure removal of the dead Today environment (decentraland.today) across shared enums, interfaces, URL resolution, gateway routing, chat validation, chain pinning, tests, and docs. No new units introduced.

Subsystem docs reviewed: CLAUDE.md, docs/app-arguments.md, docs/custom-base-domain.md.


STEP 2 — Root-cause check: PASS

The problem is dead code: the Today environment is no longer in use and its host/domain infrastructure is decommissioned. The diff removes it cleanly — this is the correct action, not a symptom workaround.


STEP 3 — Design & integration: PASS

No new long-lived units introduced — this PR only removes code. The design simplifications are sound:

  • ChatEnvironmentValidator loses its DecentralandEnvironment dependency — correct, since the Today early-return was its only use. Callers updated.
  • GatewayUrlsSourceSUPPORTED_ENVS gate removed. The array was { Org, Zone, Custom }, which is exactly the set of remaining environments, so envSupported was always true. Removing the gate and making fields non-nullable is the right cleanup.
  • DecentralandUrlsSource.BaseDomain — changed from { get; private set; } to { get; }. The Today constructor block that mutated it post-construction was the only writer. Correct.
  • System.Linq removed from GatewayUrlsSourceSUPPORTED_ENVS.Contains() was its only use. Good per CLAUDE.md (no LINQ in hot paths).

No teardown/subscription concerns — the PR removes subscriptions and arms, it doesn't add them.


STEP 4 — Member audit

  • BaseDomain { get; } — consumed throughout DecentralandUrlsSource and GatewayUrlsSource for host composition and trust checks. Changing from { get; private set; } to { get; } is a pure tightening; no consumers break.
  • ChatEnvironmentValidator(IDecentralandUrlsSource) — single-parameter constructor. Both callers (ChatContainer.Create, ChatTeleporterShould.SetUp) updated. Clean.
  • GatewayUrlsSource.enabled — simplified from envSupported && flag to flag. Behaviorally equivalent since envSupported was always true for remaining envs.

No new public members introduced.


STEP 5 — Line-level review

Pass A — Blocking issues: None (P0/P1)

All switch expressions remain exhaustive (Org, Zone, Custom, _ => throw). Nullable-to-non-nullable transition in GatewayUrlsSource is correct — the constructor now unconditionally initializes all fields. Feature-flag gating logic is behaviorally identical. No bugs, no security issues, no resource leaks.

Pass B — Design smells

One P2 finding — see inline comment on DecentralandEnvironment.cs.

[P2] DecentralandEnvironment uses implicit ordinal values while being serialized by indexGatekeeperMode correctly uses explicit values (Org = 0, Zone = 1, Localhost = 3, Custom = 4), making it resilient to member removal. DecentralandEnvironment does not, so removing Today shifts Custom from ordinal 3 to 2. The existing XML comment on Custom warns "New values must be appended: the enum is serialized by index on MainSceneLoader" — the PR necessarily breaks this append-only contract. While Main.unity serializes 0 (Org) so no checked-in asset breaks, adding explicit values now (like GatekeeperMode already does) would make the enum resilient and honest about its serialization contract.

Security review: PASS

Removing decentraland.today from ALL_DOMAINS reduces the trust surface — correct for a decommissioned domain. Host-suffix validation, deep-link allowlist, chain pinning, and gateway feature-flag gating are all preserved and unaffected. No new attack surface.


STEP 6 — Complexity

COMPLEX. Modifies shared enums and interfaces used across multiple assemblies.


STEP 7 — QA assessment

QA_REQUIRED: YES. Runtime code is modified: URL resolution, chat validation, gateway routing, chain pinning.


STEP 8 — Non-blocking warnings

None. Main.unity is not in the changed files.


STEP 9 — Verdict

REVIEW_RESULT: PASS ✅
COMPLEXITY: COMPLEX
COMPLEXITY_REASON: Modifies shared enums and interfaces (DecentralandEnvironment, GatekeeperMode, IDecentralandUrlsSource) used across multiple assemblies (Chat, Infrastructure, NetworkDefinitions, Web3), plus URL resolution and gateway routing logic.
QA_REQUIRED: YES


Reviewed by Jarvis 🤖 · Requested by decentraland-bot via GitHub

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Jarvis reviewed this PR and found no blocking issues, but assessed it as complex — human DEV review is still required before merging.

@dalkia dalkia self-assigned this Aug 27, 2026

@decentraland-bot decentraland-bot left a comment

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.

Re-review — STEP 1: Context loaded

Scope: 21 files changed (+57 −213). Pure removal of the dead Today environment (decentraland.today). Three commits on branch:

  1. 3b02588 — original removal (chore: remove the today environment)
  2. de7051c — addresses previous review P2: assign explicit values to DecentralandEnvironment enum
  3. 6953632 — merge dev into branch

Previous review (2026-08-27) PASSED with one P2 (enum explicit values). This re-review verifies the fix and re-evaluates the full diff.


STEP 2 — Root-cause check: PASS

Unchanged from prior review. The problem is dead code — the Today environment is decommissioned. The diff removes it cleanly.


STEP 3 — Design & integration: PASS

No new units introduced. All design simplifications remain sound:

  • ChatEnvironmentValidatorDecentralandEnvironment constructor param removed; only IDecentralandUrlsSource remains. Both callers updated (ChatContainer.Create, ChatTeleporterShould.SetUp).
  • GatewayUrlsSourceSUPPORTED_ENVS gate removed. Fields correctly promoted from nullable to non-nullable (constructor now unconditionally initializes them). System.Linq removed (its only use was SUPPORTED_ENVS.Contains()).
  • DecentralandUrlsSource.BaseDomain{ get; private set; }{ get; }. Correct — the Today mixture was the only post-construction writer.
  • DecentralandEnvironment — explicit values now assigned (Org = 0, Zone = 1, Custom = 2). Custom moves from implicit ordinal 3 to explicit 2; this is safe because: (a) MainSceneLoader serializes 0 (Org), (b) Custom is only assigned at runtime via ApplyBaseDomainArg, never persisted, (c) CLI parsing uses Enum.TryParse by string name, not integer.
  • GatekeeperModeToday = 2 removed; gap preserved (Org = 0, Zone = 1, Localhost = 3, Custom = 4). Correct.

No teardown/subscription concerns — the PR only removes code.


STEP 4 — Member audit

All members from the previous review re-verified. No new public members introduced. The enabled property in GatewayUrlsSource simplified from envSupported && flag to flag — behaviorally equivalent since envSupported was always true for remaining environments.


STEP 5 — Line-level review

Pass A — Blocking issues: None (P0/P1)

All switch expressions remain exhaustive (Org, Zone, Custom, _ => throw). Nullable-to-non-nullable transitions are correct. Feature-flag gating logic is behaviorally identical. No bugs, no security issues, no resource leaks.

Pass B — Design smells

[P2] Stale XML comment on DecentralandEnvironment.Custom — see inline comment. The comment still says "New values must be appended: the enum is serialized by index" but with explicit values now assigned, the append-only restriction is lifted. The previous review's inline comment specifically requested this update alongside the explicit values.

Security review: PASS

Full security audit conducted (parallel agent). Removing decentraland.today from ALL_DOMAINS correctly reduces the trust surface. Host-suffix validation (HostHasSuffix), deep-link allowlist, chain pinning, and gateway feature-flag gating are all preserved and unaffected. No new attack surface, no secrets exposed.


STEP 6 — Complexity

COMPLEX. Modifies shared enums and interfaces used across multiple assemblies.


STEP 7 — QA assessment

QA_REQUIRED: YES. Runtime code is modified: URL resolution, chat validation, gateway routing, chain pinning.


STEP 8 — Non-blocking warnings

None. Main.unity is not in the changed files.


Previous review P2 status

Enum lacks explicit values — addressed in commit de7051c. DecentralandEnvironment now has Org = 0, Zone = 1, Custom = 2.


STEP 9 — Verdict

REVIEW_RESULT: PASS ✅
COMPLEXITY: COMPLEX
COMPLEXITY_REASON: Modifies shared enums and interfaces (DecentralandEnvironment, GatekeeperMode, IDecentralandUrlsSource) used across multiple assemblies (Chat, Infrastructure, NetworkDefinitions, Web3), plus URL resolution and gateway routing logic.
QA_REQUIRED: YES


Reviewed by Jarvis 🤖 · Requested by Juan Ignacio Molteni [Dalkia] (<@U03JSUQ5Z7U>) via Slack

Signed-off-by: Juan Ignacio Molteni <juanignaciomolteni@gmail.com>
@dalkia
dalkia enabled auto-merge (squash) August 28, 2026 16:42
@decentraland-bot

Copy link
Copy Markdown
Contributor

PR #9885, run #33191568941

Overall: ✅ no significant changes

Builds: Windows change, Windows baseline, macOS change, macOS baseline

How to read this table
  • Each build is measured 3 times, interleaved with the other build (change, baseline, change, baseline, ...) in the same session, so both see the same world content and machine state. The values are the median, and (min–max) is the lowest and highest of those runs.
  • Δ is Change minus Baseline (a negative Δ means Change is faster).
  • 🟢 faster / 🔴 slower — a difference that passed every check: the runs are fully separated (every run of one build faster than every run of the other), and the median difference is at least 3% and at least 0.5 ms.
  • ⚪ within noise — the builds' runs overlap, or the difference is tiny; it cannot be told apart from random variation. Treat it as no change.
  • — informational — the 0.1% worst metrics average only the few worst frames of a run, so a single OS hiccup swings them by a lot; they are shown for context and never earn a verdict.
  • ⚠️ no verdict — the two builds' sessions were not comparable (very different sample counts, or too few usable runs), so no conclusion is drawn from them.
  • Exceptions per run — the average number of exceptions in a run's log, not counting teardown ones logged while the app quits. Flagged only on a difference of at least 2 per run and 1.5× the other build; exception kinds the baseline never threw are called out under the table. The Exception breakdown groups all of them by the explorer's report category and exception type (as totals across the runs).
  • A run that logged unusually many exceptions (at least 10 and 5× the median of its build's runs — e.g. a service was down during it) is excluded from all numbers and called out under the table.
  • The Overall line at the top only reacts to a metric that moved on two or more machines, or by 10% or more on one — a single modest 🟢/🔴 cell can still be a statistical fluke.

Intel Core i5

Metric Baseline Change Δ Result
Samples 2364 (×3) 2366 (×3)
CPU average 37.8 ms (35.9–38.3) 37.7 ms (37.1–38.2) -0.1 ms ⚪ within noise
CPU 1% worst 306.7 ms (306.0–327.4) 312.1 ms (284.4–342.2) 5.4 ms ⚪ within noise
CPU 0.1% worst 339.9 ms (321.8–352.3) 337.3 ms (297.9–355.0) -2.7 ms — informational
GPU average 23.5 ms (22.2–23.7) 23.5 ms (22.4–23.7) 0.0 ms ⚪ within noise
GPU 1% worst 312.2 ms (305.9–333.3) 315.2 ms (290.1–348.5) 3.0 ms ⚪ within noise
GPU 0.1% worst 349.1 ms (324.7–356.8) 325.5 ms (300.2–364.5) -23.6 ms — informational
Exceptions per run 0 0 0 ⚪ no significant change

Apple M1

Metric Baseline Change Δ Result
Samples 3377 (×3) 3349 (×3)
CPU average 26.5 ms (26.5–26.9) 26.8 ms (26.6–26.9) 0.3 ms ⚪ within noise
CPU 1% worst 236.2 ms (235.4–240.5) 236.0 ms (233.9–238.6) -0.1 ms ⚪ within noise
CPU 0.1% worst 245.2 ms (238.9–246.0) 246.7 ms (243.7–248.7) 1.4 ms — informational
GPU average 18.5 ms (18.0–19.9) 19.3 ms (18.7–23.6) 0.8 ms ⚪ within noise
GPU 1% worst 53.3 ms (53.2–55.3) 55.0 ms (52.9–56.2) 1.7 ms ⚪ within noise
GPU 0.1% worst 61.2 ms (60.0–61.8) 61.1 ms (57.4–61.3) -0.2 ms — informational
Exceptions per run 0 0 0 ⚪ no significant change

@Ludmilafantaniella Ludmilafantaniella left a comment

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.

✅Smoke test performed:

  • ✔️ Log In/Log Out
  • ✔️ Backpack and wearables in world
  • ✔️ Emotes in world and in backpack
  • ✔️ Teleport with map/coordinates/Jump In
  • ✔️ Chat and multiplayer
  • ✔️ Profile card
  • ✔️ Camera
  • ✔️ Skybox

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.

3 participants