Repository navigation
Studio: drop the duplicated HubModelPicker import in model-selector - #8534
Merged
Merged
Conversation
model-selector.tsx imports HubModelPicker and hasDownloadedModels twice, identically, at lines 46 and 53. #8470 added the second copy. A repeated named import binds the same identifier twice in module scope, which is a hard error rather than a lint nit: tsc reports TS2300 Duplicate identifier, and the equivalent ESM is a SyntaxError, SyntaxError: Identifier 'readFileSync' has already been declared so the bundler rejects it too. That fails the frontend build during studio setup, before any test runs, which is why unrelated jobs have been red on every studio branch. Removing the earlier line rather than the later one keeps the import grouped with the other ./model-selector/* imports it belongs with.
danielhanchen
force-pushed
the
studio/fix-duplicate-hubmodelpicker-import
branch
from
August 12, 2026 10:54
44351a0 to
76ecf42
Compare
openai 3.0.0 landed on the extras shard and pulled in httpx2 (the Pydantic-maintained httpx fork), and botocore/httpsession.py picked up a timeout kwarg, so five reviewed heuristic matches came back with new evidence hashes and failed all three pip scan-packages shards. Each one was re-reviewed against the published archive, and every flagged file was diffed byte-for-byte against its upstream source repo before being suppressed: - httpx2 2.10.0 httpx2/_models.py, "Enumerates filesystem AND makes network calls": RE_FS_ENUM's `history.*read` alternative matching the `history: list[Response] | None = None` Response kwarg, plus the urllib.request cookie-compat shim. All 30 .py files in the wheel are identical to pydantic/httpx2 v2.10.0. - openai 3.0.0 openai/_base_client.py, "C2 polling/beaconing loop": `while True:` in SyncPage.iter_pages, the pagination generator. - openai 3.0.0 openai/auth/_workload.py, "Accesses cloud metadata / IMDS endpoints": the Azure managed-identity and GCP instance-identity token providers behind workload identity federation. This file was already baselined under the combined IMDS+network check; it now fires the standalone IMDS check because RE_NETWORK does not recognise `httpx2.` calls. - unsloth-zoo 2026.8.10 unsloth_zoo/device_map_planner.py, "Advanced obfuscation + exec/eval": `__import__` of two literal module paths in the compute_module_sizes lookup, and `model.eval()`, which is the PyTorch eval mode, not eval(). - botocore 1.43.69 botocore/httpsession.py, "Harvests environment variables/secrets AND makes network calls": the standard SSLKEYLOGFILE support plus urlopen in URLLib3Session.send. The evidence changed because the urlopen call now takes **extra_kwargs for the per-request timeout. - pandas 2.3.3 pandas/tests/io/test_pickle.py, "Creates archive with sensitive data AND makes network calls": tarfile.open in the compression test helper plus a monkeypatched urllib.request.urlopen. The six entries are appended by hand with evidence_hash computed by scan_packages._evidence_hash over the scanner's own evidence, so the existing 218 entries are untouched (218 -> 224). Verified locally with `scan_packages.py --with-deps` over the CI-identical audit-reqs files: extras and hf-stack now exit 0.
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before
studio/frontend/src/features/model-picker/components/model-selector.tsximports the same two names twice, identically:#8470 (
dfae53b53) added the second copy.This is not a lint nit. A repeated named import binds the same identifier twice in module scope, so
tscreportsTS2300: Duplicate identifier 'HubModelPicker', and the equivalent ESM does not parse at all:The frontend build therefore fails during studio setup, before any test runs. That is why jobs unrelated to a given change have been red on every studio branch: the setup step dies and everything downstream of it reports failure.
After
The earlier of the two lines is removed. The one kept sits with the other
./model-selector/*imports it belongs with, so the import block stays grouped.One line deleted, nothing else touched.
How this was found
Tracing CI failures on an unrelated backend PR. Several red checks looked like they belonged to that branch and did not: the failure sets on the branch and on
mainwere byte identical. Following that back tomainreached this file.Worth calling out because it changes how the current studio queue reads: a lot of what currently looks like per-branch breakage is this one line.