fix(conformance): batch D services to 100%; model-aware round-trip echo

Merged
VI
12h ago
+2308-104

Summary

Part of restoring true 100% Smithy conformance (main's probe: 256,922/257,391; the baseline check only fails a service >100 below its recorded count, so these were hidden). No baseline or doc counts change here (re-recorded for all services in a final PR).

Service fixes

  • apigateway: UpdateAccount wrote any patch path into the account; now only replace /cloudwatchRoleArn and add/remove /features (UsagePlans) are accepted, the batch is validated before anything applies, BadRequestException otherwise.
  • ec2: CreateImage honors BootModeOverride (uefi). CreateInterruptibleCapacityReservationAllocation / Update were stubs returning input and an invalid spot type; now real: the source must be active with no end date and enough capacity, capacity moves to a new adhoc interruptible reservation, ZeroSizePreference is honored, shrinking reclaims available then in-use instances (per the AWS guide), cancelling either side returns capacity and cancels the allocation, splitting doesn't copy allocation fields. IPAM ops' AWS not-found codes (InvalidIpamId.NotFound, InvalidIpamResourceDiscoveryId.NotFound) allowed for the ec2 entry.
  • ecs: RegisterDaemonTaskDefinition keeps pidMode/ipcMode; Describe returns daemonTaskDefinitionArn/deleteRequestedAt (the SDK couldn't read the ARN before) and drops undeclared tags.
  • events: PutRule's real cron/rate parser returns AWS's "Parameter ScheduleExpression is not valid." ValidationException (allowed for events).
  • iam: SimulateCustomPolicy / SimulatePrincipalPolicy enforce input constraints and actually use ResourcePolicy (needs a caller; PolicySourceArn only stands in when it's a user), ResourceOwner / resource-ARN accounts for cross-account evaluation, the caller's own account, ResourceHandlingOption, and MaxItems/Marker paging.
  • iotwireless ListWirelessDevices and pinpoint ListTemplates return list shapes instead of full detail objects; opensearch echoes an empty domain-info container faithfully.
  • cognito-idp: AdminDeleteSoftwareToken, DescribeTermsByClient, GetClientToken were implemented but missing from supported_actions(), so never probed (+104 variants).
  • appconfig placeholder extension records no longer copy association parameter values into Parameters; sagemaker DescribeCluster returns instance-group details (Current/TargetCount, MinCount, current/desired image, Status) instead of echoing the create spec.

Conformance tool

  • The follow-up Get's shape result was discarded in round-trip checks; a shape mismatch (incl. undeclared fields) now fails the variant.
  • Echo comparison is model-aware: a structure may carry extra members only if the output shape declares them (AWS fills e.g. HostedZoneId); maps need the same keys, lists the same length, unions/scalars exact.
  • The round-trip generator no longer emits variants that compare lists/maps of different element shapes (e.g. CreateCluster's spec vs DescribeCluster's details).

Global probe delta (branch base vs branch, every service, containers disabled): 256,943/257,391 -> 257,211/257,387.

ServiceBeforeAfterWhy
apigatewayv22782/27862786/2786declared domain-configuration members AWS fills in now pass
appconfig2257/22572256/2256one cross-shape round-trip variant no longer generated
cognito-idp4708/47084812/48123 ops now probed
ec226262/2632126321/26321fixes above
ecs2439/24422441/2442RegisterDaemonTaskDefinition 39/39; the remaining variant is outside this change
events2101/21112111/2111fixes above
iam6047/60716071/6071fixes above
iotwireless3537/35563556/3556fixes above
opensearch3074/30953095/3095fixes above
pinpoint2819/28452845/2845fixes above
sagemaker16761/1678816760/167853 cross-shape round-trip variants no longer generated
ses3018/30453020/3045contact-list topic Description is a declared output member

RDS CreateDBInstance stays at 5537/5539: its documented example expects success, but the probe runs with containers disabled and RDS refuses creates without a runtime (#2107).

Test plan

  • Unit tests per fix (apigateway patching, EC2 BootModeOverride + interruptible create/update/cancel/split, ECS daemon modes + Describe keys, IAM simulate incl. cross-account cases, iotwireless/pinpoint list shapes, opensearch, appconfig, sagemaker DescribeCluster, round-trip validator + generator using real models, EventBridge message).
  • E2E: apigateway UpdateAccount, iam_simulate (resource policy, cross-account owner, paging, scenario), ec2_modify_persistence (interruptible allocation), ecs DescribeDaemonTaskDefinition; apigateway, iam, ec2_image_reserved, pinpoint, iotwireless suites pass locally (Docker-dependent ECS/APIGW tests ran in CI only).
  • Conformance tests: apigateway, apigatewayv2, appconfig, cognito, ec2, ecs, eventbridge, iam, opensearch, es.