Skip to content

chore: remove submodule-era residue — dead foundry.lock, .gitmodules and lib/ references - #23

Open
thedavidmeister wants to merge 2 commits into
mainfrom
22-remove-submodule-residue
Open

chore: remove submodule-era residue — dead foundry.lock, .gitmodules and lib/ references#23
thedavidmeister wants to merge 2 commits into
mainfrom
22-remove-submodule-residue

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Closes #22

What this removes

Removed Why
foundry.lock Foundry's git submodule lockfile, in a repo with no submodules
REUSE.toml line 16 — "foundry.lock", annotation for a file that no longer exists
.soldeerignore.gitmodules submodule-era; no .gitmodules in the tree, zero gitlinks
.soldeerignore/lib submodule-era; no root lib/, foundry.toml sets libs = ["dependencies"]
.soldeerignore/foundry.lock ignore for the file this branch deletes

Three deletions, 15 lines, no Solidity touched.

Why it is dead

Dependencies come from soldeer. soldeer.lock is the live lockfile — forge-std 1.16.1, rain-lib-hash 0.1.0, rain-solmem 0.1.3 — and everything resolves under dependencies/, so lib/ is never created.

foundry.lock meanwhile pinned three lib/ paths that do not exist, at revisions that contradict what the build resolves: its forge-std pin 1801b054 is v1.14.0 against soldeer's 1.16.1, and its rain.solmem pin 2e47e41a is not any tagged release against soldeer's 0.1.3. Nothing reads that side, so nothing ever reconciled them.

Submodules cannot come back: rainix CI runs no-submodules, which fails on a root .gitmodules or any committed gitlink.

Why the rest of .soldeerignore stays

.soldeerignore is a publish filter, not a description of the tree. An entry naming a path that is absent today is a forward-looking rule — drop it and that file gets published into the soldeer package the moment anyone adds it. So absence alone is not a reason to remove a line, and .coderabbit.yaml, CLAUDE.md, .DS_Store, .vscode, .pre-commit-config.yaml and the build/publish outputs (/out, /cache, /dependencies, /remappings.txt) all remain. Neither .coderabbit.yaml nor CLAUDE.md is misspelled here, so there was nothing to correct in place either.

The three entries that do go are not forward-looking: the paths they name cannot come back. .gitmodules and gitlinks are rejected by rainix CI, lib/ is never created under libs = ["dependencies"], and foundry.lock is deleted by this branch.

REUSE.toml is the opposite case and is unaffected by that reasoning: its annotations describe files that exist, so a path that is gone is residue there and goes.

src/lib/ and test/lib/ are this package's own source dirs, never matched by the root-anchored /lib entry, and still ship in the package (proved below).

Scope is rain.lib.memkv only — the same residue in sibling repos has its own issue each.

Verification

Everything below ran in the shell CI itself pins, github:rainlanguage/rainix/53e96a7d0a97d7c7c75c3b2412521324776fdac6#sol-shell.

Precondition checked before touching any .gitmodules / lib/ reference: git ls-files --stage | grep ^160000 is empty (zero gitlinks) and there is no .gitmodules in the tree.

Full rainix-sol suite green:

Job / step Result
legalreuse lint pass — compliant, 20/20 files with copyright + license, 0 missing
staticslither . pass — 1 contract, 99 detectors, 0 results
staticforge fmt --check pass
staticrainix-sol-single-contract pass
testforge test pass — 28 passed, 0 failed, 0 skipped, 5 suites

