feat: 30.2 — unified api surface#4
Merged
vieiralucas merged 2 commits intomainfrom Mar 25, 2026
Merged
Conversation
- copy new service.proto (BatchEnqueue RPC removed, EnqueueRequest now takes repeated EnqueueMessage, AckRequest/NackRequest take repeated messages, ConsumeResponse only has repeated messages field) - regenerate ruby proto code from new service.proto - replace batch_enqueue method with enqueue_many (no "batch" prefix) - enqueue wraps single message in EnqueueMessage + EnqueueRequest - ack/nack wrap in repeated AckMessage/NackMessage, parse first result - consume uses only repeated messages field (singular field removed) - rename BatchEnqueueResult to EnqueueResult - batcher uses unified Enqueue RPC for all batch sizes - update all tests to match new api surface - bump version to 0.4.0
5 tasks
There was a problem hiding this comment.
1 issue found across 9 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="lib/fila/client.rb">
<violation number="1" location="lib/fila/client.rb:155">
P2: A nil result silently returns success instead of raising an error. Since this sends exactly one message, receiving zero results is an error condition. This is inconsistent with `enqueue_single` which correctly raises `RPCError` when result is nil.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
- ack/nack: raise RPCError on nil result instead of silently returning (identified by cubic — nil means zero results, which is an error for single-message operations) - batcher: extract result_to_outcome and broadcast_error from flush_batch to satisfy AbcSize/CyclomaticComplexity/MethodLength/PerceivedComplexity - batcher: remove redundant begin block in pop_with_timeout - batcher: add rubocop:disable for Metrics/ClassLength (126 lines, thread management + two modes is inherently complex) - test_batch: fix array indentation and prefer single-quoted strings
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
Update Ruby SDK to match the unified proto API from Story 30.1:
service.protoand regenerated Ruby code.BatchEnqueueRPC removed.EnqueueRequestnow containsrepeated EnqueueMessage.AckRequest/NackRequestuserepeated AckMessage/NackMessage.ConsumeResponseonly hasrepeated Message messages.enqueue: Wraps single message inEnqueueMessage, sends via unifiedEnqueueRPC, parses per-messageEnqueueResult(with typedEnqueueError).enqueue_many: Replacesbatch_enqueue. Same semantics, no "batch" prefix. ReturnsArray<EnqueueResult>.ack/nack: Wrap inrepeated AckMessage/NackMessage, parse firstAckResult/NackResultwith typed error codes.consume: Only readsrepeated messagesfield (singularmessagefield removed from proto).EnqueueRPC for all batch sizes (no moreBatchEnqueuesplit).BatchEnqueueResult->EnqueueResult: Renamed, no "batch" prefix.Test plan
TestEnqueueResultunit tests pass (success/error result construction)TestEnqueueManyintegration tests pass (multiple, single, empty, mixed success/failure)TestAutoBatchingintegration tests pass (single, concurrent, nonexistent queue)TestLingerBatchingintegration tests passTestDisabledBatchingintegration tests passTestBatchModeValidationunit tests passTestCloseFlushintegration tests passTestClientintegration tests pass (enqueue/consume/ack, nack redeliver, nonexistent queue)Summary by cubic
Updates the Ruby SDK to the unified proto API (Story 30.2), replacing batch RPCs with a single
Enqueuepath and adding typed, batchedAck/Nack. Introducesenqueue_many, renames the batch result toEnqueueResult, improves batcher/error handling, and bumps to v0.4.0.New Features
EnqueueRequesttakesrepeated EnqueueMessage;ConsumeResponseonly hasmessages; typed error codes for enqueue/ack/nack;StreamEnqueueRPC scaffolded.enqueue_many;enqueuewraps a singleEnqueueMessage;ack/nacksend batched requests, parse typed errors, and raiseRPCErrorwhen no result is returned.Enqueue; centralized result/error handling; minor refactors and lint fixes.Migration
batch_enqueue(...)withenqueue_many(...).BatchEnqueueResultwithEnqueueResult.consumenow only reads themessagesfield.ack/nackkeep the same call shape but now raise typed errors (andRPCErrorif the server returns no result).Written for commit 88a334a. Summary will update on new commits.