Shared task
Fixed #34338 -- Allowed customizing code of ValidationError in BaseConstraint and subclasses.
PR #16560 ↗ · django/django · · merged Feb 23, 2023 · +268 −23 · base 51c9bb7cd160
what a new run launched now would send
Allow to customize the code attribute of ValidationError raised by BaseConstraint.validate Description It is currently possible to customize the violation_error_message of a ValidationError raised by a constraint but not the code. I'd like to add a new violation_error_message parameter to BaseConstraint to allow to easily add one. Currently, to achieve the same result, you have to subclass the constraint to tweak validate to catch and reraise the ValidationError. Since the documentation recommends to Provide a descriptive error code to the constructor: when raising a ValidationError in https://docs.djangoproject.com/en/4.1/ref/forms/validation/#raising-validationerror , I think it would make sense to provide this possibility for errors raised by constraints. If you think it would be a good idea, I'd be happy to work on a PR. Work only inside this repository checkout. Make the code change the task describes, keeping the diff focused — no drive-by refactors. When you are done, leave your changes committed or in the working tree; they are collected automatically. Stay on this snapshot checkout (`task/ycb_django_pr16560`). Never checkout, pull, or rebase onto `main`. That branch is a README-only orphan. Stay on this HEAD. Do not fetch another default branch. Push only on the Cursor-created `crazy-cursor/…` side branch from this HEAD.
Some past runs of this task were launched with a different prompt (the prompt template changed since, or those runs predate this benchmark's stored prompt). Each run persists the exact prompt it sent at launch — that per-launch record is the audit trail; this page shows only the current one.
| Run | Model | Verdict |
|---|---|---|
| Aug 21, 12:31 UTC · completed | composer-2.5 | PASS |
| Aug 21, 12:31 UTC · completed | grok-4.6 | PASS |
| Aug 21, 12:31 UTC · completed | grok-4.6-low |
Powered by YourCodingBench — benchmark coding models on your own repo's commits. sign in
| Aug 21, 12:31 UTC · completed | grok-4.6-medium | PASS |
| Aug 21, 12:31 UTC · completed | grok-4.6-xhigh | PASS |
Binary verdicts from the pinned judge (D27). Full attempt detail — candidate diff, transcript, timings — lives on each run page's score matrix.