Skip to content

Adopt the CodeMatters copyright - #755

Merged
alexander-yevsyukov merged 5 commits into
masterfrom
apply-code-matters-copyright
Sep 3, 2026
Merged

alexander-yevsyukov merged 5 commits into
masterfrom
apply-code-matters-copyright

Conversation

@alexander-yevsyukov

@alexander-yevsyukov alexander-yevsyukov commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Changes the repository's copyright holder from TeamDev to CodeMatters, Lda., and re-stamps every source header from the new IntelliJ profile.

What changed

The profile. Adds .idea/copyright/CodeMatters_Open_Source.xml and makes it the default in profiles_settings.xml. TeamDev_Open_Source.xml stays: migrate distributes .idea to consumer repositories while preserving each consumer's own profiles_settings.xml, so a repository still on the TeamDev profile must be able to resolve it.

261 source headers, re-stamped from that profile. The notice is the Apache-2.0 appendix boilerplate, verbatim, with https:// in place of the appendix's http:// link.

Two attribution strings baked into build output, which re-stamping headers does not reach:

  • the Dokka footer rendered on every generated API page (DokkaExts.kt)
  • Implementation-Vendor written into each published JAR's manifest (write-manifest.gradle.kts)

migrate's comment explaining why profiles_settings.xml is preserved, which named TeamDev Open-Source as the open-source profile.

For the reviewer

The diff is 264 files, but 259 changed only inside their copyright header block. Verified two independent ways: stripping the header from the base and HEAD versions and comparing the remainder, and diffing everything from */ onward. The real review surface is 5 files — the two profile XMLs, the two string literals above, and migrate's comment.

That matters most for buildSrc/src/main/kotlin/io/spine/dependency/, where 95 files appear in the diff: no version constant, artifact coordinate, or BOM changed. Nothing was silently bumped.

Commits are split so the mechanical re-stamp is separable from the changes that carry meaning.

Decisions taken on review

Notice wrapping stays at 97 characters. That fits the block (​ * prefix -> 100) and hash (# -> 99) comment styles, but the XML style ( ~) reaches 101 against a 100-char limit in buildSrc/quality/checkstyle.xml, checkstyle-suppressions.xml, and pmd.xml. Accepted deliberately: nothing breaks, because detekt does not scan XML, and rewrapping the notice would churn every header in every consumer repo for one character.

The hardcoded copyright holder in shared buildSrc is intentional. Every repository consuming this config is moving to the CodeMatters copyright, so one holder is correct for all consumers. The footer was equally hardcoded before this PR; the value changed, not the mechanism.

Known follow-up, not addressed here

update_copyright.py silently skips 12 tracked files under io/spine/dependency/build/. Its is_excluded() runs any(part in EXCLUDED_DIRS for part in parts), and EXCLUDED_DIRS contains "build" -- so a rule meant for Gradle's output directory also matches a Kotlin source package named build. This repo's .gitignore hits the identical ambiguity and resolves it explicitly (**/build/** followed by !**/src/**/build/**); the script has no such negation. Those 12 files were stamped here through the script's own updated_text(), so their rendering is identical. The fix belongs in the agents repository.

Verification

./gradlew -p buildSrc build passes on JDK 17 at HEAD, against master's current dependency baseline. dokkaGenerate is not registered in buildSrc, so no Dokka run applies. No version gate -- this repository has no root version.gradle.kts.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T16:42:59.593835Z d48d45f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@alexander-yevsyukov alexander-yevsyukov moved this to 🏗 In progress in v2.0 Sep 1, 2026
@alexander-yevsyukov alexander-yevsyukov self-assigned this Sep 1, 2026
alexander-yevsyukov and others added 5 commits September 3, 2026 17:37
The repository's copyright holder changes from TeamDev to CodeMatters, Lda.
Add the `CodeMatters Open-Source` IntelliJ profile, make it the default, and
re-stamp every source header that carried the TeamDev notice.

The profile as first drafted carried `/*`, ` * `, and ` */` inside its
`notice` value. IntelliJ stores a notice as bare text and adds comment
markers per language, so the markers would have been emitted twice in
`.kt` headers and as C-style markers in `.sh`, `.py`, and `.xml` files.
The value is stored bare, matching `TeamDev_Open_Source.xml`. The draft
also lacked `settings/@default`, which is what `update_copyright.py`
reads to resolve the notice; it is restored, and `module2copyright` now
names the same profile so the IDE and the script agree.

Headers were stamped by `update-copyright`. Thirteen files it filters out
were stamped through its own `updated_text()`, so their rendering is
identical: `.gitignore`, which has no extension for `style_for()` to map,
and the twelve files under `io/spine/dependency/build/`, which
`is_excluded()` drops because it tests every path segment against
`EXCLUDED_DIRS` and so mistakes that source package for Gradle's output
directory. That check belongs to the shared `agents` repository and is
left for a fix there.

`TeamDev_Open_Source.xml` stays: `migrate` distributes `.idea` to consumer
repositories while preserving each consumer's own `profiles_settings.xml`,
so repositories still on the TeamDev profile must be able to resolve it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The comment explaining why `profiles_settings.xml` is preserved listed
`TeamDev Open-Source` as the profile open-source repositories keep. That is
now one of two: config distributes `CodeMatters Open-Source` alongside it, so
a consumer can migrate on its own schedule.

Say so, and say why it matters here: with both profiles shipped, this file is
the only thing deciding which notice a consumer's headers get, which is the
reason the preservation fails closed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two attribution strings are baked into build output rather than into source
headers, so re-stamping the headers left them naming TeamDev: the Dokka footer
rendered on every generated API page, and `Implementation-Vendor` written into
each published JAR's manifest.

Point both at CodeMatters, Lda. so the artifacts agree with the sources they
are built from. Already-published JARs keep the old vendor; only builds from
here on carry the new one. `Bundle-License` is untouched — the licence is
unchanged, only the holder.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The comment named `CodeMatters Open-Source` and `TeamDev Open-Source` as the
notice a repository adopts. They are profile names; a profile contains a
notice. The block exists to be precise about which profile applies, so the
two should not be blurred there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The notice reproduced the Apache-2.0 appendix verbatim, including its
`http://` link to the licence text. Serve the reader a secure link instead:
`https://www.apache.org/licenses/LICENSE-2.0`.

Re-stamp every header from the amended profile so the sources and the profile
stay identical. `LICENSE` keeps the upstream text unchanged — it is the
licence itself, not our notice, and is reproduced as published.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@alexander-yevsyukov
alexander-yevsyukov force-pushed the apply-code-matters-copyright branch from 23dee1e to d48d45f Compare September 3, 2026 16:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d48d45f541

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread buildSrc/src/main/kotlin/DokkaExts.kt
@alexander-yevsyukov alexander-yevsyukov moved this from 🏗 In progress to In Review in v2.0 Sep 3, 2026
@alexander-yevsyukov
alexander-yevsyukov merged commit f913d03 into master Sep 3, 2026
2 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the apply-code-matters-copyright branch September 3, 2026 18:20
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants