feat(kinesis): implement all remaining operations for 100% conformance#305
Merged
vieiralucas merged 2 commits intomainfrom Apr 12, 2026
Merged
feat(kinesis): implement all remaining operations for 100% conformance#305vieiralucas merged 2 commits intomainfrom
vieiralucas merged 2 commits intomainfrom
Conversation
…ance Implement all missing Kinesis operations to achieve 100% conformance (1611/1611 variants, 39/39 operations): Tags v2 & Resource Policy: - TagResource, UntagResource, ListTagsForResource (ARN-based v2 APIs) - GetResourcePolicy, PutResourcePolicy, DeleteResourcePolicy Encryption & Enhanced Monitoring: - StartStreamEncryption, StopStreamEncryption (KMS encryption) - EnableEnhancedMonitoring, DisableEnhancedMonitoring (shard-level metrics) Account Settings & Stream Config: - DescribeAccountSettings, UpdateAccountSettings (billing commitment) - DescribeLimits (shard limits, on-demand counts) - UpdateStreamMode (PROVISIONED/ON_DEMAND) - UpdateStreamWarmThroughput, UpdateMaxRecordSize Consumer Management: - RegisterStreamConsumer, DeregisterStreamConsumer - DescribeStreamConsumer, ListStreamConsumers (with pagination) Shard Management: - ListShards (with pagination and ExclusiveStartShardId) - MergeShards (adjacent shard validation, hash range merge) - SplitShard (hash key boundary split) - UpdateShardCount (UNIFORM_SCALING resharding) Streaming: - SubscribeToShard (input validation, returns ResourceNotFoundException since HTTP/2 event-stream protocol unsupported over JSON) State changes: - Extended KinesisShard with hash key ranges, parent tracking, open/closed - Added KinesisConsumer struct and consumers HashMap - Added resource_policies, account-level settings - Added key_id, enhanced_metrics, warm_throughput, max_record_size to streams - Route writes only to open shards after resharding - Clean up consumers on stream deletion
There was a problem hiding this comment.
3 issues found across 2 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="crates/fakecloud-kinesis/src/service.rs">
<violation number="1" location="crates/fakecloud-kinesis/src/service.rs:1197">
P2: `ListShards` truncates by `MaxResults` but never returns/consumes `NextToken`, breaking pagination.</violation>
<violation number="2" location="crates/fakecloud-kinesis/src/service.rs:1257">
P1: Avoid `u128` overflow in shard adjacency validation by using checked addition.</violation>
<violation number="3" location="crates/fakecloud-kinesis/src/service.rs:1374">
P1: Validate `TargetShardCount` upper bound before looping/casting to prevent overflow and state corruption.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
- Use checked_add for u128 shard adjacency validation to prevent overflow - Validate TargetShardCount upper bound (max 10000) in UpdateShardCount - Add NextToken pagination support to ListShards
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
Test plan
cargo test -p fakecloud-kinesis— all 8 unit tests passcargo clippy -p fakecloud-kinesis -- -D warnings— cleancargo test -p fakecloud-conformance --test kinesis— all 5 handwritten tests passSummary by cubic
Implements all remaining 25 Kinesis operations to reach 100% conformance (39/39 ops, 1611/1611 variants), with full tagging, resource policies, encryption, monitoring, consumers, and shard management. Adds pagination and safety checks from review feedback.
New Features
Refactors
Written for commit 49ea9d2. Summary will update on new commits.