chore: remove the submodule-era residue — dead foundry.lock, .gitmodules//lib references, and a slither filter pointed at lib/forge-std - #27
Conversation
`foundry.lock` is Foundry's git-submodule lockfile: it pins the commit each
dependency vendored under `lib/` is checked out at. This repo has no
`.gitmodules`, no `lib/` and no gitlinks — dependencies come from soldeer,
`foundry.toml` sets `libs = ["dependencies"]`, and `soldeer.lock` is the live
lockfile. The two disagreed: `foundry.lock` pinned `lib/forge-std` at
b8f065fd (an untagged 2025-10-14 forge-std commit) while the build has been
using 1.16.1 the whole time. Nothing reconciled them because nothing read the
`foundry.lock` side.
It was not silent. `forge build` emitted one warning per entry:
Warning: Dependency 'lib/forge-std' not found at expected path
Submodules cannot come back either — rainix CI runs a `no-submodules` check
that fails on a root `.gitmodules` or any committed gitlink.
Removing the file alone would have left the references behind, so this takes
all of them in one pass:
- `foundry.lock` deleted.
- `REUSE.toml` drops its `"foundry.lock"` annotation entry.
- `.soldeerignore` drops `/foundry.lock` and `/lib`, plus three more entries
found while checking that name nothing in this tree: `.gitmodules`,
`.coderabbit.yaml` (no such file here, not gitignored; the org repos that
have one spell it `.coderabbitai.yaml`) and `CLAUDE.md` (this repo has
none). `.gas-snapshot` stays — that file does exist. So do `.DS_Store`,
`.vscode`, `.pre-commit-config.yaml` and the build/publish outputs
(`/out`, `/cache`, `/dependencies`, `/remappings.txt`): absent from a clean
checkout by design, present when `soldeer push` runs.
- `slither.config.json` `filter_paths` moves from `lib/forge-std` to
`dependencies/forge-std-`, which is where forge-std actually lands
(`dependencies/forge-std-1.16.1/`). The prefix stops short of the version so
a bump does not silently blank the filter again.
Configuration only. No Solidity source, no deployed bytecode, no audited
artifact changes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
💤 Files with no reviewable changes (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe change removes obsolete migration-era paths from repository configuration and updates Slither to filter the current ChangesConfiguration cleanup
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This change removes obsolete dependency and packaging references and updates the static-analysis path without changing Solidity source or deployed behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Closes #15.
What this removes
foundry.lockis Foundry's git submodule lockfile — it records the commit each dependency vendored underlib/is pinned to, soforge install/forge updatecan restore identical revisions. It is only meaningful in a repo that vendors dependencies as git submodules.This repo does not. Verified on a fresh clone of
main: no.gitmodules, nolib/, andgit ls-files --stagereports zero gitlinks (mode160000). Dependencies come from soldeer —foundry.tomlsetslibs = ["dependencies"]andsoldeer.lockis the live lockfile for the single package that lands underdependencies/, forge-std 1.16.1.The two lockfiles disagreed.
foundry.lockpinnedlib/forge-stdatb8f065fda83b8cd94a6b2fec8fcd911dc3b444fd, an untagged forge-std commit from 2025-10-14; the build has been using 1.16.1 the whole time, per bothfoundry.toml [dependencies]andsoldeer.lock. Nothing reconciled them, because nothing read thefoundry.lockside.Submodules also cannot come back — rainix CI runs a
no-submodulescheck that fails on a root.gitmodulesor any committed gitlink.It was not silent
forge buildemitted one warning per entry in the file. Reproduced onmainin the pinnedrainix#sol-shell(3d1c85eca08ef5a852215f77c8f3684c8313a8b3):Same command on this branch:
The warning is gone. (
forge buildstill emits an unrelated pre-existingunsafe-typecastlint ontest/LibCast.t.sol:134, unchanged by this PR and present identically onmain.)Everything in the diff
Deleting the file alone would have left every reference to it behind, silently, because not one of them fails anything —
reuse linttolerates annotation paths that do not exist, and a.soldeerignoreline for a nonexistent path is a no-op. So this takes the whole set in one pass.foundry.locksoldeer.lockREUSE.toml"foundry.lock",from the annotationpathlist.soldeerignore/foundry.lock.soldeerignore/liblib/in the tree;libs = ["dependencies"]means forge never creates one.soldeerignore.gitmodules.gitmodules, no gitlinks, andno-submoduleskeeps it that way.soldeerignore.coderabbit.yaml.coderabbitai.yaml.soldeerignoreCLAUDE.mdslither.config.jsonfilter_paths→dependencies/forge-std-,testlib/any more.soldeerignoreentries deliberately keptEach remaining line was checked individually rather than dropped by pattern:
.gas-snapshotstays. That file does exist in this repo (532 bytes, tracked). It is a live ignore, not residue..DS_Store,.vscode,.pre-commit-config.yaml— OS junk and local developer files..pre-commit-config.yamlin particular is written into the working tree on devShell entry, so it is present exactly whensoldeer pushwould run./out,/cache,/dependencies,/remappings.txt— generated atforge soldeer install/forge buildtime. Absent from a clean checkout by design, present when publishing..git,.github,.gitignore,.soldeerignore,/audit,/flake.lock,/flake.nix,/foundry.toml,/slither.config.json,/soldeer.lock,/REUSE.toml— all exist and are correctly excluded from the published package.On the slither filter
The old
lib/forge-stdhalf offilter_pathsnamed nothing, so it was not filtering anything. The new value uses thedependencies/forge-std-prefix rather than the fulldependencies/forge-std-1.16.1/, so a version bump does not silently blank the filter the same way the migration did.Checked for newly surfaced findings, as the issue asks.
slither .in the pinned shell, before and after:Identical, exit 0 both times — nothing new appeared, and nothing was widened to hide anything.
Worth stating plainly rather than implying more than was tested:
filter_pathsis inert in this repo today, on both the old value and the new one.slither .builds with--skip ./test/** ./script/**, andsrc/LibCast.solandsrc/LibConvert.solcontain noimportstatements at all, so neither forge-std nortest/ever enters the analysis for a filter to exclude. The line is fixed because it should name a real path when it starts mattering, not because it was hiding a finding.Verification
All in
nix develop github:rainlanguage/rainix/3d1c85eca08ef5a852215f77c8f3684c8313a8b3#sol-shell, matching whatrainix-solruns.forge buildDependency '...' not found at expected pathforge test -vvvslither .mainforge fmt --checkrainix-sol-single-contractreuse lintAnd on CI, on this PR's own
rainix-solrun (32500412818) —static,legalandtestall pass, thestaticjob's slither step prints the same2 contracts with 99 detectors, 0 result(s) found, and the stringDependencyappears nowhere in that job's log.Residue sweep over tracked files after the change:
Scope
Issue #15 is one repo of a 17-repo pass. Only
rain.lib.typecastis touched here. No Solidity source, no deployed bytecode and no audited artifact changes.QA
forge buildonmainprintsWarning: Dependency 'lib/forge-std' not found at expected path, and on this branch it does not. Both runs in the pinnedrainix#sol-shell, transcribed above. The existing 17-test suite is the regression guard and is green unchanged (17 passed / 0 failed / 0 skipped on both sides).mutation-probeto generate; the compiled bytecode is byte-identical either way. The repo's existing mutation coverage (audit/mutation-test-scans.json) is untouched and still describes the same tree.forge build's own warning is the oracle forfoundry.lockbeing dead (it names the missing path) and for it being fixed (the warning stops).git ls-files --stagereporting zero gitlinks plus the absence of.gitmodulesis the oracle for "no submodules here".forge soldeer installwritingdependencies/forge-std-1.16.1/andremappings.txtreadingforge-std-1.16.1/=dependencies/forge-std-1.16.1/is the oracle for the real forge-std path.reuse lintis the oracle forREUSE.toml. Every.soldeerignoreline was tested by existence check against a fresh clone, one path at a time — which is why.gas-snapshotsurvived while the five dangling entries did not.foundry.lock,.gitmodules/lib/references, and a slither filter pointed atlib/forge-std#15 asks for (a)foundry.lockdeleted, (b) itsREUSE.tomlentry removed, (c) five.soldeerignoreentries removed, (d)slither.config.jsonfilter_pathsrepointed atdependencies/forge-std-with thestaticjob checked for new findings, (e)forge buildno longer emitting the not-found warning, (f) no.gitmodules/lib//foundry.lockreference left in the tree outsidedependencies/, (g) CI green. Covered a, b, c, d, e, f locally; (d)'s "checked for newly surfaced findings" is the identical 0-result slither run above; (g) is this PR's ownrainix-solrun.