📝 docs: audit and correct all ADR statuses and content

Full pass over all 25 ADRs to align documentation with actual
implementation state. Changes by ADR:

README index: completely rewritten — previous table mapped numbers to
wrong titles from 0010 onward.

0008 (BDD Testing): added note that flat features/ structure and godog
CLI invocation are superseded by ADR-0024; framework decision stands.

0009 (Hybrid Testing): renamed from "Combine BDD and Swagger-based
testing" to "BDD Testing with OpenAPI Documentation"; clarified that
the SDK-testing layer was never built and has no open issue.

0013 (OpenAPI/Swagger): removed leftover merge conflict artifact
(=======) and duplicated 60-line block.

0015 (Cobra CLI): fixed status contradiction — body said "Implemented"
while footer said "Proposed". Now Accepted.

0018 (User Management): status Proposed → Accepted; system is fully
implemented (JWT, bcrypt, GORM repos all present).

0019 (PostgreSQL): status Proposed → Accepted (Partial); added warning
that sqlite_repository.go and gorm/driver/sqlite still present contrary
to ADR intent.

0021 (JWT Retention): fixed wrong cross-reference (previously cited
ADR-0009 "Hybrid Testing" as source of JWT multi-secret support); fixed
title number from "10" to "21"; clarified that base JWT is implemented
but the retention cleanup job is not.

0022 (Rate Limiting/Cache): added warning block linking to open Gitea
issue #13; changed all 20 false  implementation checkboxes to .

0023 (Config Hot Reloading): added note that BDD scenarios exist for
this feature but the feature itself is not yet implemented.

0024 (BDD Organization): status Proposed → Accepted; modular domain
structure is fully built.

0025 (BDD Scenario Isolation): status Proposed → Accepted (Partial);
Phase 1 done, Phase 2 blocked on ADR-0022.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-12 23:26:09 +02:00
parent 8bae62c28e
commit 73a3af1552
12 changed files with 83 additions and 128 deletions

View File

@@ -3,6 +3,8 @@
## Status
**Proposed** 🟡
> **⚠️ Not yet implemented.** Gitea issue #13 ("feat: Implement Rate Limiting and Caching Strategy") is open and tracks this work. `go-cache`, `redis`, and `ulule/limiter` are absent from `go.mod`. The phase checkboxes below are corrected to reflect actual status.
## Context
As the dance-lessons-coach application grows and potentially serves multiple users simultaneously, we need to implement rate limiting to:
@@ -284,38 +286,38 @@ func GetCacheKey(prefix, entityType, entityID string) string {
## Implementation Phases
### Phase 1: In-Memory Cache (Current Sprint)
- Research and select in-memory cache library
- Implement cache interface and in-memory service
- Add cache configuration to config package
- Implement basic cache operations (set, get, delete)
- Add TTL support and automatic cleanup
- Cache JWT validation results
- Add cache metrics and monitoring
- Research and select in-memory cache library
- Implement cache interface and in-memory service
- Add cache configuration to config package
- Implement basic cache operations (set, get, delete)
- Add TTL support and automatic cleanup
- Cache JWT validation results
- Add cache metrics and monitoring
### Phase 2: Redis-Compatible Cache (Next Sprint)
- Set up Dragonfly/KeyDB in development environment
- Implement Redis cache service
- Add configuration for Redis connection
- Implement cache fallback strategy (Redis → in-memory)
- Add health checks for Redis connection
- Implement distributed cache invalidation
- Set up Dragonfly/KeyDB in development environment
- Implement Redis cache service
- Add configuration for Redis connection
- Implement cache fallback strategy (Redis → in-memory)
- Add health checks for Redis connection
- Implement distributed cache invalidation
### Phase 3: Rate Limiting (Following Sprint)
- Research and select rate limiting library
- Implement rate limiter service
- Add rate limit configuration
- Implement Chi middleware for rate limiting
- Add rate limit headers to responses
- Implement IP whitelisting
- Add endpoint-specific rate limits
- Research and select rate limiting library
- Implement rate limiter service
- Add rate limit configuration
- Implement Chi middleware for rate limiting
- Add rate limit headers to responses
- Implement IP whitelisting
- Add endpoint-specific rate limits
### Phase 4: Advanced Features (Future)
- Cache warming for critical data
- Two-level caching (Redis + in-memory)
- Cache compression for large objects
- Rate limit exemptions for admin users
- Dynamic rate limit adjustment
- Cache analytics and usage patterns
- Cache warming for critical data
- Two-level caching (Redis + in-memory)
- Cache compression for large objects
- Rate limit exemptions for admin users
- Dynamic rate limit adjustment
- Cache analytics and usage patterns
## Configuration