Skip to content

pred path with an instance: one failing path aborts the whole batch #1177

Description

@isPANN

Summary

When pred path runs on a source instance, one failing path aborts the entire batch and shows no results for the paths that succeeded.

pred create MIS --graph 0-1,1-2,2-3,3-0,0-2 -o mis.json
pred path MIS QUBO mis.json
# Error: concrete path 4 failed during reduction: ILP -> ILP: binary encoding requires a finite upper bound ...
pred path MIS QUBO mis.json --limit 4   # works: paths 1–4 succeed

Root cause

ReductionGraph::execute_paths (src/rules/graph.rs) returns Result<Vec<ExecutedPath>, ExecutePathsError> and uses ? on each reduction step. A reduction that rejects one particular instance is a valid outcome for that path, not a fatal error for the whole request.

Paths legitimately fail for particular instances:

Proposal

  • Return one outcome per path: executed (with measured parameters) or failed (with failing step index and ReductionError). Keep batch-level errors (empty path, different sources, unknown node) as errors.
  • Keep prefix sharing. A failed prefix should mark every path that shares it as failed without running it again.
  • Update the text and JSON output of pred path and the MCP tool so failed paths show up with their reason instead of aborting.
  • Tests: a batch with one failing and one succeeding path, and a shared failing prefix.

Related: #1152, #1178 (size budget), #1179 (path ranking).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions