fix: coverage report + gas snapshot + CI + env example#18
Merged
Conversation
Session 16. Add committed .gas-snapshot baseline, coverage summary, CI gas-regression + coverage jobs, README badges, and .env.example. - docs/coverage-summary.md: 98.45% lines total; RangeGuardHook.sol + RangeGuardReactive.sol at 100% lines/functions. Production Contract Coverage section explains MockUSDC (testnet mock) + AbstractPausableReactive ReactVM branches as the only sub-100% items. - .gas-snapshot: deterministic baseline (278 tests; 14 Sepolia fork tests excluded — they vm.skip without SEPOLIA_RPC_URL and are fork-block-dependent). - ci.yml: gas-snapshot (forge snapshot --check) + coverage jobs, pinned Foundry 1.3.5 + recursive submodules. - README: tests/coverage/license/network/reactive badges. - .env.example: template with live deployed addresses; .env gitignored. - coverage/ + lcov.info gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The first CI run of the gas-snapshot job failed: four fuzz tests drifted 1-657 gas vs the committed baseline (mean gas over random inputs is not byte-reproducible across environments, even with the pinned seed=0x1 — corpus cache + platform). All 278 tests passed functionally; it was pure snapshot noise on fuzz/invariant means. Fix: gate DETERMINISTIC tests only. Regenerate .gas-snapshot and the CI --check with --no-match-test "(testFuzz|invariant)" (alongside the existing Sepolia fork --no-match-path). Baseline 277 -> 204 entries; concrete unit + integration tests still exercise every production function with fixed inputs, so real regressions are still caught. - Makefile: snapshot target carries the deterministic filters; new gas-check target mirrors the CI gate locally (run before pushing). - Docs (session-16, project-status, CLAUDE.md): exclusion rationale + the note that --no-verify was not the cause (pre-push runs test, not snapshot). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Session 16 complete. Coverage report, gas snapshot, CI updates, and environment setup.
What shipped
.gas-snapshot— 277 deterministic test baselines committeddocs/coverage-summary.md— full coverage report with production contract breakdown.env.example— complete environment variable template with comments.github/workflows/ci.yml— added gas snapshot + coverage jobsREADME.md— 5 static badges addedCoverage Results
Gas Efficiency (production functions)
afterSwap at 46,414 gas — constant cost, no LP iteration, O(1) by design.
CI Changes
forge snapshot --checkon every PR — fails if gas increasesforge coverage --report summaryon every PRNext
Full README — final session