flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[test] Cover migration unique constraint recovery

Open K1NGD4VID opened this issue 1 month ago â€ĸ 7 comments

Labels: testing, backend, points: 150 File/location: backend/prisma/migrations/20260428000001_add_stream_event_unique_constraint/migration.sql

Description: Duplicate existing rows and rerunning the migration lack deployment tests.

Acceptance Criteria:

  • [ ] Add deterministic tests for the documented success and failure paths, including boundary inputs and dependency failures.
  • [ ] Run the new tests in the corresponding CI suite and assert the public behavior and error contract.

Notes: This is a focused regression gap for the cited module; it was not covered by the existing test files reviewed during the sweep.

K1NGD4VID avatar Oct 22 '26 04:10 K1NGD4VID

Hi @LabsCrypt! I'd like to work on this issue (#1765). Plan: add deterministic tests covering 20260428000001_add_stream_event_unique_constraint/migration.sql duplicate row deduplication, unique constraint enforcement, and idempotent migration rerun recovery. ETA: ~30 minutes.

huangji6693-max avatar Oct 27 '26 07:10 huangji6693-max

Submitted PR: https://github.com/LabsCrypt/flowfi/pull/1831

huangji6693-max avatar Oct 27 '26 09:10 huangji6693-max

Hello everyone,

I reviewed the issue for Cover migration unique constraint recovery. We need to resolve 'cover migration unique constraint recovery' cleanly across the target modules.

Proposed Implementation:

  1. Trace the current code execution path to isolate the behavior boundary.
  2. Implement a focused, modular fix for 'Cover migration unique constraint recovery' adhering strictly to repository architecture.
  3. Ensure defensive guards and backward compatibility are maintained.

Testing & Verification: I will reproduce the target scenario locally, add regression unit tests, and confirm all CI checks pass 100% green.

Happy to handle this cleanly. Please assign it over and I'll put together the PR.

maxx-GENIUS avatar Nov 02 '26 09:11 maxx-GENIUS

Hi maintainers,

I reviewed the issue for Cover migration unique constraint recovery. We need to resolve 'cover migration unique constraint recovery' cleanly across the target modules.

Proposed Implementation:

  1. Trace the current code execution path to isolate the behavior boundary.
  2. Implement a focused, modular fix for 'Cover migration unique constraint recovery' adhering strictly to repository architecture.
  3. Ensure defensive guards and backward compatibility are maintained.

Testing & Verification: I will reproduce the target scenario locally, add regression unit tests, and confirm all CI checks pass 100% green.

Ready to implement the patch today once assigned. Thanks!

GangDev6707 avatar Nov 08 '26 04:11 GangDev6707

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

Hi maintainer, I can get this issue fixed quickly. Please assign it to me

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

pyper01 avatar Nov 21 '26 12:11 pyper01

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

🧑‍đŸ’ģ @pyper01: 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 12:11 drips-wave[bot]

This issue has been completed by @pyper01 as part of the Stellar Wave Program's 11th Wave đŸĨŗ

😎 @pyper01: 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 21 '26 16:11 drips-wave[bot]