Skip to content

Drop the REUSE.toml annotation that duplicates LibCodeGen.sol's own header - #130

Merged
thedavidmeister merged 4 commits into
mainfrom
2026-08-16-issue-85
Aug 17, 2026
Merged

Drop the REUSE.toml annotation that duplicates LibCodeGen.sol's own header#130
thedavidmeister merged 4 commits into
mainfrom
2026-08-16-issue-85

Conversation

@thedavidmeister

@thedavidmeisterthedavidmeister commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Closes#85

src/lib/LibCodeGen.sol heads itself with the same two SPDX lines every other
file under src/lib carries, and was also listed among the REUSE.toml paths
that cannot carry a header. reuse lint is satisfied by either copy, so the
annotation was a second statement of the same fact, held in a different file
from the one it describes and free to drift from it. The header is the copy
that travels with the file into a published package, so the annotation is the
copy that goes — which is what the issue proposed.

The whole diff against main is now that one deleted line.

Nothing guards this — it can regress silently

This change can regress silently, and no test in this repo guards it.
Putting src/lib/LibCodeGen.sol — or any other self-heading file — back into
REUSE.toml's annotated path list tomorrow reds nothing: reuse lint in
rainix / legal passes with the annotation and passes without it, which is
exactly why the duplication was invisible in the first place. The property that
would catch it — no path REUSE.toml annotates resolves to a file that licenses
itself — is a repo-wide static check, and its home is
rainlanguage/rainix#317, not a Solidity test in this
repo.

That check was previously carried here as test/lint/ReuseAnnotations.t.sol
(264 lines). It is deleted, along with the { access = "read", path = "." }
grant it needed. foundry.toml is back to main's three-entry fs_permissions
block byte for byte, including the { access = "read", path = "foundry.toml" }
line the repo-root grant had replaced. 8 of its 9 test functions asserted on its
own path-resolution and SPDX-scanning helpers rather than on anything in src/,
and reuse lint passed either way.

Why it was there in the first place

The fixer brief driving this fleet of PRs said "every fix ships a test,
verify-by-hand is never acceptable", with no exemption for changes that have no
behaviour. That was wrong and is corrected. It produced hand-rolled static
analysis in Solidity across nine PRs, this one among them.

QA

origin/main (b422d97) is merged into this
branch — merged, not rebased, and not force-pushed.

  • nix develop -c forge test: Ran 18 test suites in 2.13s (19.87s CPU time): 142 tests passed, 0 failed, 0 skipped (142 total tests).
  • Test count drop: the same merge commit before the strip ran
    19 test suites … 151 tests passed, 0 failed, 0 skipped. 151 − 142 = 9,
    exactly the nine test* functions of the deleted file, and one suite.
  • nix develop -c forge fmt --check: clean, exit 0.
  • nix develop -c reuse lint (what rainix / legal runs), on this branch:
    Invalid SPDX License Expressions: 0, Files with copyright information: 49 / 49, Files with license information: 49 / 49, compliant with REUSE 3.3.
    Compliance therefore does not depend on the deleted annotation.

Not touched

claudeand others added 2 commits August 16, 2026 18:47
src/lib/LibCodeGen.sol heads itself with SPDX-FileCopyrightText and a licence
identifier, the same as every other file under src/lib, and was additionally
listed among the REUSE.toml paths that cannot carry a header. The header is the
copy that travels with the file into a published package, so the annotation is
the copy that goes.
test/lint/ReuseAnnotations.t.sol holds the property that made the entry
redundant: no path REUSE.toml annotates resolves to a file that licenses
itself. Recursive globs are expanded to the files below them, an
unresolvable glob form is refused rather than passed unchecked, and a tag
inside a REUSE-IgnoreStart region is not read as licensing information.
The suite reads the paths REUSE.toml names, which is the whole project, so
fs_permissions grants a project wide read that subsumes the foundry.toml entry.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thedavidmeisterthedavidmeister self-assigned this Aug 16, 2026
@coderabbitai

coderabbitaiBot commented Aug 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@thedavidmeister, you've reached your PR review limit, so we couldn't start this review.

Next review available in:1 minute

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4229856d-403d-4e4f-8590-09f7238e9716

📥 Commits

Reviewing files that changed from the base of the PR and between b422d97 and 9c07027.

📒 Files selected for processing (1)
  • REUSE.toml

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

Comment @coderabbitai help to get the list of available commands.

thedavidmeisterand others added 2 commits August 16, 2026 19:20
The lint is rehomed to rainlanguage/rainix#317. `foundry.toml` returns to
`main`'s three-entry `fs_permissions` block, including the
`{ access = "read", path = "foundry.toml" }` line the lint's grant replaced.
The `REUSE.toml` deletion this PR exists for is unchanged and is now
unguarded by any test in this repo.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thedavidmeister
thedavidmeister merged commit ed08953 into mainAug 17, 2026
5 checks passed
Sign up for freeto 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.

REUSE.toml redundantly annotates src/lib/LibCodeGen.sol, which already carries its own SPDX header

2 participants

@thedavidmeister@claude