Make LICENSE-wheel reflect the bundled UI dependencies, plus two 0.43.0 RC0 fixes - #868
Merged
Merged
Conversation
The wheel's only non-source content is the compiled tracking UI at burr/tracking/server/build/assets/index-*.js, which bundles code from 130 npm packages under MIT, ISC, Apache-2.0, BSD-3-Clause and PSF. LICENSE-wheel listed exactly one third-party work, so the binary distribution's LICENSE did not reflect its contents. Rather than maintain that list by hand, derive it from the build: scripts/generate_wheel_license.py runs a sourcemap build, reads the sources array to find every node_modules file compiled into the bundle, resolves each to its owning package, and rewrites everything below the generated marker in LICENSE-wheel. --check fails when the file is stale, so CI can catch drift on dependency bumps. None of the bundled packages ships a NOTICE file, so NOTICE is unchanged. Generated-by: Claude Opus 5 (1M context)
test_bip0042_bedrock.py imported botocore at module level, above the
pytest.importorskip("boto3") guard, which made the guard dead code:
botocore ships with boto3, so without the [bedrock] extra the import
raised and pytest reported a collection error rather than a skip. Since
a collection error interrupts the whole run, `pytest tests/` -- the
command scripts/README.md gives release voters -- executed no tests at
all on a plain `pip install -e ".[tests]"`.
CI did not catch this because the main test job passes
--ignore=tests/integrations/test_bip0042_bedrock.py.
Move the botocore import below the guard. Without boto3 the module now
skips and the rest of the suite runs; with it, the tests are unchanged.
Generated-by: Claude Opus 5 (1M context)
The version endpoint imported pkg_resources, which is a setuptools module. setuptools is not a declared dependency of apache-burr, is not present in a venv created by modern tooling, and dropped pkg_resources entirely in 81.0. On a clean install of the 0.43.0 wheel the endpoint therefore raised ModuleNotFoundError and returned 500. importlib.metadata is in the standard library on every Python we support. Behaviour is otherwise unchanged, including the fallback to the legacy "burr" distribution and then to "unknown". Generated-by: Claude Opus 5 (1M context)
RAT excludes burr/tracking/server/build/**, so the existing license step never inspects the compiled UI -- the only content the wheel adds over the sdist. That is exactly where the LICENSE gap went unnoticed, and it is what silently drifts whenever a UI dependency is added or bumped. Add a release-validation step that re-derives the bundled npm packages from a sourcemap build and fails if LICENSE-wheel no longer matches. It runs after the artifact build, which has already installed telemetry/ui/node_modules. Generated-by: Claude Opus 5 (1M context)
skrawcz
approved these changes
Aug 3, 2026
7 tasks
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.
Follow-up to my -1 on the 0.43.0 RC0 vote thread, plus two smaller
things found while verifying that RC.
1. LICENSE-wheel did not reflect what the wheel contains
The wheel's only non-source content is the compiled tracking UI at
burr/tracking/server/build/assets/index-*.js. That bundle contains codefrom 130 npm packages — MIT (115), ISC (9), Apache-2.0 (3),
BSD-3-Clause (2), PSF (1) — while
LICENSE-wheellisted exactly onethird-party work (the deep-researcher MIT text). BSD-3-Clause in
particular requires the copyright notice be reproduced in redistributions.
This was raised as a non-blocking note on the 0.42.0 RC3 thread, and the
CRA → Vite migration (#793) made it worse by dropping the webpack-emitted
main.*.js.LICENSE.txtsidecar, so 0.43.0 ships less third-party licenseinformation than 0.42.0 did.
Rather than hand-maintain the list — it drifts silently on every
dependency bump — this adds
scripts/generate_wheel_license.py, whichderives it from the build itself: run a sourcemap build, read the
sourcemap's
sourcesarray to find everynode_modulesfile actuallycompiled into the bundle, resolve each to its owning package, and rewrite
everything below a marker line in
LICENSE-wheel. Content above themarker stays hand-maintained.
NOTICEis deliberately unchanged: none of the 130 bundled packagesships a NOTICE file, so there is no NOTICE content to carry over.
One thing worth a reviewer's eye: 28 of the packages ship no license file
at all (the
micromark-*family,@react-aria/*,react-select,@heroicons/react,heap). Those are listed with theirpackage.jsonlicense identifier and marked as such rather than silently omitted.
2. Release validation now catches this class of drift
RAT excludes
burr/tracking/server/build/**, so the existing license stepnever inspects the compiled UI — the only content the wheel adds over the
sdist. That is precisely where this gap hid.
release-validation.ymlnowruns
generate_wheel_license.py --checkafter the artifact build (whichhas already installed
telemetry/ui/node_modules), so a UI dependencybump that isn't reflected in
LICENSE-wheelfails the PR.3.
pytest tests/aborted collection without boto3tests/integrations/test_bip0042_bedrock.pyimportedbotocoreat modulelevel, above the
pytest.importorskip("boto3")guard. botocore ships withboto3, so without the
[bedrock]extra the import raised and pytestreported a collection error rather than a skip — and a collection error
interrupts the whole run.
pytest tests/, the commandscripts/README.mdgives release voters, therefore executed zerotests on a plain
pip install -e ".[tests]".CI doesn't catch it because the main test job passes
--ignore=tests/integrations/test_bip0042_bedrock.py.Moving the import below the guard fixes it. Before:
1 error during collection. After:1 skipped, and the rest of the suite runs.4.
GET /api/v0/versionreturned 500 on a clean installThe endpoint used
pkg_resources. setuptools isn't a declared dependency,isn't present in a venv created by modern tooling, and dropped
pkg_resourcesin 81.0, so the endpoint raisedModuleNotFoundError.Switched to
importlib.metadata; the fallback chain to the legacyburrdistribution and then
"unknown"is unchanged. No UI component callsthis, but it is public API and is in the generated OpenAPI client.
Verification
generate_wheel_license.py --checkfrom a cleannpm ci→ 130 packages,up to date, exit 0 (reproduced from a different
node_modulestree thanthe one used to generate the file)
pytest tests/without boto3 → 664 passed, 5 skipped (was: aborted)pytest tests/with boto3 → 687 passed, 4 skippedGET /api/v0/versionon a setuptools-free venv →200 {"version":"0.43.0"}Targets
main. If this lands before an RC1 it will need cherry-pickingonto the release branch, since
v0.43.0-incubating-RC0was cut fromchore/release-0.43.0-rc0rather thanmain.🤖 Generated with Claude Code