Skip to content

feat(replication): render structured active checks - #329

Merged
cxymds merged 1 commit into
mainfrom
cxymds/feat-structured-replication-check-cli
Jul 24, 2026
Merged

feat(replication): render structured active checks#329
cxymds merged 1 commit into
mainfrom
cxymds/feat-structured-replication-check-cli

Conversation

@cxymds

@cxymds cxymds commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • consume RustFS's structured active replication-check response while retaining
    compatibility with the legacy successful empty body
  • add typed core contracts for overall, per-target, and per-phase outcomes and
    a default detailed trait method so other object-store implementations remain
    source compatible
  • render all target and bucket/versioning/object-lock/put/delete-marker/
    version-delete/cleanup results in stable human and output-v3 JSON
  • return a conflict exit status for a completed structured check containing
    failed targets while still emitting the complete result
  • require an interactive confirmation or explicit --yes in non-interactive
    and JSON modes, with the active temporary mutation described before execution
  • validate aggregate/target/phase consistency, the reserved probe namespace,
    bounded single-line errors, and optional contract version
  • reject malformed/future unsupported responses, redact credentials, signed
    URLs and endpoint details, and sanitize server-controlled terminal text
  • preserve the old check_bucket_replication() failure semantics instead of
    discarding a structured failed result
  • document active mutation, cleanup risk, legacy limitations, and automation
    behavior

Compatibility

Existing output-v1 and protected command references are unchanged. The
output-v3 replication_operations family already allows additive target/data
fields, so existing resync fixtures remain byte-for-byte unchanged.

Older servers returning an empty HTTP 200 body continue to succeed, but the
client explicitly reports that no per-target or cleanup evidence is available.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test -p rc-s3 replication_check (6 passed)
  • cargo test --workspace (all unit, integration, schema, golden, and doc tests
    passed on the final source)
  • the one unrelated transient local fixture disconnect observed on the first
    workspace run passed when rerun alone and on the complete second workspace
    run
  • git diff --check

Adversarial review:

  • Security/redaction: PASS
  • Contract correctness: PASS
  • Failure/exit semantics: PASS
  • Compatibility: PASS
  • Resource bounds: PASS
  • Test quality: PASS
  • Operator documentation: PASS

Dependency

The structured service response is implemented by rustfs/rustfs#5208 and
rustfs/backlog#1417. Merge this PR after that dependency.

Closes rustfs/backlog#1496

Related: rustfs/backlog#1410, rustfs/backlog#1381, rustfs/backlog#1361

@cxymds
cxymds merged commit 77450e5 into main Jul 24, 2026
17 checks passed
@cxymds
cxymds deleted the cxymds/feat-structured-replication-check-cli branch July 24, 2026 17:36
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