refactor: switch admin ops from protobuf to binary encoding#10
Merged
vieiralucas merged 2 commits intomainfrom Mar 27, 2026
Merged
refactor: switch admin ops from protobuf to binary encoding#10vieiralucas merged 2 commits intomainfrom
vieiralucas merged 2 commits intomainfrom
Conversation
remove protobuf dependency and generated proto files. admin operations (create_queue, delete_queue, queue_stats, list_queues, redrive, config_set/get/list) now use the same binary wire format as data ops. add admin lifecycle integration test (create + list + delete).
There was a problem hiding this comment.
1 issue found across 10 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="admin.go">
<violation number="1" location="admin.go:147">
P1: Bounds check is `< 40` but the code reads 48 bytes (`p[44:48]`). A short response (40–47 bytes) will pass the check and cause an index-out-of-range panic at `ReplicationCount` or `ClusterNodeCount`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
the check was < 40 but the parser reads through p[44:48], which would panic on a valid 48-byte response that arrived as exactly 48 bytes.
Member
Author
|
Fixed in 7b28306. The bounds check was but the response layout includes (p[40:44]) and (p[44:48]), requiring 48 bytes. Updated to . |
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
google.golang.org/protobuf) and all generated proto files (filav1/,proto/)QueueConfig,QueueStats,QueueInfo,RedriveResult,ConfigEntryTest plan
go vet ./...passes (verified locally)Summary by cubic
Switch admin operations to the binary wire format used by data ops, removing the
google.golang.org/protobufdependency and all proto artifacts; requires a server that supports binary admin encoding. Also fixes a bounds check in GetQueueStats parsing to avoid panics on valid 48-byte responses.Refactors
QueueConfig,QueueStats,QueueInfo,RedriveResult,ConfigEntry.Bug Fixes
Written for commit 7b28306. Summary will update on new commits.