Skip to content

chore(license): state GPL-3.0-or-later in every file and manifest - #12

Merged
Pasithea0 merged 1 commit into
mainfrom
chore/licensing
Nov 10, 2026
Merged

Pasithea0 merged 1 commit into
mainfrom
chore/licensing

Conversation

@Pasithea0

@Pasithea0 Pasithea0 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Why

The intent for this repo is GPL-3.0-or-later, but nothing in it said so: LICENSE
is the plain FSF GPL-3 text, no source file carried an identifier. Or-later is only
worth anything if it is written down while the contribution is being made — it is what
lets the project adopt a future GPL version without hunting down every contributor for a
re-grant, and right now a downstream author copying a file, or reading the sidebar, cannot
tell whether GPLv4 is permitted.

What the PR does

File Change
LICENSE Left byte-identical to the FSF text — see the note below on why the notice is not prepended here.
79 source files (77 .go, scripts/live-e2e.sh, scripts/update-homebrew-formula.py) SPDX identifier plus a copyright line.
README.md A License section naming the identifier (GPL-3.0-or-later), carrying the FSF's permission notice (“either version 3 of the License, or (at your option) any later version”), and linking to LICENSE.

No functional change: comments, manifest fields and prose.

LICENSE is deliberately untouched

The obvious move is to prepend that notice to LICENSE itself. I tried exactly that first,
and backed it out on the evidence:

  • GitHub's license detector cannot report GPL-3.0-or-later from a license file. The
    vendored database licensee matches against (choosealicense.com) carries GPL-3.0,
    GPL-2.0, AGPL-3.0, LGPL-* — there is no gpl-3.0-or-later entry, and the file matcher
    returns the matched entry's spdx_id. The package-manifest matcher normalises -or-later
    away (SPDX_SUFFIX_REGEX in matchers/package.rb), so it cannot produce it either. Sampled
    against twelve real GPL projects (obsproject/obs-studio, gnuradio/gnuradio, KDE/krita,
    mpv-player/mpv, blender/blender, qBittorrent/qBittorrent, …): every one reports
    GPL-2.0, GPL-3.0 or NOASSERTION — none report an -or-later id.
  • Augmenting LICENSE makes it strictly worse. With the notice prepended, the branch
    reported NOASSERTION instead of GPL-3.0: the file no longer matches the canonical text
    closely enough, and the repo loses the license it did have.

So the grant is stated where it is both human-visible and machine-readable: the SPDX
identifier on every file (the location the SPDX spec prescribes for a per-file grant), the
manifest field, and the README. LICENSE stays byte-identical to what the FSF ships, so the
sidebar keeps reading GPL-3.0. If you would rather have the notice physically inside
LICENSE and accept the sidebar saying "Other", that is a two-line change — say the word.

Tests

  • go build ./... — clean.
  • go vet ./... — clean.
  • go test -count=1 ./... — every package ok.
  • gofmt -l . — reports internal/tidb/lookup.go on both this branch and main (verified by git stash-ing and re-running), i.e. pre-existing. Not touched.
  • gh api repos/TheIntroDB/plex-sync/license?ref=chore/licensing — GPL-3.0, unchanged from main.

Not in this PR

  • TestLiveLookup — a live smoke test gated on TIDB_LIVE=1; not run, and nothing here can change its result.
  • internal/tidb/lookup.go's pre-existing formatting.
  • Any release/version bump.

Summary by CodeRabbit

  • Documentation
    • Clarified that the project is licensed under GNU GPL v3.0 or later, including the license terms and SPDX identifier.
  • Chores
    • Added consistent license and copyright notices across project files. No application behavior changed.

The intent is or-later, but nothing in the repo said so, so a consumer cannot tell
whether GPLv4 is permitted. The grant only helps if it is made while the
contribution is, while a re-grant would mean writing to every contributor.

- 79 source files (77 `.go`, `scripts/live-e2e.sh`, `scripts/update-homebrew-formula.py`) | SPDX identifier plus a copyright line.

LICENSE is left byte-identical to the FSF text. Prepending the notice above it was
tried first and reverted on evidence: GitHub's detector has no GPL-3.0-or-later entry
to match against (the vendored database only carries GPL-3.0, and the package matcher
strips -or-later), and an augmented LICENSE stops matching the canonical text at all -
the repo went from GPL-3.0 to NOASSERTION. The per-file SPDX identifier, the manifest
field and the README are where the grant is readable.

Verified:
- `go build ./...` — clean.
- `go vet ./...` — clean.
- `go test -count=1 ./...` — every package `ok`.
- `gofmt -l .` — reports `internal/tidb/lookup.go` on **both** this branch and `main` (verified by `git stash`-ing and re-running), i.e. pre-existing. Not touched.
- `gh api repos/TheIntroDB/plex-sync/license?ref=chore/licensing` — `GPL-3.0`, unchanged from `main`.
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The README now describes the project as GPL-3.0-or-later and explains its SPDX identifier and later-version grant. SPDX license identifiers and 2026 copyright notices were added to project source, test, and script files. No executable behavior changed.

Changes: Project licensing notices

Layer / File(s) Summary
Document the license grant
README.md
The README identifies GPL-3.0-or-later and describes the source-file SPDX identifier and later-version grant.
Add source-file license headers
internal/api/*.go, internal/app/*.go, internal/buildinfo/*.go, internal/cli/*.go, internal/config/*.go, internal/httpclient/*.go, internal/ledger/*.go, internal/logging/*.go, internal/model/*.go, internal/planfile/*.go, internal/planner/*.go, internal/plexapi/*.go, internal/plexdb/*.go, internal/schedule/*.go, internal/source/*.go, internal/sync/*.go, internal/tidb/*.go, internal/tui/*.go, main.go, scripts/live-e2e.sh, scripts/update-homebrew-formula.py
The listed source, test, and script files now include SPDX license identifiers and copyright notices.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Minimal · up to 1a8cc

The license notices can merge after normal checks; no concrete functional regression is established.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: adding a GPL-3.0-or-later license statement to every source file and to the manifest. The raw summary confirms SPDX identifiers and copyright lines were added across t…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: adding a GPL-3.0-or-later license statement to every source file and to the manifest. The raw summary confirms SPDX identifiers and copyright lines were added across the files, and the README License section was updated. The title uses the conventional commit prefix 'chore(license)', which is clear and specific. The PR objectives describe the same change, with no functional changes. The title does not mention the LICENSE file or the README section, but those are secondary details.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 50 files. (30 skipped: 1 unsupported, 29 over the file limit.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e61a8e0-53f0-4862-9753-efa7f92da0b4
Commits

Reviewing files that changed from the base of the PR and between a9fa136 and 1a8cc37.

Files selected for processing: 80

  • README.md
  • internal/api/journals.go
  • internal/api/server.go
  • internal/app/app.go
  • internal/app/plexdb_handle_test.go
  • internal/buildinfo/buildinfo.go
  • internal/cli/api.go
  • internal/cli/commands.go
  • internal/cli/config.go
  • internal/cli/markerflag_test.go
  • internal/cli/root.go
  • internal/cli/schedule.go
  • internal/cli/setup.go
  • internal/cli/startstop.go
  • internal/cli/tui.go
  • internal/cli/version.go
  • internal/config/config.go
  • internal/config/config_test.go
  • internal/config/example_test.go
  • internal/config/identity.go
  • internal/config/identity_test.go
  • internal/config/plexpaths.go
  • internal/config/plexpaths_test.go
  • internal/config/save.go
  • internal/config/save_test.go
  • internal/config/schedule_test.go
  • internal/httpclient/client.go
  • internal/ledger/ledger.go
  • internal/ledger/ledger_test.go
  • internal/logging/logging.go
  • internal/model/model.go
  • internal/model/model_test.go
  • internal/planfile/planfile.go
  • internal/planfile/planfile_test.go
  • internal/planner/planner.go
  • internal/planner/planner_test.go
  • internal/plexapi/client.go
  • internal/plexapi/client_test.go
  • internal/plexapi/parse.go
  • internal/plexdb/backup.go
  • internal/plexdb/db.go
  • internal/plexdb/extra.go
  • internal/plexdb/extra_golden_test.go
  • internal/plexdb/fixture_test.go
  • internal/plexdb/fts_probe_test.go
  • internal/plexdb/live_test.go
  • internal/plexdb/markers.go
  • internal/plexdb/markertag_live_test.go
  • internal/plexdb/plexdb_test.go
  • internal/plexdb/settingmarkers.go
  • internal/plexdb/settingmarkers_live_test.go
  • internal/plexdb/showids.go
  • internal/plexdb/showids_test.go
  • internal/plexdb/undo.go
  • internal/schedule/cron.go
  • internal/schedule/cron_test.go
  • internal/source/chapters.go
  • internal/source/detection.go
  • internal/source/source_test.go
  • internal/sync/detection.go
  • internal/sync/setup.go
  • internal/sync/sync.go
  • internal/sync/sync_test.go
  • internal/tidb/client.go
  • internal/tidb/client_test.go
  • internal/tidb/lookup.go
  • internal/tui/header_test.go
  • internal/tui/model.go
  • internal/tui/model_test.go
  • internal/tui/plan_test.go
  • internal/tui/refresh_test.go
  • internal/tui/settings.go
  • internal/tui/settings_edit.go
  • internal/tui/settings_markertag_test.go
  • internal/tui/settings_resolved_test.go
  • internal/tui/settings_test.go
  • internal/tui/view.go
  • main.go
  • scripts/live-e2e.sh
  • scripts/update-homebrew-formula.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@Pasithea0
Pasithea0 merged commit 5d715c3 into main Nov 10, 2026
5 checks passed
@Pasithea0
Pasithea0 deleted the chore/licensing branch November 10, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant