Files
rustfs/.agents/skills/adversarial-validation/references/compatibility.md
T
唐小鸭 8023cf3e26 test(e2e): add the outbound target matrix and #7082 postmortem (#7092)
test(e2e): add the outbound target matrix and the replication checksum postmortem

Defense work for rustfs#7082, the regression rustfs#6895 introduced while
fixing rustfs#6853: a fix for one target class changed a client default for
every target class and nothing in tree modeled the other classes.

- docs/postmortems: timeline, root cause, why four defense layers missed
  it, and the SOP for changing any outbound client default; AGENTS.md and
  the adversarial compatibility lens point at it; the two env knobs from
  rustfs#6895 are documented in docs/operations.
- fake_s3_target: reject_aws_chunked_uploads, require_checksum_for_object_lock
  (Content-MD5 always verified), create_bucket_with_object_lock with a
  GetObjectLockConfiguration handler, and a TransportSnapshot on every
  journal record.
- replication_target_matrix_test: six object shapes against four target
  modes with an explicit expectation table; the two rustfs#7082 cells are
  pinned KnownFailing and fail with an XPASS message once the fix lands.
  Wired into e2e-repl-nightly, excluded from e2e-full.
2026-09-03 14:57:05 +08:00

2.1 KiB

Compatibility Lens

  • Internal metadata uses metadata_compat helpers for dual RustFS/MinIO keys, including mixed casing and removal of both twins.
  • Binary UUID metadata treats absent, empty, and nil as no value. Unversioned remote tiers receive no versionId; versioned purge requests retain the real version ID.
  • xl.meta changes preserve supported header/meta versions, recompute signatures, decode legacy fixtures, and remain readable by old RustFS/MinIO.
  • Foreign/corrupt metadata validates parallel array lengths and missing fields; it returns a decode error rather than indexing, panicking, or fabricating data.
  • Do not “correct” byte-for-byte MinIO ports without legacy fixture evidence. Bitrot framing, shard math, distribution, and inline prefixes are contracts.
  • Client-visible metadata/events strip both internal prefixes case-insensitively.
  • Proto fields are appended, never reused/renumbered; FlatBuffers tables extend compatibly and absent new fields fail closed where authorization/quorum is involved.
  • Replay real client request shapes and exact pagination boundaries for S3 handler changes.
  • Bucket metadata/IAM/config parsing remains compatible with pinned real MinIO fixtures and encrypted migration data.
  • Compatibility shims use RUSTFS_COMPAT_TODO(<task-id>), have a removal condition, and default toward reading old data safely.

Outbound targets

  • A change to what the replication or migration client sends by default (checksum policy, payload framing, headers, version-id addressing) is judged against every target class, not the one it fixes. Name each target-side rule the current default satisfies — checksum required with Object Lock parameters, aws-chunked decoding, version-id adoption, ETag equals content MD5 — and show which cell of crates/e2e_test/src/replication_target_matrix_test.rs covers each.
  • A test that asserts the fix ("no trailer header") is not evidence; the matrix cell that asserts the target accepted and stored the object is.
  • Every new environment escape hatch appears in docs/operations/replication-outbound-transport.md in the same diff.