Skip to content

chore(model)!: re-pin AWS models to 3678d8a26 (2026-11-21) - #1665

Merged
overtrue merged 1 commit into
mainfrom
p10/1623-repin-aws-models-3678d8a26
Nov 27, 2026
Merged

overtrue merged 1 commit into
mainfrom
p10/1623-repin-aws-models-3678d8a26

Conversation

@overtrue

Copy link
Copy Markdown
Collaborator

Summary

HIGH-RISK: this PR re-pins protected AWS service models (model/s3.json, model/sts.json, their .sha256 sidecars, and model/PROVENANCE.md), updates generated/dto/field_counts.txt, and touches crates/core.

Re-pins the vendored AWS Smithy models from 7eb6ab98 (2026-10-02) to official upstream aws/api-models-aws commit 3678d8a26e38bf4855aff5bae7be447ca52e63a0 (dated 2026-11-21; last models/s3 commit 9f371492 on 2026-11-18, last models/sts commit 4abb8273 on 2026-11-19), regenerates all affected artifacts, and classifies the previously unclassified Smithy traits in model/tools/drift.py.

Closes #1623.

Difftest-coupled change: new 2026-11-21 S3 model multipart version_id and replication filter/KMS members

Semantic Model Diff & ADR Assessment

python3 model/tools/drift.py reports 35 wire-affecting changes, 2 breaking, 0 unclassified (39 in #1623 prior to classifying the 4 newly appearing Smithy traits):

  • s3 (14 additive changes, 0 breaking; 8 impacted operations):
    • Optional VersionId (x-amz-version-id header / XML element) added to AbortMultipartUploadOutput, CreateMultipartUploadOutput, ListPartsOutput, MultipartUpload, UploadPartOutput, and UploadPartCopyOutput.
    • Optional EncryptionConfiguration.UseSourceMultiRegionKey (UseSourceMultiRegionKey, UseSourceMultiRegionKeyStatus) and optional ReplicationRuleAndOperator.Not / ReplicationRuleFilter.Not (ReplicationRuleNotOperator, ReplicationRuleOrOperator, ReplicationPrefixList).
  • sts (21 changes, 2 breaking; 6 impacted operations):
    • GetScopedCredentials added; optional TrustedIdentityPropagationContext on AssumeRoleWithSAMLResponse / AssumeRoleWithWebIdentityResponse; optional Scope / SubjectMode on GetWebIdentityTokenRequest; InvalidContextAssertionException added to AssumeRole.
    • Breaking entry 1 (com.amazonaws.sts#contextAssertionType length {"max":2048,"min":4} -> {"max":3072,"min":4}) — no ADR needed: strictly widens the maximum length (every previously valid input remains valid), and model/sts.json is vendored for provenance only and is not yet consumed by codegen or any STS handler.
    • Breaking entry 2 (com.amazonaws.sts#sourceIdentityType length {"max":64,"min":2} -> {"max":256,"min":2}) — no ADR needed: strictly widens the maximum length (every previously valid input remains valid), and model/sts.json is not yet consumed by codegen or any STS handler.

Code Changes

  • model/tools/drift.py, model/tools/verify.py, model/tools/test_drift.py, .github/workflows/ci.yml: classified aws.protocols#awsQueryError (WIRE_TRAITS + HTTP_TRAITS), smithy.api#sensitive, aws.protocols#awsQuery, aws.auth#sigv4a, and smithy.api#eventPayload (WIRE_TRAITS), and smithy.api#input / smithy.api#output (IGNORED_TRAITS). verify.py enforces zero unclassified traits across both pinned models and disjoint trait sets; test_drift.py (11 unit tests: 9 negative, 2 positive) runs in CI Static checks (~0.015s).
  • crates/codegen: added 9 Rule::GatewayOnly entries in crates/codegen/src/emit/seam/overrides.rs so legacy s3s conversion fails closed on replication <Not> / <UseSourceMultiRegionKey> and leaves the 6 multipart output version_id members absent backward; updated all_unknown_tests.rs and nonempty_tests.rs for the new ReplicationRuleFilter child (Not) and Tag-bearing readers (ReplicationRuleNotOperator, ReplicationRuleOrOperator).
  • crates/types: parse_replication_dto decodes historical bytes with not: None and use_source_multi_region_key: None; serialize_replication_dto fails closed with PersistenceBridgeError::UnsupportedMember when a caller passes a present UseSourceMultiRegionKey, Filter.Not, or Filter.And.Not (+3 negative tests); added regression tests in dto_tests.rs including EncryptionConfiguration Debug KMS key redaction with UseSourceMultiRegionKey present.
  • crates/core: rule_filter::replication counts Filter.Not as a direct filter child and And.Not as a condition inside <And> (+positive/negative boundary tests in rule_filter_boundaries.rs; FilterNotExclusive.reason() kept unchanged for c-replication-0024).
  • crates/difftest: updated exhaustive struct literals in convert/{listing,multipart}.rs (version_id: None), added fail-closed findings sd-0059 / sd-0060 with 3 live request rows in seam/samples.rs and seam/samples/findings.rs, and registered the 4 nested structs in tests/seam_overrides.rs.

Breaking Change

  • BREAKING — this PR touches protected files and adds fields to non-#[non_exhaustive] generated DTO structs.

  • Protected files touched (6): model/s3.json, model/s3.json.sha256, model/sts.json, model/sts.json.sha256, model/PROVENANCE.md, and generated/dto/field_counts.txt (crates/core/tests/golden/route-table.txt and model/overlays/** are untouched).

  • Version bumps (Cargo.toml, crate manifests, CHANGELOG.md, Cargo.lock, fuzz/Cargo.lock):

    • rustfs-gateway-types: 0.44.0+aws.2026-10-02 -> 0.45.0+aws.2026-11-21 (root workspace requirement 0.45.0)
    • rustfs-gateway-codegen: 0.22.0 -> 0.23.0
    • rustfs-gateway-core: 0.67.0 -> 0.68.0
    • rustfs-gateway: 0.70.0 -> 0.71.0
    • rustfs-gateway-difftest: 0.2.0 -> 0.3.0
  • Migration path: update the git revision and Cargo.lock together. Because generated DTO structs omit #[non_exhaustive] (ADR-0004), exhaustive struct literals constructing AbortMultipartUploadOutput, CreateMultipartUploadOutput, ListPartsOutput, MultipartUpload, UploadPartOutput, UploadPartCopyOutput, EncryptionConfiguration, ReplicationRuleAndOperator, or ReplicationRuleFilter must add the new optional fields as None (or ..Default::default()). No wire break or stored-data migration is required; existing persisted replication XML remains readable (not and use_source_multi_region_key decode as None).

Mutation Proofs

Every new assertion was mutated against the implementation and confirmed red before restoring byte-for-byte:

# Mutation Killed by
M1 Remove aws.protocols#awsQueryError from drift.py WIRE_TRAITS & HTTP_TRAITS test_drift.py::test_aws_query_error_change_is_breaking_http_binding & verify.py
M2 Remove smithy.api#sensitive from drift.py WIRE_TRAITS test_drift.py::test_gaining_sensitive_on_existing_shape_is_reported & verify.py
M3 Remove smithy.api#input & smithy.api#output from drift.py IGNORED_TRAITS test_drift.py::test_input_and_output_marker_traits_are_ignored & verify.py
M4 Remove smithy.api#eventPayload from drift.py WIRE_TRAITS test_drift.py::test_pinned_models_have_no_unclassified_traits & verify.py
M5a Disable use_source_multi_region_key.is_some() refusal in replication.rs replication_dto_bridge_refuses_to_drop_use_source_multi_region_key
M5b Disable value.not.is_some() refusal in replication.rs replication_dto_bridge_refuses_to_drop_filter_not_operator
M5c Disable and.not.is_some() refusal in replication.rs replication_dto_bridge_refuses_to_drop_and_not_operator
M6a Drop filter.not.is_some() count in rule_filter.rs rule_filter_boundaries::n_replication_refuses_not_beside_direct_siblings_or_alone_inside_and
M6b Drop and.not.is_some() count in rule_filter.rs rule_filter_boundaries::replication_accepts_not_alone_and_paired_inside_and

Verification

  • python3 model/tools/verify.py: ok (0.02s, 0 unclassified traits, disjoint trait sets)
  • python3 model/tools/test_drift.py: 11/11 passed (0.015s; 9 negative, 2 positive)
  • cargo fmt --all --check: pass
  • cargo clippy --workspace --all-targets -- -D warnings: pass (32.38s)
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps: pass
  • cargo deny --locked (workspace --all-features + fuzz/Cargo.toml): pass
  • cargo test --workspace: 11,832 passed, 0 failed, 3 existing ignored
  • cargo xtask codegen --check & cargo xtask spec verify: clean (1558 files, 0 differ)
  • cargo xtask ir validate: ok (0.333s, 111 generated, 42 quirks)
  • cargo xtask verify --crate: rustfs-gateway-types (prebuild 22.60s / loop 7.82s), rustfs-gateway-codegen (8.55s / 27.63s), rustfs-gateway-core (51.86s / 14.46s), rustfs-gateway-difftest (7.57s / 6.11s)
  • Guards: 145/145 static + 5/5 REQUIRES-PR + 5/5 REQUIRES-BUILD passed

Role Verdicts

  • protocol-auditor: attacked S3/STS 2026-11-21 model diff, replication filter Not/Or rules, persistence bridge fail-closed refusals, and drift.py trait classification — no break found
  • security-adversary: attacked Cargo.toml version bumps, rule_filter boundary validation, and EncryptionConfiguration KMS redaction preservation — no break found
  • simplicity-adversary: attacked seam overrides, persistence bridge guards, rule_filter count updates, and model/tools/drift.py trait sets — no break found

Checklist

  • The four-command gate passed (fmt, clippy, test, cargo xtask verify)
  • New or changed public API has rustdoc
  • Negative test cases outnumber positive ones
  • Every new assertion was mutated — see Mutation Proofs above
  • Protected Files touched — handled via the BREAKING process above
  • No unsafe, inventory/linkme, #[non_exhaustive] on DTOs, or s3s code copied
  • No credentials, signatures, or expected-signature values reachable from logs or error bodies
  • No plan document, analysis report, or working note committed
  • Commits follow Conventional Commits; PR title <=72 characters
  • A Handoff comment has been appended to chore(model): upstream drift detected (3678d8a26) #1623

Re-pin model/s3.json, model/sts.json, their .sha256 sidecars, and
model/PROVENANCE.md to upstream aws/api-models-aws commit
3678d8a26e38bf4855aff5bae7be447ca52e63a0 (2026-11-21), regenerate
generated/**, spec/operations/**, and OPERATIONS.md, and classify
previously unclassified Smithy traits in model/tools/drift.py.

BREAKING CHANGE: Touches protected model/provenance/field-count files
and adds optional fields to nine non-exhaustive-free generated DTO
structs (six multipart outputs plus EncryptionConfiguration,
ReplicationRuleFilter, and ReplicationRuleAndOperator). Bumps
rustfs-gateway-types to 0.45.0+aws.2026-11-21, codegen to 0.23.0,
core to 0.68.0, gateway to 0.71.0, and difftest to 0.3.0.
@overtrue
overtrue merged commit 80649ce into main Nov 27, 2026
34 checks passed
@overtrue
overtrue deleted the p10/1623-repin-aws-models-3678d8a26 branch November 27, 2026 14:01
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.

chore(model): upstream drift detected (3678d8a26)

1 participant