Skip to content

Studio: drop three frontend dependencies nothing imports - #15634

Merged
danielhanchen merged 1 commit into
mainfrom
studio-frontend-unused-deps
Oct 28, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-frontend-unused-deps

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Three dependencies in studio/frontend/package.json are not used by anything: not by the app, tests, configs, npm scripts, CSS, CI workflows or the Tauri build.

What changes

npm uninstall of:

The lockfile loses exactly these 3 entries; nothing is added or changed.

How it was checked

  • Module graph from the repo's own vite.config.ts production build, plus a TypeScript AST pass over every source, test, config file, script and CSS @import, tsconfig paths, npm script commands, peer requirements, and files outside the frontend (workflows, Tauri config). Transitive dependencies expanded with npm ls --all, so packages used only as peers, config plugins, type-only imports or CLIs in scripts were not flagged.
  • npm ci passes and leaves a clean tree. The production dist/ (871 files) is byte identical to main. bundle:check: 6,802.0 KB raw / 2,053.2 KB transfer / 110 chunks on both sides. Typecheck passes on both; lint gives the identical set of findings on both (main already has them). Frontend tests: 14,249 passed, 0 failed on both. tests/studio/test_frontend_dep_removal.py and the lockfile audit pass.

This is tidying, not a speed change: none of the three was in the bundle, and they are 39 KB of node_modules.

danielhanchen added a commit that referenced this pull request Oct 28, 2026
## Summary

`pip scan-packages :: extras` now fails on unrelated PRs (#15634,
#15635) with one unbaselined finding:

```
[1] HIGH  Advanced obfuscation (marshal/compile/zlib) + exec/eval
    Package:  triton
    File:     triton/_compile_warmup_pool.py
    Evidence: Obfusc: L149:  code = compile(jit_function.src, function.__name__, "exec")
    Evidence: Exec: L151:    exec(code, namespace)
```

`triton/_compile_warmup_pool.py` is new in triton 3.9.0, which the
extras lane now resolves.

## Review

Lines 131-156 of that file, in
`_JITFunctionPickler._reduce_jit_codegen_fn`:
- When triton cloudpickles a `@triton.jit` function to its
compile-warmup process pool and the function's code object name differs
from its own name, it recompiles that function's own source
(`jit_function.src`).
- It runs that source in a scratch namespace built from the function's
globals, to discover which globals the pickled function needs.
- No downloaded or external input reaches `compile` / `exec`.

It is the same first-party codegen pattern as the already-baselined
`triton/runtime/interpreter.py` entry, so it is baselined rather than
pinned away.

## Change

`scripts/scan_packages_baseline.json`: one entry for `(triton,
triton/_compile_warmup_pool.py, "Advanced obfuscation
(marshal/compile/zlib) + exec/eval")` with evidence hash `d9e13c23...`.
- The entry was generated by `scan_packages.py triton==3.9.0
--write-baseline` and inserted after the other triton entries.
- The rest of the file is byte-identical.
- If the matched code changes, the hash stops matching and the finding
reopens.

## Testing

- `python scripts/scan_packages.py triton==3.9.0`: `1 HIGH`, exit 1, on
main; exit 0 with this entry (only 3 MEDIUM remain).
- `tests/security/test_scan_packages.py` and
`tests/studio/install/test_diffusers_pin.py`: 209 passed.
wasimysaid added a commit to wasimysaid/unsloth that referenced this pull request Oct 28, 2026
@danielhanchen
danielhanchen marked this pull request as ready for review October 28, 2026 12:35
@danielhanchen
danielhanchen merged commit 9b315cb into main Oct 28, 2026
70 of 97 checks passed
@danielhanchen
danielhanchen deleted the studio-frontend-unused-deps branch October 28, 2026 12:35
@chatgpt-codex-connector

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 🔄 Running since 2026-10-28T12:35:55.257238Z c80adeb 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

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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

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