Make pred inspect respect exact problem variants - #1121
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates pred inspect (CLI and MCP) to compute reduces_to from the loaded problem’s exact normalized variant, and to list only witness-executable reductions (matching pred reduce defaults). It also renders non-default target variants as reusable slash specs (e.g., Name/Variant/...) and adds regression coverage to ensure every advertised inspection target is actually reducible.
Changes:
- Add
ReductionGraph::outgoing_reductions_from(...)to query outgoing reductions for an exact variant and reduction mode. - Update CLI + MCP inspection to derive targets from the exact variant and filter to witness-capable reductions, formatting non-default targets as slash specs.
- Add unit + CLI regression tests covering exact-variant separation and witness-only inspection output.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/rules/graph.rs |
Adds an exact-variant outgoing reduction query API used by inspection logic. |
src/unit_tests/rules/graph.rs |
Adds unit tests verifying exact-variant and mode filtering behavior, plus unknown-variant rejection. |
problemreductions-cli/src/commands/inspect.rs |
Switches inspection to exact-variant, witness-executable targets and formats non-default variants as slash specs. |
problemreductions-cli/src/mcp/tools.rs |
Aligns MCP inspection output with the updated CLI inspection behavior. |
problemreductions-cli/tests/cli_tests.rs |
Adds CLI regressions ensuring inspect advertises only executable targets and excludes non-witness reductions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1404
to
+1405
| /// Get executable outgoing reductions from one exact problem variant. | ||
| pub fn outgoing_reductions_from( |
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.
Summary
Verification
Stacked on #1083.
Fixes #1114