Skip to content

Require license and copyright trailers on commits - #185

Merged
ChrisRackauckas merged 3 commits into
mainfrom
sk/license-trailers
Nov 6, 2026
Merged

ChrisRackauckas merged 3 commits into
mainfrom
sk/license-trailers

Conversation

@StefanKarpinski

@StefanKarpinski StefanKarpinski commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #184.

Changes

  • Limit the MIT grant. LICENSE-MIT previously covered all "code derived from ModelingToolkit.jl and Modia.jl", which could be read as including changes made here after the 2025-12-01 AGPL relicensing. It now covers only pre-relicensing code and upstream code in the form it had in those projects. CONTRIBUTING.md (root and lib/ModelingToolkitTearing) and the README are updated to match.
  • State AGPL-3.0-only in CONTRIBUTING.md and the README, and add a Purpose section that spells out the intent of the licensing arrangement.
  • Require commit trailers. Every commit carries either
    License: AGPL-3.0-only
    Copyright: JuliaHub, Inc.
    
    (JuliaHub contributors) or License: Apache-2.0 (external contributors). CONTRIBUTING.md defines the Copyright: trailer as confirming JuliaHub ownership and, where needed, a present assignment, with an exclusive-license and moral-rights fallback where assignment is not effective.
  • AGENTS.md (plus a CLAUDE.md that imports it) tells coding agents how to choose and format the trailers, based on a JULIAHUB_CONTRIBUTOR environment variable that the human sets. Agents ask when it is unset, treat AI co-authors as tools rather than contributors, and add no session trailers.
  • CI check (.github/workflows/LicenseTrailers.yml, .github/scripts/check-license-trailers.sh) verifies the trailers on every non-merge commit in a PR and in each push to main. It can be run locally: .github/scripts/check-license-trailers.sh origin/main..HEAD.

Notes for merging

  • Please merge with a merge commit or rebase, not squash. A squash merge combines the commit messages, so the trailers may not end up in the last paragraph where git reads them. The push-to-main run of the new check would then fail on the squashed commit. Add CONTRIBUTING.md: external contributions under Apache 2.0 #184 was squash-merged, so its commit on main has no trailers. That's fine because the check only looks at newly added commits.
  • To enforce the check, make "Check commit license trailers" a required status check for main.

Co-author

These patches were written interactively with Claude Code.

https://claude.ai/code/session_01LiCFDWitwipscmKfADxBhb

StefanKarpinski and others added 3 commits November 6, 2026 09:54
The MIT notice previously covered all "code derived from
ModelingToolkit.jl and Modia.jl", which could be read as including
changes made in this repository after the 2025-12-01 AGPL relicensing.
Narrow it to code as it existed in those upstream projects, and state
explicitly that changes made here on or after that date are not covered.
Apply the same wording to both CONTRIBUTING.md files and the README.

License: AGPL-3.0-only
Copyright: JuliaHub, Inc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- CONTRIBUTING.md (root and lib/ModelingToolkitTearing): state that the
  project is AGPL-3.0-only, add a Purpose section spelling out the intent
  of the licensing arrangement, and require a License: trailer on every
  commit. JuliaHub contributors also add Copyright: JuliaHub, Inc., which
  is defined as a confirmation of JuliaHub ownership and, where needed, a
  present assignment of copyright, with an exclusive-license and
  moral-rights fallback for jurisdictions where assignment is ineffective.
- AGENTS.md: rules for coding agents to choose and format the trailers,
  driven by the JULIAHUB_CONTRIBUTOR environment variable, asking the user
  when it is unset and never inferring it.
- CLAUDE.md: import AGENTS.md so Claude Code picks up the same rules.
- README: say AGPL-3.0 only.

License: AGPL-3.0-only
Copyright: JuliaHub, Inc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a workflow that checks every non-merge commit in a pull request (and
in each push to main) for one of the two trailer sets required by
CONTRIBUTING.md: License: AGPL-3.0-only with Copyright: JuliaHub, Inc.,
or License: Apache-2.0 alone. The check runs a script that can also be
run locally, and is mentioned in both CONTRIBUTING.md files and in
AGENTS.md.

License: AGPL-3.0-only
Copyright: JuliaHub, Inc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ChrisRackauckas
ChrisRackauckas merged commit 4ac2e1f into main Nov 6, 2026
9 of 10 checks passed
@ChrisRackauckas
ChrisRackauckas deleted the sk/license-trailers branch November 6, 2026 15:38
@StefanKarpinski

Copy link
Copy Markdown
Member Author

Please merge with a merge commit or rebase, not squash.

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.

2 participants