Repository navigation
fix(runtime): validate reasoning outputs before rule evaluation - #70
Merged
Merged
Conversation
This was referenced Nov 1, 2026
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.
A reasoning provider can currently return boolean or infinite values for a float field and influence a rule; malformed outputs can also be mistaken for ordinary warm-up. This validates the complete response against the declared supported scalar output signature before dependent evaluation, emits bounded infer.invalid/infer.failed diagnostics, and preserves unrelated rules.
Closes #57. Part of #67.
Output ranges were previously documented and tested as metadata only. This PR deliberately enforces output types/ranges and updates that contract and the route regression: a valid response can log the approved route, while an invalid response takes its declared escalation fallback. The host still owns all external effects. Input-range enforcement is unchanged.
Compatibility tightening: output names must match exactly; bool is not numeric; numeric fields must be finite; int uses the existing IR magnitude bound. String, duration and series outputs are explicitly unsupported by this numeric VM and are rejected before calling a provider. Review the package-version/release implications before merging.
Validation: fake providers cover valid high/low responses, malformed records, ranges, failures, replay, per-bar isolation and cancellation signals. Root full reference suite with the three independent #55/#56/#57 fixes: 1,617 passed, 8 skipped. No paid inference or IBM execution.