Skip to content

Remove the submodule-era residue: dead foundry.lock, .gitmodules and lib/ references - #122

Merged
thedavidmeister merged 1 commit into
mainfrom
2026-08-15-remove-submodule-residue
Aug 19, 2026
Merged

Remove the submodule-era residue: dead foundry.lock, .gitmodules and lib/ references#122
thedavidmeister merged 1 commit into
mainfrom
2026-08-15-remove-submodule-residue

Conversation

@thedavidmeister

@thedavidmeisterthedavidmeister commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Closes#121

What

This repo has no git submodules. .gitmodules is absent, there is no lib/ directory, and git ls-files --stage | grep ^160000 returns nothing — zero committed gitlinks. Dependencies come from soldeer: foundry.toml sets libs = ["dependencies"] and soldeer.lock pins the 7 packages that land under dependencies/.

Everything removed here referenced that dead submodule layout.

foundry.lock deleted

foundry.lock is Foundry's git submodule lockfile. All 9 of its pins name lib/ paths that do not exist. Two of them (lib/rain.intorastring, lib/rain.math.float) are for dependencies this repo does not have at all, and two more contradict the live soldeer pins — 1801b054 is forge-std v1.14.0 where soldeer resolves 1.16.1, fcbae539 is openzeppelin-contracts v5.5.0 where soldeer resolves 5.6.1. Nothing reconciles any of it because nothing reads it.

It was not silent. forge build emitted one Dependency '...' not found at expected path warning per entry. Measured in rainix#sol-shell at the pinned CI SHA, in this working tree, restoring the file and building versus deleting it and building:

BASELINE_WARNINGS=9
AFTER_WARNINGS=0

REUSE.toml

Dropped the "foundry.lock", annotation entry. REUSE annotations describe files that exist, so a path that no longer exists is residue. reuse lint is green after the change (80/80 files with copyright and license information).

.soldeerignore

Removed exactly the three submodule-era entries: .gitmodules, /foundry.lock, /lib.

Nothing else was touched. .soldeerignore is a publish filter, not a description of the tree, so entries naming paths absent from a clean checkout (.DS_Store, .vscode, .pre-commit-config.yaml, /out, /cache, /dependencies, /remappings.txt) are forward-looking rules and stay. Every remaining entry was checked for spelling against the tree; all are correct.

CLAUDE.md

The "Dependencies" paragraph asserted git submodules in lib/, listed a dependency set including rain.math.float and rain.intorastring (neither is in soldeer.lock), and claimed a rain.sol.codegen remapping in foundry.toml — which has no remappings key at all; remappings.txt is generated by forge soldeer install. Rewritten to describe the soldeer layout that is actually in use.

Why this cannot regress

rainix CI runs a no-submodules check that fails on a root .gitmodules or any committed gitlink, so submodules cannot come back and these pins can never become live again.

