test: one contract per file (satisfy rainix single-contract gate) - #537
test: one contract per file (satisfy rainix single-contract gate)#537thedavidmeister wants to merge 5 commits into
Conversation
Split each test .sol that declared more than one contract so every file declares exactly one. The primary test contract stays in the original file; each helper/mock/secondary contract moves to its own file named after the contract, with the SPDX header, pragma, and imports it needs. Each original file imports the contracts it still references. Pure file reorganization: no test logic or contract behavior changes. Satisfies the rainix rainix-sol-single-contract gate (rainix #214), greening main and unblocking coverage PRs #534 and #536. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds a developer comment to ChangesInterpreter documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This PR reorganizes test contracts into one contract per file without changing test logic or contract behavior, and the relevant build, formatting, gate, and test checks pass. No actionable merge-blocking risk remains beyond normal review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
|
🤖 ai:producer |
|
🤖 ai:vetter |
|
🤖 ai:producer |
|
👤 human |
|
Rework note @23d605015892d5bbc29de677ba6fb2634199a29a: rework the PR to fit the split release lifecycle — deploys never gate merges (the deploy-before-merge choreography is superseded); remove or restructure anything in the PR that waits on a deploy; where deploy constants/pins are involved, follow the *.deploy repo convention (audited code only; version ↔ snapshot ↔ pins internally consistent; tag-release lifecycle). Whatever states follow the rework (including a typed blocked-on the repo's migration if one is genuinely needed) are the producer's ordinary transitions. Executes the 2026-08-06 ruling: rainlanguage/issue-pr-cron#221 |
…ct-per-file # Conflicts: # test/src/abstract/BaseRainlangSubParser.subParseLiteral2.t.sol # test/src/abstract/MismatchedLiteralSubParser.sol # test/src/abstract/NoMatchLiteralSubParser.sol # test/src/concrete/ZeroFPRainlangInterpreter.sol
|
🤖 ai:producer |
The rainix
rainix-sol-single-contractgate (rainix #214) enforces the Rain convention of onecontract/abstract contractper.solfile. 14 pre-existing test files declared more than one contract, which fails the gate and redsmain.This PR splits each offending file so every
.soldeclares exactly one contract. The primary test contract stays in the original file named after it; each helper / mock / secondary contract moves into its own file named after the contract, carrying the SPDX header, pragma, and the imports it needs. Each original file imports the contracts it still references. This is a pure file reorganization: no test logic or contract behavior changed.Files split (original -> moved contracts in their own new files)
test/src/abstract/BaseRainlangExtern.construction.t.sol(5) ->TestableExtern.sol,EmptyPointersExtern.sol,MismatchedExternMoreOpcodes.sol,MismatchedExternMoreIntegrity.soltest/src/abstract/BaseRainlangExtern.ierc165.t.sol(2) ->ChildRainlangExtern.soltest/src/abstract/BaseRainlangExtern.integrityOpcodeRange.t.sol(2) ->TwoOpExtern.soltest/src/abstract/BaseRainlangSubParser.ierc165.t.sol(2) ->ChildRainlangSubParser.soltest/src/abstract/BaseRainlangSubParser.subParseLiteral2.t.sol(4) ->HappyPathLiteralSubParser.sol,NoMatchLiteralSubParser.sol,MismatchedLiteralSubParser.soltest/src/abstract/BaseRainlangSubParser.subParseWord2.t.sol(3) ->MismatchedWordSubParser.sol,EmptyWordParsersSubParser.soltest/src/concrete/RainlangInterpreter.zeroFunctionPointers.t.sol(2) ->ZeroFPRainlangInterpreter.soltest/src/concrete/RainlangParser.parseMemoryOverflow.t.sol(2) ->ModifierTestParser.soltest/src/concrete/RainlangReferenceExtern.subParserIndexOutOfBounds.t.sol(2) ->MockExternBadLiteralIndex.soltest/src/lib/integrity/LibIntegrityCheck.t.sol(3) ->IntegritySingleOp.sol,IntegrityHighwater.soltest/src/lib/parse/LibSubParse.badSubParserResult.t.sol(2) ->BadLengthSubParser.soltest/src/lib/parse/LibSubParse.constantAccumulation.t.sol(3) ->ConstantReturningSubParser.sol,MultiConstantSubParser.soltest/src/lib/parse/LibSubParse.subParseWords.t.sol(2) ->ContextReturningSubParser.soltest/src/lib/state/LibInterpreterStateDataContract.t.sol(2) ->LibInterpreterStateDataContractExtern.sol14 files split into 22 new single-contract files; contract count is conserved (36 contracts before and after).
Verification
rainix-sol-single-contractexits 0 (no violations remain).forge buildclean;forge fmt --checkclean.forge test: 1524 passed. The only 16 failures are pre-existing fork tests that need RPC env vars (ARBITRUM_RPC_URL,BASE_RPC_URL, etc.) not set in the local sandbox; they fail identically on cleanmainand are in files this PR does not touch.Greens
mainand unblocks coverage PRs #534 and #536.🤖 Generated with Claude Code
Summary by CodeRabbit