QA

  • Discriminating tests: three checks, each verified to differ between base and this branch, since this diff deletes files and adds no Solidity.
    1. forge build --force warning set — on base (with foundry.lock restored into this same tree) it emits Warning: Dependency 'lib/rain.lib.hash' not found at expected path, 'lib/rain.solmem', 'lib/forge-std'; on this branch grep -i "not found at expected path" over the build output matches nothing (exit 1). Same tree, same shell, only the file differs.
    2. forge soldeer push rain-lib-memkv~0.1.2 --dry-run package manifest — base and branch produce the same 14 entries (LICENSE, LICENSES/, README.md, src/lib/LibMemoryKV.sol, test/lib/LibMemoryKVSlow.sol, the 5 test/src/lib/*.t.sol files and their dirs). This is the check on the only thing .soldeerignore affects: dropping /lib did not stop src/lib and test/lib shipping, and nothing new leaked in. Re-run after the forward-looking entries were restored — still 14, identical. Manifests read with zipfile.namelist(), not unzip (absent from the shell; an earlier attempt produced two empty listings and a vacuous diff exit 0, which is why the comparison is stated from the entry names above).
    3. reuse lint exit code — 0 on this branch after the annotation entry was removed.
  • Mutations applied:
    • REUSE.toml → delete the live "soldeer.lock", annotation path → killed by reuse lint: exit 1, Files with copyright information: 19 / 20, "not compliant". So reuse lint does fail on a dropped annotation for a file that exists; it passes here only because foundry.lock no longer exists — the exact risk this diff carried.
    • .soldeerignore → delete the live /soldeer.lock entry → killed by the dry-run manifest: 14 → 15 entries, soldeer.lock now inside the package. So check 2 is discriminating and its base-vs-branch identity is a real result, not a blind harness. This mutant is also the direct evidence for why the forward-looking entries were restored: a dropped .soldeerignore line publishes the file.
    • Both mutants reverted; git status --porcelain empty after each.
  • Oracle: independent of the code under change. reuse lint is the REUSE 3.3 spec implementation and is the legal job verbatim. The package manifest is what soldeer push will actually upload, read out of the zip rather than inferred from ignore syntax. The foundry.lock pins were checked against upstream ground truth — 1801b054 is forge-std v1.14.0 by its GitHub release tag, 2e47e41a matches no rain.solmem tag (v0.1.3 is ce03de80) — versus what soldeer.lock resolves.
  • Category check: issue asks for (a) foundry.lock deleted, (b) its REUSE.toml annotation entry removed, (c) the listed .soldeerignore lines removed, (d) no more Dependency '...' not found at expected path, (e) no .gitmodules / lib/ / foundry.lock reference left outside dependencies/, (f) CI green. (a)(b) in the diff; (c) narrowed to the submodule-era three — the issue also listed .coderabbit.yaml and CLAUDE.md as dangling, but .soldeerignore is a filter and those entries are forward-looking protection, so they stay; (d) by check 1; (e) by git grep over the tree — the only surviving lib/ hits are src/lib/… and test/lib/… import paths, this package's own layout, not submodule references; (f) by the suite table above. The issue's out-of-scope list (.DS_Store, .vscode, .pre-commit-config.yaml, /out, /cache, /dependencies, /remappings.txt, and sibling repos) was not touched.

…and lib/ references

This repo vendors nothing as a git submodule: there is no `.gitmodules`, no
`lib/` directory, and `git ls-files --stage` reports zero gitlinks. Dependencies
come from soldeer — `foundry.toml` sets `libs = ["dependencies"]` and
`soldeer.lock` is the live lockfile for forge-std 1.16.1, rain-lib-hash 0.1.0
and rain-solmem 0.1.3.

`foundry.lock` is Foundry's submodule lockfile. It still pinned three `lib/`
paths that do not exist, at revisions that contradict what the build actually
resolves (its forge-std pin `1801b054` is v1.14.0 against soldeer's 1.16.1; its
rain.solmem pin `2e47e41a` is not any tagged release against soldeer's 0.1.3).
Nothing reads that side, so nothing reconciled them — it only produced three
`Dependency '...' not found at expected path` warnings on every `forge build`.
Confirmed gone after this change.

Submodules cannot come back either: rainix CI runs a `no-submodules` check that
fails on a root `.gitmodules` or any committed gitlink.

Removed:

- `foundry.lock`
- its `REUSE.toml` annotation entry
- `.soldeerignore` entries for `.gitmodules`, `/lib` and `/foundry.lock` —
  every one a path absent from the tree
- `.soldeerignore` entries for `.coderabbit.yaml` and `CLAUDE.md` — neither
  config exists here, tracked or ignored

`.soldeerignore` keeps `.DS_Store`, `.vscode`, `.pre-commit-config.yaml` and the
build/publish outputs (`/out`, `/cache`, `/dependencies`, `/remappings.txt`):
those are absent from a clean checkout by design and present when `soldeer push`
runs. The retained `/lib`-adjacent source dirs `src/lib` and `test/lib` are
package-internal and were never covered by the root-anchored `/lib` entry.

Closes #22

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Aug 15, 2026
@coderabbitai

coderabbitai Bot 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 64b8f7f2-3279-4df5-a501-bacd79112fa5

📥 Commits

Reviewing files that changed from the base of the PR and between e846bbd and a1437b1.

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

Walkthrough

The change removes obsolete .coderabbit.yaml, .gitmodules, CLAUDE.md, foundry.lock, and lib entries from .soldeerignore. It also removes the foundry.lock entry from REUSE.toml.

Changes

Dependency reference cleanup

Layer / File(s) Summary
Remove stale dependency paths
.soldeerignore, REUSE.toml
The configuration no longer ignores obsolete repository paths or annotates foundry.lock.

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

Merge Risk: ⚪ Minimal · up to a1437

This localized cleanup removes obsolete submodule-era files and ignore entries without changing Solidity behavior; the reported validation checks pass, so no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related issues

  • rainlanguage/rain.extrospection#47 — Covers removal of the same stale submodule-era references.
  • rainlanguage/rain.intorastring#20 — Targets the same .soldeerignore and REUSE.toml cleanup.
  • rainlanguage/rain.datacontract#26 — Covers removal of obsolete .gitmodules, foundry.lock, and lib references.
  • rainlanguage/rain.tofu.erc20-decimals#30 — Covers related obsolete .gitmodules and foundry.lock references.
  • rainlanguage/rain.string#29 — Covers removal of the same stale dependency references.
  • rainlanguage/rain.erc4626.words#262 — Removes the stale foundry.lock annotation from REUSE.toml.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The reviewed files remove the listed references, but deletion of foundry.lock cannot be verified because that file was excluded by the !**/*.lock filter. Include foundry.lock in the review or provide evidence that it was deleted and that the remaining build, reference, and CI requirements pass.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The changes are limited to obsolete ignore and REUSE references described by linked issue #22.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the removal of obsolete submodule-era files and references described in the pull request objectives.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 22-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.

`.soldeerignore` is a publish FILTER, not a description of the tree. An entry
naming a path that is absent today is a forward-looking rule: drop it and that
file gets published into the soldeer package the moment anyone adds it.

The previous commit removed `.coderabbit.yaml` and `CLAUDE.md` on the grounds
that neither file exists here. That reasoning does not hold for a filter, so
both are restored. Neither is misspelled here, so nothing else changes.

Only the submodule-era entries stay removed — `.gitmodules`, `/lib` and
`/foundry.lock`. Those are not forward-looking: rainix CI's `no-submodules`
check rejects any `.gitmodules` or committed gitlink, forge never creates `lib/`
under `libs = ["dependencies"]`, and `foundry.lock` is deleted by this branch.

`REUSE.toml` is unaffected: its annotations describe files that exist, so a path
that is gone is residue there and still goes.

Verified after the restore, in the CI-pinned rainix `sol-shell`: `reuse lint`
compliant 20/20, and `forge soldeer push --dry-run` produces the same 14-entry
package as `main` does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

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

1 participant