Skip to content

Move the studiobench attribution config in with the harness - #10100

Merged
danielhanchen merged 1 commit into
mainfrom
move-attribution-under-studiobench
Aug 31, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
move-attribution-under-studiobench

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Why

A top-level attribution/ directory holding a single file is repository clutter. The file is a Vite config used by exactly one thing, the studiobench harness under tests/studio/studiobench, whose analysis/bridge_build.py is its only referrer in the tree.

attribution/vite.studiobench.config.ts
  -> tests/studio/studiobench/attribution/vite.studiobench.config.ts

Three things fall out of it

It stops shipping. attribution/ was a tracked top-level directory, so setuptools-scm put the config in the sdist of every release. Under tests/ the prune from #10060 covers it. The published sdist was carrying a build config whose consumer, after #10060, no longer ships alongside it.

It gains CI. studiobench-ci.yml triggers on tests/studio/studiobench/**, so a change to this config now runs the suite. Nothing in the repo triggered on attribution/, which is how this file managed to break twice inside its own introducing PR (#9296): once failing to build at all, once on output.keepNames producing 24 MISSING_EXPORT errors.

Module resolution is unchanged. The config resolves plugins through createRequire anchored at studio/frontend/package.json precisely because no ancestor of its own directory has a node_modules. That is still true at the new location, so the reason the anchoring exists survives intact.

studio/frontend/ was the other obvious home and is the wrong one: [tool.setuptools.package-data] already globs frontend/*.ts, so parking it there would ship it inside the wheel, to every pip install unsloth user.

Verification

Built the frontend with the config from both paths against the same node_modules:

js maps banner hits sourceMappingURL names kept
before (attribution/) 525 509 522 0 2430 / 2506
after (tests/.../attribution/) 525 509 522 0 2430 / 2506

Identical, including the SHA over the emitted relative paths (bc6adea431ca7c18 both). Vite names chunks by content hash, so an identical path set means identical bytes.

  • built dist stays gitignored: the dist/ rule at .gitignore:27 is unanchored, confirmed with git check-ignore
  • python -m build: both artifacts have no attribution entry and 0 test path segments
  • pytest tests/studio/studiobench: 1400 passed, 155 skipped
  • ruff check tests/studio/studiobench: clean

Note

Only the two path strings in bridge_build.py and the __dirname depth changed. No behavioural change to the build.

A top-level attribution/ directory holding one file is repository clutter, and
the file has no business being at the root: it is a vite config used by exactly
one thing, the studiobench harness under tests/studio/studiobench, whose
bridge_build.py is the only referrer in the tree.

Three things fall out of the move for free.

It stops shipping. attribution/ was a tracked top-level directory, so
setuptools-scm put the config in the sdist of every release; under tests/ the
prune from #10060 covers it. The published sdist was carrying a build config
whose consumer, after #10060, no longer ships with it.

It gains CI. studiobench-ci.yml triggers on tests/studio/studiobench/**, so a
change to this config now runs the suite. Nothing anywhere triggered on
attribution/, which is how this file managed to break twice inside its own
introducing PR (#9296).

Module resolution is unchanged. The config resolves its plugins through
createRequire anchored at studio/frontend/package.json precisely because no
ancestor of its own directory has a node_modules. That is still true of the new
location, so the reason the anchoring exists survives intact. studio/frontend
was the other obvious home and is the wrong one: package-data already globs
frontend/*.ts, so parking it there would ship it inside the wheel.

Verified by building the frontend with the config from both paths, against the
same node_modules:

  before  525 js, 509 maps, 522 banner hits, 0 sourceMappingURL, 2430/2506 names
  after   525 js, 509 maps, 522 banner hits, 0 sourceMappingURL, 2430/2506 names

Identical, including the SHA over the emitted relative paths -- and vite names
chunks by content hash, so an identical path set means identical bytes. The
built dist stays gitignored (the bare dist/ rule is unanchored). Both artifacts
build with no attribution entry and no tests path segment. Suite green:
1400 passed, 155 skipped, ruff clean.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 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 ✅ Completed 2026-08-31T21:48:56.405452Z 2a29a56 PR opened
ℹ️ 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.

@danielhanchen
danielhanchen merged commit 1d2679f into main Aug 31, 2026
23 of 28 checks passed
@danielhanchen
danielhanchen deleted the move-attribution-under-studiobench branch August 31, 2026 22:00
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