diff --git a/crates/controller-py/src/lib.rs b/crates/controller-py/src/lib.rs index b1909ceb..7b0e48b9 100644 --- a/crates/controller-py/src/lib.rs +++ b/crates/controller-py/src/lib.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/engine.rs b/crates/controller/src/engine.rs index f429d7d0..f2db3426 100644 --- a/crates/controller/src/engine.rs +++ b/crates/controller/src/engine.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/lib.rs b/crates/controller/src/lib.rs index 73c92e52..837c287e 100644 --- a/crates/controller/src/lib.rs +++ b/crates/controller/src/lib.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/log.rs b/crates/controller/src/log.rs index a76369da..52bbfea8 100644 --- a/crates/controller/src/log.rs +++ b/crates/controller/src/log.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/state.rs b/crates/controller/src/state.rs index 0389950f..8b8fe2e0 100644 --- a/crates/controller/src/state.rs +++ b/crates/controller/src/state.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/state/checkpoint.rs b/crates/controller/src/state/checkpoint.rs index 8964230c..0863c4de 100644 --- a/crates/controller/src/state/checkpoint.rs +++ b/crates/controller/src/state/checkpoint.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/state/kv.rs b/crates/controller/src/state/kv.rs index cfe2fea0..d0431609 100644 --- a/crates/controller/src/state/kv.rs +++ b/crates/controller/src/state/kv.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/state/links.rs b/crates/controller/src/state/links.rs index cb4015ad..19659d6c 100644 --- a/crates/controller/src/state/links.rs +++ b/crates/controller/src/state/links.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/state/metrics.rs b/crates/controller/src/state/metrics.rs index ab566827..269c5b59 100644 --- a/crates/controller/src/state/metrics.rs +++ b/crates/controller/src/state/metrics.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/transport.rs b/crates/controller/src/transport.rs index 49a2041a..a64e5865 100644 --- a/crates/controller/src/transport.rs +++ b/crates/controller/src/transport.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/crates/controller/src/wire.rs b/crates/controller/src/wire.rs index 705c65f3..b3f0e632 100644 --- a/crates/controller/src/wire.rs +++ b/crates/controller/src/wire.rs @@ -1,3 +1,4 @@ +// Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. // Copyright 2026 The TransferQueue Team // SPDX-License-Identifier: Apache-2.0 diff --git a/tests/sanity/check_license.py b/tests/sanity/check_license.py index ae32a9e1..03636d8d 100644 --- a/tests/sanity/check_license.py +++ b/tests/sanity/check_license.py @@ -1,4 +1,5 @@ # Copyright 2024 Bytedance Ltd. and/or its affiliates +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,8 +20,15 @@ from collections.abc import Iterable from pathlib import Path -LICENSE_HEADER_RE = re.compile( - r"Copyright \d{4}(?:-\d{4})? (?:Huawei Technologies Co\., Ltd\. All Rights Reserved\.|The TransferQueue Team)" +REQUIRED_COPYRIGHT_PATTERNS = ( + ( + "Huawei Technologies Co., Ltd.", + re.compile(r"Copyright \d{4}(?:-\d{4})? Huawei Technologies Co\., Ltd\. All Rights Reserved\."), + ), + ( + "The TransferQueue Team", + re.compile(r"Copyright \d{4}(?:-\d{4})? The TransferQueue Team"), + ), ) SUPPORTED_SUFFIXES = {".py", ".rs"} IGNORED_DIRS = { @@ -69,4 +77,5 @@ def get_source_files(path_arg: Path) -> Iterable[Path]: path_in_str = str(path) print(path_in_str) header_text = "\n".join(path.read_text(encoding="utf-8").splitlines()[:20]) - assert LICENSE_HEADER_RE.search(header_text), f"file {path_in_str} does not contain license" + missing = [owner for owner, pattern in REQUIRED_COPYRIGHT_PATTERNS if not pattern.search(header_text)] + assert not missing, f"file {path_in_str} is missing copyright header(s) for: {', '.join(missing)}" diff --git a/tests/test_mooncake_bootstrap.py b/tests/test_mooncake_bootstrap.py index d4dee8c1..6d9a1add 100644 --- a/tests/test_mooncake_bootstrap.py +++ b/tests/test_mooncake_bootstrap.py @@ -1,3 +1,4 @@ +# Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2026 The TransferQueue Team # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/test_mooncake_buffer_pool.py b/tests/test_mooncake_buffer_pool.py index 400360ac..ff78c995 100644 --- a/tests/test_mooncake_buffer_pool.py +++ b/tests/test_mooncake_buffer_pool.py @@ -1,3 +1,4 @@ +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/test_mooncake_client_thread_context.py b/tests/test_mooncake_client_thread_context.py index 01ce3808..87c4d5c8 100644 --- a/tests/test_mooncake_client_thread_context.py +++ b/tests/test_mooncake_client_thread_context.py @@ -1,3 +1,4 @@ +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/test_mooncake_utils.py b/tests/test_mooncake_utils.py index 42cbcd68..f2a8e211 100644 --- a/tests/test_mooncake_utils.py +++ b/tests/test_mooncake_utils.py @@ -1,3 +1,4 @@ +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/test_rust_controller.py b/tests/test_rust_controller.py index c4924b30..33cb3935 100644 --- a/tests/test_rust_controller.py +++ b/tests/test_rust_controller.py @@ -1,3 +1,4 @@ +# Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2026 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/test_simple_storage_scheduling.py b/tests/test_simple_storage_scheduling.py index 09c61ad7..cfbe0645 100644 --- a/tests/test_simple_storage_scheduling.py +++ b/tests/test_simple_storage_scheduling.py @@ -1,3 +1,4 @@ +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/transfer_queue/rust_controller.py b/transfer_queue/rust_controller.py index 82c06e73..9c57b890 100644 --- a/transfer_queue/rust_controller.py +++ b/transfer_queue/rust_controller.py @@ -1,3 +1,4 @@ +# Copyright 2026 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2026 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/transfer_queue/utils/mooncake_utils.py b/transfer_queue/utils/mooncake_utils.py index 822c977f..8aaa5680 100644 --- a/transfer_queue/utils/mooncake_utils.py +++ b/transfer_queue/utils/mooncake_utils.py @@ -1,3 +1,4 @@ +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tutorial/07_shared_fields.py b/tutorial/07_shared_fields.py index 0a5c9e7e..9f47a0e9 100644 --- a/tutorial/07_shared_fields.py +++ b/tutorial/07_shared_fields.py @@ -1,3 +1,4 @@ +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tutorial/08_data_parser.py b/tutorial/08_data_parser.py index 6a01916b..8da61729 100644 --- a/tutorial/08_data_parser.py +++ b/tutorial/08_data_parser.py @@ -1,3 +1,4 @@ +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tutorial/09_data_dump.py b/tutorial/09_data_dump.py index 44ff0b6e..0ed1e050 100644 --- a/tutorial/09_data_dump.py +++ b/tutorial/09_data_dump.py @@ -1,3 +1,4 @@ +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tutorial/10_kv_locks.py b/tutorial/10_kv_locks.py index eaa6cf7f..b0947779 100644 --- a/tutorial/10_kv_locks.py +++ b/tutorial/10_kv_locks.py @@ -1,3 +1,4 @@ +# Copyright 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # Copyright 2025 The TransferQueue Team # # Licensed under the Apache License, Version 2.0 (the "License");