Skip to content

rewrite test src/ imports to relative paths#452

Merged
thedavidmeister merged 2 commits into
mainfrom
2026-05-05-issue-411-bare-src-imports
May 9, 2026
Merged

rewrite test src/ imports to relative paths#452
thedavidmeister merged 2 commits into
mainfrom
2026-05-05-issue-411-bare-src-imports

Conversation

@thedavidmeister
Copy link
Copy Markdown
Contributor

@thedavidmeister thedavidmeister commented May 5, 2026

Summary

Bare src/ imports break when this repo is consumed as a Foundry git submodule — src/ resolves to the parent project's source directory, not this submodule's. Every test import now uses a relative path appropriate to its file's depth (../../src/..., ../../../src/..., or ../../../../src/...).

14 test files updated, 19 imports rewritten.

Closes #411.

Test plan

  • forge build clean (114 files compile)
  • full suite via rainix-sol-test — 31/31

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated import paths in test files from source-root style to relative paths for proper module resolution. No functional changes to test logic or contract behavior.

Bare `src/` imports break when this repo is consumed as a Foundry
git submodule — `src/` resolves to the parent project's source
directory, not this submodule's. Every test import now uses a
relative path appropriate to its file's depth.

Closes #411.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Warning

Rate limit exceeded

@thedavidmeister has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 41 minutes and 39 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 21ba4490-c8c2-47a6-b749-de764a37a2e9

📥 Commits

Reviewing files that changed from the base of the PR and between d869a95 and 797f121.

📒 Files selected for processing (4)
  • test/src/concrete/Flow.construction.t.sol
  • test/src/concrete/Flow.preview.t.sol
  • test/src/concrete/Flow.time.t.sol
  • test/src/concrete/Flow.transfer.t.sol

Walkthrough

This PR updates import paths across 13 test files from bare src/... references to relative paths (e.g., ../../src/..., ../../../src/...), enabling the repository to function correctly when used as a Foundry submodule.

Changes

Import Path Corrections

Layer / File(s) Summary
Test Import Updates
test/abstract/FlowTest.sol, test/abstract/FlowTransferOperation.sol, test/abstract/FlowUtilsAbstractTest.sol, test/interface/IFlowV5.t.sol, test/interface/deprecated/v4/IFlowV4.t.sol, test/lib/LibStackGeneration.sol, test/src/concrete/Flow.construction.t.sol, test/src/concrete/Flow.context.t.sol, test/src/concrete/Flow.expression.t.sol, test/src/concrete/Flow.multicall.t.sol, test/src/concrete/Flow.preview.t.sol, test/src/concrete/Flow.signedContext.t.sol, test/src/concrete/Flow.time.t.sol, test/src/concrete/Flow.transfer.t.sol
All bare src/ import paths are replaced with relative paths. Files in test/abstract/, test/interface/, and test/lib/ use ../../src/...; files nested in test/src/concrete/ use ../../../src/.... No test logic or function behavior changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

  • #419: Related because it also involves test/interface/IFlowV5.t.sol import updates.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: rewriting test imports from bare src/ paths to relative paths, which is the core objective of this PR.
Linked Issues check ✅ Passed All 19 test import statements across 14 test files identified in issue #411 have been converted from bare src/ imports to relative paths, fully addressing the linked issue's requirements.
Out of Scope Changes check ✅ Passed All changes are scoped to updating import paths in test files as specified in issue #411; no unrelated modifications to contract logic or non-test code are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-05-issue-411-bare-src-imports

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 and usage tips.

@thedavidmeister thedavidmeister self-assigned this May 9, 2026
…bare-src-imports

# Conflicts:
#	test/src/concrete/Flow.construction.t.sol
@thedavidmeister thedavidmeister merged commit 4a41cd9 into main May 9, 2026
4 checks passed
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.

[GLOBAL-1] [LOW] Bare src/ imports break repo as Foundry submodule

1 participant