Repository navigation
test: cover validation_reasons turned off - #470
Merged
Merged
Conversation
proTES keeps FOCA's validation reason as detail. Test what deployments get with exceptions.validation_reasons: false (FOCA's default): the detail names the invalid fields by location and code, without the rejected values, and the response lists them in errors. Closes #469 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideTestsAdd coverage for invalid-task responses when validation reasons are disabled, including the field-based detail and structured error fields.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #470 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 31 31
Lines 3013 3013
=========================================
Hits 3013 3013 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
uniqueg
marked this pull request as ready for review
November 9, 2026 17:36
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Linked issues
#469 test: cover validation_reasons turned off · 1 of 1 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Add a test with validation_reasons disabled that checks an invalid task gets a 400, the detail omits the validator's reason, and errors names the invalid field. | ✅ Met | The new test sets the overlay to false and asserts the status, concise detail, and structured errors. |
Sourcery assessment
Approved.
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.
Closes #469
Summary
tests/test_app.py: newtest_validation_without_reasons. With an overlay that setsexceptions.validation_reasons: false(FOCA 0.22's default; proTES's config sets it totrue), an invalid task gets400withdetailInvalid fields: #/executors (invalid-type), without the rejected value, pluscode,typeanderrors.test_validation_detailsalready covers thetruesetting.docs/upgrading.md("Validation errors") already describes the option.How it was verified
pytest tests/test_app.py: 15 passed.pre-commit run --files tests/test_app.py: all hooks pass.Review
adversarial-reviewer and quality-reviewer: no high or medium findings.
Declined review findings
clientfixture in two lines."none" not in detailis redundant with the exact match: kept, as it states the intent (the rejected value isn't echoed).Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Tests: