feat: integration tests for full stream lifecycle via API#432
Conversation
|
hey, main was failing CI from broken auth imports + frontend parse errors. fixed and pushed to main now. please rebase to pick up the fixes: git fetch upstream
git rebase upstream/main
git push --force-with-leaseif there's a conflict, resolve it locally and we'll review once CI is green. |
3e156c7 to
184688c
Compare
|
hey, main CI is fully green now. there were several real TypeScript and test issues from #444's merge that have all been fixed. please rebase one more time: git fetch upstream
git rebase upstream/main
git push --force-with-leaseyour PR's diff should be much cleaner after this rebase since main now has the canonical versions of cancel.ts, sorobanService.ts, and the withdraw test. |
184688c to
29d3682
Compare
|
@ogazboiz frontend still fails even after rebase. It's odd though because everything passes in the last pr you merged. Let me check the issue
|
|
@ogazboiz Just to be clear, I didn't work on frontend, so it's not on my end as seen in the screenshot below. But I've seen a couple issues that I'll be resolving in it
|
|
@ogazboiz Yup, I found the issue. One of the files I'm currently making changes to never passed the check but somehow all the checks are good. You can confirm all these before merging my work. Check all frontend files I'm about to make changes to now:
|
ogazboiz
left a comment
There was a problem hiding this comment.
hey @MerlinTheWhiz, the integration test in backend/tests/integration/stream-lifecycle.test.ts looks great — 701 lines covering the full event worker → DB → controller → SSE pipeline. that's exactly what #370 needed.
but i ran lint on main locally and it passes with only 1 unused-import warning. the ~17k line frontend changes in this PR aren't lint error fixes — they're mass prettier reformatting (single quotes → double, 4-space → 2-space indent, inline → multi-line objects). this is risky for a few reasons:
- scope — this PR is "integration tests for stream lifecycle" but 99% of the diff is unrelated formatting.
- conflict surface — reformatting every frontend file will conflict with every other in-flight frontend PR.
- wrong patterns introduced — i spotted these in
frontend/src/app/activity/page.tsx:useCallbackdeps changed from[session?.publicKey]to[session]— this will cause unnecessary re-renders when other session fields change.setPage(1)andfetchActivity(1, ...)wrapped insetTimeout(..., 0)— this is a hack to suppress a missing-dep warning rather than a fix. shouldn't be merged.
could you split this into two PRs?
- this PR — only
backend/tests/integration/stream-lifecycle.test.ts+ theeventsourcedep in package.json. that closes #370 cleanly. - separate PR — frontend prettier formatting, without the activity page logic changes (revert those). if we want consistent formatting we should either run prettier across the whole frontend in one go or set up a pre-commit hook.
the test is solid work — let's get just that part merged first.
59309eb to
29d3682
Compare
ogazboiz
left a comment
There was a problem hiding this comment.
hey @MerlinTheWhiz, sorry for the back and forth — you were right that ci was failing for real reasons. the root package-lock had bumped eslint-plugin-react-hooks to 7.1.1 which has stricter react-compiler rules that catch existing setState-in-effect issues in main's frontend (not your code). pushed a revert of the root lockfile to your branch so it aligns with main.
solid integration test work — full event worker → DB → controller → SSE pipeline, 700+ lines covering the lifecycle. closes #370. merging!
if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0



Closes #370
Changes made:
Screenshot of test run:
