feat: add missing ecosystem domains for Deno, Java, and Python#16903
feat: add missing ecosystem domains for Deno, Java, and Python#16903
Conversation
Add domains discovered missing in the v4 build/test experiment (Feb 19, 2026): - Node/Deno: esm.sh, cdn.jsdelivr.net, googleapis.deno.dev, googlechromelabs.github.io (5/10 Deno projects were blocked) - Java: central.sonatype.com, maven.google.com, dl.google.com, repo.gradle.org (additional Maven/Gradle repositories) - Python: crates.io, index.crates.io, static.crates.io (Rust FFI deps like pydantic-core need Rust registry access) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ython ecosystems From the v4 build/test experiment, several ecosystems were missing domains that caused build failures: Java ecosystem (was 1/8 success rate): - central.sonatype.com (Maven snapshots/publishing) - maven.google.com and dl.google.com (Google Maven repository) - repo.gradle.org (Gradle plugin/dependency repository) Node ecosystem (covers Deno via runtimeToEcosystem["deno"]="node"): - esm.sh (ESM CDN imports, commonly used in Deno projects) - googleapis.deno.dev (Google APIs for Deno) - googlechromelabs.github.io (Chromium/Puppeteer binary downloads) Python ecosystem: - crates.io, index.crates.io, static.crates.io (Rust registry, required for building native extensions like pydantic-core via pip) Update golden test fixtures and add test cases for new domains. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Expands the ecosystem domain allowlists to unblock builds that require additional Deno/CDN, Java repository, and Rust-registry access (via Python native/Rust-FFI packages).
Changes:
- Added additional Java repository/tooling domains to the
javaecosystem. - Added Deno-related CDN/domains (including jsdelivr) to the
nodeecosystem for Deno workflows. - Added Rust registry domains to the
pythonecosystem and extended tests to assert their inclusion.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/workflow/data/ecosystem_domains.json | Extends allowlisted domains for java, node (Deno/CDNs), and python (Rust registry access). |
| pkg/workflow/ecosystem_domains_test.go | Adds/extends assertions to validate the new domains are included for the relevant ecosystems. |
Comments suppressed due to low confidence (1)
pkg/workflow/data/ecosystem_domains.json:165
- Adding Rust registry domains (
crates.io,index.crates.io,static.crates.io) to thepythonecosystem introduces overlap with the existingrustecosystem. With the currentGetDomainEcosystemimplementation (map iteration), any code that tries to classify a domain into a single ecosystem (notably strict-mode suggestions) can become nondeterministic for these domains. If the overlap is intentional,GetDomainEcosystemshould be updated to use a deterministic ecosystem order / priority (or otherwise handle multi-ecosystem domains explicitly).
"index.crates.io",
"static.crates.io"
],
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "esm.sh", | ||
| "googleapis.deno.dev", | ||
| "googlechromelabs.github.io" | ||
| ], |
There was a problem hiding this comment.
Adding cdn.jsdelivr.net to the node ecosystem creates an overlap with the existing node-cdns ecosystem. GetDomainEcosystem currently iterates over a Go map (for ecosystem := range ecosystemDomains), so when a domain exists in multiple ecosystems the returned ecosystem becomes nondeterministic (and can break/flap tests like TestGetDomainEcosystem which expects cdn.jsdelivr.net → node-cdns, and can also make strict-mode ecosystem suggestions unstable). Consider either (a) keeping cdn.jsdelivr.net in only one ecosystem, or (b) making GetDomainEcosystem deterministic by iterating ecosystems in a fixed priority order and explicitly preferring node-cdns over node for this domain.
This issue also appears on line 163 of the same file.
Go map iteration is non-deterministic, so GetDomainEcosystem could return different ecosystems on each call for domains that appear in multiple ecosystems (e.g. cdn.jsdelivr.net in both "node" and "node-cdns"). Fix by introducing an ecosystemPriority slice that defines the order in which ecosystems are checked. More specific sub-ecosystems are listed before general ones: - "node-cdns" before "node" (cdn.jsdelivr.net → node-cdns) - "rust" before "python" (crates.io is a native Rust domain) Any ecosystem not in the priority list is checked last in sorted order for forward-compatibility. Also add cdn.jsdelivr.net back to the "node" ecosystem in ecosystem_domains.json — it was previously removed to avoid the non-determinism, but is now safe to include since GetDomainEcosystem consistently prefers "node-cdns" over "node". Add TestGetDomainEcosystem_Determinism to verify stability across repeated calls for multi-ecosystem domains. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Addressed the non-determinism feedback in the latest commit. Changes made:
All tests pass ( |
…ditions - Regenerate WASM golden files for claude-with-network, smoke-copilot, and smoke-test-tools to reflect new firewall domain lists from ecosystem domain changes - Fix go fmt formatting in domains.go and domains_test.go (alignment in comments) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
esm.sh,cdn.jsdelivr.net,googleapis.deno.dev,googlechromelabs.github.io) to thenodeecosystem — 5/10 Deno projects were blocked in the v4 build/test experimentcentral.sonatype.com,maven.google.com,dl.google.com,repo.gradle.org) to thejavaecosystemcrates.io,index.crates.io,static.crates.io) to thepythonecosystem for Python packages with Rust FFI dependencies (e.g. pydantic-core)Context
The v4 build/test experiment (Feb 19, 2026) tested 98 repos across 10 languages. Key failures:
esm.sh,cdn.jsdelivr.net)crates.iowas not in the Python allowlist (pydantic-core requires Rust compilation)Note:
cdn.jsdelivr.netwas already in the separatenode-cdnsecosystem but was not included when workflows specify justnode. It's now in both for completeness.Test plan
ecosystem_domains_test.gowith new test assertions for Java, Node/Deno, and Python ecosystem domainspython ecosystem includes Rust FFI domains for native packagesgo test ./pkg/workflow/ -run TestEcosystemDomain)🤖 Generated with Claude Code