Repository navigation
Move the studiobench attribution config in with the harness - #10100
Merged
Merged
Conversation
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.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
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 undertests/studio/studiobench, whoseanalysis/bridge_build.pyis its only referrer in the tree.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. Undertests/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.ymltriggers ontests/studio/studiobench/**, so a change to this config now runs the suite. Nothing in the repo triggered onattribution/, which is how this file managed to break twice inside its own introducing PR (#9296): once failing to build at all, once onoutput.keepNamesproducing 24MISSING_EXPORTerrors.Module resolution is unchanged. The config resolves plugins through
createRequireanchored atstudio/frontend/package.jsonprecisely because no ancestor of its own directory has anode_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 globsfrontend/*.ts, so parking it there would ship it inside the wheel, to everypip install unslothuser.Verification
Built the frontend with the config from both paths against the same
node_modules:attribution/)tests/.../attribution/)Identical, including the SHA over the emitted relative paths (
bc6adea431ca7c18both). Vite names chunks by content hash, so an identical path set means identical bytes.dist/rule at.gitignore:27is unanchored, confirmed withgit check-ignorepython -m build: both artifacts have noattributionentry and 0 test path segmentspytest tests/studio/studiobench: 1400 passed, 155 skippedruff check tests/studio/studiobench: cleanNote
Only the two path strings in
bridge_build.pyand the__dirnamedepth changed. No behavioural change to the build.