Repository navigation
Require the Apache 2.0 notice in every source file - #8
Merged
Merged
Conversation
Add scripts/check_source_headers.py, shared byte for byte with the other packdb-oss repositories, and run it from the checks gate (and so from the candidate release validation). It classifies every tracked file: Rust, Python and shell sources must open with the established notice, other types must be declared non-source, and exceptions need provenance and a reason and fail when stale. docs/SOURCE_HEADERS.md records the policy and the update procedure. Refs packdb-oss/packdb-sdk#15
aaraujo
commented
Oct 1, 2026
aaraujo
left a comment
Contributor
Author
There was a problem hiding this comment.
Maintainer self-review
@aaraujo has reviewed and explicitly approved this Apache 2.0 source-header enforcement change. This records the maintainer's confirmation after the merge, as required by the interim single-maintainer policy.
Merged commit: 7d8ef96ad99755a3d1af504541f4c87f584c7e52. The approval covers the source-header checker, its required CI integration, policy documentation, and the applicable source-header corrections in this PR.
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enforces the Apache 2.0 source notice described in packdb-oss/packdb-sdk#15. One of four PRs (packdb-sdk, packdb-cli, logql-parser, traceql-parser) carrying the same checker and policy document.
What changes
scripts/check_source_headers.py(checker version 1) is byte-identical in all four repositories. It classifies every tracked file:.rs,.py,.sh,.bash, and extensionless scripts identified by their shebang) must open with the notice: aCopyright <year> PackDb Contributorsline (PackDBalso accepted), thenLicensed under the Apache License, Version 2.0. The notice goes after any shebang and before Rust//!docs. The full Apache boilerplate is accepted.LICENSE,CODEOWNERS,.gitignore) are not checked.scripts/source_header_exceptions.txtlists exceptions aspath<TAB>provenance<TAB>reason. It starts empty. An exception that is malformed, a duplicate, or stale (the file is untracked, not source, or now carries the notice) fails.scripts/oss-ci.sh checksruns the checker. That makes it part of the requiredoss-ci / checksjob and of the candidate release validation, which runschecksin full. Dependency license auditing stays incargo deny.docs/SOURCE_HEADERS.mddocuments the policy, scope, exceptions, the local command and the procedure for updating the shared checker.CONTRIBUTING.mdanddocs/WORKFLOWS.mdpoint to it.Controls
//!doc, a reversed order, or a foreign copyright holder;.ts, a node shebang,.bin);OSS_CHECK_SCOPE=full scripts/oss-ci.sh checksexit 1 at the header step in all four repositories.Existing omissions fixed:
scripts/check_action_pins.pyandscripts/gitleaks-version.sh(the short form used by the sibling scripts, inserted after the shebang; file modes unchanged).