API-002 updated: - Remove db.commit() from anti-patterns (allowed at endpoint level) - Add db.delete() to anti-patterns (business logic) - Clarify that transaction control != business logic SVC-006 added (new rule): - Services should NOT call db.commit() - Transaction control belongs at endpoint level - Exception: log_service.py for audit log commits - Severity: warning (to allow gradual migration) This aligns with industry standard: - One request = one transaction - Services do work, endpoints control commits - Enables composing multiple service calls in single transaction 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
42 KiB
Executable File
42 KiB
Executable File