Surface operation validation constraints - #806
Closed
morluto wants to merge 2 commits into
Closed
Conversation
morluto
marked this pull request as ready for review
August 8, 2026 07:06
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Owner
Author
|
Closing as superseded by #818, which landed the root-cause fix with the current validation-diagnostic ownership model. This branch predates that design and now conflicts with it; reviving it would reintroduce duplicated and less precise enrichment behavior. |
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 #781.
Problem
A Pydantic model-validation failure was reduced to the domain's generic invalid-request diagnostic. For a stale topology
complex_digest, the runtime failed closed but did not explain the failing constraint.Change
Preserve one bounded, data-minimized validation record when installed computed, materialized, or bounded-search operations reject a Pydantic request. The static domain code and failure semantics remain unchanged; only the diagnostic gains its path when available, a constraint hint, and structural type/path/message data.
The record excludes the rejected input, validation context, and Pydantic URLs. It also caps dynamic text to the existing diagnostic field bounds.
Regression coverage
Covers a stale topology digest end to end and each operation adapter's Pydantic-validation branch, including a 2,000-character validator message that must remain bounded.
Validation
make test-component TESTS='tests/composition/portfolio/test_operation_installation.py::test_validation_error_preserves_the_rejected_field_and_constraint tests/composition/portfolio/test_operation_installation.py::test_validation_error_respects_diagnostic_text_bounds tests/composition/runtime/test_topology_capabilities.py::test_stale_complex_digest_surfaces_its_constraint'— 3 passedmake test-component TESTS='tests/composition/portfolio/test_operation_installation.py::test_bounded_adapter_preserves_the_rejected_field_and_constraint'— 1 passedmake check-static— passed