flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[Audit] Cancelled-via-API stream becomes invisible to status filters

Open K1NGD4VID opened this issue 3 months ago â€ĸ 6 comments

Filed from the second-wave repository audit (issue 17/100). See the audit summary for full category context.

  • Location: backend/src/repositories/stream.repository.ts:6-16 (updateStatus, used by backend/src/controllers/stream/cancel.ts:99)
  • Problem: Cancelling via the API sets isActive: false but never writes a CANCELLED StreamEvent, unlike the indexer's handleStreamCancelled which does both atomically. Until the real on-chain event is later indexed, the stream matches neither the active filter (isActive is false) nor the cancelled filter (requires a CANCELLED event) in listStreams/findStreams.
  • Evidence: updateStatus only touches Stream.isActive, no StreamEvent write.
  • Suggested implementation: Have the cancel handler write a provisional CANCELLED StreamEvent in the same transaction as the status update (reconciled/deduped later by the indexer).
  • Acceptance criteria: A stream cancelled through the API immediately appears under the "cancelled" filter, verified by an integration test.
  • Difficulty: S
  • Expected impact: Closes a window where recently cancelled streams disappear from all status views.

K1NGD4VID avatar Aug 29 '26 18:08 K1NGD4VID

Congratulations, @CHKM001! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.

🧑‍đŸ’ģ @CHKM001: 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 Aug 29 '26 19:08 drips-wave[bot]

Hi there,

Happy to work on this in flowfi. I have a clean approach to address Cancelled-via-API stream becomes invisible to status filters and will verify the implementation against existing test suites. Would love to take this on — please assign!

Cheers,

guptakumarranjeet150 avatar Oct 09 '26 17:10 guptakumarranjeet150

@Richard-tobi has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hi maintainer, i can work on this. Kindly assign

â„šī¸ Repo Maintainers: To accept this application, review their application or assign @Richard-tobi to this issue.

Richard-tobi avatar Oct 15 '26 13:10 Richard-tobi

@p4uld4vid016-code has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hello maintainer, i would like to work on this issue

â„šī¸ Repo Maintainers: To accept this application, review their application or assign @p4uld4vid016-code to this issue.

p4uld4vid016-code avatar Oct 16 '26 22:10 p4uld4vid016-code

Congratulations, @p4uld4vid016-code! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

🧑‍đŸ’ģ @p4uld4vid016-code: 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 Oct 16 '26 22:10 drips-wave[bot]

This issue has been completed by @p4uld4vid016-code as part of the Stellar Wave Program's 10th Wave đŸĨŗ

😎 @p4uld4vid016-code: 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 Oct 18 '26 02:10 drips-wave[bot]