Repository navigation
test: Foundry suite, invariants, mutation-tested; CI - #2
Merged
Merged
Conversation
…ue tests - foundry.toml with the deploy compiler settings (solc 0.8.26, optimizer 200, cancun); contracts/ untouched, forge-parity test proves forge runtime == deployed runtime - unit + fuzz tests for every external function and revert path of all six contracts, handler-based invariants for AgentJob, PredgeValidatorBond, PredgeRefundArbiter, PredgeAgentValidator and PredgeSettlement; 100% line/branch/function coverage - test_BUG_* tests pin open findings and fail until the contracts are fixed - GitHub Actions: forge build/test/coverage, npm test, slither (informational)
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.
Prepares the contract set for an external formal-methods + mutation-testing scan. No contract source changes.
What is added
foundry.tomlwith the deploy compiler settings (solc 0.8.26, optimizer 200, cancun).test/forge-parity.test.mjschecks that forge's runtime bytecode equals the deployed runtime (metadata hash excluded), so the suite tests exactly what is live.npm test(plan + live bytecode match) still passes.test/foundry/: 190 tests: unit tests for every external/public function and every revert path of all six contracts, fuzz tests, and handler-based invariant suites (escrow/bond conservation, no double payout/refund/slash, no reclaim inside the window, write-once verdicts and filings, forward-only job states, role checks)..github/workflows/foundry.yml): forge build / test / coverage, npm test, slither (informational).Numbers
Known-issue tests
test_BUG_*tests (6) fail on purpose and are excluded from the main CI step. Each one pins an open finding until it is fixed in the contracts.test_finding_*tests pass and document current behaviour that carries a design or operational risk.Do not merge until the contract review is complete.