feat(contracts/ci/docs): property testing, fuzz targets, runbooks, WASM size tracking#1007
Open
Fidelis900 wants to merge 4 commits into
Open
feat(contracts/ci/docs): property testing, fuzz targets, runbooks, WASM size tracking#1007Fidelis900 wants to merge 4 commits into
Fidelis900 wants to merge 4 commits into
Conversation
…olutions-plug#999) - Add proptest dev-dependency to predict-iq Cargo.toml - Add property_invariants_test.rs with 5 proptest properties covering stake conservation, state-machine irreversibility, and non-negative stakes - Create INVARIANTS.md documenting all financial and state-machine invariants with Certora/KEVM formal verification guidance Closes solutions-plug#999 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ions-plug#1000) - Add fuzz/ directory with Cargo.toml and three libFuzzer targets: fuzz_place_bet, fuzz_resolve_market, fuzz_withdraw - Add contract-fuzz CI job to test.yml running each target for 60 s with crash artifact upload on failure - Document fuzzing setup, targets, corpus handling, and CI in README.md Closes solutions-plug#1000 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…utions-plug#1001) - api-outage.md: API completely unreachable — ECS checks, force redeploy, ALB triage - redis-failure.md: ElastiCache down — failover steps, memory/connection diagnostics - email-queue-backup.md: SQS queue depth spike — worker restart, DLQ inspection, replay - stellar-rpc-unavailable.md: RPC unavailable — fallback endpoint switch, ledger lag check - ecs-task-crash-loop.md: Task exits immediately — exit code guide, rollback steps - Add corresponding Prometheus alert rules with runbook_url annotations to alerts.yaml Closes solutions-plug#1001 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…NGELOG (solutions-plug#998) - Add 'Print unoptimized WASM size' step to build-optimized CI job so the size trend is visible on every push, not just when the limit is exceeded - Add WASM size tracking table to CHANGELOG.md [Unreleased] section with a note on budget rationale and measurement instructions The 65,536-byte (64 KB) budget and its rationale were already documented in contracts/predict-iq/README.md (WASM_SIZE_LIMIT_BYTES env var reference). Closes solutions-plug#998 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@Fidelis900 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
This PR resolves four issues across contract testing, operational docs, and CI
transparency in a single branch.
#999 — Property-based invariant testing + INVARIANTS.md
proptestas a dev-dependency tocontracts/predict-iq/Cargo.tomlsrc/modules/property_invariants_test.rswith 5 proptest properties:Cancelledstatus is terminal; new bets are rejectedResolvedstatus is terminal; new bets are rejectedtotal_stakedis never negativetotal_stakedto zerocontracts/predict-iq/INVARIANTS.mddocumenting all 7 financial andstate-machine invariants with Certora Prover and KEVM exploration guidance
#1000 — cargo-fuzz targets for top 3 entry points
contracts/predict-iq/fuzz/with a proper cargo-fuzzCargo.tomlfuzz_place_bet— fuzz outcome, amount, and timestamp inputsfuzz_resolve_market— fuzz market ID and winning outcome (including out-of-range)fuzz_withdraw— fuzz market ID on a cancelled marketcontract-fuzzCI job to.github/workflows/test.yml:-max_total_time=60contracts/predict-iq/README.md#Fuzzing#1001 — Operational runbooks for incident response
Five new runbooks under
docs/runbooks/:api-outage.mdredis-failure.mdemail-queue-backup.mdstellar-rpc-unavailable.mdecs-task-crash-loop.mdEach runbook covers: detection signals, immediate mitigation, investigation
steps, escalation path, and post-incident actions.
Five new Prometheus alert rules added to
performance/config/alerts.yaml(
APIOutage,RedisFailure,EmailQueueBackup,StellarRPCUnavailable,ECSTaskCrashLoop) each with arunbook_urlannotation.#998 — WASM binary size budget transparency
build-optimizedCI jobso the raw pre-optimization size is logged on every build alongside the
enforced optimized-size check (existing
WASM_SIZE_LIMIT_BYTES = 65536)CHANGELOG.md[Unreleased]sectionwith budget rationale and measurement instructions for contributors
Closes
Closes #999
Closes #1000
Closes #1001
Closes #998