Fix org review submission: graceful missing-org handling + surface validation errors#13367
Merged
Merged
Conversation
Two bugs made "Submit for review" silently redisplay the checklist: 1. run_review_agent raised OrganizationDoesNotExist when the org was deleted between enqueue and (debounced) execution, dead-lettering the task after retries. It now logs and returns, matching the graceful skip pattern used elsewhere in the module. 2. The dashboard submit-review flow discarded the API error detail and showed only a generic toast. It now surfaces the actual message via extractApiErrorMessage, so a 422 (e.g. an undeliverable contact-email domain) is shown to the merchant. Also noted, but intentionally left unchanged, that the shared EmailStrDNS deliverability check can reject legitimate website-only domains; relaxing it is a cross-cutting decision for separate discussion. Co-Authored-By: Stilla <stilla@stilla.ai>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
OpenAPI ChangesNo changes detected in the OpenAPI schema. |
frankie567
reviewed
Jul 24, 2026
- Remove disputed NOTE comment on the EmailStrDNS deliverability validator - Show submit-review errors inline via an Orbit Alert instead of a toast Co-Authored-By: Stilla <stilla@stilla.ai>
pieterbeulque
approved these changes
Jul 27, 2026
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.
Fixes two bugs behind the same symptom (checklist all-green, submission fails, form silently redisplays with no explanation):
run_review_agent(organization_review/tasks.py) raisedOrganizationDoesNotExistwhen the organization was deleted between enqueue and execution, retrying 4x before dead-lettering. It now logs a structured warning and returns, matching the existing graceful-skip pattern already used elsewhere in this module (e.g.review_appeal).AccountPageDetailsRequired.tsx) discarded the API'serror.detailon a 422 (e.g. contact email failing a deliverability/MX-record check) and only showed a generic "Submission failed" toast. It now surfaces the real validation message via the existingextractApiErrorMessagehelper, matching the pattern used inAccountCreateModal.tsx.Also left a NOTE comment on the shared
EmailStrDNSvalidator (kit/email.py) flagging that its deliverability check can reject legitimate website-only domains lacking MX records, since relaxing it is cross-cutting (affects checkout/customers too) and needs its own discussion.Tests: added
TestRunReviewAgentMissingOrganization(backend) andextractApiErrorMessage422/string/fallback coverage (frontend, 16/16 passing). Backendruff check/formatpass; couldn't run the DB-backed backend test suite in the sandbox (no Docker/Postgres, pinned Python 3.14.6 unavailable) - please runuv run task test tests/organization_review/test_tasks.pyin CI/locally to confirm the new test passes.Sent by @maximevast from Matter organization setup assistance.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.