Run the bindings' library tests here, over this source - #275
Conversation
The Rust tests of library logic lived in the deploy repo's bindings crate, over the pinned package, one release behind this source. `crates/tests` (was `crates/constants`) runs them through the `rain-math-float` bindings over `test/concrete/TestDecimalFloat.sol` compiled from `src/`, whose constructor deploys the log tables, and `TestDecimalFloatHarness.sol` for packing and the tables. `build.rs` runs `forge build`; `.cargo/config.toml` points the bindings at the artifacts and runs their constructors. The log-table tests read the tables from the harness instead of copies pasted into Rust. The tests of the bindings' own Rust API stay in the deploy crate. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QyCCzi9WZPhuXcU1hwr2bq
The committed ones were recorded under mutated source during probing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QyCCzi9WZPhuXcU1hwr2bq
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QyCCzi9WZPhuXcU1hwr2bq
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
@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:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
The Rust tests that check library logic lived in
rain.math.float.deploy's bindings crate, where they ran over the deployed concrete's pinnedrain-math-floatpackage, one release behind this source. They now live here incrates/tests(wascrates/constants) and run overtest/concrete/TestDecimalFloat.solcompiled from this source:TestDecimalFloat.solhas theDecimalFloatABI oversrc/; its constructor deploys the log tables (LibTestLogTables, now shared withLogTest) into an immutable, where the deployed concrete requires them at their Zoltu address.TestDecimalFloatHarness.solhas the bindings' harness ABI: packing and theLibLogTablegetters.crates/tests/build.rsrunsforge build(andforge soldeer installwhendependencies/is absent) with the Solidity tree watched, socargo testis self-contained and never runs over a stale artifact..cargo/config.tomlpoints the bindings at the two artifacts and selects create mode (Let a consumer run the bindings over its own build of the concrete rain.math.float.deploy#21).lib.rs(arithmetic, comparisons, conversions, errors, constants), the 15fuzz_opsproptests against f64, and the 9 log-table tests, which now read the tables from the harness instead of from copies pasted into Rust, plus a check thatALT_TABLE_FLAGmatches the library's. The 4 tests of the bindings' own Rust API (Default, serde, hex) stay in the deploy crate.Stacked on #274.
QA
cargo test76 passed (48 float, 15 fuzz_ops, 10 tables, 3 constants);rainix-rs-staticclean; theLogTest-based Solidity suites 25 passed after theLibTestLogTablesfactoring.addinTestDecimalFloat.solreturningbfails 10 tests (test_add_sub,fuzz_add,test_int_frac_properties,test_inv_prod, …);LibTestLogTables.deployreverting fails 73 of 76 at EVM construction. The tests run over this source through its constructor, not the crate's committed bytecode.fuzz_opsand the table generation, integer series for the constants, algebraic identities (add/sub, mul/div, int+frac, trichotomy) for the rest; nothing read from the code under test.log10/pow/sqrt/pow10yet; the tables immutable is set by the constructor but only the Solidity suite reads it.🤖 Generated with Claude Code
https://claude.ai/code/session_01QyCCzi9WZPhuXcU1hwr2bq