Repository navigation
refactor: the replay loop gets its next event and sends one event in their own methods - #405
Merged
Merged
Conversation
…their own methods SonarCloud failed #403 on python:S3776: wrapping the old dispatch body in a loop put _dispatch_events at cognitive complexity 21 against the allowed 15. _next_event loads the next batch when the loaded one runs out, and _dispatch_event sends one event and returns the wait before the next; the loop only joins them. Behaviour is the same.
HardMax71
enabled auto-merge (squash)
October 19, 2026 00:10
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Follow-up to #403: SonarCloud failed it on python:S3776. Wrapping the old dispatch body in a loop put
_dispatch_eventsat cognitive complexity 21 against the allowed 15. Sonar isn't the required check, so #403 merged anyway, and main now carries the finding.Changes
_next_eventreturns the session's next event and loads the next batch once the loaded one runs out._dispatch_eventsends one event and returns how long to wait before the next one; a failure withoutskip_errorsends the session as before. The loop in_dispatch_eventsonly joins the two. Behaviour is unchanged.Type of Change
Test Plan
cd backend && uv run pytest tests/unit)cd frontend && npm run test)docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e')cd frontend && npm run test:e2e)./deploy.sh openapi, then./deploy.sh types), never edited by handValidation: unit 572 passed, including #403's full-speed replay test. complexipy now scores the methods 3 and 7.
Checklist
pre-commit run --all-filesand all checks passSummary by cubic
The replay dispatch loop now pulls events via
_next_eventand sends each one through_dispatch_event, each method returning control to the loop. This brings_dispatch_eventsunder SonarCloud's cognitive-complexity limit (python:S3776) with no behavior changes.Written for commit de805a5. Summary will update on new commits.