feat(visual_review): post pr comment with run review link#52653
Draft
feat(visual_review): post pr comment with run review link#52653
Conversation
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.
Motivation
Description
_post_review_prompt_commentwhich posts a best-effort GitHub PR comment toissues/{pr_number}/commentscontaining a direct link to the run review page and logs failures without failing run completion. (products/visual_review/backend/logic.py)mark_run_completedwhenever a run completes with changed/new/removed snapshots on a PR-backed run. (mark_run_completedinlogic.py)mock_github_apifixture and exposedrsps.review_commentsfor assertions. (products/visual_review/backend/tests/conftest.py)TestCommitStatusCheckscovering comment posted on change, and not posted when PR is missing, when there are no changes, or when completion fails. (products/visual_review/backend/tests/test_logic.py)Testing
pytest products/visual_review/backend/tests/test_logic.py::TestCommitStatusChecks -q, but the run failed in this environment withModuleNotFoundError: No module named 'django'so tests could not be executed here. (failure)flox activate -- bash -c "pytest ...", butfloxwas not available in this environment. (not run)review_comments), and no runtime exceptions were introduced by static inspection and committing the changes. (observed via local checks)Codex Task