QA

  • Discriminating tests: n/a as new tests — this diff deletes a dead lockfile and two ignore lines and rewrites a docs paragraph, adding no executable Solidity. The discriminating check is the forge build dependency-warning count, which is 9 on base and 0 on this branch (verified by restoring and re-deleting the file in this tree, below). The full existing suite (118 tests) is the regression guard and passes unchanged, as does reuse lint, the job a REUSE.toml edit could break.
  • Mutations applied: foundry.lock restored from HEAD (the deletion reverted in place) -> forge build in rainix#sol-shell re-emits all 9 Dependency '...' not found at expected path warnings (BASELINE_WARNINGS=9); deleted again -> AFTER_WARNINGS=0. The revert-mutant is killed, proving the deletion is what removes the warnings rather than build caching or a stale artifact. REUSE.toml -> an unlicensed file left in the tree made reuse lint exit 1 ("Missing copyright and licensing information"), confirming the lint actually ran over this tree and is not vacuously green; with the tree clean it exits 0 at 80/80.
  • Oracle: the live dependency state, derived independently of the deleted file — soldeer.lock (7 packages: @OpenZeppelin-Contracts 5.6.1, forge-std 1.16.1, rain-lib-hash 0.1.0, rain-lib-typecast 0.1.0, rain-math-binary 0.1.3, rain-sol-codegen 0.1.0, rain-solmem 0.1.3), foundry.toml (libs = ["dependencies"], a [dependencies] table, no remappings key), git ls-files --stage (zero mode-160000 entries), and the absence of .gitmodules and lib/ in a fresh clone. The upstream tags for the two contradicting pins were read from the forge-std and openzeppelin-contracts release pages, not from this repo.
  • Category check: issue Remove the submodule-era residue — dead foundry.lock, .gitmodules and lib/ references in a repo with no submodules #121's "Done when" asks for (a) foundry.lock deleted, (b) its REUSE.toml annotation removed, (c) the listed .soldeerignore lines removed, (d) CLAUDE.md line 72 rewritten for the soldeer layout, (e) no Dependency '...' not found at expected path warnings, (f) no .gitmodules / lib/ / foundry.lock reference left in the tree outside dependencies/, (g) CI green. All seven covered: a-d in the diff, e measured 9 -> 0, f re-grepped over all tracked files after the change (zero hits), g run locally in the pinned CI shell per the table below. The issue's out-of-scope list (.DS_Store, .pre-commit-config.yaml, /out, /cache, /dependencies, /remappings.txt, and .vscode) is untouched.

Verification

Run locally in github:rainlanguage/rainix/53e96a7d0a97d7c7c75c3b2412521324776fdac6#sol-shell — the exact shell and pinned SHA the rainix-sol reusable workflows use — after forge soldeer install:

checkCI jobresult
reuse lintlegalpass, 80/80 files compliant
forge fmt --checkstaticpass
slither .staticpass, 61 contracts / 97 detectors, 0 results
rainix-sol-single-contractstaticpass
forge test -vvvtestpass, 118 tests, 0 failed, 0 skipped
forge build dep warnings9 before, 0 after

Note, not in this PR

CLAUDE.md's "Build & Development" block still lists rainix-sol-prelude / rainix-sol-test / rainix-sol-static / rainix-sol-legal, none of which exist in the rainix flake any more — CI now runs forge soldeer install, slither ., forge fmt --check, rainix-sol-single-contract, reuse lint and forge test -vvv directly. That is stale in the same file but is a different migration and outside issue #121's scope.

The local denofmt pre-commit hook wants to reflow all of CLAUDE.md to 80 columns. That reflow is not applied here: it is unrelated whole-file churn, and no CI job runs pre-commit (main is not denofmt-clean today).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated dependency documentation to reflect Soldeer-managed packages, lockfiles, installation paths, and generated remappings.
    • Refreshed the documented dependency list to current forge-std, OpenZeppelin, and Rain Protocol packages.
  • Chores

    • Removed outdated ignore and licensing references for legacy dependency files and directories.

This repo has no submodules: no `.gitmodules`, no `lib/`, and
`git ls-files --stage` reports zero gitlinks. Dependencies come from
soldeer under `dependencies/` (`libs = ["dependencies"]`), locked in
`soldeer.lock`.
`foundry.lock` is Foundry's git-submodule lockfile. Its 9 pins all name
`lib/` paths that do not exist, contradict the live soldeer pins
(forge-std v1.14.0 vs 1.16.1, openzeppelin-contracts v5.5.0 vs 5.6.1)
and include two dependencies this repo no longer has at all
(`rain.intorastring`, `rain.math.float`). `forge build` emitted one
"Dependency '...' not found at expected path" warning per entry: 9
before this change, 0 after.
- delete `foundry.lock`
- drop its `REUSE.toml` annotation entry, since the annotated file is
gone and REUSE annotations describe files that exist
- drop the `.soldeerignore` entries tied to the submodule era only:
`.gitmodules`, `/foundry.lock`, `/lib`. Every other entry stays,
including paths absent from a clean checkout, because
`.soldeerignore` is a publish filter rather than a description of
the tree.
- rewrite the `CLAUDE.md` "Dependencies" paragraph, which claimed git
submodules in `lib/`, a dependency set including `rain.math.float`
and `rain.intorastring`, and a `rain.sol.codegen` remapping in
`foundry.toml` that does not exist there
Submodules cannot return: rainix CI runs a `no-submodules` check that
fails on a root `.gitmodules` or any committed gitlink.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thedavidmeisterthedavidmeister self-assigned this Aug 15, 2026
@coderabbitai

