Skip to content

feat(ymax-planner): Improve the "No feasible solution" error message for a graph with debug: true#12641

Merged
mergify[bot] merged 4 commits intomasterfrom
gibson-2026-04-ymax-planner-solver-diagnostics
Apr 28, 2026
Merged

feat(ymax-planner): Improve the "No feasible solution" error message for a graph with debug: true#12641
mergify[bot] merged 4 commits intomasterfrom
gibson-2026-04-ymax-planner-solver-diagnostics

Conversation

@gibson042
Copy link
Copy Markdown
Member

Description

  • teach preflightValidateNetworkPlan about new AssetPlaceRef syntax (DepositFromChainRef +${ChainName} and WithdrawToChainRef -${ChainName}) to avoid errors like Unsupported position key: "+Ethereum"
  • unquote the message for better readability
  • translate e$nn edge ids into $src->$dest labels
  • consolidate pick_e$nn and via_e$nn variable assignments for the same edge
  • sort edges by ascending id
  • underscore-separate number literal digits into groups of 3 such that e.g. 10k uusdc looks like "10_000_000_000".

Security Considerations

None known

Scaling Considerations

The increased object and text manipulation is a negligible burden, and even so, only applies when the solver rejects a flow graph.

Documentation Considerations

n/a

Testing Considerations

Since these error messages are intended to be human-friendly, added test coverage for them.

Upgrade Considerations

Safe for immediate deployment.

@gibson042 gibson042 requested review from dtribble and mhofman April 26, 2026 21:01
Copy link
Copy Markdown
Member

@mhofman mhofman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solver goes a bit over my head, but given the impact of this change, I'm willing to approve.

@gibson042 gibson042 requested a review from dckc April 27, 2026 19:19
@gibson042 gibson042 added the automerge:rebase Automatically rebase updates, then merge label Apr 27, 2026
…ssetPlaceRef syntax

DepositFromChainRef: `+${ChainName}`
WithdrawToChainRef: `-${ChainName}`
…for a graph with debug: true

* unquote the message
* translate `e$nn` edge ids into `$src->$dest` labels
* consolidate pick/via variable assignments for the same edge
* sort edges by ascending id
…" error message

Underscore-separate number literal digits into groups of 3 such that
e.g. 10k uusdc looks like "10_000_000_000".
@gibson042 gibson042 force-pushed the gibson-2026-04-ymax-planner-solver-diagnostics branch from c230bd8 to b966e86 Compare April 27, 2026 19:56
@mergify mergify Bot merged commit 2ac186c into master Apr 28, 2026
175 of 178 checks passed
@mergify mergify Bot deleted the gibson-2026-04-ymax-planner-solver-diagnostics branch April 28, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge:rebase Automatically rebase updates, then merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants