Moderator content-correction endpoint - #253
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…note max-length test
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Auto-approved: Adds a moderator-only content-correction endpoint that overwrites live extension content as an approved revision, with guards, docs, and tests. The change is additive, moderator-gated, audited in revision history, and does not alter existing behavior.
Re-trigger cubic
Implements the moderator content-correction workflow decided in #251 (option b: direct overwrite as auto-approved revision).
POST /extensions/{id}/moderator-correct(requireModerator, tagModeration): body isExtensionUpdateSchema+ requiredcorrection_note(1–2000 chars). No?notifyquery and no mail path — the correction is recorded in revision history only.ExtensionsDatabase.moderatorCorrect()next todelist()/relist(): one D1batch()inserting anapprovedrevision row (submitted_by/reviewer_id= moderator, epoch carried over) then publishing gated onchanges() = 1. Guards: published, listed, no pending revision (409 — approve/reject first, no supersede), active moderator. Ownership columns andpublished_atuntouched;revalidateCatalogue()on success.moderation-correct.test.ts(12 cases: auth, mid-request deactivation, 404, 409 ×3, 422 ×2, audit/ownership assertions, case-insensitive id, full owner-flow history) + revalidate purge test. Full v2 suite: 345 passed,tscclean.Closes #251.