From argos
Property-based testing review — Python Hypothesis + TS fast-check + Go gopter + Schemathesis (OpenAPI). Property hierarchy, generator hijyeni, stateful PBT, regression seed, CI gate.
npx claudepluginhub resultakak/argos --plugin argos<module | path | openapi.yaml># /property-test-review ## Amaç Mevcut test'lerde property-based test fırsatlarını bul **ve** yeni kod için PBT tasarımı yap. Generator + shrinking + regression seed + CI gate disiplini. test-engineer'a destek; Schemathesis varsa api-contract-guardian delege. ## Ne Zaman Kullanılır - Round-trip / parser / encoder fonksiyon yazıldı (encode/decode, JSON, datetime, money, unicode). - State machine domain (cart, payment intent, queue, cache) test edilecek. - OpenAPI spec mevcut; otomatik PBT (Schemathesis) gate'i kurulacak. - Flaky test fix: seed corpus oluşturulup deterministic replay. -...
Share bugs, ideas, or general feedback.
Mevcut test'lerde property-based test fırsatlarını bul ve yeni kod için PBT tasarımı yap. Generator + shrinking + regression seed + CI gate disiplini. test-engineer'a destek; Schemathesis varsa api-contract-guardian delege.
<module> — örn. apps/orders/serializers.py<path> — apps/orders/<openapi.yaml> — Schemathesis run içinYeni agent yok — mevcut agent'lara delege:
test-engineer — PBT katman tasarımı, piramit içinde konumu, flake
yönetimi (sahiplik).api-contract-guardian — Schemathesis bulgusu spec değişikliği gerektirdiğinde.backend-reviewer — invariant ifadesi domain-correct mi.security-reviewer — Schemathesis header injection / content-type
confuse bulguları.database-optimizer — state machine PBT DB-bağımlıysa fixture pattern.property-based-testing skill'i prosedürü taşır.
Rule: rules/property-based-testing.md, rules/testing.md.
rules/property-based-testing.md + rules/testing.md yükle.hypothesis|fast-check|gopter|schemathesis).assume() rate.RuleBasedStateMachine /
fc.commands tasarım..hypothesis/examples/ commit; @example
manuel seed.assume() filter rate > %30.derandomize=True PBT (stochastic'i öldürür)..hypothesis/examples/ gitignored.@example'a eklemeyi atla."any input" → spec yok)./property-test-review apps/orders/serializers.py # Python Hypothesis aday
/property-test-review src/cart/ # TS fast-check stateful
/property-test-review openapi.yaml # Schemathesis kurulum
/property-test-review --flake-fix tests/test_cart.py # seed corpus oluştur
# PBT Review: apps/orders/
## Current state
- Test framework: pytest + pytest-asyncio
- PBT kütüphane: yok
- Aday fonksiyon: 4 (encode_order, normalize_sku, money_round, parse_address)
- OpenAPI: var (openapi.yaml — 28 endpoint)
- Stateful domain: Cart aggregate (apps/cart/aggregate.py)
## Findings
- **High**: `encode_order/decode_order` round-trip test yok — unicode SKU
başarısız oluyor (manual repro: `"café-x"`)
- **High**: `Cart.checkout` state machine PBT yok — 14 step retry senaryosunda
total negatife düşebilir (manual: add→remove→retry zinciri)
- **Medium**: Schemathesis CI gate yok — spec ↔ impl drift catch yok
- **Medium**: `money_round(0.1 + 0.2)` örnek-based test idempotency property
eksik
- **Low**: `pytest-hypothesis` plugin install yok (Hypothesis fixture
integration sınırlı)
## Action Items
| P0 | Hypothesis encode/decode round-trip + unicode generator | @backend | 2026-05-25 |
| P0 | Cart stateful PBT (RuleBasedStateMachine) total invariant | @backend | 2026-05-30 |
| P1 | Schemathesis CI gate (checks all, stateful=links) | @ci-cd | 2026-06-01 |
| P1 | money_round idempotency property + @example seeds | @backend | 2026-05-25 |
| P2 | pytest-hypothesis plugin + conftest profile (ci/dev) | @test-eng | 2026-05-25 |
Projected: edge case coverage +N kategori; spec ↔ impl drift CI'da yakalanır.