Review source
Round 14 (Opus 4.8 + Gemini) — DX. Two competing Python SDKs.
Problem
- Two Python SDKs exist: sdk/grantlayer/client.py vs sdk/python/grantlayer_client.py — which is canonical? This is confusing and a maintenance hazard.
- SDK tests primarily cover happy-path. They would be more robust if they also tested resiliency against unexpected server errors (500s, malformed JSON, timeouts).
- PII/GDPR consideration for webhook DLQ: webhook_delivery logs the entire payload to the dead-letter queue (Redis) on failure (workers/jobs.py). If the payload contains PII it could be stored indefinitely.
Fix
- Pick ONE canonical Python SDK (the httpx-based async one), delete or alias the other, update all imports and docs
- Add SDK resiliency tests: mock 500 responses, malformed JSON, connection timeouts — assert the SDK retries/raises cleanly
- Webhook DLQ: redact or hash PII fields before storing failed payloads in Redis, OR add a TTL on DLQ entries so they don't persist indefinitely
Acceptance Criteria
- Exactly one canonical Python SDK; the duplicate is removed/aliased
- SDK tests cover 500s, malformed JSON, timeouts
- Webhook DLQ entries are PII-safe (redacted or TTL'd)
- mypy clean, ruff clean, tests >= baseline
Review source
Round 14 (Opus 4.8 + Gemini) — DX. Two competing Python SDKs.
Problem
Fix
Acceptance Criteria