coderabbitaiBot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e35e924-ca6b-4828-8868-83569b11952f

📥 Commits

Reviewing files that changed from the base of the PR and between aed67a6 and d6a5664.

⛔ Files ignored due to path filters (1)
  • foundry.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • .soldeerignore
  • CLAUDE.md
  • REUSE.toml
💤 Files with no reviewable changes (2)
  • REUSE.toml
  • .soldeerignore

📝 Walkthrough

Walkthrough

The repository removes obsolete .gitmodules, foundry.lock, and lib metadata references. Dependency documentation now describes Soldeer-managed dependencies, lockfiles, installation paths, and generated remappings.

Changes

Soldeer migration cleanup

Layer / File(s)Summary
Dependency documentation
CLAUDE.md
The dependency documentation now describes Soldeer configuration, lockfiles, installation paths, generated remappings, and the current dependency set.
Repository metadata cleanup
.soldeerignore, REUSE.toml
The ignore list no longer includes .gitmodules, /foundry.lock, or /lib. The REUSE annotation list no longer includes foundry.lock.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk:⚪ Minimal · up to d6a56

This change removes obsolete submodule-era files and references without changing executable application behavior; the reported build, test, formatting, static-analysis, and licensing checks pass, so no actionable merge-blocking risk remains.

Possibly related issues

  • rain.flare#208 — Removes the same obsolete Soldeer ignore entries.
  • rain.tofu.erc20-decimals#30 — Covers the same submodule-to-Soldeer cleanup across metadata and documentation.
  • rainlang#553 — Removes obsolete submodule entries and updates dependency metadata.
  • raindex#2834 — Performs the same Soldeer migration cleanup.
  • rain.verify#30 — Updates submodule-era metadata and Soldeer dependency documentation.
  • rain.extrospection#47 — Removes stale submodule references and updates dependency documentation.
  • rain.datacontract#26 — Removes obsolete dependency paths from repository metadata.
  • rain.intorastring#20 — Removes stale submodule-era ignore entries.
  • rain.string#29 — Removes the same obsolete dependency references.
  • rain.erc4626.words#262 — Removes the stale foundry.lock REUSE annotation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check nameStatusExplanationResolution
Linked Issues check❓ InconclusiveThe reviewable changes satisfy the documented cleanup, but deletion of foundry.lock is excluded and cannot be verified from the provided summary.Verify the excluded foundry.lock deletion and confirm the remaining build-warning, repository-reference, and CI acceptance criteria.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly describes the removal of stale submodule-era files and references, which matches the main change.
Out of Scope Changes check✅ PassedAll reported changes directly support the linked issue by removing stale dependency metadata and updating soldeer documentation.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-08-15-remove-submodule-residue

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.

@thedavidmeister
thedavidmeister merged commit 166f495 into mainAug 19, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown

@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment:

S/M/L PR Classification Guidelines:

This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed.

Small (S)

Characteristics:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

@coderabbitai

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
base="$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null || true)"if [ -z"$base" ];thenecho"Could not determine the base branch."exit 1
fiprintf'MERGE_BASE=%s\n'"$base"
git diff --stat "$base" HEAD
printf'\nNAME_STATUS\n'
git diff --name-status "$base" HEAD
printf'\nNUMSTAT\n'
git diff --numstat "$base" HEAD

Length of output: 604


SIZE=S

You are interacting with an AI system.

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.

Remove the submodule-era residue — dead foundry.lock, .gitmodules and lib/ references in a repo with no submodules

1 participant

@thedavidmeister