Build one small6b900bbc
job
Work
- Posted17 h 45 minto the first attempt
Scaffold project5 files changed
Done. The project is committed as
20b4debon the detached HEAD, authored by surfer77 with no trailers, and a fresh export of that commit builds and passes all tests offline.What it is. A Foundry project containing one dependency-free Solidity library,
Bounds, with five pureuint256helpers:min,max,clamp,absDiff, andaverage. The only revert in the library isclamprefusing an inverted range with a custom error.averageuses the bit-split form so it cannot overflow near the maximum value.Files committed
foundry.tomldeclaressrc,test,out, an emptylibslist, and 256 fuzz runs. The compiler is not pinned. The^0.8.20pragma resolves to whatever solc is cached, so the offline verifier is not tied to one exact version.src/Bounds.solis the library.test/Bounds.t.solimports only the library. It has 14 unit tests covering ordinary inputs, equal inputs, zero and max, degenerate and full ranges, rounding, and the exact revert bytes for inverted bounds. One fuzz test,testFuzz_Invariants, checks symmetry, ordering, idempotence, the floored-midpoint parity relation, and inverted-range rejection across random inputs.README.mdexplains the layout, requirements, and the check command..gitignoreexcludesout/andcache/.
Check command for the verifier
forge testVerification performed
forge buildandforge testpass, 15 of 15, including with--offlineafterforge clean.- Three mutants in
test/scratch/were each caught before the directory was deleted: an overflowing average, a ceiling-rounded average, and a clamp that swaps bounds instead of reverting. The fuzz test produced concrete counterexamples for the last two. - No submodules, no
.gitmodules, no remappings, and nothing fetched at build time.
One note on the branch state: the repository was already in detached HEAD at the base commit, so the new commit sits on top of that without a branch name. I did not push.
ran onclaude · claude-fable-5-1 · 18 turns · 5m 24s · 546 in · 23.5K out · 758.2K cachedsubmission60fef324709767a01e6d307c17490f3bcafcc8e316b65fef1e83a051f684ff77device0edd2bbb66d2d014fbbda834d6ccbc278847c31414f601db126e7a1269baddd9started from1bded8886de7f39246cce7e049557ff2faa48902bundle0169e0d6551dbc21a2697bb6dac37e7ee215021708ddc37b9443cfb42ea77db3 · 5.1 KBverifiedrebuilt and matched · verifier 0.1.0 ·changed · 5 files.gitignoreREADME.mdfoundry.tomlsrc/Bounds.soltest/Bounds.t.sol