Skip to content

maintenance-pool: the Error::InvalidSplit path has no test #836

Closed

Description

@chonilius

Error::InvalidSplit (code 17) is declared in contracts/maintenance-pool/src/error.rs and returned by the contract, but never asserted anywhere in contracts/maintenance-pool/src/test.rs:

$ grep -c 'Error::InvalidSplit' contracts/maintenance-pool/src/test.rs
0

Reachable via: withdraw with recipients whose bps do not sum to 10000, or an empty list, or a duplicate address (contracts/maintenance-pool/src/lib.rs:408). escrow and milestones each assert this; maintenance-pool gained the path in #483 without a test.

Why it matters: CI runs cargo llvm-cov --workspace but does not fail on a coverage threshold, so an untested error path shows up only as a number in the log. These are the branches a client's error handling is written against — an untested one can be renumbered or made unreachable by a refactor without any test turning red.

Fix: add a #[test] that drives the contract into the condition and asserts try_* returns Err(Ok(Error::InvalidSplit)).

Activity

  1. added
    testing
    on Nov 11, 2026
  2. rupesh-kumar-sah commented on Nov 12, 2026

    @rupesh-kumar-sah

    Hi maintainers,

    I reviewed "maintenance-pool: the Error::InvalidSplit path has no test" and have a structured approach ready for implementation:

    I have reviewed the problem description and acceptance criteria for this issue. I have a clear, tested implementation ready with defensive error handling and 100% green CI proof.

    I will deliver a clean, well-tested, and production-ready PR promptly upon assignment. Kindly assign this issue to me.

    Thank you!

  3. added
    Stellar Wave
    on Nov 20, 2026
  4. defimomof2 commented on Nov 20, 2026

    @defimomof2
    Contributor

    @defimomof2 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

    I can take this on. I've gone through the details and will provide a well-tested solution aligned with the project standards.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @defimomof2 to this issue.

  5. drips-wave commented on Nov 20, 2026

    @drips-wave

    Congratulations, @defimomof2! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

    🧑‍💻 @defimomof2: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  6. grantfox-oss commented on Nov 21, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @defimomof2's PR #923 was approved and merged by @chonilius.

    🏆 @defimomof2: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (958 total points). Track your full progress on GrantFox.

    👏 Great work, @defimomof2! Keep contributing to MergeFi.

  7. drips-wave commented on Nov 21, 2026

    @drips-wave

    This issue has been completed by @defimomof2 as part of the Stellar Wave Program's 11th Wave 🥳

    😎 @defimomof2: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Assignees

Labels

Stellar Wavetesting

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions