Skip to content

feat(rc-admin)!: add bounded diagnostic snapshots#285

Draft
cxymds wants to merge 1 commit into
cxymds/issue-1403-diagnostic-capabilitiesfrom
cxymds/issue-1400-diagnostic-snapshots
Draft

feat(rc-admin)!: add bounded diagnostic snapshots#285
cxymds wants to merge 1 commit into
cxymds/issue-1403-diagnostic-capabilitiesfrom
cxymds/issue-1400-diagnostic-snapshots

Conversation

@cxymds

@cxymds cxymds commented Jul 21, 2026

Copy link
Copy Markdown
Member

Related issue

Closes rustfs/backlog#1400

Stacked on #282 (cxymds/issue-1403-diagnostic-capabilities).

Background and user impact

RustFS beta.10 exposes authenticated health information, a v4 cluster snapshot, and an extension catalog, but rc did not provide bounded typed commands for those routes. Route presence alone is insufficient: unknown server versions must remain fail-closed unless a read-only route is successfully confirmed, malformed/partial telemetry must not become a zero-valued success, and snapshot: null must remain distinct from a missing response field.

Solution

  • Add rc admin diagnostics health|cluster|extensions ALIAS.
  • Add forward-compatible core snapshot types that preserve unknown fields.
  • Bound all diagnostic and capability-discovery success/error bodies to 8 MiB, including /v3/info and all three v4 discovery reads.
  • Reconcile successfully probed cluster and extension routes to Available on unknown versions while keeping health conservative.
  • Reject semantically incomplete health, cluster, and extension payloads.
  • Represent explicit snapshot: null as initializing_or_unavailable, never healthy.
  • Keep extension ordering deterministic and never access extension instances or speedtest routes.
  • Add distinct output-v3 types: health_snapshot, cluster_snapshot, and extension_catalog.

BREAKING contract note

BREAKING: This PR updates the protected docs/reference/rc/ behavior contract and adds three output-v3 enum values for new commands. It does not change output v1/v2, config schema, exit-code definitions, or existing command behavior. Migration is opt-in: consumers only see the new schemas when invoking the new diagnostics commands.

Validation

Exact head: 1fb67e15de3f1bb300b110afe3d9864c752e5cce

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • Focused core diagnostic contract: 6 passed
  • Focused S3 diagnostic reads: 3 passed
  • Focused CLI diagnostics: 4 passed
  • Independent review and post-fix re-review: no remaining findings

Limitations

  • This is not mc support diag archive parity.
  • Drive observations remain in rustfs/backlog#1407 and reuse the observability branch.
  • Object/network/site speedtests, inspect archive retrieval, SUBNET upload, and extension instance configuration are out of scope.
  • A local live beta.10 container run was not possible because the workspace Docker daemon is unavailable; validation is source-backed plus mock/integration test coverage until GitHub checks complete.

BREAKING CHANGE: Adds new protected rc admin diagnostics command contracts and three output-v3 family enum values. Existing output-v1/v2 records and existing v3 families are unchanged; consumers opt in by invoking the new commands.
@cxymds
cxymds changed the base branch from cxymds/issue-1403-diagnostic-capabilities to main July 21, 2026 16:55
@cxymds cxymds closed this Jul 21, 2026
@cxymds cxymds reopened this Jul 21, 2026
@cxymds
cxymds changed the base branch from main to cxymds/issue-1403-diagnostic-capabilities July 21, 2026 16:55
@cxymds

cxymds commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Validation is complete for exact head 1fb67e15de3f1bb300b110afe3d9864c752e5cce.

Local gates:

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace

Focused validation:

  • Core diagnostic contract: 6 passed.
  • S3 bounded diagnostic reads: 3 passed.
  • CLI diagnostics and semantic-invalid exit mapping: 4 passed.
  • Independent review plus post-fix re-review: no remaining findings.

Remote gates:

The draft PR is open and its true stacked base is restored to cxymds/issue-1403-diagnostic-capabilities. The protected documentation/output-v3 additions are declared as BREAKING in the title and description.

A local live beta.10 container run was not performed because the Docker daemon is unavailable in this workspace; the validation claim is limited to the source-backed contract audit, mocks, local suites, and GitHub checks above.

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