diff --git a/jmlx-native-macos-arm64/NOTICE b/jmlx-native-macos-arm64/NOTICE index c8ea58d1..d3e1e753 100644 --- a/jmlx-native-macos-arm64/NOTICE +++ b/jmlx-native-macos-arm64/NOTICE @@ -8,7 +8,12 @@ jmlx-native-macos-arm64 bundles precompiled binaries built from: See META-INF/LICENSE for the MIT text and META-INF/LICENSE-APACHE-2.0 for the complete Apache License 2.0 text in this jar. META-INF/THIRD-PARTY-NOTICES carries the additional MLX/JACCL compiled-in dependency texts, -including JSON, fmt, gguflib/FP16, pocketfft, V8, ThreadPool and Metal math adaptations. +including JSON, fmt, gguflib/FP16, pocketfft, V8, ThreadPool, NumPy/opt_einsum, +supervised-lda, SIMD math, PyTorch, TensorFlow and GPU/PRNG algorithm references. +MLX adaptations remain modifications of the attributed upstream code; the listed reference +versions are license-evidence snapshots where MLX does not pin an upstream revision. +The release audit and unresolved provenance findings are recorded in +req/phase8-4-native-license-audit.md in the jmlx source repository. Provenance: mlx-metal 0.32.4, wheel SHA-256 514df92d41a286895d2564b4b18f4da45096bd7a4a0c47e1042f345ad5a7f936; diff --git a/jmlx-native-macos-arm64/README.md b/jmlx-native-macos-arm64/README.md index b40c4a44..00d11cce 100644 --- a/jmlx-native-macos-arm64/README.md +++ b/jmlx-native-macos-arm64/README.md @@ -50,3 +50,9 @@ Run `./scripts/bootstrap-native.sh` before building a distributable native jar. checkout still builds, but the local native jar intentionally has no bundled runtime and cannot be published. The publish task refuses to run until the validated staged files and completion marker are present. + +The main, sources and Javadoc JARs carry `LICENSE`, `NOTICE`, `LICENSE-APACHE-2.0` and +`THIRD-PARTY-NOTICES` under `META-INF`. Run +`./gradlew :jmlx-native-macos-arm64:verifyNativeReleasePayload` to verify their reviewed digests. +The [Phase 8.4 native license audit](../req/phase8-4-native-license-audit.md) records compiled-in +dependencies and unresolved provenance findings that must be resolved before release. diff --git a/jmlx-native-macos-arm64/THIRD-PARTY-NOTICES b/jmlx-native-macos-arm64/THIRD-PARTY-NOTICES index 83453d8d..1d7f15ff 100644 --- a/jmlx-native-macos-arm64/THIRD-PARTY-NOTICES +++ b/jmlx-native-macos-arm64/THIRD-PARTY-NOTICES @@ -1,5 +1,7 @@ Third-party notices for the pinned macOS ARM64 native payload +======== JMLX NATIVE NOTICE SECTION ======== + MLX and JACCL (MIT) Source: https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/LICENSE SHA-256 of source: ccfab7ccb2ea306f71531c8ca77bb55507606cd90768b1e32b8b52ab5b48cf01 @@ -26,7 +28,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== mlx-c (MIT) Source: https://github.com/ml-explore/mlx-c/blob/a26f2d584a14ec619ae8db9a09be03becd47598a/LICENSE @@ -54,9 +56,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== -Additional nlohmann/json single-header attributions (MIT) +nlohmann/json single-header transitive MIT attributions Source: https://github.com/nlohmann/json/blob/9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03/single_include/nlohmann/json.hpp SHA-256 of source: 9bea4c8066ef4a1c206b2be5a36302f8926f7fdc6087af5d20b417d0cf103ea6 @@ -69,6 +71,8 @@ SHA-256 of source: 9bea4c8066ef4a1c206b2be5a36302f8926f7fdc6087af5d20b417d0cf103 The complete MIT permission text appears in the nlohmann/json section below. +======== JMLX NATIVE NOTICE SECTION ======== + nlohmann/json 3.11.3 (MIT) Source: https://github.com/nlohmann/json/blob/9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03/LICENSE.MIT SHA-256 of source: 86b998c792894ccb911a1cb7994f7a9652894e7a094c0b5e45be2f553f45cf14 @@ -95,7 +99,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== fmt 12.1.0 (MIT) Source: https://github.com/fmtlib/fmt/blob/407c905e45ad75fc29bf0f9bb7c5c2fd3475976f/LICENSE @@ -129,7 +133,7 @@ of this Software are embedded into a machine-executable object form of such source code, you may redistribute such embedded portions in such object form without including the above copyright and permission notices. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== gguf-tools (MIT) Source: https://github.com/antirez/gguf-tools/blob/8fa6eb65236618e28fd7710a0fba565f7faa1848/LICENSE @@ -157,7 +161,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== FP16 code referenced by gguf-tools fp16.c (MIT) Source: https://github.com/Maratyszcza/FP16/blob/782eea126dc5c755827be751a099eb01826175cf/LICENSE @@ -175,7 +179,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== pocketfft (BSD-3-Clause) Source: https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/3rdparty/pocketfft.h @@ -218,7 +222,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== V8 small_vector adaptation (BSD-3-Clause) Source: https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/small_vector.h @@ -253,7 +257,7 @@ SHA-256 of source: 2fd7d2a423a74b7857ae886ddae0b6c4183f5b9f1d6b8f8d3ba8db38a5ad4 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== ThreadPool modifications in MLX/JACCL (zlib) Source: https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/threadpool.h @@ -282,7 +286,7 @@ SHA-256 of source: e22e3eb7a2ee0b06b0ea69e8a49375761de9b799dd96b06e7ae9e778d9820 // 3. This notice may not be removed or altered from any source // distribution. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== Norbert Juffa expm1f (BSD-2-Clause) Source: https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/expm1f.h @@ -321,7 +325,7 @@ SHA-256 of source: dbdf551f45723639da54d72e327008bde6ef01a2f1ed561bb065e251ab6c9 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -======================================================================== +======== JMLX NATIVE NOTICE SECTION ======== NVIDIA/Filipe RNC Maia cexpf adaptation (Apache-2.0) Source: https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/cexpf.h @@ -345,3 +349,510 @@ SHA-256 of source: 88b6e15a52a5800d98d9bc6da840ca5cf70bf572fda136409580c1f17b1e0 // // Forked from // https://github.com/NVIDIA/cccl/blob/main/thrust/thrust/detail/complex/cexpf.h + +======== JMLX NATIVE NOTICE SECTION ======== + +NumPy einsum adaptation (BSD-3-Clause) +Source: https://github.com/numpy/numpy/blob/1d49c7f7ff527c696fc26ab2278ad51632a66660/LICENSE.txt +SHA-256 of source: 01fb016849aa427edb1bbbbd55f91c26ca6cadb32a5b20e7f000655dd05b0760 +MLX adaptation/reference: mlx/einsum.cpp + +Copyright (c) 2005-2024, NumPy Developers. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of the NumPy Developers nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +======== JMLX NATIVE NOTICE SECTION ======== + +opt_einsum algorithm attribution (MIT) +Source: https://github.com/dgasmith/opt_einsum/blob/c15aec2c7dbbcaf5b9790b980f699bf295baa7d9/LICENSE +SHA-256 of source: 7b26691a7c8ee48af425a53cbaeaabc9aa3a84ea2e93fe47a1ecc550c1de76db +MLX adaptation/reference: mlx/einsum.cpp + +The MIT License (MIT) + +Copyright (c) 2014 Daniel Smith + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +======== JMLX NATIVE NOTICE SECTION ======== + +supervised-lda NumpyFormat adaptation (MIT) +Source: https://github.com/angeloskath/supervised-lda/blob/fe3a39bb0d6c7d0c2a33f069440869ad70774da8/LICENSE +SHA-256 of source: b50379222802591434ac7a2137ba171b6c7529e9c1bb95eba1c9c9aa55609621 +MLX adaptation/reference: mlx/io/load.cpp + +The MIT License (MIT) + +Copyright (c) 2016 Angelos Katharopoulos & Despoina Paschalidou + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +======== JMLX NATIVE NOTICE SECTION ======== + +fastermath exponential adaptation (BSD-3-Clause) +Source: https://github.com/akohlmey/fastermath/blob/2ed806f45871129c9ccddc63422370641af9f14d/src/exp.c +SHA-256 of source: 1d408b5aed22e94947cd8bcb74594b8e0d0287bada919d875fc9a32d2d3cf665 +MLX adaptation/reference: mlx/backend/cpu/simd/math.h + +/* + Copyright (c) 2012,2013 Axel Kohlmeyer + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +======== JMLX NATIVE NOTICE SECTION ======== + +Julien Pommier NEON math adaptation (zlib) +Source: https://github.com/JishinMaster/simd_utils/blob/3c1433a86fb38edcc9b02039f3c9a65b16640976/neon_mathfun.h +SHA-256 of source: e75773addab087ff17c288f1143f45af0a532b1fafe2b550f13e55475a7d05a6 +MLX adaptation/reference: mlx/backend/cpu/simd/math.h + +/* Copyright (C) 2011 Julien Pommier + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + (this is the zlib license) +*/ + +======== JMLX NATIVE NOTICE SECTION ======== + +PyTorch CPU and Metal math adaptations (BSD-3-Clause) +Source: https://github.com/pytorch/pytorch/blob/e3643e1e0e923f0fc063dfab6f45c956d568919d/LICENSE +SHA-256 of source: a8a2c6b67cf8a597ffaa5c82380a6bd1b82629c0417e00673d8013d662eb500a +MLX adaptation/reference: mlx/backend/cpu/simd/math.h, mlx/backend/metal/kernels/fp8.h, mlx/backend/metal/kernels/utils.h + +From PyTorch: + +Copyright (c) 2016- Facebook, Inc (Adam Paszke) +Copyright (c) 2014- Facebook, Inc (Soumith Chintala) +Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) +Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) +Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) +Copyright (c) 2011-2013 NYU (Clement Farabet) +Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston) +Copyright (c) 2006 Idiap Research Institute (Samy Bengio) +Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz) + +From Caffe2: + +Copyright (c) 2016-present, Facebook Inc. All rights reserved. + +All contributions by Facebook: +Copyright (c) 2016 Facebook Inc. + +All contributions by Google: +Copyright (c) 2015 Google Inc. +All rights reserved. + +All contributions by Yangqing Jia: +Copyright (c) 2015 Yangqing Jia +All rights reserved. + +All contributions by Kakao Brain: +Copyright 2019-2020 Kakao Brain + +All contributions by Cruise LLC: +Copyright (c) 2022 Cruise LLC. +All rights reserved. + +All contributions by Tri Dao: +Copyright (c) 2024 Tri Dao. +All rights reserved. + +All contributions by Arm: +Copyright (c) 2021, 2023-2024 Arm Limited and/or its affiliates + +All contributions from Caffe: +Copyright(c) 2013, 2014, 2015, the respective contributors +All rights reserved. + +All other contributions: +Copyright(c) 2015, 2016 the respective contributors +All rights reserved. + +Caffe2 uses a copyright model similar to Caffe: each contributor holds +copyright over their contributions to Caffe2. The project versioning records +all such contribution and copyright details. If a contributor wants to further +mark their specific copyright on a particular contribution, they should +indicate their copyright solely in the commit message of the change when it is +committed. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America + and IDIAP Research Institute nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +======== JMLX NATIVE NOTICE SECTION ======== + +TensorFlow cumulative log-sum-exp gradient adaptation (Apache-2.0) +Source: https://github.com/tensorflow/tensorflow/blob/2a5910906a0e0f3dbc186ff9db6386d81a63448c/tensorflow/python/ops/math_grad.py +SHA-256 of source: 29ff2b107b055bd5be79647d790d7a6ad89b9363a6bfee15c79c1c08c0b02658 +MLX adaptation/reference: mlx/primitives.cpp + +# Copyright 2015 The TensorFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +======== JMLX NATIVE NOTICE SECTION ======== + +JAX Threefry algorithm reference (Apache-2.0) +Source: https://github.com/jax-ml/jax/blob/81991d87c8608d07f9752940375092aa4fb9610e/jax/_src/prng.py +SHA-256 of source: 8d41666e2e2a5ceedfc4848ec38cedf48a38ccab2da004edf3c6095745751470 +MLX adaptation/reference: mlx/backend/cpu/threefry.h, mlx/random.cpp + +# Copyright 2021 The JAX Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +======== JMLX NATIVE NOTICE SECTION ======== + +Random123 Threefry attribution (BSD-3-Clause) +Source: https://github.com/DEShawResearch/random123/blob/726a093cd9a73f3ec3c8d7a70ff10ed8efec8d13/LICENSE +SHA-256 of source: 5fd0885ab205878bd90c19144677286252eb9b988c1545a3a910edfe1e27b6df +MLX adaptation/reference: mlx/backend/cpu/threefry.h + +/** @page LICENSE +Copyright 2010-2012, D. E. Shaw Research. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name of D. E. Shaw Research nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +======== JMLX NATIVE NOTICE SECTION ======== + +VkFFT algorithm reference (MIT) +Source: https://github.com/DTolm/VkFFT/blob/066a17c17068c0f11c9298d848c2976c71fad1c1/LICENSE +SHA-256 of source: 2bfae14bf46ead0effe63ed36b0d28bcc8846716bfc030d03b146eda7f0bdebd +MLX adaptation/reference: mlx/backend/metal/kernels/fft.h + +MIT License + +Copyright (c) 2020 - present Dmitrii Tolmachev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +======== JMLX NATIVE NOTICE SECTION ======== + +CUB merge-sort algorithm reference (BSD-3-Clause) +Source: https://github.com/NVIDIA/cccl/blob/64d3a5f0c1c83ed83be8c0a9a1f0cdb31f913e81/cub/LICENSE.TXT +SHA-256 of source: 2e15eba2e130f3e80d9e91724c7dce3781ce99316324681ff54b00c1fc9759b3 +MLX adaptation/reference: mlx/backend/metal/kernels/sort.h + +Copyright (c) 2010-2011, Duane Merrill. All rights reserved. +Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the NVIDIA CORPORATION nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +======== JMLX NATIVE NOTICE SECTION ======== + +Cephes math provenance (upstream permission statement; review open) +Source: https://www.netlib.org/cephes/readme +SHA-256 of source: 82004ae6ed8feb08fd16783b6b32e82adfe047f60cb2f238dbf5d4bf9dae42a2 + + Some software in this archive may be from the book _Methods and +Programs for Mathematical Functions_ (Prentice-Hall or Simon & Schuster +International, 1989) or from the Cephes Mathematical Library, a +commercial product. In either event, it is copyrighted by the author. +What you see here may be used freely but it comes with no support or +guarantee. + + The two known misprints in the book are repaired here in the +source listings for the gamma function and the incomplete beta +integral. + + + Stephen L. Moshier + moshier@na-net.ornl.gov + +======== JMLX NATIVE NOTICE SECTION ======== + +PyTorch Metal hypot license variant (BSD-3-Clause) +Source: https://github.com/pytorch/pytorch/blob/a82aae9d4a7827849ce50f31c4c7ee8f278d05f5/LICENSE +SHA-256 of source: bd018feef8825e88181c84eb7e3aa4eafb8f08a20d9fd6ef948569610c4a3e43 +MLX adaptation/reference: mlx/backend/metal/kernels/utils.h + +From PyTorch: + +Copyright (c) 2016- Facebook, Inc (Adam Paszke) +Copyright (c) 2014- Facebook, Inc (Soumith Chintala) +Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) +Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) +Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) +Copyright (c) 2011-2013 NYU (Clement Farabet) +Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston) +Copyright (c) 2006 Idiap Research Institute (Samy Bengio) +Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz) + +From Caffe2: + +Copyright (c) 2016-present, Facebook Inc. All rights reserved. + +All contributions by Facebook: +Copyright (c) 2016 Facebook Inc. + +All contributions by Google: +Copyright (c) 2015 Google Inc. +All rights reserved. + +All contributions by Yangqing Jia: +Copyright (c) 2015 Yangqing Jia +All rights reserved. + +All contributions by Kakao Brain: +Copyright 2019-2020 Kakao Brain + +All contributions by Cruise LLC: +Copyright (c) 2022 Cruise LLC. +All rights reserved. + +All contributions by Tri Dao: +Copyright (c) 2024 Tri Dao. +All rights reserved. + +All contributions by Arm: +Copyright (c) 2021, 2023-2025 Arm Limited and/or its affiliates + +All contributions from Caffe: +Copyright(c) 2013, 2014, 2015, the respective contributors +All rights reserved. + +All other contributions: +Copyright(c) 2015, 2016 the respective contributors +All rights reserved. + +Caffe2 uses a copyright model similar to Caffe: each contributor holds +copyright over their contributions to Caffe2. The project versioning records +all such contribution and copyright details. If a contributor wants to further +mark their specific copyright on a particular contribution, they should +indicate their copyright solely in the commit message of the change when it is +committed. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America + and IDIAP Research Institute nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/jmlx-native-macos-arm64/build.gradle b/jmlx-native-macos-arm64/build.gradle index a495fd59..70df3f8b 100644 --- a/jmlx-native-macos-arm64/build.gradle +++ b/jmlx-native-macos-arm64/build.gradle @@ -166,9 +166,11 @@ tasks.named('check') { dependsOn tasks.named('verifyPackagedNativeResources') } tasks.register('verifyNativeReleasePayload', Exec) { group = 'verification' description = 'Checks packaged dylib deployment targets, source paths, pins and license texts.' - dependsOn tasks.named('jar') + dependsOn tasks.named('jar'), tasks.named('sourcesJar'), tasks.named('javadocJar') commandLine 'python3', rootProject.file('tools/release-all/release_inputs.py'), 'native', tasks.named('jar').get().archiveFile.get().asFile, + '--documentation-jar', tasks.named('sourcesJar').get().archiveFile.get().asFile, + '--documentation-jar', tasks.named('javadocJar').get().archiveFile.get().asFile, '--bootstrap', rootProject.file('scripts/bootstrap-native.sh'), '--forbid', System.getProperty('user.home'), '--forbid', rootProject.projectDir } diff --git a/req/native-license-inventory.json b/req/native-license-inventory.json index 1e9edae0..adf9f846 100644 --- a/req/native-license-inventory.json +++ b/req/native-license-inventory.json @@ -36,38 +36,194 @@ { "component": "pocketfft (BSD-3-Clause)", "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/3rdparty/pocketfft.h", - "sha256": "0eaea21304bf324639ff11022ee63faf48a8fab64afe5c3c2d1efefbe1d7dfa6" + "sha256": "0eaea21304bf324639ff11022ee63faf48a8fab64afe5c3c2d1efefbe1d7dfa6", + "noticeLines": [ + 1, + 36 + ] }, { "component": "V8 small_vector adaptation (BSD-3-Clause)", "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/small_vector.h", - "sha256": "2fd7d2a423a74b7857ae886ddae0b6c4183f5b9f1d6b8f8d3ba8db38a5ad4677" + "sha256": "2fd7d2a423a74b7857ae886ddae0b6c4183f5b9f1d6b8f8d3ba8db38a5ad4677", + "noticeLines": [ + 1, + 29 + ] }, { "component": "ThreadPool modifications in MLX/JACCL (zlib)", "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/threadpool.h", - "sha256": "e22e3eb7a2ee0b06b0ea69e8a49375761de9b799dd96b06e7ae9e778d9820667" + "sha256": "e22e3eb7a2ee0b06b0ea69e8a49375761de9b799dd96b06e7ae9e778d9820667", + "noticeLines": [ + 1, + 22 + ] }, { "component": "Norbert Juffa expm1f (BSD-2-Clause)", "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/expm1f.h", - "sha256": "dbdf551f45723639da54d72e327008bde6ef01a2f1ed561bb065e251ab6c9f1a" + "sha256": "dbdf551f45723639da54d72e327008bde6ef01a2f1ed561bb065e251ab6c9f1a", + "noticeLines": [ + 1, + 33 + ] }, { "component": "NVIDIA/Filipe RNC Maia cexpf adaptation (Apache-2.0)", "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/cexpf.h", - "sha256": "88b6e15a52a5800d98d9bc6da840ca5cf70bf572fda136409580c1f17b1e0aab" + "sha256": "88b6e15a52a5800d98d9bc6da840ca5cf70bf572fda136409580c1f17b1e0aab", + "noticeLines": [ + 1, + 19 + ] }, { "component": "nlohmann/json single-header transitive MIT attributions", "source": "https://github.com/nlohmann/json/blob/9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03/single_include/nlohmann/json.hpp", - "sha256": "9bea4c8066ef4a1c206b2be5a36302f8926f7fdc6087af5d20b417d0cf103ea6" + "sha256": "9bea4c8066ef4a1c206b2be5a36302f8926f7fdc6087af5d20b417d0cf103ea6", + "noticeFragments": [ + "// SPDX-FileCopyrightText: 2008-2009 Bj\u00f6rn Hoehrmann ", + "// SPDX-FileCopyrightText: 2009 Florian Loitsch ", + "// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann ", + "// SPDX-FileCopyrightText: 2016-2021 Evan Nemerson ", + "// SPDX-FileCopyrightText: 2018 The Abseil Authors" + ] + }, + { + "component": "NumPy einsum adaptation (BSD-3-Clause)", + "source": "https://github.com/numpy/numpy/blob/1d49c7f7ff527c696fc26ab2278ad51632a66660/LICENSE.txt", + "sha256": "01fb016849aa427edb1bbbbd55f91c26ca6cadb32a5b20e7f000655dd05b0760", + "mlxPaths": [ + "mlx/einsum.cpp" + ] + }, + { + "component": "opt_einsum algorithm attribution (MIT)", + "source": "https://github.com/dgasmith/opt_einsum/blob/c15aec2c7dbbcaf5b9790b980f699bf295baa7d9/LICENSE", + "sha256": "7b26691a7c8ee48af425a53cbaeaabc9aa3a84ea2e93fe47a1ecc550c1de76db", + "mlxPaths": [ + "mlx/einsum.cpp" + ] + }, + { + "component": "supervised-lda NumpyFormat adaptation (MIT)", + "source": "https://github.com/angeloskath/supervised-lda/blob/fe3a39bb0d6c7d0c2a33f069440869ad70774da8/LICENSE", + "sha256": "b50379222802591434ac7a2137ba171b6c7529e9c1bb95eba1c9c9aa55609621", + "mlxPaths": [ + "mlx/io/load.cpp" + ] + }, + { + "component": "fastermath exponential adaptation (BSD-3-Clause)", + "source": "https://github.com/akohlmey/fastermath/blob/2ed806f45871129c9ccddc63422370641af9f14d/src/exp.c", + "sha256": "1d408b5aed22e94947cd8bcb74594b8e0d0287bada919d875fc9a32d2d3cf665", + "mlxPaths": [ + "mlx/backend/cpu/simd/math.h" + ], + "noticeLines": [ + 1, + 28 + ] + }, + { + "component": "Julien Pommier NEON math adaptation (zlib)", + "source": "https://github.com/JishinMaster/simd_utils/blob/3c1433a86fb38edcc9b02039f3c9a65b16640976/neon_mathfun.h", + "sha256": "e75773addab087ff17c288f1143f45af0a532b1fafe2b550f13e55475a7d05a6", + "mlxPaths": [ + "mlx/backend/cpu/simd/math.h" + ], + "noticeLines": [ + 7, + 26 + ] + }, + { + "component": "PyTorch CPU and Metal math adaptations (BSD-3-Clause)", + "source": "https://github.com/pytorch/pytorch/blob/e3643e1e0e923f0fc063dfab6f45c956d568919d/LICENSE", + "sha256": "a8a2c6b67cf8a597ffaa5c82380a6bd1b82629c0417e00673d8013d662eb500a", + "mlxPaths": [ + "mlx/backend/cpu/simd/math.h", + "mlx/backend/metal/kernels/fp8.h" + ] + }, + { + "component": "TensorFlow cumulative log-sum-exp gradient adaptation (Apache-2.0)", + "source": "https://github.com/tensorflow/tensorflow/blob/2a5910906a0e0f3dbc186ff9db6386d81a63448c/tensorflow/python/ops/math_grad.py", + "sha256": "29ff2b107b055bd5be79647d790d7a6ad89b9363a6bfee15c79c1c08c0b02658", + "mlxPaths": [ + "mlx/primitives.cpp" + ], + "noticeLines": [ + 1, + 13 + ] + }, + { + "component": "JAX Threefry algorithm reference (Apache-2.0)", + "source": "https://github.com/jax-ml/jax/blob/81991d87c8608d07f9752940375092aa4fb9610e/jax/_src/prng.py", + "sha256": "8d41666e2e2a5ceedfc4848ec38cedf48a38ccab2da004edf3c6095745751470", + "mlxPaths": [ + "mlx/backend/cpu/threefry.h", + "mlx/random.cpp" + ], + "noticeLines": [ + 1, + 13 + ] + }, + { + "component": "Random123 Threefry attribution (BSD-3-Clause)", + "source": "https://github.com/DEShawResearch/random123/blob/726a093cd9a73f3ec3c8d7a70ff10ed8efec8d13/LICENSE", + "sha256": "5fd0885ab205878bd90c19144677286252eb9b988c1545a3a910edfe1e27b6df", + "mlxPaths": [ + "mlx/backend/cpu/threefry.h" + ] + }, + { + "component": "VkFFT algorithm reference (MIT)", + "source": "https://github.com/DTolm/VkFFT/blob/066a17c17068c0f11c9298d848c2976c71fad1c1/LICENSE", + "sha256": "2bfae14bf46ead0effe63ed36b0d28bcc8846716bfc030d03b146eda7f0bdebd", + "mlxPaths": [ + "mlx/backend/metal/kernels/fft.h" + ] + }, + { + "component": "CUB merge-sort algorithm reference (BSD-3-Clause)", + "source": "https://github.com/NVIDIA/cccl/blob/64d3a5f0c1c83ed83be8c0a9a1f0cdb31f913e81/cub/LICENSE.TXT", + "sha256": "2e15eba2e130f3e80d9e91724c7dce3781ce99316324681ff54b00c1fc9759b3", + "mlxPaths": [ + "mlx/backend/metal/kernels/sort.h" + ] + }, + { + "component": "metal-cpp 26 (Apache-2.0)", + "source": "https://files.pythonhosted.org/packages/2a/d6/4340ed6e184f71693d7f531c9ae55d677451351245760d71f8dd714dcbe5/mlx_metal-0.32.4-py3-none-macosx_26_0_arm64.whl", + "archiveMember": "mlx/include/metal_cpp/LICENSE.txt", + "sha256": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2", + "packagedAs": "LICENSE-APACHE-2.0" + }, + { + "component": "Cephes math provenance (upstream permission statement; review open)", + "source": "https://www.netlib.org/cephes/readme", + "sha256": "82004ae6ed8feb08fd16783b6b32e82adfe047f60cb2f238dbf5d4bf9dae42a2", + "mlxPaths": [ + "mlx/backend/cpu/simd/math.h" + ] + }, + { + "component": "PyTorch Metal hypot license variant (BSD-3-Clause)", + "source": "https://github.com/pytorch/pytorch/blob/a82aae9d4a7827849ce50f31c4c7ee8f278d05f5/LICENSE", + "sha256": "bd018feef8825e88181c84eb7e3aa4eafb8f08a20d9fd6ef948569610c4a3e43", + "mlxPaths": [ + "mlx/backend/metal/kernels/utils.h" + ] } ], "packagedTexts": { "LICENSE-APACHE-2.0": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2", - "THIRD-PARTY-NOTICES": "05b1c3f340a7dfa55be9bdf9ea6722f66e4b5805ce1db62d4accfee79051108e", - "NOTICE": "24504f331cf88fc190b6b94c34080f170fc978a0808c8ca3ca34a15888414e90", + "THIRD-PARTY-NOTICES": "4efc6e66304629e287bb7120b732a5784c2c1e398e28bf47e214eef885e34eb8", + "NOTICE": "3d162cd4a141174798a138dd851970047df54127d1f286f93190e5e2aa09cfdf", "LICENSE": "f44fd6beb3ec3205e3efb85d1582c273402a43fe4cc613834d8a8151fd5ce4a9" }, "nativePins": { diff --git a/req/phase8-4-implementation-report.md b/req/phase8-4-implementation-report.md index 42a30114..486fec07 100644 --- a/req/phase8-4-implementation-report.md +++ b/req/phase8-4-implementation-report.md @@ -84,6 +84,42 @@ The post-plugin audit is complete; the proposed all-new tuple still needs review inventory and current account publishing capacity need release review. No earlier/local report substitutes for these gates. Phase 8.4 is not complete. +## Native transitive-license review (2026-11-16) + +The [native source audit](phase8-4-native-license-audit.md) reviews the pinned macOS +CPU/Metal payload and expands the packaged inventory to 26 entries, including previously +missing NumPy/opt_einsum, loader, SIMD math, PyTorch/TensorFlow and GPU/PRNG attributions. +The explicit native release check now verifies the reviewed legal text digests in main, +sources and Javadoc artifacts. Six new regressions cover source/cache tampering, changed +notice text even after its inventory hash is updated, wheel identity/member checks, +incomplete companion JARs and the nonzero unresolved-findings CLI result. + +All 63 release selftests passed locally (51.987 seconds); the native module check and +release-payload verification also passed. Source evidence was verified from an empty cache. +The audit retains small source/packaging reports and logs outside `build/`. Native payload +bytes and upstream pins are unchanged. Juffa `erf`/`erfinv` licensing and the Cephes permission +chain remain explicit provenance findings, so the license release gate is still open. +No signed candidate or publication is claimed by these checks. + +PR #100 review corrections (2026-11-16) add explicit UTF-8 decoding, URL/digest cache keys, +atomic cache installation without hit rewrites, component-section notice binding, excerpt +validation, required legal files independent of the inventory, contextual Stack Exchange +errors and companion-JAR personal-path checks. The nine additional regressions bring the +release suite to 72 tests (all passed in 64.873 seconds). The real audit passed with Python's +preferred encoding measured as ISO8859-1 and a fresh cache containing 57 distinct URL/digest +entries; both legal findings still produce the intended nonzero `--require-clear` exit. +Native Gradle checks passed again (15 tasks: 6 executed, 9 up-to-date). Review-prefixed evidence +supersedes the earlier cache/network verification; the original logs remain identified as history. + +The further PR #100 follow-up (2026-11-16) scans main-JAR metadata and all other entries +outside the five separately verified native payload files for forbidden prefixes. A distinctive +literal notice separator preserves ordinary equals-sign rules inside licenses. All 74 release +selftests passed (59.161 seconds), including 17 focused license tests; native Gradle checks +passed again (15 tasks: 6 executed, 9 up-to-date). Follow-up source checks rehashed the prior +URL-bound cache and verified all 57 URL/digest pairs plus three rebuilt JARs. Follow-up-prefixed +evidence records this warm-cache check separately from the prior cold run. Both legal findings +remain open and `--require-clear` still exits 1. + ## Review corrections (2026-11-15) The minimum-host workflow now creates its Gradle home through `GITHUB_ENV` at step scope; diff --git a/req/phase8-4-native-license-audit.json b/req/phase8-4-native-license-audit.json new file mode 100644 index 00000000..0ca522c6 --- /dev/null +++ b/req/phase8-4-native-license-audit.json @@ -0,0 +1,394 @@ +{ + "schema": 1, + "date": "2026-11-16", + "reviewedSourceSha": "a97eb5b0c735cdc047a13c5539295cce64130eef", + "status": "blocked-on-provenance", + "inventory": "req/native-license-inventory.json", + "scope": "Pinned macOS ARM64 MLX 0.32.4 wheel and mlx-c; source-level transitive and adaptation review, not a reproducible build of the vendor wheel.", + "sourceEvidence": [ + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/CMakeLists.txt", + "sha256": "2f00891709ef72b5eefbb233444c12759d69b242b853eb65213c4f96c8d074fa" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/setup.py", + "sha256": "96c246d8920bc788a76aaa488a72ef06ff694a68067466f9f2d45b5845dc1f0c" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/CMakeLists.txt", + "sha256": "073e21b832e81e887ed7ad1992bcba44f242cc1e0525e9aec72fd3d96e953f7b" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/io/CMakeLists.txt", + "sha256": "6670ba104506c020a095e883a1d21dd5187574e3e22042beb9fcb888b35c5818" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/io/load.cpp", + "sha256": "e1e2053254678abcc7f499b7d57ad98324fc15d10ee8b316aba2b242cbd012ab" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/io/gguf.cpp", + "sha256": "18e766b7ed3d07c736b0725391bb187f509dfb243a434ffe0e9644cdac27d1be" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/io/gguf_quants.cpp", + "sha256": "0fd0ce5da615388905310269a3c189ac7e8714c0f47daf478e109f33a00321b3" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/einsum.cpp", + "sha256": "7eaf1572757c74f6fff603181137df3a6b39ee762cb57ab0693bcf9bd96b2636" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/primitives.cpp", + "sha256": "06b9ffc486d7fc74556911c4a99a11683ba35c4015868e968a4c07b342f18cf1" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/types/fp16.h", + "sha256": "b63e769ec5794e19d338081727b212405355c3f47328b0e0817e61d2500ea6f7" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/cpu/CMakeLists.txt", + "sha256": "682ff05b4bde5166215981d983abd366556ea84458d6519b512a52718d2a523b" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/cpu/simd/math.h", + "sha256": "5dbe79caa33a228d1354b2621876dc0fb3629dd6733c8ee4ebd0471790b0a94a" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/cpu/lapack.h", + "sha256": "dd51d42638da3dd64ef91562f5a670c5fad913c3989c4de81273004a065ada61" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/cpu/threefry.h", + "sha256": "b174dd5054408045dfefcf6eec8856223ee7f86b73c28e078905c303a0701725" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/cpu/threefry.cpp", + "sha256": "f732e47eb1ffbbd51cea451618c31c3d76ade14494176836c483ec1d0a2884c3" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/common/hadamard.h", + "sha256": "9fe5c5c7a386cc74266ed031dc95a106f330d8b6e2f76dc20137c546c01ddfb7" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/CMakeLists.txt", + "sha256": "0755d1749ab6210320a17ad1f9908e778c2f3ed179869017eddd1317ba3dd1de" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/erf.h", + "sha256": "31d88004390bbe08636c5f64a3cb3180ebc8d79a89267347de9f6c33aba0e9f9" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/fp8.h", + "sha256": "9a9d77a6295f66b4ada4311c3b855b6ecb7a2b38f28623109e3c61d2e17e81ae" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/utils.h", + "sha256": "e40473c36e2f2e7ba250b29e8dbbe3c150ce207379e57a2818e916b343e9f2cf" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/fft.h", + "sha256": "fba2fbfd998e437cbe6db4842fcd75ae995ca1eda891057db76caba376367cda" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/sort.h", + "sha256": "3171f47dabf2cf501dffc2e388e3d66446d6f71712e8d070028258a084b63574" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/backend/metal/kernels/unary_ops.h", + "sha256": "af710925f066b029f67289a0bbe4edd0ba6c5e7f51c9df609abb111216fa963f" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/distributed/jaccl/lib/CMakeLists.txt", + "sha256": "0979cfa705cf47d193b3a3d5057646a42d632c0df856b98c656ac8bf4a5bb9bf" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/distributed/jaccl/lib/README.md", + "sha256": "ccc60539e33f3a4139fb6cf37834467edec88ed083b92b06ce34913ac1c06e51" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/distributed/jaccl/lib/jaccl/threadpool.h", + "sha256": "ca375bc5bf8828860a49f961a364fd03073fc9e836bdf3137de15fbfc594a37e" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/distributed/jaccl/lib/jaccl/rdma.cpp", + "sha256": "0b3d7e113a75815178ad479b3f218993b957b1a453be63400ccec82bb8aedf33" + }, + { + "source": "https://github.com/ml-explore/mlx/blob/36969c094354086e15d2a327a9c50feb20b9cf11/mlx/distributed/mpi/mpi.cpp", + "sha256": "d8b608d8c009c1058a6d53389ffd604c3a4189837ab49dc5ff882215d96a3f9f" + }, + { + "source": "https://github.com/ml-explore/mlx-c/blob/a26f2d584a14ec619ae8db9a09be03becd47598a/CMakeLists.txt", + "sha256": "11ef0ba482ab8a97c44e97342be6a233ada4e1e2821c746002231c1884b1ce1c" + }, + { + "source": "https://github.com/ml-explore/mlx-c/blob/a26f2d584a14ec619ae8db9a09be03becd47598a/LICENSE", + "sha256": "44326a4ea062241ae6fc26ee2ec90bdc81af7eb7b9d3966181b733fa69d42057" + }, + { + "source": "https://api.stackexchange.com/2.3/answers/35148199?site=stackoverflow&filter=withbody", + "jsonBody": true, + "sha256": "fc4bebdfe83046e2054633802d2d1a3e24e370a53570722fc99cf7a1594057ef", + "answerId": 35148199, + "contentLicense": "CC BY-SA 4.0", + "lastEditDate": 1655581169 + }, + { + "source": "https://api.stackexchange.com/2.3/answers/49743348?site=stackoverflow&filter=withbody", + "jsonBody": true, + "sha256": "a3ab5a09acc1039b51f1e4cbcf21bc66d8e807432cb26bbdd4ae2459f565c81d", + "answerId": 49743348, + "contentLicense": "CC BY-SA 4.0", + "lastEditDate": 1623305077 + }, + { + "source": "https://github.com/pytorch/pytorch/blob/a82aae9d4a7827849ce50f31c4c7ee8f278d05f5/LICENSE", + "sha256": "bd018feef8825e88181c84eb7e3aa4eafb8f08a20d9fd6ef948569610c4a3e43" + }, + { + "source": "https://github.com/pytorch/pytorch/blob/abf28982a8cb43342e7669d859de9543fd804cc9/LICENSE", + "sha256": "a8a2c6b67cf8a597ffaa5c82380a6bd1b82629c0417e00673d8013d662eb500a" + } + ], + "unresolvedFindings": [ + { + "id": "NATIVE-LICENSE-1", + "component": "Norbert Juffa erf / erfinv adaptations", + "mlxPaths": [ + "mlx/backend/metal/kernels/erf.h", + "mlx/backend/cpu/simd/math.h" + ], + "evidence": [ + "https://stackoverflow.com/a/35148199", + "https://stackoverflow.com/a/49743348" + ], + "finding": "Metal erf explicitly cites Stack Overflow; inverse-erf coefficients and evaluation structure also match njuffa answer 49743348. Both retrieved answer records declare CC BY-SA 4.0. The BSD-2-Clause notice in expm1f.h covers that file, not proof of a permissive grant for erf/erfinv.", + "resolutionRequired": "Retain an applicable alternative license grant with the exact code mapping, or review and satisfy the applicable attribution/share-alike obligations before distribution. A separately reviewed upstream/pin or implementation change is another option." + }, + { + "id": "NATIVE-LICENSE-2", + "component": "Cephes through fastermath and NEON math", + "mlxPaths": [ + "mlx/backend/cpu/simd/math.h" + ], + "evidence": [ + "https://www.netlib.org/cephes/readme" + ], + "finding": "MLX explicitly traces exp/sincos to Cephes through fastermath and neon_mathfun.h. The direct BSD-3-Clause and zlib notices and the original Cephes permission statement are now retained. The original statement has no standard license identifier; no additional Cephes grant for this exact provenance chain was established.", + "resolutionRequired": "Document why the retained original permission covers this redistribution, or retain an applicable grant for the exact derived material. Do not label this chain BSD solely because another project received permission." + } + ], + "nativeFiles": { + "libmlxc.dylib": { + "sha256": "15a08b85d40333093a38043d0545f9ff6d12ab532e58e7c1af067a23c93a238d", + "size": 2364080 + }, + "libmlx.dylib": { + "sha256": "d8c9393d584e781393c3effccfccd8ba85ad0c70264edaf9f897dca9875375c6", + "size": 21720704 + }, + "libjaccl.dylib": { + "sha256": "7890e84a96e3121c8c1c2f351e41e46ba4d92e7b7bc6275fc2b38c2773891032", + "size": 2131168 + }, + "mlx.metallib": { + "sha256": "c6d7a3facb83568f6e4cb2cf4a8c736ee29302571a48343cb9a3a4d1cd3e3893", + "size": 214156448 + }, + "native-pin.properties": { + "sha256": "9fbdc2f67202c57a6e86adbae8f3ab318c89cbbc222df34c197aedf14f5739b7", + "size": 75 + } + }, + "wheelSha256": "514df92d41a286895d2564b4b18f4da45096bd7a4a0c47e1042f345ad5a7f936", + "verification": { + "componentCount": 26, + "packagedTexts": { + "LICENSE-APACHE-2.0": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2", + "THIRD-PARTY-NOTICES": "4efc6e66304629e287bb7120b732a5784c2c1e398e28bf47e214eef885e34eb8", + "NOTICE": "3d162cd4a141174798a138dd851970047df54127d1f286f93190e5e2aa09cfdf", + "LICENSE": "f44fd6beb3ec3205e3efb85d1582c273402a43fe4cc613834d8a8151fd5ce4a9" + }, + "result": "Source/notice consistency and main/companion non-payload path checks pass; legal findings remain open.", + "releaseSelftests": { + "tests": 74, + "seconds": 59.161, + "result": "passed" + }, + "gradle": { + "result": "passed", + "tasks": 15, + "executed": 6, + "upToDate": 9 + }, + "sourceCheck": { + "components": 26, + "sourceEvidenceRecords": 34, + "sourceUrlDigestPairs": 57, + "networkCacheInitiallyEmpty": false, + "cache": "Prior URL-bound review cache; all source objects rehashed without new requests.", + "locale": "en_US.ISO8859-1", + "pythonUtf8Mode": false, + "checkedJars": [ + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar" + ], + "requireClearExitCode": 1, + "releaseReady": false + } + }, + "artifacts": { + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar": { + "sha256": "895b8e847735663859aad46d0083b9081ba33b3fbf7f5967bf1c8c94f71e6435", + "size": 77821148 + }, + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar": { + "sha256": "b61dbff6e31caf5a9a2226d942c0a474308345ceef0d890cf533f988edd2a4b9", + "size": 15599 + }, + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar": { + "sha256": "1c759f986d1ed8d102a3ef4d08b4a37b4a59895ddb3b2242ab1937d5da87fa82", + "size": 4167653 + }, + "jmlx-native-macos-arm64/build/publications/maven/pom-default.xml": { + "sha256": "84d86eecdea022cdd63b5dcac25ae0586a627ee3f722bf9c972b4170ff11ae35", + "size": 1793 + } + }, + "retainedEvidence": { + "req/plans/evidence/native-license-audit-2026-11-16/commands.json": "bb7405bae0fc42201d644b8a7196ccf188d3529b6e49f458f863a90604b57fa8", + "req/plans/evidence/native-license-audit-2026-11-16/dylib-dependencies.txt": "6a89c22df5bd2df1233ac72062eaa3c0ed43877e5d4a95650be221f7bc105cdc", + "req/plans/evidence/native-license-audit-2026-11-16/followup-commands.json": "74d43b6c91a9ea17cb6a93a2507b0496b7e1ef976e38df340acbb634808efe15", + "req/plans/evidence/native-license-audit-2026-11-16/followup-gradle.log": "ecf1908c967a38780f74512d1c10aa59b5c940f2a052e250135e1f17b89385f7", + "req/plans/evidence/native-license-audit-2026-11-16/followup-release-selftests.log": "0c5bb6869448f0333c5bfa457297e78ffd3ce5612f7cba895213df71f41f8a78", + "req/plans/evidence/native-license-audit-2026-11-16/followup-require-clear.log": "790b5abfba72fb67f90bf1b69735aad801d2f57ac2dcb73cf38a9e98d435b36e", + "req/plans/evidence/native-license-audit-2026-11-16/followup-source-verification.json": "e6f34e6d83d1e387956728cf14eda4f6fe46fd1e9d8f9bfc6eb6fd759f37e1c9", + "req/plans/evidence/native-license-audit-2026-11-16/gradle.log": "b6c4f673c6ec2344860aa5f7f9f2777ee48875c6875c8db83483a1ab823451d0", + "req/plans/evidence/native-license-audit-2026-11-16/release-selftests.log": "8349212051702036b0a08fe9d45375449db51005eded98d20a8b32be680fa27a", + "req/plans/evidence/native-license-audit-2026-11-16/require-clear.log": "790b5abfba72fb67f90bf1b69735aad801d2f57ac2dcb73cf38a9e98d435b36e", + "req/plans/evidence/native-license-audit-2026-11-16/review-commands.json": "0c40721f8cd70de57734efb7165cb7fe92f9a8b7e3bab1220930520e1ddb5a56", + "req/plans/evidence/native-license-audit-2026-11-16/review-environment.json": "3e891906644fb6679d6c79c0bd80bc69cd6ee045cf70b2018cb5aa0e458fb634", + "req/plans/evidence/native-license-audit-2026-11-16/review-gradle.log": "b6c4f673c6ec2344860aa5f7f9f2777ee48875c6875c8db83483a1ab823451d0", + "req/plans/evidence/native-license-audit-2026-11-16/review-release-selftests.log": "278dd7abab947eabfc83b5d7bc507426f86edf5a5f92b45fbda32097c12533e3", + "req/plans/evidence/native-license-audit-2026-11-16/review-require-clear.log": "790b5abfba72fb67f90bf1b69735aad801d2f57ac2dcb73cf38a9e98d435b36e", + "req/plans/evidence/native-license-audit-2026-11-16/review-source-verification.json": "5b6b1befe93eec262d2aad5cd811468bab02eda7a3afb772de657eb0665e6a6a", + "req/plans/evidence/native-license-audit-2026-11-16/source-verification.json": "d997ffe28d000a2fbc6fff5fd94d4e1331e038750131826b70c9b24bce01e1ac" + }, + "verificationTools": { + "tools/release-all/audit_native_licenses.py": "3b26e1a6976a882d5d1dd0ada610381239e9f2dadfc39a593ada3392504a349a", + "tools/release-all/release_inputs.py": "5266931df56ab5c6b119d26d632365a4a912956ed8e5bdf4593e02bdae4a9018", + "tools/release-all/tests/test_native_licenses.py": "274c3bbe0d4fe8de34e2298c3b62c320270f1e77b3333ed4be6d64ee693454ef", + "tools/release-all/tests/test_release_inputs.py": "b6154e90f6cf0ab136f2458d56cd9c669b06a5e7c999e91b06419cb26b8165ac" + }, + "originalVerification": { + "componentCount": 26, + "packagedTexts": { + "LICENSE-APACHE-2.0": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2", + "THIRD-PARTY-NOTICES": "163204e769e4db89cb29aaffb4ef125839f298ae71372ee1591df3a2fe5c7ba6", + "NOTICE": "3d162cd4a141174798a138dd851970047df54127d1f286f93190e5e2aa09cfdf", + "LICENSE": "f44fd6beb3ec3205e3efb85d1582c273402a43fe4cc613834d8a8151fd5ce4a9" + }, + "result": "Source and notice consistency checks do not resolve the open license findings.", + "releaseSelftests": { + "tests": 63, + "seconds": 51.987, + "result": "passed" + }, + "gradle": { + "result": "passed", + "tasks": 15, + "executed": 6, + "upToDate": 9 + }, + "sourceCheck": { + "components": 26, + "sourceEvidenceRecords": 34, + "networkCacheInitiallyEmpty": true, + "checkedJars": [ + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar" + ], + "requireClearExitCode": 1, + "releaseReady": false + } + }, + "originalArtifacts": { + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar": { + "sha256": "3aebc865da1b4f72d6b4d770c9dce743f418ddf07511d910250cf8751fd27b9f", + "size": 77821135 + }, + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar": { + "sha256": "61ac28b0914c9283591574a7cba48233d398d73b2d807b548a7234f4ea8dc80f", + "size": 15586 + }, + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar": { + "sha256": "37bf4835d5bd543a25f6a9a980e5003b35d7f10dd27faf9d01ca35f2195b349d", + "size": 4167640 + }, + "jmlx-native-macos-arm64/build/publications/maven/pom-default.xml": { + "sha256": "84d86eecdea022cdd63b5dcac25ae0586a627ee3f722bf9c972b4170ff11ae35", + "size": 1793 + } + }, + "reviewOfCommit": "8dd48dc7ee85fb6e449db2c6cbdcc4efbcda9d9b", + "historicalEvidenceNote": "Unprefixed evidence and originalVerification/originalArtifacts record the first PR #100 implementation (56 of 57 distinct URL/digest fetches). Review-prefixed evidence and priorReviewVerification/priorReviewArtifacts record the subsequent URL-bound cold run (57 of 57). Followup-prefixed evidence supersedes the artifact/section/path validation using that warm URL-bound cache.", + "priorReviewVerification": { + "componentCount": 26, + "packagedTexts": { + "LICENSE-APACHE-2.0": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2", + "THIRD-PARTY-NOTICES": "ef25c942cd907e22c0177d1726facffca4be894f848e31e92464e5d80ffaadda", + "NOTICE": "3d162cd4a141174798a138dd851970047df54127d1f286f93190e5e2aa09cfdf", + "LICENSE": "f44fd6beb3ec3205e3efb85d1582c273402a43fe4cc613834d8a8151fd5ce4a9" + }, + "result": "Source/notice consistency and companion path checks pass; legal findings remain open.", + "releaseSelftests": { + "tests": 72, + "seconds": 64.873, + "result": "passed" + }, + "gradle": { + "result": "passed", + "tasks": 15, + "executed": 6, + "upToDate": 9 + }, + "sourceCheck": { + "components": 26, + "sourceEvidenceRecords": 34, + "sourceUrlDigestPairs": 57, + "newCacheEntries": 57, + "networkCacheInitiallyEmpty": true, + "locale": "en_US.ISO8859-1", + "preferredEncoding": "ISO8859-1", + "pythonUtf8Mode": false, + "checkedJars": [ + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar" + ], + "requireClearExitCode": 1, + "releaseReady": false + } + }, + "priorReviewArtifacts": { + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar": { + "sha256": "8cbd8ceff0d126b435b9b57634c4c49c89f4f1392efe18dce74b14835419c37e", + "size": 77821143 + }, + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar": { + "sha256": "6d8752626fcefff509c489d52ca20995ba58d5e81a14d81493ac89ceb1d2e490", + "size": 15594 + }, + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar": { + "sha256": "df47c556060393ac65fe10381386e0fba5ea1446658c767c734afb204cb32a81", + "size": 4167648 + }, + "jmlx-native-macos-arm64/build/publications/maven/pom-default.xml": { + "sha256": "84d86eecdea022cdd63b5dcac25ae0586a627ee3f722bf9c972b4170ff11ae35", + "size": 1793 + } + } +} diff --git a/req/phase8-4-native-license-audit.md b/req/phase8-4-native-license-audit.md new file mode 100644 index 00000000..d826fb48 --- /dev/null +++ b/req/phase8-4-native-license-audit.md @@ -0,0 +1,216 @@ +# Phase 8.4 native transitive-license audit + +Review date: 2026-11-16. Source baseline: PR #99 merge +`a97eb5b0c735cdc047a13c5539295cce64130eef`. + +**The license release gate remains open.** This review found missing permissive notices and +adds them to the native main, sources and Javadoc JARs. Two provenance findings below require +resolution before release. Passing source/hash/packaging checks establishes consistency of +the reviewed material, not permission for the unresolved material. + +The [machine-readable audit](phase8-4-native-license-audit.json) records the reviewed source +files, hashes of the current five-file native payload and open findings. The +[inventory](native-license-inventory.json) records 26 entries, immutable source URLs where +available, source SHA-256s, notice extraction ranges and packaged-text hashes. + +## Scope and method + +The payload is the SHA-256-pinned `mlx-metal` 0.32.4 macOS ARM64 wheel, plus locally compiled +mlx-c at `a26f2d584a14ec619ae8db9a09be03becd47598a`. Upstream MLX tag `v0.32.4` +resolves to `36969c094354086e15d2a327a9c50feb20b9cf11`. The local source copies are clean at +those revisions. Bootstrap uses the wheel's system MLX configuration; it does not compile a +second MLX. Native pins, generated bindings, binary deployment targets and native payload bytes +are unchanged by this audit. + +The review followed root, CPU, Metal, I/O and distributed CMake target definitions; inspected +copyright/license and adaptation/reference comments throughout `mlx/` and mlx-c; inspected +fetched-dependency licenses; and compared that inventory with the packaged legal texts. It also +reviewed the wheel's installed metal-cpp license, build configuration and dylib linkage. +The linked source files and digests are retained in `sourceEvidence` in the JSON. + +The wheel is a vendor binary. Release/tag pairing, installed headers and exported build +configuration identify the source to review; this is not a reproducible rebuild or an attested +complete build log for that wheel. When code is a compiled adaptation or an algorithm reference, +not a separately linked library, it is still considered. Where MLX cites an unversioned project, +the inventory's pinned upstream version is a license-evidence snapshot, not a claim that MLX +incorporated that exact release. Algorithm references receive conservative attribution; this +does not establish copied implementation code or settle the historical provenance. + +## Component disposition + +All confirmed texts below are carried in `META-INF/THIRD-PARTY-NOTICES`, except metal-cpp's +complete Apache text in `META-INF/LICENSE-APACHE-2.0`. The latter also supplies the complete +Apache terms for the attributed adaptations. The module's own MIT license and top-level +NOTICE are packaged alongside them in all three JARs. + +| Component / adaptation | Evidence and disposition | +| --- | --- | +| MLX / JACCL | MLX MIT text; JACCL README explicitly uses MLX's license | +| mlx-c | MIT text from the pinned commit | +| metal-cpp 26 | Full Apache-2.0 text, byte-identical to the wheel's installed license | +| nlohmann/json 3.11.3 | MIT permission/disclaimer and all five distinct single-header copyright attributions; used by MLX and JACCL | +| fmt 12.1.0 | Complete MIT text and optional compiled-code exception; retain the text despite the exception | +| gguf-tools / FP16 | MIT texts for the pinned static GGUF implementation and FP16 provenance; FP16 also appears in MLX's type conversion header | +| pocketfft | Full embedded BSD-3-Clause notice, including the FFTW-derived DCT authors; source expressly identifies that code's BSD permission | +| V8 small_vector | Embedded BSD-3-Clause notice | +| ThreadPool | Embedded zlib notice, also checked against JACCL's separate modified copy | +| Norbert Juffa `expm1f` | Embedded BSD-2-Clause notice; confined to the material it identifies | +| NVIDIA / Filipe RNC Maia `cexpf` | Embedded Apache-2.0 attribution and complete Apache terms | +| NumPy / opt_einsum | **Added:** BSD-3-Clause and MIT texts for the einsum adaptation | +| supervised-lda NumpyFormat | **Added:** MIT text for the explicitly adapted NumPy loader | +| fastermath / Julien Pommier NEON math | **Added:** source-local BSD-3-Clause and zlib notices; Cephes origin remains a separate finding | +| PyTorch | **Added:** complete BSD-3-Clause license for CPU erf, Metal hypot and FP8 conversions; both copyright-year variants from the three cited commits are retained | +| TensorFlow | **Added:** Apache-2.0 copyright/header for the cumulative log-sum-exp gradient adaptation, plus complete Apache terms | +| JAX / Random123 | **Added:** JAX Apache attribution and Random123 BSD-3-Clause notice for Threefry references | +| VkFFT / CUB | **Added:** MIT and source-local BSD-3-Clause notices for Metal FFT and merge-sort references | +| Cephes | **Added:** original permission statement; remains `NATIVE-LICENSE-2` below | + +The POM's MIT and Apache-2.0 entries describe the module and primary bundled work. They are +not an exhaustive transitive-license inventory; the complete notices travel in the artifacts. +Adaptations are identified as modifications rather than attributed as original jmlx code. + +## Distribution boundary and exclusions + +The [retained `otool -L` output](plans/evidence/native-license-audit-2026-11-16/dylib-dependencies.txt) +shows the sibling MLX/JACCL dylibs and Apple system frameworks/libraries: Metal, Foundation, +QuartzCore, Accelerate, libc++, libSystem and libobjc. Those system components are not copied +into the JAR. metal-cpp is header-only code compiled into the payload, so its notice is included. +Static/header-only dependencies above are included even though `otool` cannot list them. + +The Python frontend, nanobind, Python standard library, upstream tests/benchmarks/examples and +their tool dependencies are not packaged. The backend wheel provides headers, dylibs and Metal +kernels; jmlx copies only the four native runtime files and its own pin file. The CUDA backend, +CUTLASS/cuDNN/cuFFT/NCCL implementations, Windows dlfcn/OpenBLAS paths and Linux BLAS/LAPACK +fallback are excluded by this macOS CPU/Metal build. CUB's algorithm attribution above concerns +Metal sort and is retained independently of the excluded CUDA backend. + +MLX's MPI backend calls `dlopen("libmpi.dylib")`; JACCL similarly opens the OS RDMA library. +No OpenMPI or RDMA implementation library is bundled. A citation in the non-Accelerate LAPACK +workaround, JAX type-promotion documentation, mathematical derivations and the Hadamard matrix +reference are recorded as references, rather than evidence that those projects' libraries are +distributed. Optional functionality loading a user's additional libraries does not add those +libraries to the reviewed bundle. + +## Open findings + +### NATIVE-LICENSE-1: Juffa `erf` / `erfinv` provenance + +The pinned Metal `erf.h` explicitly says its error function is based on +[njuffa's answer 35148199](https://stackoverflow.com/a/35148199). The inverse-error-function +coefficients and evaluation structure in that file and CPU `simd/math.h` also match +[njuffa's answer 49743348](https://stackoverflow.com/a/49743348); this second mapping is an +inference from the code comparison. The retrieved primary answer records both declare +`CC BY-SA 4.0`; their body hashes and edit timestamps are recorded in the audit JSON. + +The existing BSD-2-Clause grant in `expm1f.h` is not evidence of an alternative grant for these +other functions. This review found no such grant. Adding a BSD notice for `expm1f` therefore +does not close this finding. Before release, retain an applicable alternative grant with an +exact code mapping, or review and fulfill the applicable attribution/share-alike obligations. +A separately reviewed upstream/pin or implementation change is another possible resolution. +This audit does not change the native code or claim those obligations have been satisfied. + +### NATIVE-LICENSE-2: Cephes provenance chain + +CPU SIMD `math.h` explicitly traces its exponential and sine/cosine implementations through +fastermath and NEON math to Cephes. Both immediate upstream notices are now retained. +The [original Cephes statement](https://www.netlib.org/cephes/readme) permits free use but has +no standard license identifier. Its exact text is now also packaged. This review did not +establish an additional grant for this exact provenance chain. + +Document why that original permission covers this redistribution, or retain an applicable +grant for the derived material, before closing the gate. Another project's separate BSD +permission is not used as proof here. This is an unresolved review question, not a finding +that the code is prohibited or GPL-licensed. + +## Verification and reproduction + +The original 2026-11-16 verification passed 63 release selftests and the native Gradle checks. +Its digest-only cache checked the declared contents of 26 notice entries and 34 additional +source records, but fetched only 56 of the 57 distinct URL/digest pairs: two PyTorch sources +shared a cache entry. The review correction below supersedes that network-verification evidence. +The unprefixed retained logs remain historical records of that original implementation. + +Use Python 3.11+ and the existing Java toolchains. Bootstrap first if the native files and +verified wheel are absent. From the repository root: + +```sh +./gradlew :jmlx-native-macos-arm64:check \ + :jmlx-native-macos-arm64:verifyNativeReleasePayload \ + :jmlx-native-macos-arm64:generatePomFileForMavenPublication +bash tools/release-all/selftest.sh +python3 tools/release-all/audit_native_licenses.py \ + --wheel native/scratch/mlx_metal.whl \ + --cache build/releaseAll/native-license-audit-cache \ + --jar jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar \ + --jar jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar \ + --jar jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar \ + --output build/releaseAll/native-license-verification.json +``` + +The script verifies the wheel digest, fetches/hash-checks the recorded primary sources on a +cache miss, checks every extracted notice against its source and the component's own section +of the packaged text, and checks all supplied JARs. Notice headings match inventory component +names exactly. The inventory independently requires all four legal files in every JAR. +Sections use the literal `======== JMLX NATIVE NOTICE SECTION ========` marker; +ordinary lines of equals signs inside upstream license texts remain part of that section. +Cache keys bind both the original URL and the declared digest, so two different URLs with +identical contents are fetched separately. Cached objects are rehashed before use, never +rewritten on a hit, and new objects are installed atomically after validation. +Notice files are decoded explicitly as UTF-8. Matching ignores line-end whitespace only. +Source/header excerpts keep their full permission conditions and +disclaimers; the JSON attribution record lists each distinct original copyright line. +With an empty cache the check also reproduces the recorded source hashes from the network. +Mutable Cephes/Stack Overflow sources fail the digest check if their reviewed content changes. +The Cephes readme has no commit-pinned URL: an ordinary upstream edit can cause this failure; +it is not by itself evidence of tampering. Review the new content before changing its recorded hash. + +The default command verifies consistency and writes `releaseReady: false` with both finding +IDs. Add `--require-clear` to make those findings produce a nonzero exit, after writing the +report. Neither an empty cache nor successful JAR checks overrides that result. After a version +cut, use the actual candidate artifact filenames and rerun against the exact signed bundle; +these SNAPSHOT artifacts are development evidence only. + +Small reports and logs are retained outside `build/` under +[`req/plans/evidence/native-license-audit-2026-11-16/`](plans/evidence/native-license-audit-2026-11-16/). +The wheel, source cache and large native artifacts remain ignored/reproducible inputs. +The JSON records their digests; `./gradlew clean` does not remove the committed reports. + +## Review corrections (2026-11-16) + +Review adds URL-bound atomic caching, explicit UTF-8 notice decoding, component section +matching, strict excerpt bounds, contextual Stack Exchange response errors and an independent +four-file legal inventory requirement. Companion source/Javadoc entries are now scanned for +the forbidden home/checkout prefixes by `release_inputs.py native --documentation-jar`, as +invoked by the explicit Gradle release check. Those path checks do not depend on file extensions. + +New regressions exercise a non-UTF-8 subprocess, independent requests for equal-digest URLs, +mocked network/URL rewriting, atomic cache replacement/failure and read-only hits, JSON body +extraction/error responses, excerpt validation and section binding, inventory omission, +main-JAR missing notices and the companion-JAR CLI/path checks. Review evidence uses the +`review-` filename prefix and records its locale and fresh cache separately from the original run. +The two legal provenance findings remain unresolved. + +The corrected run passed all 72 release selftests (64.873 seconds), including 15 focused +license tests, and the native Gradle checks (15 tasks: 6 executed, 9 up-to-date). Under +`LC_ALL=en_US.ISO8859-1`, `PYTHONUTF8=0` and `PYTHONCOERCECLOCALE=0`, Python measured its +preferred encoding as `ISO8859-1`; the real audit still verified all 26 entries and 34 source +records. Its initially empty cache gained 57 entries for 57 distinct URL/digest pairs, and +all three JARs passed. `--require-clear` again exited 1 for the two unresolved legal findings. + +### Main-JAR metadata and separator follow-up (2026-11-16) + +`native_jar_report` now scans all main-JAR entries for the supplied forbidden prefixes except +the five exact native payload entries, which still go through `native_report` and its pinned +MLX path exception. This includes the manifest, other `META-INF` entries and unexpected entries +under the native resource directory. Companion scans remain unchanged. + +The notice separator is now the distinctive literal marker above. Regression coverage checks +that upstream rules of eight and 72 equals signs survive within a license section, and that +main-JAR metadata leaks fail without applying the generic scan to the pinned native payload. +Follow-up evidence uses the `followup-` prefix; its source check reuses the independently +URL-validated cache from the prior cold run, rehashing every cached object. + +All 74 release selftests passed (59.161 seconds), including 17 focused license tests. Native +Gradle checks passed (15 tasks: 6 executed, 9 up-to-date), and the warm-cache source/notice +check verified all 57 URL/digest pairs and all three rebuilt JARs under the same ISO-8859-1 +environment. `--require-clear` retained its expected exit 1 for the two open legal findings. diff --git a/req/phase8-4-release-checklist.md b/req/phase8-4-release-checklist.md index 3f93a3c5..be6da128 100644 --- a/req/phase8-4-release-checklist.md +++ b/req/phase8-4-release-checklist.md @@ -38,6 +38,9 @@ BellSoft 21.0.12.1; the matching-toolchain audit reproduces every JAR exactly. T The local physical Apple Silicon Mac runs 27.2.1; exact-candidate execution and the dedicated credential-free runner setup remain required before release acceptance. - [ ] Complete native transitive-license audit, including compiled-in MLX dependencies. + The [2026-11-16 source audit](phase8-4-native-license-audit.md) expands the packaged + inventory to 26 entries. Two provenance findings (Juffa `erf`/`erfinv` and Cephes) + still prevent closing this gate; successful notice checks do not resolve them. - [ ] Verify current official Portal size limits/accounting against actual signed bundle. - [x] Integrate released upstream plugin 2.6.0 and verify the clean historical 8.1 fixture. [Compatibility evidence](phase8-4-plugin-2.6.0-compatibility.md) records the unpushed scratch @@ -86,8 +89,9 @@ Apple Clang 21.0.0 (clang-2100.4.1.1), CMake 4.5.0, selected SDK 27.2. This is metadata/path evidence only, not a minimum-host Metal execution result. The native main/sources/Javadoc jars now carry full Apache-2.0 and additional dependency texts. -The pinned-source inventory covers JSON, fmt, gguflib/FP16, pocketfft, V8, ThreadPool and Metal -math adaptations as well as MLX/mlx-c. Review the inventory before closing the legal gate. +The pinned-source inventory also covers NumPy/opt_einsum, supervised-lda, SIMD math, +PyTorch/TensorFlow and GPU/PRNG algorithm references. The dated audit records inclusion, +exclusions, evidence and unresolved provenance; review its findings before closing the legal gate. Logs/receipts belong under ignored `build/releaseAll/` or outside the checkout. Never put credentials in the evidence or publish the temporary candidate draft Release. diff --git a/req/plans/evidence/native-license-audit-2026-11-16/commands.json b/req/plans/evidence/native-license-audit-2026-11-16/commands.json new file mode 100644 index 00000000..7e1053e8 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/commands.json @@ -0,0 +1,33 @@ +{ + "sourceAudit": { + "argv": [ + "python3", + "tools/release-all/audit_native_licenses.py", + "--wheel", + "native/scratch/mlx_metal.whl", + "--cache", + "build/releaseAll/native-license-audit-cache", + "--jar", + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar", + "--jar", + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar", + "--jar", + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar", + "--output", + "build/releaseAll/native-license-verification.json", + "--require-clear" + ], + "expectedExitCode": 1, + "cache": "Actual retained run started with an empty external temporary cache; this normalized command uses an ignored repository cache." + }, + "gradle": [ + "./gradlew", + ":jmlx-native-macos-arm64:check", + ":jmlx-native-macos-arm64:verifyNativeReleasePayload", + ":jmlx-native-macos-arm64:generatePomFileForMavenPublication" + ], + "selftests": [ + "bash", + "tools/release-all/selftest.sh" + ] +} diff --git a/req/plans/evidence/native-license-audit-2026-11-16/dylib-dependencies.txt b/req/plans/evidence/native-license-audit-2026-11-16/dylib-dependencies.txt new file mode 100644 index 00000000..6fc370a5 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/dylib-dependencies.txt @@ -0,0 +1,23 @@ +native/install/lib/libmlx.dylib: + @rpath/libmlx.dylib (compatibility version 0.0.0, current version 0.0.0) + /System/Library/Frameworks/Metal.framework/Versions/A/Metal (compatibility version 1.0.0, current version 373.2.0) + /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 5026.5.4, weak) + /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1195.14.4) + /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0) + @rpath/libjaccl.dylib (compatibility version 0.0.0, current version 0.0.0) + /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 2100.43.0) + /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1356.0.0) + /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) +native/install/lib/libmlxc.dylib: + @rpath/libmlxc.dylib (compatibility version 0.0.0, current version 0.0.0) + @rpath/libmlx.dylib (compatibility version 0.0.0, current version 0.0.0) + /System/Library/Frameworks/Metal.framework/Versions/A/Metal (compatibility version 1.0.0, current version 383.1.0) + /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 5027.1.8) + /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1223.10.17) + /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0) + /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 2200.32.0) + /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1359.40.3) +native/install/lib/libjaccl.dylib: + @rpath/libjaccl.dylib (compatibility version 0.0.0, current version 0.0.0) + /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 2100.43.0) + /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1356.0.0) diff --git a/req/plans/evidence/native-license-audit-2026-11-16/followup-commands.json b/req/plans/evidence/native-license-audit-2026-11-16/followup-commands.json new file mode 100644 index 00000000..84151306 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/followup-commands.json @@ -0,0 +1,38 @@ +{ + "sourceAudit": { + "argv": [ + "python3", + "tools/release-all/audit_native_licenses.py", + "--wheel", + "native/scratch/mlx_metal.whl", + "--cache", + "build/releaseAll/native-license-audit-cache", + "--jar", + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar", + "--jar", + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar", + "--jar", + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar", + "--output", + "build/releaseAll/native-license-followup-verification.json", + "--require-clear" + ], + "expectedExitCode": 1, + "cache": "Warm URL/digest-keyed cache from the prior review cold run; all 57 cached source objects rehashed. No new source URLs or expected source digests.", + "environment": { + "LC_ALL": "en_US.ISO8859-1", + "PYTHONUTF8": "0", + "PYTHONCOERCECLOCALE": "0" + } + }, + "gradle": [ + "./gradlew", + ":jmlx-native-macos-arm64:check", + ":jmlx-native-macos-arm64:verifyNativeReleasePayload", + ":jmlx-native-macos-arm64:generatePomFileForMavenPublication" + ], + "selftests": [ + "bash", + "tools/release-all/selftest.sh" + ] +} diff --git a/req/plans/evidence/native-license-audit-2026-11-16/followup-gradle.log b/req/plans/evidence/native-license-audit-2026-11-16/followup-gradle.log new file mode 100644 index 00000000..74cc8a9e --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/followup-gradle.log @@ -0,0 +1,103 @@ +> Task :buildSrc:compileJava UP-TO-DATE +> Task :buildSrc:compileGroovy NO-SOURCE +> Task :buildSrc:processResources NO-SOURCE +> Task :buildSrc:classes UP-TO-DATE +> Task :buildSrc:jar UP-TO-DATE +> Task :jmlx-native-macos-arm64:compileJava UP-TO-DATE +> Task :jmlx-native-macos-arm64:processResources NO-SOURCE +> Task :jmlx-native-macos-arm64:classes UP-TO-DATE +> Task :jmlx-native-macos-arm64:checkstyleMain UP-TO-DATE +> Task :jmlx-native-macos-arm64:compileTestJava NO-SOURCE +> Task :jmlx-native-macos-arm64:processTestResources NO-SOURCE +> Task :jmlx-native-macos-arm64:testClasses UP-TO-DATE +> Task :jmlx-native-macos-arm64:checkstyleTest NO-SOURCE +> Task :jmlx-native-macos-arm64:spotlessJava UP-TO-DATE +> Task :jmlx-native-macos-arm64:spotlessJavaCheck UP-TO-DATE +> Task :jmlx-native-macos-arm64:spotlessCheck UP-TO-DATE +> Task :jmlx-native-macos-arm64:stageNativeResources UP-TO-DATE +> Task :jmlx-native-macos-arm64:jar +> Task :jmlx-native-macos-arm64:javadoc UP-TO-DATE +> Task :jmlx-native-macos-arm64:javadocJar +> Task :jmlx-native-macos-arm64:sourcesJar +> Task :jmlx-native-macos-arm64:test NO-SOURCE +> Task :jmlx-native-macos-arm64:verifyPackagedNativeResources +> Task :jmlx-native-macos-arm64:verifyReleaseScriptsMatch UP-TO-DATE +> Task :jmlx-native-macos-arm64:check + +> Task :jmlx-native-macos-arm64:verifyNativeReleasePayload +{ + "pins": { + "mlxMetalVersion": "0.32.4", + "mlxcCommit": "a26f2d584a14ec619ae8db9a09be03becd47598a" + }, + "supportedMinimum": [ + 27, + 2, + 0 + ], + "deploymentTarget": [ + 26, + 2, + 0 + ], + "files": { + "libmlxc.dylib": { + "sha256": "15a08b85d40333093a38043d0545f9ff6d12ab532e58e7c1af067a23c93a238d", + "size": 2364080, + "minos": [ + 26, + 2, + 0 + ], + "sdk": [ + 27, + 2, + 0 + ] + }, + "libmlx.dylib": { + "sha256": "d8c9393d584e781393c3effccfccd8ba85ad0c70264edaf9f897dca9875375c6", + "size": 21720704, + "minos": [ + 26, + 2, + 0 + ], + "sdk": [ + 26, + 5, + 0 + ], + "upstreamPathAllowlist": [ + "/Users/runner/work/mlx/mlx/build/temp.macosx-11.0-arm64-cpython-310/mlx.core/mlx/backend/metal/kernels//mlx.metallib" + ] + }, + "libjaccl.dylib": { + "sha256": "7890e84a96e3121c8c1c2f351e41e46ba4d92e7b7bc6275fc2b38c2773891032", + "size": 2131168, + "minos": [ + 26, + 2, + 0 + ], + "sdk": [ + 26, + 5, + 0 + ] + }, + "mlx.metallib": { + "sha256": "c6d7a3facb83568f6e4cb2cf4a8c736ee29302571a48343cb9a3a4d1cd3e3893", + "size": 214156448 + }, + "native-pin.properties": { + "sha256": "9fbdc2f67202c57a6e86adbae8f3ab318c89cbbc222df34c197aedf14f5739b7", + "size": 75 + } + } +} + +> Task :jmlx-native-macos-arm64:generatePomFileForMavenPublication + +BUILD SUCCESSFUL in 4s +15 actionable tasks: 6 executed, 9 up-to-date diff --git a/req/plans/evidence/native-license-audit-2026-11-16/followup-release-selftests.log b/req/plans/evidence/native-license-audit-2026-11-16/followup-release-selftests.log new file mode 100644 index 00000000..1a6f690b --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/followup-release-selftests.log @@ -0,0 +1,79 @@ +test_main_checks_environment_before_consumer_or_output_creation (test_bundle_smoke.BundleSmokeTest.test_main_checks_environment_before_consumer_or_output_creation) ... ok +test_main_explains_that_legacy_preliminary_records_must_be_regenerated (test_bundle_smoke.BundleSmokeTest.test_main_explains_that_legacy_preliminary_records_must_be_regenerated) ... ok +test_minimum_host_accepts_patch_releases_and_rejects_other_minor_versions (test_bundle_smoke.BundleSmokeTest.test_minimum_host_accepts_patch_releases_and_rejects_other_minor_versions) ... ok +test_minimum_host_requires_physical_arm64_and_complete_identity (test_bundle_smoke.BundleSmokeTest.test_minimum_host_requires_physical_arm64_and_complete_identity) ... ok +test_other_macos_reports_require_at_least_supported_minor (test_bundle_smoke.BundleSmokeTest.test_other_macos_reports_require_at_least_supported_minor) ... ok +test_task_outcomes_and_configuration_cache_reuse (test_collector.CollectorTest.test_task_outcomes_and_configuration_cache_reuse) ... ok +test_class_and_documentation_changes_survive (test_compare_publications.ComparePublicationsTest.test_class_and_documentation_changes_survive) ... ok +test_cli_require_equal_writes_report_and_returns_verdict (test_compare_publications.ComparePublicationsTest.test_cli_require_equal_writes_report_and_returns_verdict) ... ok +test_dependency_and_gradle_provenance_changes_survive_normalization (test_compare_publications.ComparePublicationsTest.test_dependency_and_gradle_provenance_changes_survive_normalization) ... ok +test_duplicate_archive_entries_are_rejected (test_compare_publications.ComparePublicationsTest.test_duplicate_archive_entries_are_rejected) ... ok +test_expected_set_requires_all_five_files_per_module (test_compare_publications.ComparePublicationsTest.test_expected_set_requires_all_five_files_per_module) ... ok +test_extra_artifact_is_rejected (test_compare_publications.ComparePublicationsTest.test_extra_artifact_is_rejected) ... ok +test_missing_artifact_is_rejected (test_compare_publications.ComparePublicationsTest.test_missing_artifact_is_rejected) ... ok +test_missing_metadata_fields_have_context (test_compare_publications.ComparePublicationsTest.test_missing_metadata_fields_have_context) ... ok +test_nested_artifact_record_is_rejected (test_compare_publications.ComparePublicationsTest.test_nested_artifact_record_is_rejected) ... ok +test_normalization_never_deflates_even_for_deflated_inputs (test_compare_publications.ComparePublicationsTest.test_normalization_never_deflates_even_for_deflated_inputs) ... ok +test_only_archive_order_timestamps_and_matching_metadata_hashes_are_normalized (test_compare_publications.ComparePublicationsTest.test_only_archive_order_timestamps_and_matching_metadata_hashes_are_normalized) ... ok +test_pom_and_module_formatting_differences_survive (test_compare_publications.ComparePublicationsTest.test_pom_and_module_formatting_differences_survive) ... ok +test_publications_shape_is_validated (test_compare_publications.ComparePublicationsTest.test_publications_shape_is_validated) ... ok +test_stale_metadata_cannot_be_blessed_by_recomputed_hashes (test_compare_publications.ComparePublicationsTest.test_stale_metadata_cannot_be_blessed_by_recomputed_hashes) ... ok +test_unexpected_url_record_is_rejected (test_compare_publications.ComparePublicationsTest.test_unexpected_url_record_is_rejected) ... ok +test_wrong_checksum_is_rejected_even_when_size_matches (test_compare_publications.ComparePublicationsTest.test_wrong_checksum_is_rejected_even_when_size_matches) ... ok +test_zip_metadata_differences_survive (test_compare_publications.ComparePublicationsTest.test_zip_metadata_differences_survive) ... ok +test_actual_plugin_bundle_replacement_is_rejected_even_if_receipt_copy_is_verified (test_final_receipt.FinalReceiptTest.test_actual_plugin_bundle_replacement_is_rejected_even_if_receipt_copy_is_verified) ... ok +test_all_macos_acceptance_reports_require_supported_os (test_final_receipt.FinalReceiptTest.test_all_macos_acceptance_reports_require_supported_os) ... ok +test_cached_task_cannot_claim_passed (test_final_receipt.FinalReceiptTest.test_cached_task_cannot_claim_passed) ... ok +test_final_valid_and_preliminary_rejected (test_final_receipt.FinalReceiptTest.test_final_valid_and_preliminary_rejected) ... ok +test_minimum_host_requires_supported_minor_and_accepts_patch_releases (test_final_receipt.FinalReceiptTest.test_minimum_host_requires_supported_minor_and_accepts_patch_releases) ... ok +test_missing_reports_changed_plan_and_logs_block_upload (test_final_receipt.FinalReceiptTest.test_missing_reports_changed_plan_and_logs_block_upload) ... ok +test_plugin_digests_are_reviewed_record_anchors_after_full_verification (test_final_receipt.FinalReceiptTest.test_plugin_digests_are_reviewed_record_anchors_after_full_verification) ... ok +test_plugin_digests_cli_stdout_contract (test_final_receipt.FinalReceiptTest.test_plugin_digests_cli_stdout_contract) ... ok +test_real_bundle_check_does_not_authorize_a_different_plugin_upload_file (test_final_receipt.FinalReceiptTest.test_real_bundle_check_does_not_authorize_a_different_plugin_upload_file) ... ok +test_receipt_cannot_select_a_different_upload_path (test_final_receipt.FinalReceiptTest.test_receipt_cannot_select_a_different_upload_path) ... ok +test_report_cannot_invent_runtime_properties (test_final_receipt.FinalReceiptTest.test_report_cannot_invent_runtime_properties) ... ok +test_all_three_artifacts_require_every_reviewed_text (test_native_licenses.NativeLicensesTest.test_all_three_artifacts_require_every_reviewed_text) ... ok +test_corrupt_cache_and_changed_wheel_fail (test_native_licenses.NativeLicensesTest.test_corrupt_cache_and_changed_wheel_fail) ... ok +test_distinct_urls_with_shared_digest_are_fetched_independently (test_native_licenses.NativeLicensesTest.test_distinct_urls_with_shared_digest_are_fetched_independently) ... ok +test_fragments_and_line_ranges_must_be_valid_and_in_the_component_section (test_native_licenses.NativeLicensesTest.test_fragments_and_line_ranges_must_be_valid_and_in_the_component_section) ... ok +test_github_rewrite_and_atomic_cache_write_then_read_only_hit (test_native_licenses.NativeLicensesTest.test_github_rewrite_and_atomic_cache_write_then_read_only_hit) ... ok +test_interrupted_cache_replace_leaves_no_partial_entry (test_native_licenses.NativeLicensesTest.test_interrupted_cache_replace_leaves_no_partial_entry) ... ok +test_inventory_cannot_drop_any_required_text (test_native_licenses.NativeLicensesTest.test_inventory_cannot_drop_any_required_text) ... ok +test_license_equals_rules_remain_inside_the_component_section (test_native_licenses.NativeLicensesTest.test_license_equals_rules_remain_inside_the_component_section) ... ok +test_main_jar_scans_other_entries_but_keeps_native_payload_validation_separate (test_native_licenses.NativeLicensesTest.test_main_jar_scans_other_entries_but_keeps_native_payload_validation_separate) ... ok +test_native_cli_checks_companion_notices_and_personal_paths (test_native_licenses.NativeLicensesTest.test_native_cli_checks_companion_notices_and_personal_paths) ... ok +test_native_main_missing_reviewed_text_fails_before_payload_parsing (test_native_licenses.NativeLicensesTest.test_native_main_missing_reviewed_text_fails_before_payload_parsing) ... ok +test_non_utf8_locale_reads_notices_as_utf8 (test_native_licenses.NativeLicensesTest.test_non_utf8_locale_reads_notices_as_utf8) ... ok +test_notice_hash_update_cannot_hide_missing_upstream_attribution (test_native_licenses.NativeLicensesTest.test_notice_hash_update_cannot_hide_missing_upstream_attribution) ... ok +test_require_clear_cli_writes_findings_and_exits_nonzero (test_native_licenses.NativeLicensesTest.test_require_clear_cli_writes_findings_and_exits_nonzero) ... ok +test_stack_exchange_body_and_unexpected_responses (test_native_licenses.NativeLicensesTest.test_stack_exchange_body_and_unexpected_responses) ... ok +test_valid_sources_and_texts_do_not_clear_unresolved_findings (test_native_licenses.NativeLicensesTest.test_valid_sources_and_texts_do_not_clear_unresolved_findings) ... ok +test_wheel_member_has_its_own_digest_and_packaged_text_check (test_native_licenses.NativeLicensesTest.test_wheel_member_has_its_own_digest_and_packaged_text_check) ... ok +test_unstaged_local_jar_succeeds_but_combined_publish_fails (test_native_publish.NativePublishTest.test_unstaged_local_jar_succeeds_but_combined_publish_fails) ... ok +test_reviewed_hashes_and_receipt_gate_protect_the_actual_upload (test_plugin_upload.PluginUploadTest.test_reviewed_hashes_and_receipt_gate_protect_the_actual_upload) ... ok +test_bundle_digest_tag_and_path_checks (test_release_inputs.ReleaseInputsTest.test_bundle_digest_tag_and_path_checks) ... ok +test_invalid_manifest_variants (test_release_inputs.ReleaseInputsTest.test_invalid_manifest_variants) ... ok +test_macho_minimum_and_malformed_commands (test_release_inputs.ReleaseInputsTest.test_macho_minimum_and_malformed_commands) ... ok +test_native_target_and_local_paths_are_blocking (test_release_inputs.ReleaseInputsTest.test_native_target_and_local_paths_are_blocking) ... ok +test_notice_wheel_digest_is_checked_against_bootstrap_not_only_its_inventory_hash (test_release_inputs.ReleaseInputsTest.test_notice_wheel_digest_is_checked_against_bootstrap_not_only_its_inventory_hash) ... ok +test_preflight_does_not_probe_until_local_versions_are_valid (test_release_inputs.ReleaseInputsTest.test_preflight_does_not_probe_until_local_versions_are_valid) ... ok +test_selection_and_duplicates (test_release_inputs.ReleaseInputsTest.test_selection_and_duplicates) ... ok +test_archive_filter_requirement_is_reported_before_io (test_reproduce_audit.ReproduceAuditTest.test_archive_filter_requirement_is_reported_before_io) ... ok +test_archive_requires_one_jdk_and_rejects_path_traversal (test_reproduce_audit.ReproduceAuditTest.test_archive_requires_one_jdk_and_rejects_path_traversal) ... ok +test_central_download_hash_is_checked (test_reproduce_audit.ReproduceAuditTest.test_central_download_hash_is_checked) ... ok +test_environment_removes_injection_and_controls_locale (test_reproduce_audit.ReproduceAuditTest.test_environment_removes_injection_and_controls_locale) ... ok +test_every_daemon_and_compiler_javadoc_identity_is_checked (test_reproduce_audit.ReproduceAuditTest.test_every_daemon_and_compiler_javadoc_identity_is_checked) ... ok +test_git_ignores_caller_config_and_environment_injection (test_reproduce_audit.ReproduceAuditTest.test_git_ignores_caller_config_and_environment_injection) ... ok +test_gradle_version_is_checked (test_reproduce_audit.ReproduceAuditTest.test_gradle_version_is_checked) ... ok +test_jdk_archive_is_verified_before_extraction (test_reproduce_audit.ReproduceAuditTest.test_jdk_archive_is_verified_before_extraction) ... ok +test_result_requires_exact_artifacts_and_verdict (test_reproduce_audit.ReproduceAuditTest.test_result_requires_exact_artifacts_and_verdict) ... ok +test_source_assignment_and_missing_source_no_fallback (test_resolution.ResolutionTest.test_source_assignment_and_missing_source_no_fallback) ... ok +test_extraction_failure_cleans_partial_repository (test_runner_cleanup.RunnerCleanupTest.test_extraction_failure_cleans_partial_repository) ... ok +test_clt_only_does_not_require_xcodebuild (test_runtime_evidence.RuntimeEvidenceTest.test_clt_only_does_not_require_xcodebuild) ... ok +test_explicit_java_home_returns_measured_vendor_build_and_path (test_runtime_evidence.RuntimeEvidenceTest.test_explicit_java_home_returns_measured_vendor_build_and_path) ... ok +test_xcodebuild_failure_falls_back_to_clt_metadata (test_runtime_evidence.RuntimeEvidenceTest.test_xcodebuild_failure_falls_back_to_clt_metadata) ... ok + +---------------------------------------------------------------------- +Ran 74 tests in 59.161s + +OK diff --git a/req/plans/evidence/native-license-audit-2026-11-16/followup-require-clear.log b/req/plans/evidence/native-license-audit-2026-11-16/followup-require-clear.log new file mode 100644 index 00000000..c47c95d4 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/followup-require-clear.log @@ -0,0 +1 @@ +native license release gate remains open: NATIVE-LICENSE-1, NATIVE-LICENSE-2 diff --git a/req/plans/evidence/native-license-audit-2026-11-16/followup-source-verification.json b/req/plans/evidence/native-license-audit-2026-11-16/followup-source-verification.json new file mode 100644 index 00000000..e8a52548 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/followup-source-verification.json @@ -0,0 +1,128 @@ +{ + "schema": 1, + "inventorySha256": "778f44d7947e1ff722c6bd14ab54c1ebbe66e40e967a23bcc414eea3344c6d82", + "components": [ + { + "component": "MLX and JACCL (MIT)", + "sha256": "ccfab7ccb2ea306f71531c8ca77bb55507606cd90768b1e32b8b52ab5b48cf01" + }, + { + "component": "mlx-c (MIT)", + "sha256": "44326a4ea062241ae6fc26ee2ec90bdc81af7eb7b9d3966181b733fa69d42057" + }, + { + "component": "nlohmann/json 3.11.3 (MIT)", + "sha256": "86b998c792894ccb911a1cb7994f7a9652894e7a094c0b5e45be2f553f45cf14" + }, + { + "component": "fmt 12.1.0 (MIT)", + "sha256": "07580f2a3b35709ce703d523f447b242f6dfec7582a8c0df102c7fa2849375f8" + }, + { + "component": "gguf-tools (MIT)", + "sha256": "7cce16d2bf2e2ce6a7d70b5ecd5fb43c6409a97aa0750ff75c11823e6e8c9d05" + }, + { + "component": "FP16 code referenced by gguf-tools fp16.c (MIT)", + "sha256": "17e4f539024be2749ee729d1e2f01d24cef12ece8c9bf18e91a4349be29c80bf" + }, + { + "component": "pocketfft (BSD-3-Clause)", + "sha256": "0eaea21304bf324639ff11022ee63faf48a8fab64afe5c3c2d1efefbe1d7dfa6" + }, + { + "component": "V8 small_vector adaptation (BSD-3-Clause)", + "sha256": "2fd7d2a423a74b7857ae886ddae0b6c4183f5b9f1d6b8f8d3ba8db38a5ad4677" + }, + { + "component": "ThreadPool modifications in MLX/JACCL (zlib)", + "sha256": "e22e3eb7a2ee0b06b0ea69e8a49375761de9b799dd96b06e7ae9e778d9820667" + }, + { + "component": "Norbert Juffa expm1f (BSD-2-Clause)", + "sha256": "dbdf551f45723639da54d72e327008bde6ef01a2f1ed561bb065e251ab6c9f1a" + }, + { + "component": "NVIDIA/Filipe RNC Maia cexpf adaptation (Apache-2.0)", + "sha256": "88b6e15a52a5800d98d9bc6da840ca5cf70bf572fda136409580c1f17b1e0aab" + }, + { + "component": "nlohmann/json single-header transitive MIT attributions", + "sha256": "9bea4c8066ef4a1c206b2be5a36302f8926f7fdc6087af5d20b417d0cf103ea6" + }, + { + "component": "NumPy einsum adaptation (BSD-3-Clause)", + "sha256": "01fb016849aa427edb1bbbbd55f91c26ca6cadb32a5b20e7f000655dd05b0760" + }, + { + "component": "opt_einsum algorithm attribution (MIT)", + "sha256": "7b26691a7c8ee48af425a53cbaeaabc9aa3a84ea2e93fe47a1ecc550c1de76db" + }, + { + "component": "supervised-lda NumpyFormat adaptation (MIT)", + "sha256": "b50379222802591434ac7a2137ba171b6c7529e9c1bb95eba1c9c9aa55609621" + }, + { + "component": "fastermath exponential adaptation (BSD-3-Clause)", + "sha256": "1d408b5aed22e94947cd8bcb74594b8e0d0287bada919d875fc9a32d2d3cf665" + }, + { + "component": "Julien Pommier NEON math adaptation (zlib)", + "sha256": "e75773addab087ff17c288f1143f45af0a532b1fafe2b550f13e55475a7d05a6" + }, + { + "component": "PyTorch CPU and Metal math adaptations (BSD-3-Clause)", + "sha256": "a8a2c6b67cf8a597ffaa5c82380a6bd1b82629c0417e00673d8013d662eb500a" + }, + { + "component": "TensorFlow cumulative log-sum-exp gradient adaptation (Apache-2.0)", + "sha256": "29ff2b107b055bd5be79647d790d7a6ad89b9363a6bfee15c79c1c08c0b02658" + }, + { + "component": "JAX Threefry algorithm reference (Apache-2.0)", + "sha256": "8d41666e2e2a5ceedfc4848ec38cedf48a38ccab2da004edf3c6095745751470" + }, + { + "component": "Random123 Threefry attribution (BSD-3-Clause)", + "sha256": "5fd0885ab205878bd90c19144677286252eb9b988c1545a3a910edfe1e27b6df" + }, + { + "component": "VkFFT algorithm reference (MIT)", + "sha256": "2bfae14bf46ead0effe63ed36b0d28bcc8846716bfc030d03b146eda7f0bdebd" + }, + { + "component": "CUB merge-sort algorithm reference (BSD-3-Clause)", + "sha256": "2e15eba2e130f3e80d9e91724c7dce3781ce99316324681ff54b00c1fc9759b3" + }, + { + "component": "metal-cpp 26 (Apache-2.0)", + "sha256": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2" + }, + { + "component": "Cephes math provenance (upstream permission statement; review open)", + "sha256": "82004ae6ed8feb08fd16783b6b32e82adfe047f60cb2f238dbf5d4bf9dae42a2" + }, + { + "component": "PyTorch Metal hypot license variant (BSD-3-Clause)", + "sha256": "bd018feef8825e88181c84eb7e3aa4eafb8f08a20d9fd6ef948569610c4a3e43" + } + ], + "sourceEvidenceCount": 34, + "sourceUrlDigestPairs": 57, + "packagedTexts": { + "LICENSE-APACHE-2.0": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2", + "THIRD-PARTY-NOTICES": "4efc6e66304629e287bb7120b732a5784c2c1e398e28bf47e214eef885e34eb8", + "NOTICE": "3d162cd4a141174798a138dd851970047df54127d1f286f93190e5e2aa09cfdf", + "LICENSE": "f44fd6beb3ec3205e3efb85d1582c273402a43fe4cc613834d8a8151fd5ce4a9" + }, + "checkedJars": [ + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar" + ], + "releaseReady": false, + "unresolvedFindings": [ + "NATIVE-LICENSE-1", + "NATIVE-LICENSE-2" + ] +} diff --git a/req/plans/evidence/native-license-audit-2026-11-16/gradle.log b/req/plans/evidence/native-license-audit-2026-11-16/gradle.log new file mode 100644 index 00000000..cda0c658 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/gradle.log @@ -0,0 +1,103 @@ +> Task :buildSrc:compileJava UP-TO-DATE +> Task :buildSrc:compileGroovy NO-SOURCE +> Task :buildSrc:processResources NO-SOURCE +> Task :buildSrc:classes UP-TO-DATE +> Task :buildSrc:jar UP-TO-DATE +> Task :jmlx-native-macos-arm64:compileJava UP-TO-DATE +> Task :jmlx-native-macos-arm64:processResources NO-SOURCE +> Task :jmlx-native-macos-arm64:classes UP-TO-DATE +> Task :jmlx-native-macos-arm64:checkstyleMain UP-TO-DATE +> Task :jmlx-native-macos-arm64:compileTestJava NO-SOURCE +> Task :jmlx-native-macos-arm64:processTestResources NO-SOURCE +> Task :jmlx-native-macos-arm64:testClasses UP-TO-DATE +> Task :jmlx-native-macos-arm64:checkstyleTest NO-SOURCE +> Task :jmlx-native-macos-arm64:spotlessJava UP-TO-DATE +> Task :jmlx-native-macos-arm64:spotlessJavaCheck UP-TO-DATE +> Task :jmlx-native-macos-arm64:spotlessCheck UP-TO-DATE +> Task :jmlx-native-macos-arm64:stageNativeResources UP-TO-DATE +> Task :jmlx-native-macos-arm64:jar +> Task :jmlx-native-macos-arm64:javadoc UP-TO-DATE +> Task :jmlx-native-macos-arm64:javadocJar +> Task :jmlx-native-macos-arm64:sourcesJar +> Task :jmlx-native-macos-arm64:test NO-SOURCE +> Task :jmlx-native-macos-arm64:verifyPackagedNativeResources +> Task :jmlx-native-macos-arm64:verifyReleaseScriptsMatch UP-TO-DATE +> Task :jmlx-native-macos-arm64:check + +> Task :jmlx-native-macos-arm64:verifyNativeReleasePayload +{ + "pins": { + "mlxMetalVersion": "0.32.4", + "mlxcCommit": "a26f2d584a14ec619ae8db9a09be03becd47598a" + }, + "supportedMinimum": [ + 27, + 2, + 0 + ], + "deploymentTarget": [ + 26, + 2, + 0 + ], + "files": { + "libmlxc.dylib": { + "sha256": "15a08b85d40333093a38043d0545f9ff6d12ab532e58e7c1af067a23c93a238d", + "size": 2364080, + "minos": [ + 26, + 2, + 0 + ], + "sdk": [ + 27, + 2, + 0 + ] + }, + "libmlx.dylib": { + "sha256": "d8c9393d584e781393c3effccfccd8ba85ad0c70264edaf9f897dca9875375c6", + "size": 21720704, + "minos": [ + 26, + 2, + 0 + ], + "sdk": [ + 26, + 5, + 0 + ], + "upstreamPathAllowlist": [ + "/Users/runner/work/mlx/mlx/build/temp.macosx-11.0-arm64-cpython-310/mlx.core/mlx/backend/metal/kernels//mlx.metallib" + ] + }, + "libjaccl.dylib": { + "sha256": "7890e84a96e3121c8c1c2f351e41e46ba4d92e7b7bc6275fc2b38c2773891032", + "size": 2131168, + "minos": [ + 26, + 2, + 0 + ], + "sdk": [ + 26, + 5, + 0 + ] + }, + "mlx.metallib": { + "sha256": "c6d7a3facb83568f6e4cb2cf4a8c736ee29302571a48343cb9a3a4d1cd3e3893", + "size": 214156448 + }, + "native-pin.properties": { + "sha256": "9fbdc2f67202c57a6e86adbae8f3ab318c89cbbc222df34c197aedf14f5739b7", + "size": 75 + } + } +} + +> Task :jmlx-native-macos-arm64:generatePomFileForMavenPublication + +BUILD SUCCESSFUL in 3s +15 actionable tasks: 6 executed, 9 up-to-date diff --git a/req/plans/evidence/native-license-audit-2026-11-16/release-selftests.log b/req/plans/evidence/native-license-audit-2026-11-16/release-selftests.log new file mode 100644 index 00000000..1317c437 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/release-selftests.log @@ -0,0 +1,68 @@ +test_main_checks_environment_before_consumer_or_output_creation (test_bundle_smoke.BundleSmokeTest.test_main_checks_environment_before_consumer_or_output_creation) ... ok +test_main_explains_that_legacy_preliminary_records_must_be_regenerated (test_bundle_smoke.BundleSmokeTest.test_main_explains_that_legacy_preliminary_records_must_be_regenerated) ... ok +test_minimum_host_accepts_patch_releases_and_rejects_other_minor_versions (test_bundle_smoke.BundleSmokeTest.test_minimum_host_accepts_patch_releases_and_rejects_other_minor_versions) ... ok +test_minimum_host_requires_physical_arm64_and_complete_identity (test_bundle_smoke.BundleSmokeTest.test_minimum_host_requires_physical_arm64_and_complete_identity) ... ok +test_other_macos_reports_require_at_least_supported_minor (test_bundle_smoke.BundleSmokeTest.test_other_macos_reports_require_at_least_supported_minor) ... ok +test_task_outcomes_and_configuration_cache_reuse (test_collector.CollectorTest.test_task_outcomes_and_configuration_cache_reuse) ... ok +test_class_and_documentation_changes_survive (test_compare_publications.ComparePublicationsTest.test_class_and_documentation_changes_survive) ... ok +test_cli_require_equal_writes_report_and_returns_verdict (test_compare_publications.ComparePublicationsTest.test_cli_require_equal_writes_report_and_returns_verdict) ... ok +test_dependency_and_gradle_provenance_changes_survive_normalization (test_compare_publications.ComparePublicationsTest.test_dependency_and_gradle_provenance_changes_survive_normalization) ... ok +test_duplicate_archive_entries_are_rejected (test_compare_publications.ComparePublicationsTest.test_duplicate_archive_entries_are_rejected) ... ok +test_expected_set_requires_all_five_files_per_module (test_compare_publications.ComparePublicationsTest.test_expected_set_requires_all_five_files_per_module) ... ok +test_extra_artifact_is_rejected (test_compare_publications.ComparePublicationsTest.test_extra_artifact_is_rejected) ... ok +test_missing_artifact_is_rejected (test_compare_publications.ComparePublicationsTest.test_missing_artifact_is_rejected) ... ok +test_missing_metadata_fields_have_context (test_compare_publications.ComparePublicationsTest.test_missing_metadata_fields_have_context) ... ok +test_nested_artifact_record_is_rejected (test_compare_publications.ComparePublicationsTest.test_nested_artifact_record_is_rejected) ... ok +test_normalization_never_deflates_even_for_deflated_inputs (test_compare_publications.ComparePublicationsTest.test_normalization_never_deflates_even_for_deflated_inputs) ... ok +test_only_archive_order_timestamps_and_matching_metadata_hashes_are_normalized (test_compare_publications.ComparePublicationsTest.test_only_archive_order_timestamps_and_matching_metadata_hashes_are_normalized) ... ok +test_pom_and_module_formatting_differences_survive (test_compare_publications.ComparePublicationsTest.test_pom_and_module_formatting_differences_survive) ... ok +test_publications_shape_is_validated (test_compare_publications.ComparePublicationsTest.test_publications_shape_is_validated) ... ok +test_stale_metadata_cannot_be_blessed_by_recomputed_hashes (test_compare_publications.ComparePublicationsTest.test_stale_metadata_cannot_be_blessed_by_recomputed_hashes) ... ok +test_unexpected_url_record_is_rejected (test_compare_publications.ComparePublicationsTest.test_unexpected_url_record_is_rejected) ... ok +test_wrong_checksum_is_rejected_even_when_size_matches (test_compare_publications.ComparePublicationsTest.test_wrong_checksum_is_rejected_even_when_size_matches) ... ok +test_zip_metadata_differences_survive (test_compare_publications.ComparePublicationsTest.test_zip_metadata_differences_survive) ... ok +test_actual_plugin_bundle_replacement_is_rejected_even_if_receipt_copy_is_verified (test_final_receipt.FinalReceiptTest.test_actual_plugin_bundle_replacement_is_rejected_even_if_receipt_copy_is_verified) ... ok +test_all_macos_acceptance_reports_require_supported_os (test_final_receipt.FinalReceiptTest.test_all_macos_acceptance_reports_require_supported_os) ... ok +test_cached_task_cannot_claim_passed (test_final_receipt.FinalReceiptTest.test_cached_task_cannot_claim_passed) ... ok +test_final_valid_and_preliminary_rejected (test_final_receipt.FinalReceiptTest.test_final_valid_and_preliminary_rejected) ... ok +test_minimum_host_requires_supported_minor_and_accepts_patch_releases (test_final_receipt.FinalReceiptTest.test_minimum_host_requires_supported_minor_and_accepts_patch_releases) ... ok +test_missing_reports_changed_plan_and_logs_block_upload (test_final_receipt.FinalReceiptTest.test_missing_reports_changed_plan_and_logs_block_upload) ... ok +test_plugin_digests_are_reviewed_record_anchors_after_full_verification (test_final_receipt.FinalReceiptTest.test_plugin_digests_are_reviewed_record_anchors_after_full_verification) ... ok +test_plugin_digests_cli_stdout_contract (test_final_receipt.FinalReceiptTest.test_plugin_digests_cli_stdout_contract) ... ok +test_real_bundle_check_does_not_authorize_a_different_plugin_upload_file (test_final_receipt.FinalReceiptTest.test_real_bundle_check_does_not_authorize_a_different_plugin_upload_file) ... ok +test_receipt_cannot_select_a_different_upload_path (test_final_receipt.FinalReceiptTest.test_receipt_cannot_select_a_different_upload_path) ... ok +test_report_cannot_invent_runtime_properties (test_final_receipt.FinalReceiptTest.test_report_cannot_invent_runtime_properties) ... ok +test_all_three_artifacts_require_every_reviewed_text (test_native_licenses.NativeLicensesTest.test_all_three_artifacts_require_every_reviewed_text) ... ok +test_corrupt_cache_and_changed_wheel_fail (test_native_licenses.NativeLicensesTest.test_corrupt_cache_and_changed_wheel_fail) ... ok +test_notice_hash_update_cannot_hide_missing_upstream_attribution (test_native_licenses.NativeLicensesTest.test_notice_hash_update_cannot_hide_missing_upstream_attribution) ... ok +test_require_clear_cli_writes_findings_and_exits_nonzero (test_native_licenses.NativeLicensesTest.test_require_clear_cli_writes_findings_and_exits_nonzero) ... ok +test_valid_sources_and_texts_do_not_clear_unresolved_findings (test_native_licenses.NativeLicensesTest.test_valid_sources_and_texts_do_not_clear_unresolved_findings) ... ok +test_wheel_member_has_its_own_digest_and_packaged_text_check (test_native_licenses.NativeLicensesTest.test_wheel_member_has_its_own_digest_and_packaged_text_check) ... ok +test_unstaged_local_jar_succeeds_but_combined_publish_fails (test_native_publish.NativePublishTest.test_unstaged_local_jar_succeeds_but_combined_publish_fails) ... ok +test_reviewed_hashes_and_receipt_gate_protect_the_actual_upload (test_plugin_upload.PluginUploadTest.test_reviewed_hashes_and_receipt_gate_protect_the_actual_upload) ... ok +test_bundle_digest_tag_and_path_checks (test_release_inputs.ReleaseInputsTest.test_bundle_digest_tag_and_path_checks) ... ok +test_invalid_manifest_variants (test_release_inputs.ReleaseInputsTest.test_invalid_manifest_variants) ... ok +test_macho_minimum_and_malformed_commands (test_release_inputs.ReleaseInputsTest.test_macho_minimum_and_malformed_commands) ... ok +test_native_target_and_local_paths_are_blocking (test_release_inputs.ReleaseInputsTest.test_native_target_and_local_paths_are_blocking) ... ok +test_notice_wheel_digest_is_checked_against_bootstrap_not_only_its_inventory_hash (test_release_inputs.ReleaseInputsTest.test_notice_wheel_digest_is_checked_against_bootstrap_not_only_its_inventory_hash) ... ok +test_preflight_does_not_probe_until_local_versions_are_valid (test_release_inputs.ReleaseInputsTest.test_preflight_does_not_probe_until_local_versions_are_valid) ... ok +test_selection_and_duplicates (test_release_inputs.ReleaseInputsTest.test_selection_and_duplicates) ... ok +test_archive_filter_requirement_is_reported_before_io (test_reproduce_audit.ReproduceAuditTest.test_archive_filter_requirement_is_reported_before_io) ... ok +test_archive_requires_one_jdk_and_rejects_path_traversal (test_reproduce_audit.ReproduceAuditTest.test_archive_requires_one_jdk_and_rejects_path_traversal) ... ok +test_central_download_hash_is_checked (test_reproduce_audit.ReproduceAuditTest.test_central_download_hash_is_checked) ... ok +test_environment_removes_injection_and_controls_locale (test_reproduce_audit.ReproduceAuditTest.test_environment_removes_injection_and_controls_locale) ... ok +test_every_daemon_and_compiler_javadoc_identity_is_checked (test_reproduce_audit.ReproduceAuditTest.test_every_daemon_and_compiler_javadoc_identity_is_checked) ... ok +test_git_ignores_caller_config_and_environment_injection (test_reproduce_audit.ReproduceAuditTest.test_git_ignores_caller_config_and_environment_injection) ... ok +test_gradle_version_is_checked (test_reproduce_audit.ReproduceAuditTest.test_gradle_version_is_checked) ... ok +test_jdk_archive_is_verified_before_extraction (test_reproduce_audit.ReproduceAuditTest.test_jdk_archive_is_verified_before_extraction) ... ok +test_result_requires_exact_artifacts_and_verdict (test_reproduce_audit.ReproduceAuditTest.test_result_requires_exact_artifacts_and_verdict) ... ok +test_source_assignment_and_missing_source_no_fallback (test_resolution.ResolutionTest.test_source_assignment_and_missing_source_no_fallback) ... ok +test_extraction_failure_cleans_partial_repository (test_runner_cleanup.RunnerCleanupTest.test_extraction_failure_cleans_partial_repository) ... ok +test_clt_only_does_not_require_xcodebuild (test_runtime_evidence.RuntimeEvidenceTest.test_clt_only_does_not_require_xcodebuild) ... ok +test_explicit_java_home_returns_measured_vendor_build_and_path (test_runtime_evidence.RuntimeEvidenceTest.test_explicit_java_home_returns_measured_vendor_build_and_path) ... ok +test_xcodebuild_failure_falls_back_to_clt_metadata (test_runtime_evidence.RuntimeEvidenceTest.test_xcodebuild_failure_falls_back_to_clt_metadata) ... ok + +---------------------------------------------------------------------- +Ran 63 tests in 51.987s + +OK diff --git a/req/plans/evidence/native-license-audit-2026-11-16/require-clear.log b/req/plans/evidence/native-license-audit-2026-11-16/require-clear.log new file mode 100644 index 00000000..c47c95d4 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/require-clear.log @@ -0,0 +1 @@ +native license release gate remains open: NATIVE-LICENSE-1, NATIVE-LICENSE-2 diff --git a/req/plans/evidence/native-license-audit-2026-11-16/review-commands.json b/req/plans/evidence/native-license-audit-2026-11-16/review-commands.json new file mode 100644 index 00000000..a3a9c82a --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/review-commands.json @@ -0,0 +1,38 @@ +{ + "sourceAudit": { + "argv": [ + "python3", + "tools/release-all/audit_native_licenses.py", + "--wheel", + "native/scratch/mlx_metal.whl", + "--cache", + "build/releaseAll/native-license-audit-cache", + "--jar", + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar", + "--jar", + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar", + "--jar", + "jmlx-native-macos-arm64/build/libs/jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar", + "--output", + "build/releaseAll/native-license-review-verification.json", + "--require-clear" + ], + "expectedExitCode": 1, + "cache": "Review run started with an empty external temporary cache; key = SHA-256(original URL) + declared content digest. This normalized command uses an ignored repository cache.", + "environment": { + "LC_ALL": "en_US.ISO8859-1", + "PYTHONUTF8": "0", + "PYTHONCOERCECLOCALE": "0" + } + }, + "gradle": [ + "./gradlew", + ":jmlx-native-macos-arm64:check", + ":jmlx-native-macos-arm64:verifyNativeReleasePayload", + ":jmlx-native-macos-arm64:generatePomFileForMavenPublication" + ], + "selftests": [ + "bash", + "tools/release-all/selftest.sh" + ] +} diff --git a/req/plans/evidence/native-license-audit-2026-11-16/review-environment.json b/req/plans/evidence/native-license-audit-2026-11-16/review-environment.json new file mode 100644 index 00000000..367d752c --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/review-environment.json @@ -0,0 +1,10 @@ +{ + "LC_ALL": "en_US.ISO8859-1", + "PYTHONUTF8": "0", + "PYTHONCOERCECLOCALE": "0", + "cacheInitiallyEmpty": true, + "newCacheEntries": 57, + "sourceUrlDigestPairs": 57, + "exitCode": 1, + "preferredEncoding": "ISO8859-1" +} diff --git a/req/plans/evidence/native-license-audit-2026-11-16/review-gradle.log b/req/plans/evidence/native-license-audit-2026-11-16/review-gradle.log new file mode 100644 index 00000000..cda0c658 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/review-gradle.log @@ -0,0 +1,103 @@ +> Task :buildSrc:compileJava UP-TO-DATE +> Task :buildSrc:compileGroovy NO-SOURCE +> Task :buildSrc:processResources NO-SOURCE +> Task :buildSrc:classes UP-TO-DATE +> Task :buildSrc:jar UP-TO-DATE +> Task :jmlx-native-macos-arm64:compileJava UP-TO-DATE +> Task :jmlx-native-macos-arm64:processResources NO-SOURCE +> Task :jmlx-native-macos-arm64:classes UP-TO-DATE +> Task :jmlx-native-macos-arm64:checkstyleMain UP-TO-DATE +> Task :jmlx-native-macos-arm64:compileTestJava NO-SOURCE +> Task :jmlx-native-macos-arm64:processTestResources NO-SOURCE +> Task :jmlx-native-macos-arm64:testClasses UP-TO-DATE +> Task :jmlx-native-macos-arm64:checkstyleTest NO-SOURCE +> Task :jmlx-native-macos-arm64:spotlessJava UP-TO-DATE +> Task :jmlx-native-macos-arm64:spotlessJavaCheck UP-TO-DATE +> Task :jmlx-native-macos-arm64:spotlessCheck UP-TO-DATE +> Task :jmlx-native-macos-arm64:stageNativeResources UP-TO-DATE +> Task :jmlx-native-macos-arm64:jar +> Task :jmlx-native-macos-arm64:javadoc UP-TO-DATE +> Task :jmlx-native-macos-arm64:javadocJar +> Task :jmlx-native-macos-arm64:sourcesJar +> Task :jmlx-native-macos-arm64:test NO-SOURCE +> Task :jmlx-native-macos-arm64:verifyPackagedNativeResources +> Task :jmlx-native-macos-arm64:verifyReleaseScriptsMatch UP-TO-DATE +> Task :jmlx-native-macos-arm64:check + +> Task :jmlx-native-macos-arm64:verifyNativeReleasePayload +{ + "pins": { + "mlxMetalVersion": "0.32.4", + "mlxcCommit": "a26f2d584a14ec619ae8db9a09be03becd47598a" + }, + "supportedMinimum": [ + 27, + 2, + 0 + ], + "deploymentTarget": [ + 26, + 2, + 0 + ], + "files": { + "libmlxc.dylib": { + "sha256": "15a08b85d40333093a38043d0545f9ff6d12ab532e58e7c1af067a23c93a238d", + "size": 2364080, + "minos": [ + 26, + 2, + 0 + ], + "sdk": [ + 27, + 2, + 0 + ] + }, + "libmlx.dylib": { + "sha256": "d8c9393d584e781393c3effccfccd8ba85ad0c70264edaf9f897dca9875375c6", + "size": 21720704, + "minos": [ + 26, + 2, + 0 + ], + "sdk": [ + 26, + 5, + 0 + ], + "upstreamPathAllowlist": [ + "/Users/runner/work/mlx/mlx/build/temp.macosx-11.0-arm64-cpython-310/mlx.core/mlx/backend/metal/kernels//mlx.metallib" + ] + }, + "libjaccl.dylib": { + "sha256": "7890e84a96e3121c8c1c2f351e41e46ba4d92e7b7bc6275fc2b38c2773891032", + "size": 2131168, + "minos": [ + 26, + 2, + 0 + ], + "sdk": [ + 26, + 5, + 0 + ] + }, + "mlx.metallib": { + "sha256": "c6d7a3facb83568f6e4cb2cf4a8c736ee29302571a48343cb9a3a4d1cd3e3893", + "size": 214156448 + }, + "native-pin.properties": { + "sha256": "9fbdc2f67202c57a6e86adbae8f3ab318c89cbbc222df34c197aedf14f5739b7", + "size": 75 + } + } +} + +> Task :jmlx-native-macos-arm64:generatePomFileForMavenPublication + +BUILD SUCCESSFUL in 3s +15 actionable tasks: 6 executed, 9 up-to-date diff --git a/req/plans/evidence/native-license-audit-2026-11-16/review-release-selftests.log b/req/plans/evidence/native-license-audit-2026-11-16/review-release-selftests.log new file mode 100644 index 00000000..a4446170 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/review-release-selftests.log @@ -0,0 +1,77 @@ +test_main_checks_environment_before_consumer_or_output_creation (test_bundle_smoke.BundleSmokeTest.test_main_checks_environment_before_consumer_or_output_creation) ... ok +test_main_explains_that_legacy_preliminary_records_must_be_regenerated (test_bundle_smoke.BundleSmokeTest.test_main_explains_that_legacy_preliminary_records_must_be_regenerated) ... ok +test_minimum_host_accepts_patch_releases_and_rejects_other_minor_versions (test_bundle_smoke.BundleSmokeTest.test_minimum_host_accepts_patch_releases_and_rejects_other_minor_versions) ... ok +test_minimum_host_requires_physical_arm64_and_complete_identity (test_bundle_smoke.BundleSmokeTest.test_minimum_host_requires_physical_arm64_and_complete_identity) ... ok +test_other_macos_reports_require_at_least_supported_minor (test_bundle_smoke.BundleSmokeTest.test_other_macos_reports_require_at_least_supported_minor) ... ok +test_task_outcomes_and_configuration_cache_reuse (test_collector.CollectorTest.test_task_outcomes_and_configuration_cache_reuse) ... ok +test_class_and_documentation_changes_survive (test_compare_publications.ComparePublicationsTest.test_class_and_documentation_changes_survive) ... ok +test_cli_require_equal_writes_report_and_returns_verdict (test_compare_publications.ComparePublicationsTest.test_cli_require_equal_writes_report_and_returns_verdict) ... ok +test_dependency_and_gradle_provenance_changes_survive_normalization (test_compare_publications.ComparePublicationsTest.test_dependency_and_gradle_provenance_changes_survive_normalization) ... ok +test_duplicate_archive_entries_are_rejected (test_compare_publications.ComparePublicationsTest.test_duplicate_archive_entries_are_rejected) ... ok +test_expected_set_requires_all_five_files_per_module (test_compare_publications.ComparePublicationsTest.test_expected_set_requires_all_five_files_per_module) ... ok +test_extra_artifact_is_rejected (test_compare_publications.ComparePublicationsTest.test_extra_artifact_is_rejected) ... ok +test_missing_artifact_is_rejected (test_compare_publications.ComparePublicationsTest.test_missing_artifact_is_rejected) ... ok +test_missing_metadata_fields_have_context (test_compare_publications.ComparePublicationsTest.test_missing_metadata_fields_have_context) ... ok +test_nested_artifact_record_is_rejected (test_compare_publications.ComparePublicationsTest.test_nested_artifact_record_is_rejected) ... ok +test_normalization_never_deflates_even_for_deflated_inputs (test_compare_publications.ComparePublicationsTest.test_normalization_never_deflates_even_for_deflated_inputs) ... ok +test_only_archive_order_timestamps_and_matching_metadata_hashes_are_normalized (test_compare_publications.ComparePublicationsTest.test_only_archive_order_timestamps_and_matching_metadata_hashes_are_normalized) ... ok +test_pom_and_module_formatting_differences_survive (test_compare_publications.ComparePublicationsTest.test_pom_and_module_formatting_differences_survive) ... ok +test_publications_shape_is_validated (test_compare_publications.ComparePublicationsTest.test_publications_shape_is_validated) ... ok +test_stale_metadata_cannot_be_blessed_by_recomputed_hashes (test_compare_publications.ComparePublicationsTest.test_stale_metadata_cannot_be_blessed_by_recomputed_hashes) ... ok +test_unexpected_url_record_is_rejected (test_compare_publications.ComparePublicationsTest.test_unexpected_url_record_is_rejected) ... ok +test_wrong_checksum_is_rejected_even_when_size_matches (test_compare_publications.ComparePublicationsTest.test_wrong_checksum_is_rejected_even_when_size_matches) ... ok +test_zip_metadata_differences_survive (test_compare_publications.ComparePublicationsTest.test_zip_metadata_differences_survive) ... ok +test_actual_plugin_bundle_replacement_is_rejected_even_if_receipt_copy_is_verified (test_final_receipt.FinalReceiptTest.test_actual_plugin_bundle_replacement_is_rejected_even_if_receipt_copy_is_verified) ... ok +test_all_macos_acceptance_reports_require_supported_os (test_final_receipt.FinalReceiptTest.test_all_macos_acceptance_reports_require_supported_os) ... ok +test_cached_task_cannot_claim_passed (test_final_receipt.FinalReceiptTest.test_cached_task_cannot_claim_passed) ... ok +test_final_valid_and_preliminary_rejected (test_final_receipt.FinalReceiptTest.test_final_valid_and_preliminary_rejected) ... ok +test_minimum_host_requires_supported_minor_and_accepts_patch_releases (test_final_receipt.FinalReceiptTest.test_minimum_host_requires_supported_minor_and_accepts_patch_releases) ... ok +test_missing_reports_changed_plan_and_logs_block_upload (test_final_receipt.FinalReceiptTest.test_missing_reports_changed_plan_and_logs_block_upload) ... ok +test_plugin_digests_are_reviewed_record_anchors_after_full_verification (test_final_receipt.FinalReceiptTest.test_plugin_digests_are_reviewed_record_anchors_after_full_verification) ... ok +test_plugin_digests_cli_stdout_contract (test_final_receipt.FinalReceiptTest.test_plugin_digests_cli_stdout_contract) ... ok +test_real_bundle_check_does_not_authorize_a_different_plugin_upload_file (test_final_receipt.FinalReceiptTest.test_real_bundle_check_does_not_authorize_a_different_plugin_upload_file) ... ok +test_receipt_cannot_select_a_different_upload_path (test_final_receipt.FinalReceiptTest.test_receipt_cannot_select_a_different_upload_path) ... ok +test_report_cannot_invent_runtime_properties (test_final_receipt.FinalReceiptTest.test_report_cannot_invent_runtime_properties) ... ok +test_all_three_artifacts_require_every_reviewed_text (test_native_licenses.NativeLicensesTest.test_all_three_artifacts_require_every_reviewed_text) ... ok +test_corrupt_cache_and_changed_wheel_fail (test_native_licenses.NativeLicensesTest.test_corrupt_cache_and_changed_wheel_fail) ... ok +test_distinct_urls_with_shared_digest_are_fetched_independently (test_native_licenses.NativeLicensesTest.test_distinct_urls_with_shared_digest_are_fetched_independently) ... ok +test_fragments_and_line_ranges_must_be_valid_and_in_the_component_section (test_native_licenses.NativeLicensesTest.test_fragments_and_line_ranges_must_be_valid_and_in_the_component_section) ... ok +test_github_rewrite_and_atomic_cache_write_then_read_only_hit (test_native_licenses.NativeLicensesTest.test_github_rewrite_and_atomic_cache_write_then_read_only_hit) ... ok +test_interrupted_cache_replace_leaves_no_partial_entry (test_native_licenses.NativeLicensesTest.test_interrupted_cache_replace_leaves_no_partial_entry) ... ok +test_inventory_cannot_drop_any_required_text (test_native_licenses.NativeLicensesTest.test_inventory_cannot_drop_any_required_text) ... ok +test_native_cli_checks_companion_notices_and_personal_paths (test_native_licenses.NativeLicensesTest.test_native_cli_checks_companion_notices_and_personal_paths) ... ok +test_native_main_missing_reviewed_text_fails_before_payload_parsing (test_native_licenses.NativeLicensesTest.test_native_main_missing_reviewed_text_fails_before_payload_parsing) ... ok +test_non_utf8_locale_reads_notices_as_utf8 (test_native_licenses.NativeLicensesTest.test_non_utf8_locale_reads_notices_as_utf8) ... ok +test_notice_hash_update_cannot_hide_missing_upstream_attribution (test_native_licenses.NativeLicensesTest.test_notice_hash_update_cannot_hide_missing_upstream_attribution) ... ok +test_require_clear_cli_writes_findings_and_exits_nonzero (test_native_licenses.NativeLicensesTest.test_require_clear_cli_writes_findings_and_exits_nonzero) ... ok +test_stack_exchange_body_and_unexpected_responses (test_native_licenses.NativeLicensesTest.test_stack_exchange_body_and_unexpected_responses) ... ok +test_valid_sources_and_texts_do_not_clear_unresolved_findings (test_native_licenses.NativeLicensesTest.test_valid_sources_and_texts_do_not_clear_unresolved_findings) ... ok +test_wheel_member_has_its_own_digest_and_packaged_text_check (test_native_licenses.NativeLicensesTest.test_wheel_member_has_its_own_digest_and_packaged_text_check) ... ok +test_unstaged_local_jar_succeeds_but_combined_publish_fails (test_native_publish.NativePublishTest.test_unstaged_local_jar_succeeds_but_combined_publish_fails) ... ok +test_reviewed_hashes_and_receipt_gate_protect_the_actual_upload (test_plugin_upload.PluginUploadTest.test_reviewed_hashes_and_receipt_gate_protect_the_actual_upload) ... ok +test_bundle_digest_tag_and_path_checks (test_release_inputs.ReleaseInputsTest.test_bundle_digest_tag_and_path_checks) ... ok +test_invalid_manifest_variants (test_release_inputs.ReleaseInputsTest.test_invalid_manifest_variants) ... ok +test_macho_minimum_and_malformed_commands (test_release_inputs.ReleaseInputsTest.test_macho_minimum_and_malformed_commands) ... ok +test_native_target_and_local_paths_are_blocking (test_release_inputs.ReleaseInputsTest.test_native_target_and_local_paths_are_blocking) ... ok +test_notice_wheel_digest_is_checked_against_bootstrap_not_only_its_inventory_hash (test_release_inputs.ReleaseInputsTest.test_notice_wheel_digest_is_checked_against_bootstrap_not_only_its_inventory_hash) ... ok +test_preflight_does_not_probe_until_local_versions_are_valid (test_release_inputs.ReleaseInputsTest.test_preflight_does_not_probe_until_local_versions_are_valid) ... ok +test_selection_and_duplicates (test_release_inputs.ReleaseInputsTest.test_selection_and_duplicates) ... ok +test_archive_filter_requirement_is_reported_before_io (test_reproduce_audit.ReproduceAuditTest.test_archive_filter_requirement_is_reported_before_io) ... ok +test_archive_requires_one_jdk_and_rejects_path_traversal (test_reproduce_audit.ReproduceAuditTest.test_archive_requires_one_jdk_and_rejects_path_traversal) ... ok +test_central_download_hash_is_checked (test_reproduce_audit.ReproduceAuditTest.test_central_download_hash_is_checked) ... ok +test_environment_removes_injection_and_controls_locale (test_reproduce_audit.ReproduceAuditTest.test_environment_removes_injection_and_controls_locale) ... ok +test_every_daemon_and_compiler_javadoc_identity_is_checked (test_reproduce_audit.ReproduceAuditTest.test_every_daemon_and_compiler_javadoc_identity_is_checked) ... ok +test_git_ignores_caller_config_and_environment_injection (test_reproduce_audit.ReproduceAuditTest.test_git_ignores_caller_config_and_environment_injection) ... ok +test_gradle_version_is_checked (test_reproduce_audit.ReproduceAuditTest.test_gradle_version_is_checked) ... ok +test_jdk_archive_is_verified_before_extraction (test_reproduce_audit.ReproduceAuditTest.test_jdk_archive_is_verified_before_extraction) ... ok +test_result_requires_exact_artifacts_and_verdict (test_reproduce_audit.ReproduceAuditTest.test_result_requires_exact_artifacts_and_verdict) ... ok +test_source_assignment_and_missing_source_no_fallback (test_resolution.ResolutionTest.test_source_assignment_and_missing_source_no_fallback) ... ok +test_extraction_failure_cleans_partial_repository (test_runner_cleanup.RunnerCleanupTest.test_extraction_failure_cleans_partial_repository) ... ok +test_clt_only_does_not_require_xcodebuild (test_runtime_evidence.RuntimeEvidenceTest.test_clt_only_does_not_require_xcodebuild) ... ok +test_explicit_java_home_returns_measured_vendor_build_and_path (test_runtime_evidence.RuntimeEvidenceTest.test_explicit_java_home_returns_measured_vendor_build_and_path) ... ok +test_xcodebuild_failure_falls_back_to_clt_metadata (test_runtime_evidence.RuntimeEvidenceTest.test_xcodebuild_failure_falls_back_to_clt_metadata) ... ok + +---------------------------------------------------------------------- +Ran 72 tests in 64.873s + +OK diff --git a/req/plans/evidence/native-license-audit-2026-11-16/review-require-clear.log b/req/plans/evidence/native-license-audit-2026-11-16/review-require-clear.log new file mode 100644 index 00000000..c47c95d4 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/review-require-clear.log @@ -0,0 +1 @@ +native license release gate remains open: NATIVE-LICENSE-1, NATIVE-LICENSE-2 diff --git a/req/plans/evidence/native-license-audit-2026-11-16/review-source-verification.json b/req/plans/evidence/native-license-audit-2026-11-16/review-source-verification.json new file mode 100644 index 00000000..8222bfd1 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/review-source-verification.json @@ -0,0 +1,128 @@ +{ + "schema": 1, + "inventorySha256": "d596ec18ff5e144acb34d429cb83cdfa1f165d0f24e8d3d8bad2ad1d9843d9eb", + "components": [ + { + "component": "MLX and JACCL (MIT)", + "sha256": "ccfab7ccb2ea306f71531c8ca77bb55507606cd90768b1e32b8b52ab5b48cf01" + }, + { + "component": "mlx-c (MIT)", + "sha256": "44326a4ea062241ae6fc26ee2ec90bdc81af7eb7b9d3966181b733fa69d42057" + }, + { + "component": "nlohmann/json 3.11.3 (MIT)", + "sha256": "86b998c792894ccb911a1cb7994f7a9652894e7a094c0b5e45be2f553f45cf14" + }, + { + "component": "fmt 12.1.0 (MIT)", + "sha256": "07580f2a3b35709ce703d523f447b242f6dfec7582a8c0df102c7fa2849375f8" + }, + { + "component": "gguf-tools (MIT)", + "sha256": "7cce16d2bf2e2ce6a7d70b5ecd5fb43c6409a97aa0750ff75c11823e6e8c9d05" + }, + { + "component": "FP16 code referenced by gguf-tools fp16.c (MIT)", + "sha256": "17e4f539024be2749ee729d1e2f01d24cef12ece8c9bf18e91a4349be29c80bf" + }, + { + "component": "pocketfft (BSD-3-Clause)", + "sha256": "0eaea21304bf324639ff11022ee63faf48a8fab64afe5c3c2d1efefbe1d7dfa6" + }, + { + "component": "V8 small_vector adaptation (BSD-3-Clause)", + "sha256": "2fd7d2a423a74b7857ae886ddae0b6c4183f5b9f1d6b8f8d3ba8db38a5ad4677" + }, + { + "component": "ThreadPool modifications in MLX/JACCL (zlib)", + "sha256": "e22e3eb7a2ee0b06b0ea69e8a49375761de9b799dd96b06e7ae9e778d9820667" + }, + { + "component": "Norbert Juffa expm1f (BSD-2-Clause)", + "sha256": "dbdf551f45723639da54d72e327008bde6ef01a2f1ed561bb065e251ab6c9f1a" + }, + { + "component": "NVIDIA/Filipe RNC Maia cexpf adaptation (Apache-2.0)", + "sha256": "88b6e15a52a5800d98d9bc6da840ca5cf70bf572fda136409580c1f17b1e0aab" + }, + { + "component": "nlohmann/json single-header transitive MIT attributions", + "sha256": "9bea4c8066ef4a1c206b2be5a36302f8926f7fdc6087af5d20b417d0cf103ea6" + }, + { + "component": "NumPy einsum adaptation (BSD-3-Clause)", + "sha256": "01fb016849aa427edb1bbbbd55f91c26ca6cadb32a5b20e7f000655dd05b0760" + }, + { + "component": "opt_einsum algorithm attribution (MIT)", + "sha256": "7b26691a7c8ee48af425a53cbaeaabc9aa3a84ea2e93fe47a1ecc550c1de76db" + }, + { + "component": "supervised-lda NumpyFormat adaptation (MIT)", + "sha256": "b50379222802591434ac7a2137ba171b6c7529e9c1bb95eba1c9c9aa55609621" + }, + { + "component": "fastermath exponential adaptation (BSD-3-Clause)", + "sha256": "1d408b5aed22e94947cd8bcb74594b8e0d0287bada919d875fc9a32d2d3cf665" + }, + { + "component": "Julien Pommier NEON math adaptation (zlib)", + "sha256": "e75773addab087ff17c288f1143f45af0a532b1fafe2b550f13e55475a7d05a6" + }, + { + "component": "PyTorch CPU and Metal math adaptations (BSD-3-Clause)", + "sha256": "a8a2c6b67cf8a597ffaa5c82380a6bd1b82629c0417e00673d8013d662eb500a" + }, + { + "component": "TensorFlow cumulative log-sum-exp gradient adaptation (Apache-2.0)", + "sha256": "29ff2b107b055bd5be79647d790d7a6ad89b9363a6bfee15c79c1c08c0b02658" + }, + { + "component": "JAX Threefry algorithm reference (Apache-2.0)", + "sha256": "8d41666e2e2a5ceedfc4848ec38cedf48a38ccab2da004edf3c6095745751470" + }, + { + "component": "Random123 Threefry attribution (BSD-3-Clause)", + "sha256": "5fd0885ab205878bd90c19144677286252eb9b988c1545a3a910edfe1e27b6df" + }, + { + "component": "VkFFT algorithm reference (MIT)", + "sha256": "2bfae14bf46ead0effe63ed36b0d28bcc8846716bfc030d03b146eda7f0bdebd" + }, + { + "component": "CUB merge-sort algorithm reference (BSD-3-Clause)", + "sha256": "2e15eba2e130f3e80d9e91724c7dce3781ce99316324681ff54b00c1fc9759b3" + }, + { + "component": "metal-cpp 26 (Apache-2.0)", + "sha256": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2" + }, + { + "component": "Cephes math provenance (upstream permission statement; review open)", + "sha256": "82004ae6ed8feb08fd16783b6b32e82adfe047f60cb2f238dbf5d4bf9dae42a2" + }, + { + "component": "PyTorch Metal hypot license variant (BSD-3-Clause)", + "sha256": "bd018feef8825e88181c84eb7e3aa4eafb8f08a20d9fd6ef948569610c4a3e43" + } + ], + "sourceEvidenceCount": 34, + "sourceUrlDigestPairs": 57, + "packagedTexts": { + "LICENSE-APACHE-2.0": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2", + "THIRD-PARTY-NOTICES": "ef25c942cd907e22c0177d1726facffca4be894f848e31e92464e5d80ffaadda", + "NOTICE": "3d162cd4a141174798a138dd851970047df54127d1f286f93190e5e2aa09cfdf", + "LICENSE": "f44fd6beb3ec3205e3efb85d1582c273402a43fe4cc613834d8a8151fd5ce4a9" + }, + "checkedJars": [ + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar" + ], + "releaseReady": false, + "unresolvedFindings": [ + "NATIVE-LICENSE-1", + "NATIVE-LICENSE-2" + ] +} diff --git a/req/plans/evidence/native-license-audit-2026-11-16/source-verification.json b/req/plans/evidence/native-license-audit-2026-11-16/source-verification.json new file mode 100644 index 00000000..e4cca242 --- /dev/null +++ b/req/plans/evidence/native-license-audit-2026-11-16/source-verification.json @@ -0,0 +1,127 @@ +{ + "schema": 1, + "inventorySha256": "a1e07bf84f51bf2d7010b13b78a4079cb20f082aa9e4b685f9acc2cc01a0e78f", + "components": [ + { + "component": "MLX and JACCL (MIT)", + "sha256": "ccfab7ccb2ea306f71531c8ca77bb55507606cd90768b1e32b8b52ab5b48cf01" + }, + { + "component": "mlx-c (MIT)", + "sha256": "44326a4ea062241ae6fc26ee2ec90bdc81af7eb7b9d3966181b733fa69d42057" + }, + { + "component": "nlohmann/json 3.11.3 (MIT)", + "sha256": "86b998c792894ccb911a1cb7994f7a9652894e7a094c0b5e45be2f553f45cf14" + }, + { + "component": "fmt 12.1.0 (MIT)", + "sha256": "07580f2a3b35709ce703d523f447b242f6dfec7582a8c0df102c7fa2849375f8" + }, + { + "component": "gguf-tools (MIT)", + "sha256": "7cce16d2bf2e2ce6a7d70b5ecd5fb43c6409a97aa0750ff75c11823e6e8c9d05" + }, + { + "component": "FP16 code referenced by gguf-tools fp16.c (MIT)", + "sha256": "17e4f539024be2749ee729d1e2f01d24cef12ece8c9bf18e91a4349be29c80bf" + }, + { + "component": "pocketfft (BSD-3-Clause)", + "sha256": "0eaea21304bf324639ff11022ee63faf48a8fab64afe5c3c2d1efefbe1d7dfa6" + }, + { + "component": "V8 small_vector adaptation (BSD-3-Clause)", + "sha256": "2fd7d2a423a74b7857ae886ddae0b6c4183f5b9f1d6b8f8d3ba8db38a5ad4677" + }, + { + "component": "ThreadPool modifications in MLX/JACCL (zlib)", + "sha256": "e22e3eb7a2ee0b06b0ea69e8a49375761de9b799dd96b06e7ae9e778d9820667" + }, + { + "component": "Norbert Juffa expm1f (BSD-2-Clause)", + "sha256": "dbdf551f45723639da54d72e327008bde6ef01a2f1ed561bb065e251ab6c9f1a" + }, + { + "component": "NVIDIA/Filipe RNC Maia cexpf adaptation (Apache-2.0)", + "sha256": "88b6e15a52a5800d98d9bc6da840ca5cf70bf572fda136409580c1f17b1e0aab" + }, + { + "component": "nlohmann/json single-header transitive MIT attributions", + "sha256": "9bea4c8066ef4a1c206b2be5a36302f8926f7fdc6087af5d20b417d0cf103ea6" + }, + { + "component": "NumPy einsum adaptation (BSD-3-Clause)", + "sha256": "01fb016849aa427edb1bbbbd55f91c26ca6cadb32a5b20e7f000655dd05b0760" + }, + { + "component": "opt_einsum algorithm attribution (MIT)", + "sha256": "7b26691a7c8ee48af425a53cbaeaabc9aa3a84ea2e93fe47a1ecc550c1de76db" + }, + { + "component": "supervised-lda NumpyFormat adaptation (MIT)", + "sha256": "b50379222802591434ac7a2137ba171b6c7529e9c1bb95eba1c9c9aa55609621" + }, + { + "component": "fastermath exponential adaptation (BSD-3-Clause)", + "sha256": "1d408b5aed22e94947cd8bcb74594b8e0d0287bada919d875fc9a32d2d3cf665" + }, + { + "component": "Julien Pommier NEON math adaptation (zlib)", + "sha256": "e75773addab087ff17c288f1143f45af0a532b1fafe2b550f13e55475a7d05a6" + }, + { + "component": "PyTorch CPU and Metal math adaptations (BSD-3-Clause)", + "sha256": "a8a2c6b67cf8a597ffaa5c82380a6bd1b82629c0417e00673d8013d662eb500a" + }, + { + "component": "TensorFlow cumulative log-sum-exp gradient adaptation (Apache-2.0)", + "sha256": "29ff2b107b055bd5be79647d790d7a6ad89b9363a6bfee15c79c1c08c0b02658" + }, + { + "component": "JAX Threefry algorithm reference (Apache-2.0)", + "sha256": "8d41666e2e2a5ceedfc4848ec38cedf48a38ccab2da004edf3c6095745751470" + }, + { + "component": "Random123 Threefry attribution (BSD-3-Clause)", + "sha256": "5fd0885ab205878bd90c19144677286252eb9b988c1545a3a910edfe1e27b6df" + }, + { + "component": "VkFFT algorithm reference (MIT)", + "sha256": "2bfae14bf46ead0effe63ed36b0d28bcc8846716bfc030d03b146eda7f0bdebd" + }, + { + "component": "CUB merge-sort algorithm reference (BSD-3-Clause)", + "sha256": "2e15eba2e130f3e80d9e91724c7dce3781ce99316324681ff54b00c1fc9759b3" + }, + { + "component": "metal-cpp 26 (Apache-2.0)", + "sha256": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2" + }, + { + "component": "Cephes math provenance (upstream permission statement; review open)", + "sha256": "82004ae6ed8feb08fd16783b6b32e82adfe047f60cb2f238dbf5d4bf9dae42a2" + }, + { + "component": "PyTorch Metal hypot license variant (BSD-3-Clause)", + "sha256": "bd018feef8825e88181c84eb7e3aa4eafb8f08a20d9fd6ef948569610c4a3e43" + } + ], + "sourceEvidenceCount": 34, + "packagedTexts": { + "LICENSE-APACHE-2.0": "f4e92c7fe2aa066e294c0da9d08683dc9fb741ee6e6debbfad99a0c96e07c1f2", + "THIRD-PARTY-NOTICES": "163204e769e4db89cb29aaffb4ef125839f298ae71372ee1591df3a2fe5c7ba6", + "NOTICE": "3d162cd4a141174798a138dd851970047df54127d1f286f93190e5e2aa09cfdf", + "LICENSE": "f44fd6beb3ec3205e3efb85d1582c273402a43fe4cc613834d8a8151fd5ce4a9" + }, + "checkedJars": [ + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-sources.jar", + "jmlx-native-macos-arm64-0.1.0-SNAPSHOT-javadoc.jar" + ], + "releaseReady": false, + "unresolvedFindings": [ + "NATIVE-LICENSE-1", + "NATIVE-LICENSE-2" + ] +} diff --git a/tools/release-all/README.md b/tools/release-all/README.md index 0f9e4079..9b9ad489 100644 --- a/tools/release-all/README.md +++ b/tools/release-all/README.md @@ -124,6 +124,15 @@ compatibility. `release_inputs.py native --bootstrap scripts/bootstrap-native.sh` checks ARM64 Mach-O `LC_BUILD_VERSION`, native pins, personal path leaks and exact legal text digests. Only the known pinned upstream MLX path is allowlisted; upstream binaries remain unchanged. +`--documentation-jar ` also checks every reviewed notice in a companion artifact; +it scans companion entries for the supplied `--forbid` prefixes as well. +The main JAR's other entries receive the same scan; its five native payload entries retain +the separate binary/path verifier and pinned upstream MLX exception. +`:jmlx-native-macos-arm64:verifyNativeReleasePayload` checks main, sources and Javadoc jars. +The [native license audit](../../req/phase8-4-native-license-audit.md) records the source +inventory, reproduction command and unresolved provenance findings. Its +`audit_native_licenses.py` check supports `--require-clear`; source/notice consistency alone +does not close the license release gate. The native publication's unconditional unstaged guard also applies to combined staging. The Portal upload documentation states a 1 GB archive limit; account-level publishing limits diff --git a/tools/release-all/audit_native_licenses.py b/tools/release-all/audit_native_licenses.py new file mode 100644 index 00000000..f210850d --- /dev/null +++ b/tools/release-all/audit_native_licenses.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python3 +"""Recheck pinned native license sources and packaged notices; no build or upload.""" + +import argparse +import hashlib +import json +import os +import re +import tempfile +import urllib.request +import zipfile +from pathlib import Path + +from release_inputs import native_notice_report, read_json, sha256, validate_native_legal_inventory + +NOTICE_SEPARATOR = "======== JMLX NATIVE NOTICE SECTION ========" + + +def normalized(text): + """Ignore line-end whitespace when matching a license excerpt, preserving its words.""" + return "\n".join(line.rstrip() for line in text.splitlines()).strip() + + +def cache_path(entry, cache): + return cache / (hashlib.sha256(entry["source"].encode("utf-8")).hexdigest() + + "-" + entry["sha256"]) + + +def source_bytes(entry, cache, wheel): + fetched = False + if "archiveMember" in entry: + with zipfile.ZipFile(wheel) as archive: + data = archive.read(entry["archiveMember"]) + else: + cached = cache_path(entry, cache) + if cached.is_file(): + data = cached.read_bytes() + else: + url = entry["source"].replace("https://github.com/", "https://raw.githubusercontent.com/") + url = url.replace("/blob/", "/", 1) + with urllib.request.urlopen(url, timeout=45) as response: + data = response.read() + if entry.get("jsonBody"): + try: + document = json.loads(data) + except ValueError as error: + raise ValueError(f"unexpected Stack Exchange response: {entry['source']}") from error + items = document.get("items") if isinstance(document, dict) else None + if (not isinstance(items, list) or len(items) != 1 + or not isinstance(items[0], dict) or not isinstance(items[0].get("body"), str) + or "error_id" in document): + raise ValueError(f"unexpected Stack Exchange response: {entry['source']}") + data = items[0]["body"].encode("utf-8") + fetched = True + if hashlib.sha256(data).hexdigest() != entry["sha256"]: + raise ValueError(f"source digest differs: {entry['source']}") + if fetched: + cache.mkdir(parents=True, exist_ok=True) + temporary = None + try: + with tempfile.NamedTemporaryFile(dir=cache, suffix=".tmp", delete=False) as stream: + temporary = Path(stream.name) + stream.write(data) + os.replace(temporary, cached) + finally: + if temporary is not None: + temporary.unlink(missing_ok=True) + return data + + +def notice_sections(text): + sections = {} + for section in re.split(r"^" + re.escape(NOTICE_SEPARATOR) + r"[ \t]*$", text, flags=re.M): + lines = section.strip().splitlines() + if lines: + title = lines[0] + if title in sections: + raise ValueError(f"duplicate native notice section: {title}") + sections[title] = "\n".join(lines[1:]) + return sections + + +def check_attribution(entry, text, texts): + name = entry.get("packagedAs", "THIRD-PARTY-NOTICES") + if not isinstance(name, str) or name not in texts: + raise ValueError(f"unknown packaged text for {entry['component']}: {name}") + target = texts[name] + if name == "THIRD-PARTY-NOTICES": + sections = notice_sections(target) + if entry["component"] not in sections: + raise ValueError(f"missing native notice section: {entry['component']}") + target = sections[entry["component"]] + if "noticeFragments" in entry: + fragments = entry["noticeFragments"] + if not isinstance(fragments, list) or not all(isinstance(item, str) for item in fragments): + raise ValueError(f"invalid notice fragments: {entry['component']}") + elif "noticeLines" in entry: + bounds = entry["noticeLines"] + lines = text.splitlines() + if (not isinstance(bounds, list) or len(bounds) != 2 + or not all(type(value) is int for value in bounds) + or not 1 <= bounds[0] <= bounds[1] <= len(lines)): + raise ValueError(f"invalid notice line range: {entry['component']}") + fragments = ["\n".join(lines[bounds[0] - 1:bounds[1]])] + else: + fragments = [text] + if not fragments or any(not normalized(fragment) or normalized(fragment) not in normalized(text) + or normalized(fragment) not in normalized(target) for fragment in fragments): + raise ValueError(f"upstream attribution missing from packaged text: {entry['component']}") + + +def verify(root, wheel, cache, jars=()): + inventory = read_json(root / "req/native-license-inventory.json") + validate_native_legal_inventory(inventory) + audit = read_json(root / "req/phase8-4-native-license-audit.json") + if sha256(wheel) != inventory["wheelSha256"]: + raise ValueError("wheel digest differs from reviewed inventory") + legal = root / "jmlx-native-macos-arm64" + texts = {} + for name, digest in inventory["packagedTexts"].items(): + if sha256(legal / name) != digest: + raise ValueError(f"packaged notice source differs: {name}") + texts[name] = (legal / name).read_text(encoding="utf-8") + checked = [] + for entry in inventory["components"]: + text = source_bytes(entry, cache, wheel).decode("utf-8") + check_attribution(entry, text, texts) + checked.append({"component": entry["component"], "sha256": entry["sha256"]}) + for entry in audit["sourceEvidence"]: + source_bytes(entry, cache, wheel) + for jar in jars: + native_notice_report(jar, inventory) + return {"schema": 1, "inventorySha256": sha256(root / "req/native-license-inventory.json"), + "components": checked, "sourceEvidenceCount": len(audit["sourceEvidence"]), + "sourceUrlDigestPairs": len({(entry["source"], entry["sha256"]) + for entry in inventory["components"] + audit["sourceEvidence"] + if "archiveMember" not in entry}), + "packagedTexts": inventory["packagedTexts"], "checkedJars": [jar.name for jar in jars], + "releaseReady": not audit["unresolvedFindings"], + "unresolvedFindings": [entry["id"] for entry in audit["unresolvedFindings"]]} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--root", type=Path, default=Path(__file__).resolve().parents[2]) + parser.add_argument("--wheel", type=Path, required=True) + parser.add_argument("--cache", type=Path, required=True) + parser.add_argument("--jar", type=Path, action="append", default=[]) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--require-clear", action="store_true") + args = parser.parse_args() + result = verify(args.root, args.wheel, args.cache, args.jar) + args.output.write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8") + if args.require_clear and not result["releaseReady"]: + raise SystemExit("native license release gate remains open: " + ", ".join(result["unresolvedFindings"])) + + +if __name__ == "__main__": + try: + main() + except (ValueError, OSError, KeyError, zipfile.BadZipFile) as error: + raise SystemExit(f"native license audit: {error}") from error diff --git a/tools/release-all/release_inputs.py b/tools/release-all/release_inputs.py index d593e031..5d72156a 100644 --- a/tools/release-all/release_inputs.py +++ b/tools/release-all/release_inputs.py @@ -33,6 +33,7 @@ PURE = set(list(MODULE_KEYS)[:3]) NATIVE_FILES = ("libmlxc.dylib", "libmlx.dylib", "libjaccl.dylib", "mlx.metallib", "native-pin.properties") +REQUIRED_NATIVE_LEGAL_TEXTS = {"LICENSE", "NOTICE", "LICENSE-APACHE-2.0", "THIRD-PARTY-NOTICES"} UPSTREAM_PATH = (b"/Users/runner/work/mlx/mlx/build/temp.macosx-11.0-arm64-cpython-310/" b"mlx.core/mlx/backend/metal/kernels//mlx.metallib") UPSTREAM_MLX_HASH = "d8c9393d584e781393c3effccfccd8ba85ad0c70264edaf9f897dca9875375c6" @@ -207,7 +208,43 @@ def verify_smoke_environment(kind, env, supported_minimum, run_id=None): raise ValueError(error) +def validate_native_legal_inventory(inventory): + texts = inventory.get("packagedTexts") + if not isinstance(texts, dict) or not REQUIRED_NATIVE_LEGAL_TEXTS <= texts.keys(): + raise ValueError("native license inventory lacks required packaged texts") + + +def native_notice_report(jar, inventory, forbidden=(), *, skip_native_payload=False): + """Check reviewed legal texts in either the runtime or documentation artifact.""" + validate_native_legal_inventory(inventory) + with zipfile.ZipFile(jar) as archive: + names = archive.namelist() + if len(names) != len(set(names)): + raise ValueError(f"duplicate jar entries: {jar}") + result = {} + for name, digest in inventory["packagedTexts"].items(): + entry = "META-INF/" + name + if entry not in names: + raise ValueError(f"{jar}: missing native legal text: {name}") + data = archive.read(entry) + if not data.strip() or hashlib.sha256(data).hexdigest() != digest: + raise ValueError(f"{jar}: native legal text differs from reviewed inventory: {name}") + result[name] = digest + for entry in archive.infolist(): + if skip_native_payload and entry.filename in { + "se/alipsa/jmlx/native/macos-aarch64/" + name for name in NATIVE_FILES}: + # native_report checks these bytes separately, including the pinned MLX exception. + continue + if not entry.is_dir() and forbidden: + data = archive.read(entry) + if any(prefix and prefix.encode("utf-8") in data for prefix in forbidden): + raise ValueError(f"{jar}: personal path leaked in {entry.filename}") + return result + + def native_jar_report(jar, bootstrap, forbidden): + inventory = read_json(Path(bootstrap).resolve().parents[1] / "req/native-license-inventory.json") + native_notice_report(jar, inventory, forbidden, skip_native_payload=True) with tempfile.TemporaryDirectory(prefix="jmlx-native-verify-") as temp: with zipfile.ZipFile(jar) as archive: names = archive.namelist() @@ -216,14 +253,7 @@ def native_jar_report(jar, bootstrap, forbidden): for name in NATIVE_FILES: data = archive.read("se/alipsa/jmlx/native/macos-aarch64/" + name) (Path(temp) / name).write_bytes(data) - for name in ("META-INF/LICENSE", "META-INF/NOTICE", "META-INF/LICENSE-APACHE-2.0"): - if not archive.read(name).strip(): - raise ValueError(f"missing native legal text: {name}") - inventory = read_json(Path(bootstrap).resolve().parents[1] / "req/native-license-inventory.json") notice = archive.read("META-INF/NOTICE").decode("utf-8") - for name, digest in inventory["packagedTexts"].items(): - if hashlib.sha256(archive.read("META-INF/" + name)).hexdigest() != digest: - raise ValueError(f"native legal text differs from reviewed inventory: {name}") report = native_report(temp, bootstrap, forbidden) if inventory.get("nativePins") != report["pins"]: raise ValueError("native license inventory targets different upstream pins") @@ -345,6 +375,7 @@ def main(): native.add_argument("directory", type=Path) native.add_argument("--bootstrap", type=Path, required=True) native.add_argument("--forbid", action="append", default=[]) + native.add_argument("--documentation-jar", type=Path, action="append", default=[]) bundle = sub.add_parser("bundle") bundle.add_argument("bundle", type=Path) bundle.add_argument("--record", type=Path, required=True) @@ -367,7 +398,12 @@ def main(): archive.extractall(args.extract) else: verify = native_jar_report if args.directory.suffix == ".jar" else native_report - print(json.dumps(verify(args.directory, args.bootstrap, args.forbid), indent=2)) + report = verify(args.directory, args.bootstrap, args.forbid) + if args.documentation_jar: + inventory = read_json(args.bootstrap.resolve().parents[1] / "req/native-license-inventory.json") + for jar in args.documentation_jar: + native_notice_report(jar, inventory, args.forbid) + print(json.dumps(report, indent=2)) if __name__ == "__main__": diff --git a/tools/release-all/tests/test_native_licenses.py b/tools/release-all/tests/test_native_licenses.py new file mode 100644 index 00000000..a3b7ab4a --- /dev/null +++ b/tools/release-all/tests/test_native_licenses.py @@ -0,0 +1,298 @@ +"""Native license evidence rejects stale sources and incomplete companion artifacts.""" + +import hashlib +import io +import json +import os +import subprocess +import sys +import tempfile +import unittest +import zipfile +from pathlib import Path +from contextlib import redirect_stdout +from unittest.mock import patch + +sys.path.insert(0, str(Path(__file__).parents[1])) +import audit_native_licenses as A +import release_inputs as R + + +class NativeLicensesTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + self.cache = self.root / "cache" + self.cache.mkdir() + (self.root / "req").mkdir() + self.legal = self.root / "jmlx-native-macos-arm64" + self.legal.mkdir() + self.source = "Copyright © Björn\nPermission and disclaimer\n".encode("utf-8") + self.digest = hashlib.sha256(self.source).hexdigest() + self.wheel = self.root / "wheel.whl" + with zipfile.ZipFile(self.wheel, "w") as archive: + archive.writestr("license.txt", self.source) + self.inventory = {"wheelSha256": R.sha256(self.wheel), "components": [ + {"component": "example", "source": "https://example.invalid/license", + "sha256": self.digest}], "packagedTexts": {}} + self.cached = A.cache_path(self.inventory["components"][0], self.cache) + self.cached.write_bytes(self.source) + for name in ("LICENSE", "NOTICE", "LICENSE-APACHE-2.0", "THIRD-PARTY-NOTICES"): + data = (b"example\n" + self.source if name == "THIRD-PARTY-NOTICES" else self.source) + (self.legal / name).write_bytes(data) + self.inventory["packagedTexts"][name] = hashlib.sha256(data).hexdigest() + self.audit = {"sourceEvidence": [], "unresolvedFindings": [{"id": "open-license"}]} + self.save() + + def save(self): + (self.root / "req/native-license-inventory.json").write_text(json.dumps(self.inventory)) + (self.root / "req/phase8-4-native-license-audit.json").write_text(json.dumps(self.audit)) + + def verify(self, jars=()): + return A.verify(self.root, self.wheel, self.cache, jars) + + def test_valid_sources_and_texts_do_not_clear_unresolved_findings(self): + result = self.verify() + self.assertFalse(result["releaseReady"]) + self.assertEqual(result["unresolvedFindings"], ["open-license"]) + self.audit["unresolvedFindings"] = [] + self.save() + self.assertTrue(self.verify()["releaseReady"]) + + def test_corrupt_cache_and_changed_wheel_fail(self): + self.cached.write_bytes(b"unreviewed") + with self.assertRaisesRegex(ValueError, "source digest differs"): + self.verify() + self.cached.write_bytes(self.source) + self.wheel.write_bytes(b"unreviewed wheel") + with self.assertRaisesRegex(ValueError, "wheel digest differs"): + self.verify() + + def test_notice_hash_update_cannot_hide_missing_upstream_attribution(self): + (self.legal / "THIRD-PARTY-NOTICES").write_bytes(b"example\ndifferent attribution") + self.inventory["packagedTexts"]["THIRD-PARTY-NOTICES"] = R.sha256( + self.legal / "THIRD-PARTY-NOTICES") + self.save() + with self.assertRaisesRegex(ValueError, "upstream attribution missing"): + self.verify() + + def test_wheel_member_has_its_own_digest_and_packaged_text_check(self): + self.inventory["components"][0].update(archiveMember="license.txt", packagedAs="LICENSE") + self.save() + self.verify() + self.inventory["components"][0]["sha256"] = "0" * 64 + self.save() + with self.assertRaisesRegex(ValueError, "source digest differs"): + self.verify() + + def test_all_three_artifacts_require_every_reviewed_text(self): + jars = [self.root / f"native{suffix}.jar" for suffix in ("", "-sources", "-javadoc")] + def write_jar(jar, omitted=None, changed=None): + with zipfile.ZipFile(jar, "w") as archive: + for name in self.inventory["packagedTexts"]: + if name != omitted: + archive.writestr("META-INF/" + name, + b"different" if name == changed else (self.legal / name).read_bytes()) + for jar in jars: + write_jar(jar) + self.assertEqual(len(self.verify(jars)["checkedJars"]), 3) + for jar in jars: + for name in self.inventory["packagedTexts"]: + with self.subTest(jar=jar.name, text=name): + write_jar(jar, omitted=name) + with self.assertRaisesRegex(ValueError, "missing native legal text"): + self.verify(jars) + write_jar(jar, changed=name) + with self.assertRaisesRegex(ValueError, "legal text differs"): + self.verify(jars) + write_jar(jar) + + def test_require_clear_cli_writes_findings_and_exits_nonzero(self): + output = self.root / "result.json" + args = ["audit_native_licenses.py", "--root", str(self.root), "--wheel", str(self.wheel), + "--cache", str(self.cache), "--output", str(output), "--require-clear"] + with patch.object(sys, "argv", args), self.assertRaisesRegex(SystemExit, "open-license"): + A.main() + self.assertFalse(json.loads(output.read_text())["releaseReady"]) + + def test_non_utf8_locale_reads_notices_as_utf8(self): + output = self.root / "locale-result.json" + result = subprocess.run( + [sys.executable, str(Path(A.__file__)), "--root", str(self.root), + "--wheel", str(self.wheel), "--cache", str(self.cache), "--output", str(output)], + env=dict(os.environ, LC_ALL="en_US.ISO8859-1", PYTHONUTF8="0", PYTHONCOERCECLOCALE="0"), + capture_output=True, timeout=15) + self.assertEqual(result.returncode, 0, result.stderr.decode("utf-8", errors="replace")) + self.assertFalse(json.loads(output.read_bytes())["releaseReady"]) + + def test_distinct_urls_with_shared_digest_are_fetched_independently(self): + first = dict(self.inventory["components"][0], source="https://example.invalid/first") + second = dict(first, source="https://example.invalid/second") + with patch.object(A.urllib.request, "urlopen", side_effect=[io.BytesIO(self.source), + io.BytesIO(self.source)]) as fetch: + A.source_bytes(first, self.cache, self.wheel) + A.source_bytes(second, self.cache, self.wheel) + self.assertEqual([call.args[0] for call in fetch.call_args_list], [first["source"], second["source"]]) + self.assertNotEqual(A.cache_path(first, self.cache), A.cache_path(second, self.cache)) + third = dict(first, source="https://example.invalid/wrong-digest") + with patch.object(A.urllib.request, "urlopen", return_value=io.BytesIO(b"wrong")): + with self.assertRaisesRegex(ValueError, "source digest differs"): + A.source_bytes(third, self.cache, self.wheel) + self.assertFalse(A.cache_path(third, self.cache).exists()) + + def test_github_rewrite_and_atomic_cache_write_then_read_only_hit(self): + entry = dict(self.inventory["components"][0], + source="https://github.com/owner/repo/blob/revision/path/blob/LICENSE") + with patch.object(A.urllib.request, "urlopen", return_value=io.BytesIO(self.source)) as fetch: + with patch.object(A.os, "replace", wraps=os.replace) as replace: + self.assertEqual(A.source_bytes(entry, self.cache, self.wheel), self.source) + fetch.assert_called_once_with( + "https://raw.githubusercontent.com/owner/repo/revision/path/blob/LICENSE", timeout=45) + self.assertEqual(replace.call_count, 1) + self.assertEqual(replace.call_args.args[1], A.cache_path(entry, self.cache)) + self.assertEqual(list(self.cache.glob("*.tmp")), []) + with patch.object(A.urllib.request, "urlopen", side_effect=AssertionError("unexpected fetch")): + with patch.object(A.os, "replace", side_effect=AssertionError("unexpected write")): + with patch.object(Path, "write_bytes", side_effect=AssertionError("unexpected rewrite")): + self.assertEqual(A.source_bytes(entry, self.cache, self.wheel), self.source) + + def test_interrupted_cache_replace_leaves_no_partial_entry(self): + entry = dict(self.inventory["components"][0], source="https://example.invalid/interrupted") + with patch.object(A.urllib.request, "urlopen", return_value=io.BytesIO(self.source)): + with patch.object(A.os, "replace", side_effect=OSError("interrupted")): + with self.assertRaisesRegex(OSError, "interrupted"): + A.source_bytes(entry, self.cache, self.wheel) + self.assertFalse(A.cache_path(entry, self.cache).exists()) + self.assertEqual(list(self.cache.glob("*.tmp")), []) + + def test_stack_exchange_body_and_unexpected_responses(self): + entry = dict(self.inventory["components"][0], source="https://example.invalid/answer", jsonBody=True) + response = json.dumps({"items": [{"body": self.source.decode("utf-8")}]}).encode() + with patch.object(A.urllib.request, "urlopen", return_value=io.BytesIO(response)): + self.assertEqual(A.source_bytes(entry, self.cache, self.wheel), self.source) + A.cache_path(entry, self.cache).unlink() + for document in ({"items": []}, {"error_id": 502}, {"items": [{}]}, {"items": [None]}, + {"items": [{"body": None}]}, [], {"items": "wrong"}): + with self.subTest(document=document): + with patch.object(A.urllib.request, "urlopen", + return_value=io.BytesIO(json.dumps(document).encode())): + with self.assertRaisesRegex(ValueError, "unexpected Stack Exchange response: https://"): + A.source_bytes(entry, self.cache, self.wheel) + with patch.object(A.urllib.request, "urlopen", return_value=io.BytesIO(b"not JSON")): + with self.assertRaisesRegex(ValueError, "unexpected Stack Exchange response"): + A.source_bytes(entry, self.cache, self.wheel) + + def test_fragments_and_line_ranges_must_be_valid_and_in_the_component_section(self): + entry = self.inventory["components"][0] + text = self.source.decode("utf-8") + texts = {"THIRD-PARTY-NOTICES": "example\n" + text} + A.check_attribution(dict(entry, noticeLines=[1, 1]), text, texts) + A.check_attribution(dict(entry, noticeFragments=text.splitlines()), text, texts) + for bounds in ([2, 1], [0, 1], [1, 3], [], [1], [True, 2], "1,2"): + with self.subTest(bounds=bounds), self.assertRaisesRegex(ValueError, "invalid notice line range"): + A.check_attribution(dict(entry, noticeLines=bounds), text, texts) + for fragments in ([], [""], [" \n"], [1], "Copyright"): + with self.subTest(fragments=fragments), self.assertRaises(ValueError): + A.check_attribution(dict(entry, noticeFragments=fragments), text, texts) + for target in ("missing", None, [], 1): + with self.subTest(target=target), self.assertRaisesRegex(ValueError, "unknown packaged text"): + A.check_attribution(dict(entry, packagedAs=target), text, texts) + misplaced = {"THIRD-PARTY-NOTICES": "example\nother text\n" + A.NOTICE_SEPARATOR + + "\nother component\n" + text} + for selectors in ({}, {"noticeLines": [1, 1]}, {"noticeFragments": text.splitlines()}): + with self.subTest(selectors=selectors), self.assertRaisesRegex(ValueError, "upstream attribution missing"): + A.check_attribution(dict(entry, **selectors), text, misplaced) + + def test_inventory_cannot_drop_any_required_text(self): + jar = self.root / "missing.jar" + for name in R.REQUIRED_NATIVE_LEGAL_TEXTS: + inventory = dict(self.inventory, packagedTexts=dict(self.inventory["packagedTexts"])) + del inventory["packagedTexts"][name] + with self.subTest(name=name), self.assertRaisesRegex(ValueError, "inventory lacks required"): + R.native_notice_report(jar, inventory) + + def test_license_equals_rules_remain_inside_the_component_section(self): + text = "Copyright\n========\nPermission\n" + "=" * 72 + "\nDisclaimer\n" + target = "example\n" + text + A.NOTICE_SEPARATOR + "\nother component\nother text\n" + self.assertEqual(A.notice_sections(target)["example"], text.rstrip()) + A.check_attribution(self.inventory["components"][0], text, + {"THIRD-PARTY-NOTICES": target}) + + def test_main_jar_scans_other_entries_but_keeps_native_payload_validation_separate(self): + scripts = self.root / "scripts" + scripts.mkdir() + bootstrap = scripts / "bootstrap-native.sh" + wheel_hash = self.inventory["wheelSha256"] + pins = {"mlxMetalVersion": "0.32.4", "mlxcCommit": "a" * 40} + bootstrap.write_text('MLX_METAL_WHEEL_SHA256="' + wheel_hash + '"\n') + self.inventory["nativePins"] = pins + (self.legal / "NOTICE").write_text(" ".join((*pins.values(), wheel_hash)), encoding="utf-8") + self.inventory["packagedTexts"]["NOTICE"] = R.sha256(self.legal / "NOTICE") + self.save() + jar = self.root / "native.jar" + prefix = "se/alipsa/jmlx/native/macos-aarch64/" + def write_jar(leak=None): + with zipfile.ZipFile(jar, "w") as archive: + for name in self.inventory["packagedTexts"]: + archive.writestr("META-INF/" + name, (self.legal / name).read_bytes()) + for name in R.NATIVE_FILES: + archive.writestr(prefix + name, R.UPSTREAM_PATH if name == "libmlx.dylib" else b"payload") + if leak: + archive.writestr(leak, b"/Users/runner/private/source") + with patch.object(R, "native_report", return_value={"pins": pins}) as payload_check: + write_jar() + R.native_jar_report(jar, bootstrap, ["/Users/runner"]) + self.assertEqual(payload_check.call_args.args[2], ["/Users/runner"]) + payload_check.reset_mock() + for entry in ("META-INF/MANIFEST.MF", "META-INF/debug.txt", "api/example.class", + prefix + "unexpected.txt"): + with self.subTest(entry=entry): + write_jar(entry) + with self.assertRaisesRegex(ValueError, "personal path leaked in " + entry): + R.native_jar_report(jar, bootstrap, ["/Users/runner"]) + payload_check.assert_not_called() + + def test_native_main_missing_reviewed_text_fails_before_payload_parsing(self): + scripts = self.root / "scripts" + scripts.mkdir() + jar = self.root / "native.jar" + with zipfile.ZipFile(jar, "w") as archive: + for name in self.inventory["packagedTexts"]: + if name != "NOTICE": + archive.writestr("META-INF/" + name, (self.legal / name).read_bytes()) + with self.assertRaisesRegex(ValueError, "missing native legal text: NOTICE"): + R.native_jar_report(jar, scripts / "bootstrap-native.sh", []) + + def test_native_cli_checks_companion_notices_and_personal_paths(self): + scripts = self.root / "scripts" + scripts.mkdir() + jars = [self.root / f"native-{name}.jar" for name in ("sources", "javadoc")] + def write_jar(jar, omit=False, leak=False): + with zipfile.ZipFile(jar, "w") as archive: + for name in self.inventory["packagedTexts"]: + if not omit or name != "NOTICE": + archive.writestr("META-INF/" + name, (self.legal / name).read_bytes()) + archive.writestr("api/example.html", b"/Users/release/private/source" if leak else b"API") + for jar in jars: + write_jar(jar) + args = ["release_inputs.py", "native", str(self.root / "native.jar"), "--bootstrap", + str(scripts / "bootstrap-native.sh"), "--forbid", "/Users/release"] + for jar in jars: + args += ["--documentation-jar", str(jar)] + with patch.object(sys, "argv", args), patch.object(R, "native_jar_report", return_value={}): + with redirect_stdout(io.StringIO()): + R.main() + for jar in jars: + with self.subTest(jar=jar.name): + write_jar(jar, omit=True) + with self.assertRaisesRegex(ValueError, "missing native legal text: NOTICE"): + R.main() + write_jar(jar, leak=True) + with self.assertRaisesRegex(ValueError, "personal path leaked in api/example.html"): + R.main() + write_jar(jar) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/release-all/tests/test_release_inputs.py b/tools/release-all/tests/test_release_inputs.py index a05af408..8201152e 100644 --- a/tools/release-all/tests/test_release_inputs.py +++ b/tools/release-all/tests/test_release_inputs.py @@ -162,7 +162,7 @@ def test_notice_wheel_digest_is_checked_against_bootstrap_not_only_its_inventory wheel_hash = "e"*64 bootstrap.write_text('MLX_METAL_WHEEL_SHA256="' + wheel_hash + '"\n') pins = {"mlxMetalVersion": "0.32.4", "mlxcCommit": "a"*40} - legal = {"LICENSE": b"MIT", "LICENSE-APACHE-2.0": b"Apache-2.0", + legal = {"LICENSE": b"MIT", "LICENSE-APACHE-2.0": b"Apache-2.0", "THIRD-PARTY-NOTICES": b"dependencies", "NOTICE": ("0.32.4 " + "a"*40 + " " + wheel_hash).encode()} inventory_file = root / "req/native-license-inventory.json" inventory_file.parent.mkdir()