hegel-review
Installation
SKILL.md
Reviewing property-based tests
Check every test against this list. When a check fails, quote the offending code and give the smallest change that fixes it.
- Narrowed generators: drawn domains trimmed to dodge failures — ranges shrunk, characters filtered, sizes capped in the domain rather than at materialization, or a whole value class (subnormals, tiny magnitudes, exact bounds) excluded after it failed there, with or without an explanatory comment. The domain should be as wide as the contract.
- Fixed inputs in property clothing: a "property" that only ever sees one value or a few hand-picked cases.
- Missing direction: a parser or validator tested only on valid input; or invalid input checked only for "doesn't crash" when rejection should be asserted.
- More than one property per test: assertions about unrelated contracts sharing one test and one failure signal.
- Evidence-free properties: asserting behavior nothing documents or implies, or restating the implementation instead of a contract.
- Tolerance hacks: an epsilon widened until the test passes; approximate equality where the contract is exact. Equality, ordering, and hashing laws, exact roundtrips, and endpoint or identity claims (ratio 0 or 1 returning an endpoint) are exact contracts; a failed check on one dismissed as "a precision limitation", or a tolerance added after a failure was observed with no ledger note grounding it in the contract, is this hack applied during triage.
- Weakened oracles: asserting only
is_ok(), only a length, or only "doesn't panic" where the actual value could be checked cheaply. should_panicor ignored tests: tests that pass while the bug is present, or are excluded from the default run.- Config parameters fixed: constructor and configuration knobs pinned to defaults instead of generated.
- Untested variants: one property instantiated for one type or variant when the contract covers several; or the same property copy-pasted with drift.
- Silent-triage residue: commented-out asserts, deleted failing tests, TODOs hiding a red test.
- Resource bounds in the wrong place: recursion depth or collection size limited in the drawn domain instead of at materialization.