From ca14db9a6a8208b4c655fd3191b13b86fcde0619 Mon Sep 17 00:00:00 2001 From: Prabhsimran Singh Date: Sat, 24 Oct 2026 10:23:28 +0530 Subject: [PATCH] fix(license): list parakeet-derived runtime files explicitly The license check treated every file under src/runtime/ggml/ as derived from parakeet.cpp, so new first-party files there (llama_log_shim.cpp from #47) failed unless they carried a third-party notice that does not apply. List the nine derived files from the initial release in DERIVED_FILES and drop the directory prefix. Fixes #74. Signed-off-by: Prabhsimran Singh --- scripts/check_license_headers.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/check_license_headers.py b/scripts/check_license_headers.py index 12914841..085f9939 100644 --- a/scripts/check_license_headers.py +++ b/scripts/check_license_headers.py @@ -33,12 +33,20 @@ ".ps1", ".cmake", } -DERIVED_PREFIX = "src/runtime/ggml/" DERIVED_FILES = { "src/asr/encoder/fastconformer.cpp", "src/asr/encoder/fastconformer.h", "src/asr/encoder/rel_pos_attention.cpp", "src/asr/encoder/rel_pos_attention.h", + "src/runtime/ggml/CMakeLists.txt", + "src/runtime/ggml/backend.cpp", + "src/runtime/ggml/loader.cpp", + "src/runtime/ggml/logging.cpp", + "src/runtime/ggml/nn.cpp", + "src/runtime/ggml/nn.h", + "src/runtime/ggml/runtime.h", + "src/runtime/ggml/session.cpp", + "src/runtime/ggml/tensor_container.cpp", } @@ -101,7 +109,7 @@ def expected_header(path: Path) -> str: lines = [f"{prefix} {COPYRIGHT}", f"{prefix} {LICENSE}"] path_string = path.as_posix() - if path_string.startswith(DERIVED_PREFIX) or path_string in DERIVED_FILES: + if path_string in DERIVED_FILES: if prefix == "/*": lines.extend( [ @@ -128,7 +136,7 @@ def has_header(path: Path, text: str) -> bool: if COPYRIGHT not in first_lines or LICENSE not in first_lines: return False path_string = path.as_posix() - if path_string.startswith(DERIVED_PREFIX) or path_string in DERIVED_FILES: + if path_string in DERIVED_FILES: return ( "Copyright (c) 2025 Jason Ni" in first_lines and "Licensed under the MIT License" in first_lines