Skip to content

chore(build): insert_apache_header.py skips benches/, leaving audio_fft.rs unlicensed #1707

Closed

Description

@agatha197

Summary

The Apache-header insertion script skips the benches/ root, so the repo's one benchmark source file ships without a license header. It is the only Rust file under a top-level source root missing it.

Background

insert_apache_header.py walks a fixed list of source roots that omits benches/, so benches/audio_fft.rs was never given a header. This is a licensing gap on a committed source file.

Proposed Solution

Add "benches" to TARGET_ROOTS, run the script to insert the header, and extend the Python test by one assertion.

Implementation Notes

  • scripts/insert_apache_header.py:20 (confirmed): TARGET_ROOTS = ("src", "examples", "tests"); benches/ is the only top-level Rust source root not listed.
  • benches/audio_fft.rs:1 (confirmed): starts at use std::f64::consts::PI; with no header; registered at Cargo.toml:358-360 ([[bench]] audio_fft).
  • tests/test_insert_apache_header.py:21-27 asserts should_process_path per root, so the assertion shape to extend already exists.
  • Verifiable locally with no Rust toolchain.

Acceptance Criteria

  • benches/audio_fft.rs carries the standard header.
  • The script and its test cover benches/.

Original Suggestion

Title: chore(build): insert_apache_header.py skips benches/, leaving audio_fft.rs unlicensed

The Apache-header insertion script skips the benches/ root, so the repo's one benchmark source file ships without a license header — the only Rust file under a top-level source root missing it.

Evidence

  • scripts/insert_apache_header.py:20 — TARGET_ROOTS = ("src", "examples", "tests"); benches/ is the only top-level Rust source root not listed
  • benches/audio_fft.rs:1 — starts at use std::f64::consts::PI;, no header; registered at Cargo.toml:358-360 ([[bench]] audio_fft)
  • tests/test_insert_apache_header.py:21-27 — asserts should_process_path per root, so the assertion shape to extend already exists

Suggested fix

Add "benches" to TARGET_ROOTS, run the script to insert the header, and extend the Python test by one line. Verifiable locally with no Rust toolchain.

Acceptance criteria

  • benches/audio_fft.rs carries the standard header
  • The script and its test cover benches/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions