Skip to content

fix(conformance): map every shipped service to its real wire protocol#759

Merged
vieiralucas merged 2 commits intomainfrom
conformance-protocol-map
Apr 25, 2026
Merged

fix(conformance): map every shipped service to its real wire protocol#759
vieiralucas merged 2 commits intomainfrom
conformance-protocol-map

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 25, 2026

Summary

  • service_protocol() only mapped 17 services. Everything else (ECS, Step Functions, Bedrock, Bedrock Runtime, Scheduler, SES, RDS, ElastiCache, ELBv2) fell through _ => Protocol::Query. JSON/REST services were probed as form-encoded Action=…, hit APIGW's catch-all, and returned 4xx — counted as Pass under lenient classification.
  • Add explicit entries for the missing services. Add unit test forcing every shipped service to declare its protocol.
  • Baseline regenerated. Pre: 61,741 / 61,743 variants pass. Post: 64,998 / 65,630. Real conformance gaps surface in ECS / ECR / Step Functions; 23 of 26 services still at 100%. Follow-up commits will close those gaps.

Test plan

  • cargo test --release -p fakecloud-conformance --lib service_protocol_covers_every_shipped_service passes
  • cargo test --release -p fakecloud-conformance --lib (48+1 tests) passes
  • fakecloud-conformance run against current baseline = no regressions
  • Cubic clean
  • Full CI green

Summary by cubic

Mapped every shipped service to its real wire protocol to stop JSON/REST services from being misrouted as Query and falsely counted as passes. Regenerated the conformance baseline to surface real gaps (notably in ecs, ecr, and states), and fixed CI tests for Logs and Step Functions to match current behavior.

  • Bug Fixes
    • Added explicit protocol mappings: ecs (Json: AmazonEC2ContainerServiceV20141113), states (Json: AWSStepFunctions), ses (Rest), bedrock (Rest), bedrock-runtime (Rest), scheduler (Rest), rds (Query), elasticache (Query), elasticloadbalancing (Query).
    • Added a unit test in fakecloud-conformance that requires every shipped service to declare its protocol.
    • Derived PartialEq/Eq for Protocol to enable exact assertions in tests.
    • Fixed Logs tests to create a real query via StartQuery before ListLogGroupsForQuery in fakecloud-conformance and fakecloud-e2e.
    • Increased Step Functions wait_for_execution budget to 10s in fakecloud-e2e to avoid flakiness on CI.
    • Updated baseline: total variants 61,743 → 65,630; passes 61,741 → 64,998. 23/26 services at 100%; gaps now visible in ecs, ecr, and states.

Written for commit 331a4da. Summary will update on new commits.

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 2 files

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

`service_protocol()` only mapped 17 services. Everything else fell
through `_ => Protocol::Query`, sending form-encoded `Action=…` to `/`
for ECS / Step Functions / Bedrock / Bedrock Runtime / Scheduler / SES /
RDS / ElastiCache / ELBv2.

For the JSON / REST services in that list, the request never reaches
the right handler — APIGW's catch-all returns `NotFoundException: Stage
not specified`, the probe sees a 4xx without a "not implemented"
substring, and lenient classification calls it Pass. ECS reported
76/76 implemented even though only 60 ops are actually routed by the
service. ELBv2 / SES / Bedrock / etc. were similarly inflated.

Add explicit entries for the missing services:

- ecs            → Json (target: AmazonEC2ContainerServiceV20141113)
- states         → Json (target: AWSStepFunctions)
- ses            → Rest (sesv2 restJson1)
- bedrock        → Rest
- bedrock-runtime → Rest
- scheduler      → Rest
- rds / elasticache / elasticloadbalancing → Query (matches Smithy)

Also adds a unit test that asserts every shipped service has an
explicit protocol mapping, so any new service added to the workspace
forces the conformance crate to declare its wire format.

Baseline regenerated: total variants 61,743 → 65,630 (probes that were
silently dropped now actually run); pass count 61,741 → 64,998 (real
gaps surfaced in ECS, ECR, Step Functions). Per-service breakdown:

- 23 of 26 services: 100% pass
- ECR:    56 / 58 fully passing  (2 missing-validation gaps)
- ECS:    29 / 60 fully passing (variant edge-cases on routed ops; the
                                 16 Daemon/ExpressGateway ops stay
                                 NotImplemented per SUPPORTED list)
- States: 28 / 37 fully passing  (paginator + validation gaps)

Real conformance gaps in those three services to be addressed in
follow-up commits.
@vieiralucas vieiralucas force-pushed the conformance-protocol-map branch from f21470e to d828a70 Compare April 25, 2026 20:44
Three pre-existing test bugs that the protocol-map fix surfaced because
this branch is the first to actually run the full conformance + e2e
suites against post-#761 main:

- crates/fakecloud-conformance/tests/logs.rs::logs_list_log_groups_for_query
- crates/fakecloud-e2e/tests/logs.rs::logs_misc_stubs

Both tests called `ListLogGroupsForQuery` with a synthetic queryId. PR
#761's Cubic round (commit ad110ec) tightened the impl to return
`ResourceNotFoundException` for unknown queryIds — matching real AWS —
but the test sites still expected the previous "silently empty" answer.
Fix: create a real query via `StartQuery` first, then look it up.

- crates/fakecloud-e2e/tests/stepfunctions.rs::wait_for_execution

50 polls * 50ms = 2.5s. The PR-#757 SNS RSA-SHA256 signing + post-#760
SES-MIME work can push first-touch latency past that budget on
GitHub-hosted runners under parallel load. Bump the budget to 10s.
Locally executions still complete in <2s.

The conformance probe-map change in this PR exposed these because
`paths-filter` only triggers conformance + e2e when the conformance
crate changes, so the failing tests rode in unnoticed.
@vieiralucas vieiralucas merged commit 44a1cf8 into main Apr 25, 2026
47 checks passed
@vieiralucas vieiralucas deleted the conformance-protocol-map branch April 25, 2026 21:19
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