flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[Contracts] Re-enable acceptance tests and cover the untested public surface

Open blurbeast opened this issue 2 weeks ago • 3 comments

Overview & Background

The acceptance-test module is compiled out (lib.rs:37-38: // #[cfg(test)] // mod acceptance_tests;), and its one live test is misnamed — extend_stream_ttl_requires_existing_stream actually asserts try_withdraw returns StreamNotFound. Zero references exist in test.rs for withdraw_and_swap, batch_create_streams, configure_protocol_fees, transfer_recipient, mint_stream_position, update_position_on_transfer, update_position_on_complete, get_positions_by_owner, or extend_stream_ttl. Hybrid-cliff tests never enable protocol fees (which is what hides the tail-rate bug). get_positions_by_owner is guaranteed to always return StreamNotFound because try_load_positions_by_owner is a stub returning an empty Vec.


Technical Specification & Architecture

  1. Re-enable and repair acceptance_tests (fix the misnamed test and stale "unimplemented" comments).
  2. Add behavioral, auth-failure, and event tests for the untested entrypoints.
  3. Add at least one fee-enabled hybrid-cliff schedule test asserting an intermediate claimable amount.
  4. Implement or explicitly mark try_load_positions_by_owner.

Target Files

  • contracts/stream_contract/src/lib.rs
  • contracts/stream_contract/src/acceptance_tests.rs
  • contracts/stream_contract/src/test.rs
  • contracts/stream_contract/src/storage.rs

Acceptance Criteria

  • [ ] acceptance_tests compiles and runs in CI.
  • [ ] Every public entrypoint has at least one success and one auth-failure test.
  • [ ] Fee-enabled hybrid-cliff behavior is locked by a test.

blurbeast avatar Nov 18 '26 19:11 blurbeast

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

i can solve

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

achiever2110 avatar Nov 21 '26 07:11 achiever2110

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

🧑‍💻 @achiever2110: 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 🌊

drips-wave[bot] avatar Nov 21 '26 07:11 drips-wave[bot]

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

😎 @achiever2110: 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.

drips-wave[bot] avatar Nov 22 '26 20:11 drips-wave[bot]