Repository navigation
feat(smartqa): add run comment edit and delete routes [squash] - #352
Merged
Merged
Conversation
added 4 commits
November 26, 2026 20:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
Draft. Head
6d5f7108704b2e2a2018bc8fe119def2421b1780. Do not merge. An independent cross-lab verifier must sign the verdict (RGS-1) before the PR is marked ready.Conditions
Change
annotation_repository.py: addget_comment,edit_commentanddelete_comment.edit_commentuses the same body checks asadd_commentand setsedited_at.run_annotations.py: addPATCHandDELETE /api/runs/{session_id}/comments/{comment_id}.require_note_write, write. A signed-in caller with no subject gets 404 for a hidden run or unknown comment, not 401. A fully anonymous caller gets 401 first from the sharedevidence_scopedependency, as onPOST.PATCHaccepts only{"body": "..."}and returns 200 with the comment. Only the author can edit, admins included.DELETEreturns 204. The author or an admin can delete.run_not_visible404. A non-author getscomment_not_permitted403.access_control.pyand inpreview_routes.pyREAL.docs/board-api.mddocuments both routes and their errors.actor_required401 mapping inCommentRoutenow covers every non-GET comment route.Blast Radius
GETandPOSTcomment routes and the annotation routes keep their behaviour. The 401 mapping change affects only comment routes with a method other thanGET.test_route_tiers.py,test_preview_routes.py) fail if a route is unclassified.Evidence
Red first: the new repository and API tests failed before the implementation (for example
test_get_comment_returns_the_comment_or_nonefailed with noget_comment)./verifyran: lint wasENV(ruffnot on the bare PATH) and tests wereTOO_BROAD(380 files). Theuv runcommands above cover both.NOT-RUN: a What's New entry. No QA-visible UI changes in this PR.
Refs CHE-7704, CHE-1365