Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7a14ed5. Configure here.
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.

My last attempt to deploy the BLQ failed. It encountered crash loop issues related to the state-machine I built in the logic. This is a second attempt. I did a large refactor to make everything simpler and less prone to error. I would like to test this in s4s2 to see how it does.
This shouldn't effect anything in prod since its behind a feature flag and nothing uses the blq yet so it should be safe.
Usage
set the flag
consumer.blq_enabled="my-consumer-group"this will restart the consumer group and drain the backlog. once the backlog is drained, behavior goes back to normal. to trigger the blq mechanism again, you can flip the flag off and on again.The following is AI-Generated
Summary
consumer.blq_enabledis now a string (the physical consumer group to enable for) instead of a global boolean, so BLQ can be toggled per consumer group.blq_active: boolthat starts from the flag and flips off (one-way, until restart) the first time a fresh message arrives.poll()watches for the flag flipping from off→on for this consumer group and callsexit_fn(defaults tostd::process::exit(0)), so the consumer restarts with clean downstream state and re-enters BLQ mode on the next stale message.Test plan
cargo test --lib strategies::blq_router— both new tests pass:test_shutoff_until_flag_flips— with the flag off, fresh + stale both forward to next_step; flipping the flag on for this consumer group triggersexit_fnon the nextpoll().test_blq_routes_stale_then_disables_on_fresh— with the flag on, stale messages go to the producer; first fresh message flipsblq_activeoff; subsequent fresh + stale both go to next_step.cargo buildsucceeds.🤖 Generated with Claude Code