Skip to content

test(parity): add error-case and edge-semantics coverage#384

Merged
vieiralucas merged 1 commit intomainfrom
worktree-parity-batch2
Apr 14, 2026
Merged

test(parity): add error-case and edge-semantics coverage#384
vieiralucas merged 1 commit intomainfrom
worktree-parity-batch2

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 14, 2026

Summary

Expands parity from 7 happy-path tests to 15, focused on the drift-prone surfaces that real-AWS comparison actually catches: error codes, conditional writes, filter policies, FIFO ordering, multipart upload, data-key generation.

New tests

Service Test What it protects against
SQS `get_queue_url` on missing queue Error code drift (`QueueDoesNotExist`)
SQS FIFO queue with content-based dedup FIFO ordering + dedup semantics
SNS Subscription filter policy Attribute-based filtering actually filters
S3 `get_object` on missing key Error code drift (`NoSuchKey`)
S3 5 MiB multipart upload Part-size handling, completion, byte-identical round-trip
DynamoDB `Query` with `KeyConditionExpression` Composite-key Query + sort order
DynamoDB Conditional `PutItem` `ConditionalCheckFailedException` code on attribute_not_exists
KMS `GenerateDataKey` + decrypt 32-byte AES key round-trip through Decrypt
SecretsManager `get_secret_value` on missing secret Error code drift (`ResourceNotFoundException`)

Local run against fakecloud: 15/15 pass. Weekly real-AWS run will pick them up automatically on the next scheduled or dispatched tick.

Test plan

  • `cargo test -p fakecloud-parity` — 15/15 pass against local fakecloud
  • `cargo clippy -p fakecloud-parity --tests -- -D warnings` — clean
  • `cargo fmt` — clean
  • CI `Parity (fakecloud)` job runs green
  • Next weekly real-AWS run confirms parity

Summary by cubic

Expands the parity test suite from 7 to 15 to lock in real-AWS error codes and edge-case semantics. Covers SQS, SNS, S3, DynamoDB, KMS, and Secrets Manager to reduce drift in high-risk paths.

  • New Features
    • Error parity: SQS get_queue_url on missing queue, S3 get_object on missing key, Secrets Manager get_secret_value on missing secret, DynamoDB conditional PutItem failure code.
    • Edge semantics: SQS FIFO ordering with content-based dedup, SNS subscription filter policy, S3 5 MiB multipart upload round-trip, DynamoDB Query on composite key with sort order, KMS GenerateDataKey + Decrypt round-trip.

Written for commit 665370a. Summary will update on new commits.

Expands parity from 7 happy-path tests to 15 covering the drift-prone
surfaces: error codes, conditional writes, filter policies, FIFO,
multipart upload, and data-key generation.

New tests:
- sqs: nonexistent-queue error code, FIFO queue with content-based
  dedup and ordering assertions
- sns: subscription filter policy (matching + non-matching publish,
  only matching delivered)
- s3: get-object-nonexistent error code, 5MiB multipart upload
  round-trip with byte-identical assertion
- dynamodb: Query with KeyConditionExpression (composite key + sort
  order), conditional PutItem with ConditionalCheckFailedException
- kms: GenerateDataKey + decrypt round-trip
- secretsmanager: get-nonexistent error code
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@vieiralucas vieiralucas merged commit d85753e into main Apr 14, 2026
37 of 38 checks passed
@vieiralucas vieiralucas deleted the worktree-parity-batch2 branch April 14, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant