Common Patterns
This section documents recurring implementation patterns used across the project. Each entry provides pseudocode (not verbatim code) and links to the real implementation in src/ or code_source_simule/.
Context
The same problems recur in this project: API rate limiting, silent error swallowing, credential leaks, and incomplete test coverage. Documenting patterns here prevents re-solving the same problem and ensures consistency across the codebase.
Details
Contents of this section
| File | Purpose | Key use case |
|---|---|---|
| retry-strategies.md | Exponential backoff + 24h quota lockout | API quota limits, rate limiting |
| error-handling.md | Error propagation, silent failure prevention | SMTP alerts, pipeline failures |
| security-checklist.md | Secrets hygiene, OWASP discipline | Any new integration, credential management |
| testing-approach.md | Test-first rules, exception conditions | New features, bug fixes, documentation |
How to use these patterns
- Find the pattern that matches your problem in the table above.
- Read the Details section for pseudocode and the reasoning behind the pattern.
- Follow the Links to the real implementation in
src/— the pseudocode is a guide, not the code. - If the real implementation has diverged from the pattern, update this file (wiki is authoritative for pattern intent; code is authoritative for implementation).
Links
- retry-strategies.md
- error-handling.md
- security-checklist.md
- testing-approach.md
- ../01_architecture/key-decisions.md — decisions that produced these patterns
- ../index-by-task.md — find patterns by task