Skip to content

fix: make evaluation/submission delete a soft delete with revoke - #243

Merged
tmimmanuel merged 1 commit into
mainfrom
dev
Jul 23, 2026
Merged

fix: make evaluation/submission delete a soft delete with revoke#243
tmimmanuel merged 1 commit into
mainfrom
dev

Conversation

@tmimmanuel

Copy link
Copy Markdown
Collaborator

Summary

  • Add deleted_at timestamp column to Submission and EvaluationRun.
  • DELETE /api/admin/evaluations/{id} and DELETE /api/admin/submissions/{id} now set deleted_at instead of hard-deleting the row (submission delete also cancels its queued jobs via the existing cancel_submission_jobs helper).
  • New POST /api/admin/evaluations/{id}/revoke and POST /api/admin/submissions/{id}/revoke clear deleted_at to restore a row.
  • Public /api/leaderboard excludes deleted_at rows by default (so a deleted submission still disappears from public standings); admin leaderboard passes include_deleted=True so deleted rows stay visible there for revoking.
  • Companion PR in mini-router.github.io adds the Revoke button and visual "deleted" state to the admin UI.

Test plan

  • pytest passes (19 passed, 18 skipped)
  • Verified live: soft-delete an evaluation → still listed via GET /evaluations with deleted_at set → revoke → deleted_at clears
  • Verified live: soft-delete a submission → disappears from /api/leaderboard (public) but still present in /api/admin/leaderboard with deleted_at set → revoke → reappears in public leaderboard

Hard-deleting evaluations/submissions from the admin UI was
irreversible. Add a deleted_at timestamp column to both Submission and
EvaluationRun; DELETE now sets deleted_at instead of removing the row
(and, for submissions, cancels its queued jobs), and new
POST .../revoke endpoints clear deleted_at to restore a row.

The public /api/leaderboard endpoint excludes deleted_at rows by
default (so deleting a submission still removes it from the public
standings), while the admin leaderboard endpoint passes
include_deleted=True so deleted rows stay visible there with a Revoke
action. GET /api/admin/evaluations already returned all rows
regardless of deleted_at, so no change needed there beyond exposing
the field.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added eval Evaluation changes validator Validator backend changes labels Jul 23, 2026
@tmimmanuel
tmimmanuel merged commit 796364d into main Jul 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eval Evaluation changes validator Validator backend changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant