Skip to content

Surface operation validation constraints - #806

Closed
morluto wants to merge 2 commits into
mainfrom
agent/enrich-operation-validation-diagnostics
Closed

Surface operation validation constraints#806
morluto wants to merge 2 commits into
mainfrom
agent/enrich-operation-validation-diagnostics

Conversation

@morluto

@morluto morluto commented Aug 7, 2026

Copy link
Copy Markdown
Owner

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 passed
  • make test-component TESTS='tests/composition/portfolio/test_operation_installation.py::test_bounded_adapter_preserves_the_rejected_field_and_constraint' — 1 passed
  • make check-static — passed

@morluto
morluto marked this pull request as ready for review August 8, 2026 07:06
@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

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.

@morluto

morluto commented Aug 8, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Topology capability hides the failing complex_digest constraint after an invalid request

1 participant