Repository navigation
Add the tokenizers crate and its notices for the v1.2 tokenizer trainer (v1.1 dependency front-load) - #354
Conversation
Pin tokenizers 0.23.2 (onig regex backend, no default features), the same requirement main carries. Cargo.lock adds its 25 transitive crates at main's versions and leaves every existing crate unchanged. An integration test trains a byte-level BPE tokenizer the way main's train_tokenizer does and checks the serialized JSON. Co-Authored-By: Claude <[email protected]>
A policy expression_overrides entry names an exact package version, the license expression its inventory record must carry, and a reason. The record is then checked against the override instead of its Cargo metadata, and an override no record uses is reported as stale. Co-Authored-By: Claude <[email protected]>
The DiskGraph extension now ships tokenizers and its runtime crates. onig_sys declares MIT but bundles Oniguruma's C source under BSD-2-Clause, so the policy overrides its expression to "MIT AND BSD-2-Clause" and the inventory carries Oniguruma's COPYING. Co-Authored-By: Claude <[email protected]>
Change mapRelease requirement: v1.2's new third-party Rust crates (
|
Pre-merge checks:
|
| Check name | Status | Explanation |
|---|---|---|
| Pr Size | The PR size check fails only when the changed-file count exceeds 40. The PR head has three commits on top of the v1.1 line (base 5705c52, the parent of the first PR commit da2719f). Comparing that b… | |
| Public Resource Access | The PR adds external references in these places: (1) 22 unique origin repository URLs in 3rdparty/notices/inventory.json, THIRD-PARTY.txt, and `packages/diskgraph/third_party/artifact-manifest.j… |
Full details: Pr Size
-
Explanation
The PR size check fails only when the changed-file count exceeds 40. The PR head has three commits on top of the v1.1 line (base 5705c52, the parent of the first PR commit da2719f). Comparing that base with HEAD shows 9 changed files (1 added, 8 modified): 3rdparty/notices/inventory.json, 3rdparty/notices/policy.json, THIRD-PARTY.txt, packages/diskgraph/Cargo.lock, packages/diskgraph/diskgraph-pybind/Cargo.toml, packages/diskgraph/diskgraph-pybind/tests/train_tokenizer.rs, packages/diskgraph/third_party/artifact-manifest.json, scripts/gen_third_party.py, and test/scripts/test_gen_third_party.py. 9 does not exceed 40, so the check passes. Line counts were ignored, as the check requires. The base is inferred from local history because releases/v1.1 is not present as a ref. Even with a different base, the PR description lists only these kinds of files, so the result is unlikely to change.
Full details: Public Resource Access
-
Explanation
The PR adds external references in these places: (1) 22 unique
originrepository URLs in3rdparty/notices/inventory.json,THIRD-PARTY.txt, andpackages/diskgraph/third_party/artifact-manifest.json(for examplehttps://github.com/huggingface/tokenizersandhttps://github.com/rust-onig/rust-onig); (2) 25source = "registry+https://github.com/rust-lang/crates.io-index"lines inpackages/diskgraph/Cargo.lockand matchingsourcefields in the manifests; (3) twohttp://www.apache.org/licenses/URLs inside copied Apache-2.0 license text. The test file,Cargo.tomlline,policy.json, and scripts add no URLs. I checked anonymous access with unauthenticated HTTP requests. Everyoriginrepository returned HTTP 200 (GitHub returns 404 for private repositories anonymously, so 200 confirms public access).https://index.crates.io/config.json,https://github.com/rust-lang/crates.io-index, andhttp://www.apache.org/licenses/LICENSE-2.0also returned 200. The PR description's links (github.com/NVIDIA/kumo-engineand its PR page) are also publicly reachable. No added or modified external reference is confirmed inaccessible, so the check passes.
Full details: Change Map Design Review
-
Explanation
The change map (PR comment marked
<!-- kumo-pr-change-map -->, fetched withgh api) is accurate on file facts. I checked these against the checked-out tree: -Cargo.tomlline 50 has thetokenizersrequirement. -policy.jsonhas theonig_sysexpression_overridesentry. -gen_third_party.pyvalidate()reads overrides (lines 996-1004), checks them (lines 1077-1082) and reports stale ones (lines 1249-1251). -test_gen_third_party.pyhastest_expression_override_needs_its_exact_package_and_a_reason(line 222). -train_tokenizer.rsexists and matches the row's description. The design has these substantive problems: 1. Omitted material behavior (proven). The map listsonig_sysonly as the reason for the override. It omits thatonig_syscompiles Oniguruma's bundled C source on every wheel platform. The PR description says macOS arm64 and Linux aarch64 wheels were not built locally. The map's verification row says only "one wheel build." A reader of the map cannot see this gap. 2. Unsourced release requirement. The map states "Release requirement: v1.2's new third-party Rust crates must be onreleases/v1.1." The description gives only a preference: review early. No requester, issue or release-policy text is cited.docs/development/releasing-kumo-engine.mddoes not state this requirement. The whole PR depends on this requirement, so it needs a source or a restated scope. 3. Circular justification for the test (uncertain design question). The test row says "The dependency is used, built and tested in CI." The test checkstokenizerslibrary behavior, not Kumo behavior. The description says nothing in the shipped code callstokenizers. The test therefore adds CI cost and asserts third-party output details (for exampleĠshoes) to a release branch. The map does not show that the stated goal needs it. Its stopping condition does not depend on it. 4. Unexamined smaller alternative (uncertain design question). Theonigfeature alone causes theonig_sysC build and the override mechanism. The map does not discuss whetherfeatures = ["onig"]is needed for the added test or for v1.1. It justifies main's exact line only by matching main. That is a consistency argument, not proof of minimality. Items 1 and 2 are the main reasons for FAIL. Items 3 and 4 are design questions that the map should answer.Resolution
- Add to the change map a row or note that
onig_syscompiles bundled C on all wheel targets. State which targets are unverified (macOS arm64 and Linux aarch64, per the description). Change "Focused verification" to name them. 2. Replace the unsourced "Release requirement" sentence with its source (a request, issue or release-plan link). If no source exists, state it as the author's scheduling preference and explain why a release branch must carry it. 3. Either droptrain_tokenizer.rsfrom this PR, or justify it with a v1.1 behavior or requirement. Do not justify it by "the dependency is used." If it stays, say what it protects in Kumo code. 4. State whetheronigis needed for the v1.1 build or for the added test. If it is not needed, say why the map still uses main's exact feature set. Or drop the feature and accept a lockfile diff frommain.
- Add to the change map a row or note that
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Design discussion or issue: front-loads the third-party dependencies that #307 added on
main, so they can be reviewed for v1.1 before v1.2 needs them.Summary
v1.2 adds the Rust
tokenizerscrate to the DiskGraph extension (#307). This PR adds that same dependency, at the same versions, toreleases/v1.1, together with its license records. That way the new third-party crates can be reviewed now, and v1.2 won't need a dependency or notice change later. v1.1 behaviour doesn't change. Nothing in the shipped extension callstokenizers. Its only caller is a new integration test.What changes:
diskgraph-pybindgets main's exact requirement as a normal dependency:tokenizers = { version = "=0.23.2", default-features = false, features = ["onig"] }. The crate version stays0.1.0.Cargo.lockadds the 25 crates listed below at main's exact versions. No existing crate version changes. The lockfile's set of third-party crates and versions is identical tomain's. The only difference isdiskgraph-pybind's own version and its first-party dependency lists.expression_overridespolicy mechanism (from Train Text tokenizers for stored columns inside DiskGraph (stack 4/5) #307). It is needed foronig_sys(see below).3rdparty/notices/inventory.jsonandTHIRD-PARTY.txtare byte-identical tomain.packages/diskgraph/third_party/artifact-manifest.jsondiffers frommainonly indiskgraph-pybind's version and the lockfile hash.New crates in
Cargo.lock(25)base64daachorsedarlingdarling_coredarling_macrodary_heapderive_builderderive_builder_corederive_builder_macroesaxx-rsmacro_rules_attributemacro_rules_attribute-proc_macromonostatemonostate-implonigonig_syspasteyrandrand_chacharand_corerayon-condspm_precompiledtokenizersunicode-normalization-alignmentsunicode_categoriesCargo.lockalready had four more crates at these versions, andtokenizersnow pulls them into the shipped extension. So they also get new notice records. Their versions don't change.castawaycompact_strpastestatic_assertionsAll 29 records are in the
diskgraph-extensionanddiskgraph-extension-windowsartifacts. They are identical to the records onmain.onig_sys: "MIT AND BSD-2-Clause"onig_sys69.9.3 declaresMITin its Cargo metadata, but it bundles Oniguruma's C source, which is BSD-2-Clause. A3rdparty/notices/policy.jsonentry underexpression_overridessets its expression toMIT AND BSD-2-Clause, with the reason "The onig_sys crate bundles Oniguruma's C source under BSD-2-Clause." Its inventory record carries bothLICENSE.mdandoniguruma/COPYING, soTHIRD-PARTY.txtincludes Oniguruma's license text.The override mechanism is main's code. An override names an exact ecosystem, name and version, and must give an expression and a non-empty reason. A record with an override is checked against the override instead of its Cargo metadata. An override that no inventory record uses fails the check as stale. So the override ends when
onig_syschanges version.What uses it
packages/diskgraph/diskgraph-pybind/tests/train_tokenizer.rstrains a small byte-level BPE tokenizer (BpeTrainerwithByteLevel,add_prefix_space = false), the same way main'strain_tokenizerdoes. It checks the serialized JSON and an encoding. CI'scargo test --workspaceandcargo clippy --workspace --all-targetsboth build it.Not included
diskgraph-pybindversion 0.1.0 → 0.2.0.kumo-settingsand its license metadata entries (Add kumo.settings for the shared scratch directory (stack 1/5) #299).ahashandcompact_strdirect dependencies ofdiskgraph-pybind.compact_strreaches the extension throughtokenizerseither way.Change map
#354 (comment)
Testing Done
On Linux x86_64, from the branch head:
.github/workflows/license-notice.ymlpasses:cargo fetch --lockedcheck_cargo_license_metadata.pycargo deny check licenses(cargo-deny 0.20.2):licenses okgenerate_artifact_manifest.py --check: currentgen_third_party.py --checklines: currenttest_gen_third_party,test_refresh_diskgraph_notice_inventoryandtest_cargo_license_metadata: 19 tests OKcheck_python_license_metadata.pypasses for 14 manifests.test_generate_npm_third_party.pydidn't run here because this machine has no Node. This PR doesn't touch npm notices.refresh_diskgraph_notice_inventory.pyreports the inventory as current.cargo build --locked --workspace,cargo test --locked --workspace(includes the new tokenizer test) andcargo clippy --locked --workspace --all-targets -- -D warningsall pass../scripts/diskgraph installbuilds the DiskGraph wheel, which compilesonig_sys's bundled C source, and the module imports.releases/v1.1, exactly the 25 crates above are added and none are removed. Againstmain, the only difference isdiskgraph-pybind0.1.0 vs 0.2.0.Not run locally:
kumo-engine-wheel.ymlalso builds macOS arm64 (macos-15) and Linux aarch64 (ubuntu-24.04-arm) wheels.onig_syscompiles its bundled C source on each, so those platforms are covered by the release wheel workflow, not by this local run.mainalready builds this same dependency on them.Checklist
🤖 Generated with Claude Code