Vestigial reviewer_notes field: rename, deduplicate, or add real UI #85
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?
reviewer_notesexists on bothpostsandreview_feedback, described as "notes from human reviewer" — but there has never been a review-UI input for it. The only thing that writes it is the auto-reject system (post.reviewer_notes = "[auto-rejected] {reason}") and the REST API (PATCH /posts/{id}), and nothing in the web UI ever reads or displays it.PR #81 removes the one place it had any UI: the "Set Manual Spam Score" modal's "Notes (optional)" textarea. After that, the field is effectively just an auto-reject annotation plus an API field — the "human reviewer notes" concept doesn't actually exist anywhere user-facing.
Decision to make (pick one):
auto_reject_reasononposts, scoped to the auto-reject path only, and stop pretending there's a human-notes feature.posts.reviewer_notesandreview_feedback.reviewer_notes; keep it in one place only.Context: the field today is mostly
[auto-rejected] …strings produced byreject_blocked_posts, plus whatever the API sets.Findings from exploring
reviewer_notes:posts.reviewer_notesis written in exactly one place —reject_blocked_postssets"[auto-rejected] {reason}". It is read only byPostResponse(the API); the web review UI never reads it (it recomputes blocked reasons from the filters, not from this field).review_feedback.reviewer_notesis written bycreate_review_feedback(auto-reject copies the post note;PATCH /posts/{id}passes a note only whenapprovedis also present). Nothing in the codebase reads it —ReviewFeedbackis itself a write-only audit table.PostUpdate.reviewer_notes(the PATCH input) is described as "Notes from human reviewer" but only lands onreview_feedback, which nobody reads.Recommendation — combine options 1 + 2 (both apply):
posts.reviewer_notes→posts.auto_reject_reason(its only writer is auto-reject).review_feedback.reviewer_notesentirely (redundant duplicate, never read).reviewer_notesfromPostUpdate; exposeauto_reject_reasononPostResponse.create_review_feedbackloses itsreviewer_notesparameter.Plan of attack:
models.py→services/review.py+services/export_eligibility.py→schemas.py→api/__init__.py→ migration → tests → docs.Branch:
feat/issue-85-auto-reject-reason, PR intofeat/issue-80-collectwithRefs #85.(The stale
templates/review.htmlTODO is a separate follow-up, not part of this change.)