Property tests for invariants: throw thousands of generated inputs at rules that must never break
minchoi · x · 2026-11-19
Rule 3 of minchoi's thread: write property tests for things that must never break—state a rule you think can't fail, then attack it with thousands of generated inputs. Examples: balance never goes negative, running a migration twice equals once, decode(encode(x))==x. Tools: fast-check (JS/TS), Hypothesis (Python), proptest (Rust).
More from coding & agent
- Claude Code verification rules: differential tests, REVIEW.md isolation, and mined rules — minchoi · 2026-11-19
- Claude Code rules: 3 failed fixes then a human, and checks a change can't edit — minchoi · 2026-11-19
- Give Claude a way to run the change, not just the tests: verify skill in .claude/skills/ — minchoi · 2026-11-19
- Claude Code team says Claude writes and reviews ~90% of their code, aided by 7 verification rules — minchoi · 2026-11-19
- Replit MCP Server lets AI assistants manage workspaces, files and deployments — modelcontextprotocol · 2026-11-19
- Developer flags Codex background agent reading internal chats and acting without authorization — HarveenChadha · 2026-11-19