Skip to content

Retry dusty CAT combines onto a remainder coin - #200

Merged
hoffmang9 merged 2 commits into
mainfrom
feat/combine-dust-third-coin
Aug 13, 2026
Merged

Retry dusty CAT combines onto a remainder coin#200
hoffmang9 merged 2 commits into
mainfrom
feat/combine-dust-third-coin

Conversation

@hoffmang9

Copy link
Copy Markdown
Owner

Summary

  • After the two-sided spread, buy clips like 24,975 mojos left CAT dust on the tightest covering set (two 25,025 coins → 100 mojo change), so the shaper returned CannotFund even when a remainder coin could absorb legal change.
  • Keep the 1 CAT dust floor. When a covering combine would be dust, retry once while skipping dusty overshoots so leftover change lands on an extra remainder coin, or on a different pair whose change is already legal.
  • Fail closed when no covering set within combine_input_cap leaves legal change. Daemon flat combine (no dust context) is unchanged.

Test plan

  • shape::combine tests: third-coin remainder, two 25.025s alone still rejected, alternate pair with legal change preferred
  • selection test: skip dusty two-coin cover and take remainder (ignore dust fragments)
  • Existing fragmented cap-5 / eco181 / bootstrap planner dust tests still pass
  • After merge: rebuild john-deere binaries and restore the size-25 buy rung so bootstrap can mint 24.975 clips

…e dust floor.

Spread-adjusted buy clips left sub-CAT change on the tightest covering set, so the shaper returned CannotFund even when another coin could absorb legal change.
…licit.

The legal-change selector always sets an input cap, so dust never reached the greedy path; DustChangeFilter now enters combine from policy instead of a selection re-export.
@hoffmang9
hoffmang9 merged commit b4bc0dd into main Aug 13, 2026
3 checks passed
@hoffmang9
hoffmang9 deleted the feat/combine-dust-third-coin branch August 13, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant