Conversation
Adds the ModelRejection enum (INVALID/WITHHELD) and a failing unit test for ModelPipelineResult's not-yet-added rejection() accessor and 4-arg set() overload. ModelPipelineResult itself is not yet updated -- next commit wires it up and updates CoreModelPipeline/CoreExtModelPipeline to report it. Towards #2583
Adds a rejection() accessor and a 4-arg set(...) overload so an implementation can optionally report why a REJECTED outcome occurred. The existing 3-arg set(...) is unchanged (rejection defaults to null), so every existing ModelPipeline implementation and consumer keeps compiling and behaving exactly as before. Verified via ModelPipelineResultTest (all 5 cases green). Towards #2583
…WIP) CoreModelPipeline always reports INVALID (its only rejection cause is a validity fault). CoreExtModelPipeline reports WITHHELD when a stage called withhold() and INVALID otherwise (a stage's own reject(diagnostic) call or the base validator's own structural failure). Maven build verification still in progress (multi-module reactor bootstrap in a fresh checkout); standalone javac compile checked. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhKM5SjiYaBR7nTx5RGoq3
…ion test shouldRejectValueFailingBaseValidation drives a real validation-failure report, which needs a working clock; reuse the existing engine(...) test helper instead of a bare mock. Verified via a real Maven surefire run (not just standalone javac): ModelPipelineResultTest (5/5), CoreModelLenientTest (5/5), CoreExtModelPipelineTest (13/13) all green. checkstyle:check clean for runtime/engine and runtime/model-core. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhKM5SjiYaBR7nTx5RGoq3
…ELD coverage TestModel could only ever report an unclassified rejection via its reject list, so no test implementation could exercise ModelRejection.WITHHELD without depending on a production model. Add an additive withhold config list, parallel to reject, that reports WITHHELD on a match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhKM5SjiYaBR7nTx5RGoq3
jfallows
force-pushed
the
claude/cool-wozniak-ebva0y
branch
from
September 24, 2026 17:27
254c2e7 to
02efc1c
Compare
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.
Description
This change introduces a new
ModelRejectionenum to categorize the reasons why aModelPipelinerejects data, distinguishing between invalid data (malformed or failing validation) and withheld data (acceptable but deliberately not delivered).Changes
New
ModelRejectionenum: Defines two rejection categories:INVALID: The value is unacceptable (malformed or fails validation)WITHHELD: The value is acceptable but the pipeline chose not to deliver itEnhanced
ModelPipelineResult:rejection()getter to retrieve the rejection categoryset()method accepting an optionalModelRejectionparameterset()method now delegates to the 4-argument version withnullrejectionUpdated pipeline implementations:
CoreModelPipeline: ReportsINVALIDrejection for structural validation failuresCoreExtModelPipeline: ReportsWITHHELDfor stage-level withholding andINVALIDfor validation failures or envelope errorsComprehensive test coverage:
ModelPipelineResultTestvalidates result behavior with and without rejectionsCoreExtModelPipelineTestandCoreModelLenientTestto verify rejection categorizationMotivation
This change provides better observability and diagnostics by explicitly categorizing why data was rejected, enabling downstream handlers and monitoring systems to distinguish between data quality issues and intentional filtering decisions.
https://claude.ai/code/session_01KhKM5SjiYaBR7nTx5RGoq3