Business rules sit in the repository layer; introduce a ReviewService #125
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: LOW - refactor, do it alongside other work
The observation
Layering is real in one direction: routes never touch raw SQL, sessions flow correctly, and keyset
pagination lives where it should. But responsibilities have not been assigned to the layers:
PhotoRepository.apply_decision_projectionEvidenceRepository.supersedeandDecisionRepository.get_by_idare dead codeCommentRepositoryandUserRepositoryare thin CRUD ceremonyRecommendation
Not worth a rework for its own sake. Do it as a side effect of the concurrency fix (#77): a
ReviewServiceowningsubmit_decision,update_notes,update_flags,add_manual_evidence,and
supersede_evidence— each doing conflict check → history write → projection → audit → commit.That collapses the route bodies to request parsing and makes #6 and #9 testable without going
through HTTP.
Done when
References
backend/app/repositories/photos.py:80-101backend/app/api/routes/photos.pyBest done with: #77 (concurrency fix), #79 (projection rebuild).