Files
rustfs/scripts
唐小鸭 2fd613157b refactor(sse): extract SSE into the rustfs-sse crate and layer it (#9574)
* refactor(sse): extract server-side encryption into rustfs-sse crate

Move the SSE-S3 / SSE-KMS / SSE-C key resolution, metadata and authorization logic out of rustfs/src/storage/sse.rs into a new crates/sse (rustfs-sse) so its outward references are explicit.

The crate depends only on rustfs-config, rustfs-kms, rustfs-policy, rustfs-s3-types and rustfs-utils. It does not reach the storage engine, IAM, the gateway or the server binary; scripts/check_architecture_migration_rules.sh now pins that dependency set.

Everything the crate needs from the running server arrives through the SseHost port (current KMS service, KMS manager state, bucket default encryption, per-key authorization). The host is an explicit parameter on every entry point that needs it rather than a global, so a missing installation cannot silently fall back to the local key provider.

The crate reports failures as SseError, which carries the S3 error code. The KMS-to-S3 error mapping moves with it and rustfs/src/error.rs reuses it, so response codes and messages are unchanged. The source of an SSE-internal error is no longer wrapped in StorageError::Io.

rustfs/src/storage/sse.rs stays as the adapter: it implements the host, binds the entry points to this server and converts back to ApiError, and keeps the conversions that cross the engine boundary (read-side resolver, multipart completion gate, reader error mapping).

Tests split with the code. Four provider round-trips over rio streams move to storage/sse_test.rs because the crate does not depend on rio. Cross-crate test seams sit behind the test-util feature, enabled only from the rustfs dev-dependencies. The rio-v2 CI lane and cache warm-up now include -p rustfs-sse so the rio-v2-only SSE tests keep running.

* refactor(sse): remove three unused configuration helpers

get_sse_type, sse_configuration_to_metadata and SseTypeV2::to_metadata have no caller in the crate, its tests, or the server. All three carried #[allow(unused)], which is what kept the compiler from reporting them.

* refactor(sse): split the crate root into core and kms modules

Move every item of the single-file crate into modules without changing
any of them:

- core/s3: what S3 defines for SSE (request headers, scheme selection,
  SSE-C validation, key-policy authorization)
- core/keying: how RustFS seals and records object keys (key material,
  direct and object-key forms, stored metadata, encryption context)
- core/{request,write,read,rewrap,audit}: the per-request entry points
- kms: data-key providers (KMS-backed, local master key, MinIO
  builtin-KMS ciphertext) and the provider registry

The rio-v2 only modules carry the feature gate at module level instead
of on each item. Inline tests move to a crate-level tests module. The
public surface is unchanged and is now an explicit re-export list in
lib.rs; visibility is otherwise tightened to pub(crate) or private.

Documentation that cited the old file now points at the module that
holds the symbol.

* refactor(sse): add an explicit startup step for process-level state

Give rustfs-sse one entry point, `startup::init`, for the state that is
fixed for the lifetime of the process. The server calls it where it used
to log the SSE-KMS key policy mode.

- Resolve the key policy enforcement switch once and log its mode.
- Check `RUSTFS_SSE_S3_MASTER_KEY` at startup and report it through the
  `sse_local_master_key` event as `loaded`, `not_set`, or `invalid`. An
  unusable value is logged as an error; startup still succeeds and
  requests fail exactly as before.
- Return a `StartupReport` so the caller can see both results. Repeated
  calls return the first report without logging again.

Anything that follows the KMS service state stays resolved per request:
the service follows configuration and can be started, restarted, or
stopped from the admin API while the process runs.

`get_local_sse_dek_provider` becomes synchronous, since it never awaited
anything. The "Using RUSTFS_SSE_S3_MASTER_KEY for SSE-S3" line that was
logged when the key was first used is replaced by the startup event.

* refactor(sse): split the write path into S3 scheme and keying mode

The write entry points mixed two questions: which SSE scheme S3 asks for,
and how this build forms and stores the object key. Give each a home.

- `core/s3/scheme.rs` gains `resolve_write_scheme`, which validates the
  headers and resolves the request, then the bucket default, to a
  `WriteScheme`. PutObject and CreateMultipartUpload now share it; the
  second copy of that decision (`SseTypeV2`,
  `prepare_sse_configuration_v2`) is removed.
- `core/keying/` gains one constructor per key source
  (`new_key_under_customer_key`, `new_session_key_under_customer_key`,
  `new_key_under_data_key`) in each mode. `keying/mod.rs` is the only
  place that says which mode a build writes.
- `core/write.rs` only orders the steps and no longer carries any
  `rio-v2` conditional compilation.

No behavior change. A multipart session still validates the SSE-C key at
creation only in the mode that seals the session key under it.

`SseTypeV2` leaves the public surface; nothing outside the crate used it.

* refactor(sse): split the read path into S3 scheme and keying mode

The read entry points decided the scheme, authorized the key, and
recovered the object key in one function, with the SSE-C preamble and
the managed key resolution written out twice. Separate the steps.

- `core/keying/stored.rs` (new) recognizes how a stored object was keyed
  (`recognize_stored_managed_key`) and recovers its key
  (`open_under_customer_key`, `open_under_stored_data_key`). The unwrap
  body moves there unchanged.
- `core/s3/ssec.rs` gains `require_matching_ssec_key` and
  `stored_ssec_algorithm`, shared by the unwrap and the response-header
  paths.
- `core/read.rs` orders the steps: recognize, name the key, authorize,
  recover. Both read entry points resolve the key through one helper, so
  authorization and the response header cannot name different keys.
- `core/keying/` no longer imports from `core/s3/`: the request check
  `reject_kms_context_location_override` moves to `core/s3/headers.rs`,
  and the legacy SSE-C nonce hashes with `md5` directly.

`rio-v2` conditional compilation is now confined to `core/keying/` and
`kms/`. No behavior change: the order of checks on a read is preserved.

* docs(sse): describe the module layout and its layer rules

Record in the crate instructions what the split settled: where startup
state, the entry points, the S3 layer, the keying layer, and the
data-key providers live, and the rules that keep them apart.

- `core/keying/` never imports from `core/s3/`; `core/s3/` reads stored
  metadata only through `core/keying/metadata.rs`.
- `rio-v2` conditional compilation stays under `core/keying/` and `kms/`.
- A new stored format is added under `core/keying/` without changes
  under `core/s3/`.

* refactor(sse): let each keying mode own its stored record

One function wrote the stored metadata of every keying mode, and one
function read it back, each switching on the mode and the build inline.
Give a mode both directions of its own record instead.

- `core/keying/direct.rs` records and reads the Direct record
  (`record_customer_key_nonce`, `record_wrapped_data_key`,
  `read_wrapped_data_key`).
- `core/keying/object.rs` records and reads the sealed-key record in
  MinIO's slots (`record_sealed_customer_key`,
  `record_data_key_in_minio_slots`, `read_sealed_data_key`).
- `encryption_material_to_metadata` records the scheme and hands the key
  to the mode that formed it.
- `core/keying/stored.rs` reads in three named steps: the recognition
  order of the modes (`read_stored_data_key`), the choice of the
  provider that unwraps the data key (`unwrap_stored_data_key`), and the
  opening of the object key. A stored key carries its mode as
  `StoredKeyMode` rather than as an optional sealed key.

No behavior change. The stored metadata is identical for every
combination of scheme, mode, sealed key, key id, context, and size in
both builds, and the order of the read-side failures is preserved.

* test(sse): add a black-box suite that compares two server binaries

Unit tests cannot show that moving SSE into its own crate left what a
client sees, and what lands on disk, unchanged. This suite drives a real
server process and can compare two binaries.

- 30 cases over six process configurations: no key source, a loaded and
  an invalid local master key, the Local KMS backend with per-key
  authorization off and enforced. They cover round trips and response
  headers, bucket default encryption, CopyObject, multipart uploads,
  run-time KMS stop and start, malformed requests and authorization.
- Every HTTP exchange inside a case is recorded as an observation:
  status, error code and message, SSE headers, response header names,
  body hash, and the encryption metadata key names stored for the
  object. `diff` compares two runs field by field against a closed list
  of accepted differences.
- `cross` has one binary write every stored form and another read the
  same data directory.
- A registered binary is pinned by SHA-256, and a run fails when the
  stored form does not match the build the binary was registered as.

Results for this branch against its base, default build: 93 verdicts and
252 exchanges equal, no blocking difference; the only accepted one is the
new `sse_local_master_key` startup event. Cross reads pass in both
directions, 42 objects each.

The suite also pins two behaviors that predate this branch. Multipart
responses for SSE-C uploads carry `x-amz-server-side-encryption: AES256`
besides the customer-key headers; MP-03 records that as a known deviation.
A `rio-v2` build cannot read back encrypted objects of roughly 64 to
128 KiB, or of 3 MiB and more, so under that build the comparison only
shows that both binaries fail the same cases.

* test(sse): stop the black-box suite from overlooking two regressions

The known-deviation marker in MP-03 accepted any SSE headers that
contained the expected ones, so an unrelated extra header, the raw
customer key included, was still reported as the known deviation. It now
tolerates exactly the one documented difference and fails on anything
else.

The observation of a result document kept only the set of element names.
A wrong part size, a missing part or reordered parts in a listing changed
nothing, so a comparison between two binaries could not see them. It now
keeps every leaf with its value in document order and reduces only the
elements that vary between runs: upload ids, timestamps, markers and
ETags of encrypted objects.

`suite.py selftest` checks both offline, together with the rules of the
comparison. Against the previous observation code it fails on the three
listing cases. The comparison of this branch with its base still shows no
blocking difference in either build.

* test(sse): prepare the black-box suite for P1 cases and more backends

The suite could only run P0 cases on six built-in configurations with one
shared site each. The next groups of cases need more than that:

- `run --level p0|p1|all`, and a `skip` verdict for a case the backend's
  capability table rules out.
- `register_config` lets a case module add a process configuration with
  what it needs before the process starts, once it answers, and at the
  end of the run. The two Local KMS configurations now use the same
  mechanism instead of special cases in the driver.
- `isolated` cases get a site of their own on a fresh data directory and
  may restart it with another configuration or environment.
- Exchange hooks and post-run checks, for modules that keep everything a
  run saw and judge it as a whole.
- Case modules are discovered by file name, and the binary registry can
  be shared between state directories.

The P0 results and the comparison with the base are unchanged.

* test(sse): cover run-time state, authorization, leaks and stored form

Three groups of cases are added to the black-box suite, with what they
need to run.

Run-time state (14 cases). A write follows the state the process is in
now, a read follows what the object recorded: the master key across
restarts, KMS stopped, started and configured at run time, a deployment
moving between key sources, a changed backend, and keys disabled,
destroyed and rotated. New configurations: Local KMS with a master key,
Vault Transit, Vault KV2 and the Static backend. Vault is a development
server started by the driver with a token generated per run; when it
cannot be started its cases report an environment error.

Authorization and leaks (18 cases). Per-key authorization on bucket
defaults, both ends of a copy, multipart uploads, every read entry point,
anonymous access, internal work and audit entries. Every exchange of a
run is archived with secrets redacted, and four checks over the whole run
look for key material in responses and server logs, for internal headers,
and for unexpected internal-error messages.

Stored form (8 cases). What an encrypted object looks like on disk is
read with the repository's `dump_fileinfo` tool and held to one manifest
per build: every metadata key with its exact value or, for random values,
its shape. The cases also search the drives for plaintext, customer keys
and unwrapped data keys. `cross` records the stored form of everything
the writer stored.

Compared with the base on the default build, all levels: 382 verdicts and
887 exchanges equal, no blocking difference; 86 case runs pass on each
side. Three cases report a known deviation that predates this branch: the
multipart SSE-C response header (MP-03), an SSE-KMS write that turns from
400 into 503 after a refused KMS start (KS-09), and a read by a caller
without a grant that reveals whether the key was destroyed or KMS is
stopped (SEC-05). The manifests were written from the base binaries and
the branch stores the same form in both builds.

Each group was shown to fail when it should: Vault unavailable gives
environment errors, the two authorization configurations swapped fail the
matrix both ways, a planted key is found in a log and in a response, a
`rio-v2` binary registered as the default build fails the manifest and
the build check.

* test(sse): expect only customer-key headers on SSE-C multipart replies

MP-03 recorded the extra `x-amz-server-side-encryption: AES256` header on
SSE-C CreateMultipartUpload and CompleteMultipartUpload responses as a
known deviation. The header is gone on main, so the case now checks the
intended headers directly; left as a marker it would report the deviation
as fixed and fail the run.

On both builds the base and this branch pass the case.

* test(sse): take the black-box suite out of this repository

The suite under `scripts/test/sse_blackbox/` drives a server binary from
the outside and compares two binaries. It is a product-level test
harness, not part of the server's own tests, and belongs with the other
external test suites rather than in this repository.

The directory is removed, with the paragraph in `crates/sse/AGENTS.md`
that pointed to it. No server code changes.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
2026-11-25 06:19:21 +08:00
..
2025-12-18 20:13:24 +08:00
2025-12-18 20:13:24 +08:00
2025-12-28 21:57:44 +08:00
2025-12-18 20:13:24 +08:00

scripts/ index

Authoritative inventory of everything under scripts/ (backlog#1153 infra-13). One row per top-level entry; subdirectories get one row each and keep their own READMEs. The test-layer map that ties the major runners together lives in docs/testing/README.md.

Statuses

  • ci-gate — wired into CI, release, or image-build pipelines. Do not move, rename, or change flags without updating the wiring listed in the last column.
  • dev-tool — run by humans: local dev loops, runbooks, validation harnesses. Kept working, not wired into CI.
  • archived — one-shot scripts whose investigation/issue is finished, moved to scripts/archive/. Unmaintained reference material: never wire into CI, and expect bit-rot. To resurrect one, move it back and give it an index row here.

Adding a script? Add an index row in the same PR. Issue-scoped scripts (run_issueNNN_*, validate_issue_NNN_*) are expected to be archived when their issue closes.

Repository & CI gates

Entry Status Purpose Wiring / docs
check_architecture_migration_rules.sh ci-gate Architecture-boundary anti-regression guard ci.yml Quick Checks; make pre-commit
check_body_cache_whitelist.sh ci-gate Keeps the app-layer body-cache eligibility gate fail-closed ci.yml Quick Checks
check_doc_paths.sh ci-gate Fails when instruction/architecture docs reference repo paths that no longer exist make pre-commit / pre-pr
check_embedded_secrets.sh ci-gate Repo-wide scan blocking committed private key material and provider credential literals ci.yml Quick Checks; make pre-commit / pre-pr
check_extension_schema_boundaries.sh ci-gate Extension-schema crate boundary guard ci.yml Quick Checks; make pre-commit
check_layer_dependencies.sh ci-gate Crate-layering DAG guard (reads layer-dependency-baseline.txt) ci.yml Quick Checks
check_logging_guardrails.sh ci-gate Blocks legacy logging patterns from returning make pre-commit / pre-pr
download_rc.sh ci-gate Downloads and verifies the RustFS CLI release binary for container builds Dockerfile, Dockerfile.glibc, Dockerfile.source, Dockerfile.decommission-local
check_migration_gate_count.sh ci-gate Migration-critical test gate with committed count floor (.config/migration-gate-floor.txt) ci.yml Test and Lint; docs/testing/README.md
check_no_planning_docs.sh ci-gate Blocks committed planning-type documents ci.yml Quick Checks; make pre-commit
check_no_tokio_io_uring.sh ci-gate Keeps tokio's io-uring backend disabled ci.yml Quick Checks
check_s3s_footprint.sh ci-gate Lower-only s3s surface ratchet: a pull request (--base <sha>, from Quick Checks) may not rise above its base revision; the baseline is a ceiling everywhere (a drop passes and prints the line to lower) ahead of the gateway migration (reads .config/s3s-footprint-baseline.txt; s3_error_lines leaves out lines whose file imports the macro from rustfs-s3-types, rule in the script header); --mode allowlist fails on any Rust file referencing s3s outside .config/s3s-edge-allowlist.txt, --dry-run lists them ci.yml Quick Checks; make pre-commit; make script-tests (--self-test)
check_test_retirements.py ci-gate Every test a migration slice retires (.config/test-retirements/<slice>.txt, rustfs/backlog#2765) has five fields, is listed once, and names a replacement that exists (a test function, a differential step or an e2e function) ci.yml Quick Checks; make pre-commit; make script-tests (--self-test)
check_test_count_ratchet.sh ci-gate Per-crate test-count floor and #[ignore] ceiling against .config/test-count-baseline.txt; no crate may fall below its tests row or rise above its ignored row (extra tests and new crates pass with a note) ci.yml Quick Checks; make pre-commit
guard_source_set.sh ci-gate (library) Sourced helpers for text guards that must survive a mechanical file split (rustfs/backlog#2765): guard_source_set resolves a required file plus the split directory (a missing required file fails), module_relative_rg rewrites a super:: rule for each file's module depth Sourced by check_architecture_migration_rules.sh and check_logging_guardrails.sh; contract tests test_guard_source_set.sh; end-to-end split probe test_split_guard_rules.sh (both make script-tests)
check_unsafe_code_allowances.sh ci-gate Unsafe-code allowance ledger guard ci.yml Quick Checks
layer-dependency-baseline.txt ci-gate (data) Committed baseline consumed by check_layer_dependencies.sh Architecture guard troubleshooting
static.sh ci-gate Static-build helper executed inside image builds Dockerfile.source, Dockerfile.decommission-local
helm_chart_version.sh dev-tool Normalizes chart/app versions for installation references rustfs-release-version-bump skill
test_helm_templates.sh ci-gate Helm template rendering test helm-package.yml

Test & e2e runners

Entry Status Purpose Wiring / docs
repro_rejoin_readiness_docker.py dev-tool Fixed-source Docker HTTPS rejoin and acknowledged-overwrite diagnostic; retains first failure Guide
test_repro_rejoin_readiness_docker.py ci-gate Provenance, native architecture, ownership and failure-preservation guards make script-tests; same guide
diagnose_scanner_enumeration_restart.py dev-tool Strict fixed raw-entry-budget scanner-worker restart diagnostic Checkpoint fixture
prepare_replacement_migration.py dev-tool Prepares digest-bound schema 5/6 replacement maintenance approvals Replacement recovery
test_prepare_replacement_migration.py dev-tool Verifies maintenance approval scope, publication, and stopped-writer assertion Python unittest; same runbook
test_diagnose_scanner_enumeration_restart.py dev-tool Driver report validation and positive convergence oracle tests Python unittest; same guide
test_object_generation_protocol_model.py dev-tool Bounded single-slot, four-voter promise/accept design model and recovery/retirement examples; no production runtime evidence python3 scripts/test_object_generation_protocol_model.py; Generation contract
junit_diff.py dev-tool Case-by-case pass/fail/skip diff of two JUnit XML reports (reference vs candidate stack); exit 1 on any difference or stale --allow entry, 2 on unreadable input python3 scripts/junit_diff.py a.xml b.xml; backlog T3.1
test_junit_diff.py ci-gate Contract tests and fixtures (scripts/tests/junit_diff/) for junit_diff.py make script-tests
acceptance_lane.py ci-gate Shared reader for the two gateway-acceptance checkers: the startup record and recorded exit codes imported by the two scripts below; tested by their --self-test
check_conformance_rulings.py ci-gate Judges the gateway conformance report against .config/conformance-rulings.toml (an unruled failure, a ruled case failing differently, a stale ruling, or a skip on the server's own answer fails) .github/workflows/gateway-acceptance.yml; make script-tests (--self-test); backlog T3.4
compat_matrix_report.py ci-gate Judges the gateway client matrix manifest (no fail or sut-unregistered cell, every client ran) .github/workflows/gateway-acceptance.yml; make script-tests (--self-test); backlog T3.5
gateway_corpus_capture.py ci-gate Records the ordinary e2e-full and pinned Ceph tests listed in .config/gateway-corpus-tests.toml (nightly by default, record --suite smoke locally), checks the raw and deduplicated entries for secrets, and reports the sample-count gate. Full suite coverage and release replay are separate. gateway-acceptance.yml and make script-tests
gateway_wire_replay.py ci-gate Runs the explicitly selected Ceph tests on the pinned release, sends their identical signed requests to the candidate and compares status, error code, selected headers and response bodies. gateway-acceptance.yml and make script-tests
s3-tests/reference_parity.py ci-gate Plans the reference parity targets, lists a run's failures for the single rerun, and compares every candidate's s3-tests JUnit against the pinned reference per node id with a tolerated-difference file .github/workflows/reference-parity.yml; backlog T3.2
s3-tests/test_reference_parity.py ci-gate Contract tests for reference_parity.py make script-tests
test_reference_binary.py ci-gate Contract tests for .github/actions/reference-binary/reference_binary.py (pin resolution and verified unpacking) make script-tests
e2e-run.sh ci-gate Boots a rustfs server and runs the s3s-e2e black-box conformance tool against it ci.yml e2e-tests jobs; docs/testing/README.md
run_ecstore_validation_suite.sh dev-tool ecstore black-box validation suite (quick/full/destructive/fuzz profiles) docs/testing/README.md, docs/testing/ecstore-validation-suite-design.md
run_e2e_tests.sh dev-tool Local e2e_test crate runner (starts a server, applies filters, cleans up) crates/e2e_test/README.md
gen_bucket_config_goldens.sh dev-tool One-shot generator for the 13-family persisted bucket-config XML byte goldens; refuses to overwrite without --force and records the generating commit crates/ecstore/tests/fixtures/bucket-config-goldens/README.md; crates/ecstore/tests/bucket_config_goldens.rs
run.sh dev-tool Local rustfs startup wrapper make e2e-server; Justfile
run.ps1 dev-tool Windows counterpart of run.sh —
probe.sh dev-tool Probe-style e2e run make probe-e2e
run_scanner_validation_harness.sh dev-tool Scanner validation harness docs/operations/scanner-benchmark-runbook.md
scanner_memory_acceptance.py dev-tool Owned S3 scanner-memory and scanner-off burst acceptance phases Memory acceptance
test_scanner_memory_acceptance.py dev-tool Dataset, ownership, telemetry and acceptance-oracle tests Python unittest; same guide
check_test_wiring.py dev-tool Validates test wiring and assembles one or more measured Scanner/Heal release descriptors into a single release evidence bundle .config/scanner-heal-required-tests.json; check_test_wiring.py --self-test
run_scanner_heal_evidence_case.sh dev-tool Runs one Scanner/Heal release-evidence registry case and checks the produced receipt/oracle .config/scanner-heal-required-tests.json; check_test_wiring.py --check-scanner-heal
run_scanner_heal_authority_evidence.py dev-tool Assembles measured Scanner/Heal G01 root/quota authority release descriptors from operator-collected authority artifacts .config/scanner-heal-required-tests.json; test_scanner_heal_authority_evidence.sh
run_scanner_heal_checkpoint_crash_evidence.py dev-tool Assembles measured Scanner/Heal G02/R-E checkpoint and restart release descriptors from scanner restart diagnostic reports diagnose_scanner_enumeration_restart.py; test_scanner_heal_checkpoint_crash_evidence.sh
run_scanner_heal_g14_multiset_evidence.py dev-tool Assembles measured Scanner/Heal G14 same-window EC8+4 multi-set/multi-pool release descriptors from e2e case directories or an operator-collected proof .config/scanner-heal-required-tests.json; test_scanner_heal_g14_multiset_evidence.sh
run_scanner_heal_g09_upgrade_evidence.sh dev-tool Runs the G09 mixed-version and rollback upgrade E2E lanes against a pinned previous release and verifies the raw evidence artifacts docs/testing/ci-gates.md; .github/workflows/e2e-upgrade.yml; test_scanner_heal_g09_upgrade_evidence.sh
run_scanner_heal_linux_evidence_plan.py dev-tool Writes the unified Scanner/Heal Linux release-evidence execution manifest and can run lightweight preflight checks without producing measured evidence docs/testing/ci-gates.md; test_scanner_heal_linux_evidence_plan.sh
run_scanner_heal_scoped_ack_evidence.py dev-tool Assembles measured Scanner/Heal G03 scoped ACK publication and mixed-peer fallback release descriptors .config/scanner-heal-required-tests.json; test_scanner_heal_scoped_ack_evidence.sh
run_scanner_heal_legacy_rollback_evidence.py dev-tool Assembles measured Scanner/Heal R-L legacy source-conflict, migration-gap, and source-retirement release descriptors .config/scanner-heal-required-tests.json; test_scanner_heal_legacy_rollback_evidence.sh
run_scanner_heal_mrf_evidence.py dev-tool Assembles measured Scanner/Heal G07/G08/P4 MRF release descriptors from W13 raw artifacts .config/scanner-heal-required-tests.json; test_scanner_heal_w13_mrf_evidence.sh
run_scanner_heal_scheduler_pressure_evidence.py dev-tool Assembles measured Scanner/Heal G10/P1/P3 scheduler-pressure release descriptors from a completed measured ABBA run, recovery-window proof, and profile artifacts docs/operations/scanner-benchmark-runbook.md; test_scanner_heal_scheduler_pressure_evidence.sh
run_scanner_heal_status_outcome_probe.py dev-tool Normalizes live Scanner/Heal status/outcome observations into the measured G05/G06/R-D raw artifacts consumed by the descriptor producer .config/scanner-heal-required-tests.json; test_scanner_heal_status_outcome_evidence.sh
run_scanner_heal_status_outcome_evidence.py dev-tool Assembles measured Scanner/Heal G05/G06/R-D status-and-outcome release descriptors from same-run status, compatibility, and disposition artifacts .config/scanner-heal-required-tests.json; test_scanner_heal_status_outcome_evidence.sh
run_scanner_heal_maintenance_evidence.py dev-tool Assembles measured Scanner/Heal G11/G13 maintenance-producer release descriptors from operator-collected proof JSON .config/scanner-heal-required-tests.json; test_scanner_heal_maintenance_evidence.sh
run_scanner_heal_w13_mrf_evidence.sh dev-tool Runs the W13 durable MRF replay lanes and writes G07/G08/P4 bundle-ready evidence descriptors docs/testing/ci-gates.md; test_scanner_heal_w13_mrf_evidence.sh
run_scanner_heal_w16_recovery_evidence.sh dev-tool Runs the W16 recovery-intent and quota authority lanes and writes G04/G12 bundle-ready evidence descriptors docs/testing/ci-gates.md; test_scanner_heal_w16_recovery_evidence.sh
test_scanner_validation_harness.sh dev-tool Self-test for the scanner validation harness —
test_scanner_heal_checkpoint_crash_evidence.sh dev-tool Shell self-test for the Scanner/Heal checkpoint/crash evidence assembler —
test_scanner_heal_authority_evidence.sh dev-tool Shell self-test for the Scanner/Heal G01 authority evidence assembler —
test_scanner_heal_scoped_ack_evidence.sh dev-tool Shell self-test for the Scanner/Heal G03 scoped ACK evidence assembler —
test_scanner_heal_legacy_rollback_evidence.sh dev-tool Shell self-test for the Scanner/Heal R-L legacy rollback evidence assembler —
test_scanner_heal_g14_multiset_evidence.sh dev-tool Shell self-test for the Scanner/Heal G14 multi-set/multi-pool evidence assembler —
test_scanner_heal_scheduler_pressure_evidence.sh dev-tool Shell self-test for the Scanner/Heal scheduler-pressure evidence assembler —
test_scanner_heal_status_outcome_evidence.sh dev-tool Shell self-test for the Scanner/Heal status-and-outcome evidence assembler —
test_scanner_heal_maintenance_evidence.sh dev-tool Shell self-test for the Scanner/Heal G11/G13 maintenance evidence assembler —
test_scanner_heal_g09_upgrade_evidence.sh dev-tool Shell self-test for the Scanner/Heal G09 upgrade evidence runner —
test_scanner_heal_w16_recovery_evidence.sh dev-tool Shell self-test for the Scanner/Heal W16 recovery evidence runner —
test_scanner_heal_w13_mrf_evidence.sh dev-tool Shell self-test for the Scanner/Heal W13 MRF evidence runner —
scanner_abba.py dev-tool Scanner/heal ABBA orchestration and evidence gates via run_scanner_validation_harness.sh --abba docs/operations/scanner-benchmark-runbook.md
scanner_client_trace.py dev-tool Reconcile client request ledgers and calculate per-window exact sample percentiles scanner_abba.py
test_scanner_abba.py dev-tool Synthetic ABBA adapter and failure-path tests test_scanner_validation_harness.sh
test_scanner_client_trace.py dev-tool Client ledger reconciliation and fail-closed tests test_scanner_validation_harness.sh
test_summarize_scanner_heal_perf.py dev-tool Scanner/heal summary and provenance tests test_scanner_validation_harness.sh
test_scanner_heal_scheduler_pressure_evidence.py dev-tool Scheduler-pressure evidence fail-closed tests test_scanner_heal_scheduler_pressure_evidence.sh
test_scanner_heal_linux_evidence_plan.py dev-tool Linux evidence plan coverage tests test_scanner_heal_linux_evidence_plan.sh
test_build_rustfs_options.sh dev-tool Shell test for rustfs build-option wiring make test (script-tests)
test_entrypoint_credentials.sh dev-tool Container entrypoint credential and bundled bootstrap-default test make test (script-tests)
test_helm_chart_version.sh dev-tool Test for helm_chart_version.sh —
test_package_service_scripts.sh ci-gate Verifies DEB/RPM install, upgrade, removal, and service restart scriptlets audit.yml workflow-pin-report
test_package_versions.sh ci-gate Exact-output and fail-closed tests for DEB/RPM package version normalization audit.yml workflow-pin-report; package.yml RPM build
windows-sftp-listener-smoke.sh dev-tool Confirms rustfs.exe --features sftp binds an SFTP listener on Windows —

Benchmark & performance harnesses

Entry Status Purpose Wiring / docs
run_hotpath_warp_ab.sh dev-tool Linux warp A/B rig for the hotpath series (quick local A/B) docs/operations/hotpath-warp-ab-runbook.md
run_hotpath_warp_abba.sh dev-tool Formal ABBA warp runner (baseline/candidate interleaved, --rounds >= 3) docs/operations/hotpath-warp-ab-runbook.md
hotpath_warp_ab_gate.sh dev-tool Relative-budget gate evaluated over the warp A/B results used by run_hotpath_warp_ab.sh; hotpath runbook
run_internode_grpc_ab_bench.sh dev-tool One-click A/B driver for the internode gRPC optimization stages docs/operations/internode-grpc-benchmark-runbook.md
run_internode_transport_baseline.sh dev-tool Internode transport baseline runner internode runbook; crates/io-metrics/README.md
check_internode_rpc_timeout_boundary.py dev-tool Verifies under-budget success, over-budget deadlines and post-stall recovery from recorded internode RPC probe reports internode gRPC benchmark runbook; test_internode_rpc_timeout_boundary.py
run_four_node_cluster_failover_bench.sh dev-tool Four-node cluster failover benchmark with configurable host ports and optional server-only image build docker/compose/README.md; internode runbook
run_object_batch_bench.sh dev-tool Batch object benchmark runner with PUT-specific Warp summary extraction internode + scanner runbooks
test_object_batch_bench.sh dev-tool Regression test for Warp PUT summary extraction scripts/test_object_batch_bench.sh
wait_storage_quiescence.py dev-tool Fail-closed dirty/writeback and PSI stability gate before storage benchmarks python3 -m unittest scripts/test_wait_storage_quiescence.py
run_object_batch_bench_enhanced.sh dev-tool Enhanced batch benchmark runner; hub used by the smoke rigs hotpath runbook
run_pinned_paired_abba_bench.sh dev-tool Pinned RustFS/MinIO paired ABBA benchmark orchestrator for backlog#1432 test_pinned_paired_abba_bench.sh
prepare_conditional_read_baseline.py dev-tool Installs only the matching conditional-read benchmark harness in a clean detached baseline docs/testing/conditional-read-benchmark.md
run_conditional_read_abba.py dev-tool Serial ordinary/hit/miss GET ABBA with cache/slow-disk controls and drift/regression gates docs/testing/conditional-read-benchmark.md
test_conditional_read_abba.py dev-tool Parser, drift rejection, and throughput/lock regression tests for conditional-read evidence run_conditional_read_abba.py
run_get_codec_streaming_smoke.sh dev-tool Local GET benchmark harness for the codec streaming read path docs/testing/ecstore-validation-suite-design.md
run_get_1mib_abba_stage_metrics.sh dev-tool Exact-1MiB isolated-host GET ABBA/stage-metrics harness for backlog#1434 test_get_1mib_abba_stage_metrics.sh
issue_2007_coalescer_prometheus_report.py dev-tool Read-only Prometheus report for GET metadata coalescer delay cost validation; usage in the module docstring test_issue_2007_coalescer_prometheus_report.sh
prometheus_metrics_1649_smoke.py dev-tool Read-only Prometheus instant-query smoke check for the backlog#1649 metric dimensions, required labels, and retired series; usage in the module docstring --self-test
run_gt1g_get_http_matrix.sh dev-tool >1 GiB GET HTTP matrix docs/testing/ecstore-validation-suite-design.md
run_gt1g_multipart_put_matrix.sh dev-tool >1 GiB multipart PUT matrix docs/testing/ecstore-validation-suite-design.md
sample_remote_rustfs_rss.sh dev-tool Remote RustFS PID CPU/RSS TSV sampler for hotpath profiling runs test_sample_remote_rustfs_rss.sh; backlog#1647
summarize_samply_profile_symbols.py dev-tool Offline samply profile.json.gz + .syms.json function-level hotpath summarizer test_summarize_samply_profile_symbols.py; backlog#1647
run_scanner_benchmarks.sh dev-tool (disposition pending) Scanner performance benchmark runner. Contains a hardcoded stale path; disposition owned by backlog perf-10 — do not fix, move, or delete it here —

Local development & operations

Entry Status Purpose Wiring / docs
dev_clear.sh dev-tool Local dev cleanup. scripts/dev_*.sh is a CI paths-filter glob — keep the naming ci.yml/build.yml paths filters
dev_deploy.sh dev-tool Copy a built binary to dev servers make deploy (.config/make/deploy.mak); Justfile
dev_rustfs.sh dev-tool Local dev run loop —
dev_rustfs.env dev-tool (data) Env presets for the dev scripts —
restart_local_single_node_multidisk_rustfs.sh dev-tool Restart a local single-node multi-disk instance —
inspect_dashboard.sh dev-tool Sanity-checks the Grafana dashboard JSON .docker/observability
notify.sh dev-tool Starts a local webhook receiver for notify-target development —
manual_transition_debug.sh dev-tool Log/metrics helper for manual transition troubleshooting —
manual_transition_journal_audit.sh dev-tool Journal + metrics + log audit for manual transition jobs —
manual_transition_mixed_rollout_matrix.sh dev-tool Matrix generator for mixed-version rollout phases —
manual_transition_mixed_rollout_runbook.sh dev-tool Reusable mixed-version rollout runbook generator (external run) —
manual_transition_mixed_version_docker_harness.sh dev-tool Dedicated #1508 Docker harness for old/new manual-transition rollout evidence with strict/baseline/blocked result classification test_manual_transition_runbooks.sh
monitor_manual_transition_ci.sh dev-tool CI workflow/status watcher for manual transition follow-up monitoring —
manual_transition_soak_matrix.sh dev-tool Matrix generator for nightly stress windows —
manual_transition_nightly_stress_runbook.sh dev-tool Nightly stress entrypoint with failure snapshot templates —
install-flatc.sh dev-tool Local flatc installer (macOS) —
install-protoc.sh dev-tool Local protoc installer (macOS/Linux) —
cargo_publish_workspace.sh dev-tool Generates the workspace crate publish order, checks existing registry versions, and optionally runs ordered cargo publish dry-runs or publication docs/operations/cargo-publish-workspace.md
makefile-header.sh dev-tool Generates the ## —— section —— header lines used in .config/make/*.mak —
tls_gen.md dev-tool (doc) Notes on generating local TLS certificates —

Subdirectories

Entry Status Purpose Wiring / docs
codemods/ dev-tool Scripted, idempotent source migrations for the gateway migration (rustfs/backlog#2734); s3_error_to_s3_types.py moves s3s error-type paths onto rustfs-s3-types per crate closure and refuses the s3s edge allowlist; split_bucket_usecase.py splits rustfs/src/app/bucket_usecase.rs into one file per configuration family (preparatory refactor P2, rustfs/backlog#2765) and stops on any item its tables do not assign make script-tests (--self-test); usage in each script's docstring
fuzz/ ci-gate Unified cargo-fuzz runner and helpers for the fuzz/ sub-workspace fuzz.yml; fuzz/README.md
release/ ci-gate Release creation and DEB/RPM version-normalization helpers build.yml; package.yml; manual-main-packages.yml
s3-tests/ ci-gate ceph/s3-tests compatibility harness (allow-lists, patches, report tooling) ci.yml; e2e-s3tests.yml; scripts/s3-tests/README.md
security/ ci-gate Workflow-pin enforcement and release supply-chain asset generation audit.yml; build.yml
table-catalog/ dev-tool S3-Tables / pyiceberg validation suite docs/architecture/s3-tables-support-matrix.md
test/ dev-tool Manual operational validation runbooks (decommission, tier lifecycle), paired .sh + .md —
archive/ archived Retired one-shot scripts (see below) —

Archived (scripts/archive/)

Moved 2026-07 (backlog#1153 infra-13) after a whole-tree reference census: each entry had zero references from CI, Makefiles, docs, or code — or was referenced only by other scripts in this same archived set. Reasons:

Entry Was
validate_issue_785_list_objects.sh One-shot issue validation (list-objects series)
validate_issue_786_list_objects.sh One-shot issue validation (list-objects series)
validate_issue_787_list_quorum.sh One-shot issue validation (list-quorum)
validate_issue_841_list_objects_observability.sh One-shot issue validation (list observability)
validate_issue_1365_docker.sh One-shot issue validation (docker repro)
validate_issue_2723_site_replication.sh One-shot issue validation (site replication)
validate_issue_3031_docker.sh One-shot issue validation (docker repro)
run_issue712_deeper_zero_copy_put_with_capture.sh One-shot perf capture for backlog#712
run_issue797_local_4node_16disk_ab.sh One-shot 4-node/16-disk A/B for backlog#797
run_issue_2573_acceptance.sh One-shot acceptance run for issue #2573
run_issue_2941_perf_capture.sh One-shot perf capture for issue #2941
run_put_large_stage_breakdown.sh backlog#706 large-PUT stage breakdown (family)
run_put_large_stage_breakdown_with_capture.sh backlog#706 one-shot wrapper (family)
run_put_large_tuning_matrix.sh backlog#706 tuning matrix (family)
collect_put_large_stage_breakdown_artifacts.sh backlog#706 artifact collector (family)
analyze_put_service_metrics_deltas.py backlog#706 metrics-delta analyzer (family)
README-stress-test.md GET-optimization one-shot suite doc
stress-test-get-optimization.sh GET-optimization one-shot stress test
quick-validate-get-optimization.sh GET-optimization one-shot validation
benchmark-sf-optimization.sh GET-optimization one-shot benchmark
prepare_gt1g_get_test_objects.sh >1 GiB GET investigation one-shot fixture prep
run_gt1g_multipart_put_server_path_focus.sh >1 GiB PUT investigation one-shot focus run
run_get_metrics_gate_smoke.sh One-shot GET metrics-gate smoke
run_object_batch_bench_abc.sh One-shot capacity/object profile A/B/C controller
run_object_data_cache_bench.sh One-shot GET bench for the object-data-cache rollout gate
setup-test-binaries.sh One-shot Docker-build test binary fixture
test.sh Ancient manual mc bucket smoke scratchpad
test_policy.json Orphaned IAM policy fixture (hardcoded test bucket)
dual_stack.py, test_dual_stack.py Both-stack lanes (stack proof, gateway preflight, per-profile diff); retired when the gateway stack became the only S3 stack. Not runnable from here: it imports junit_diff.py
mint_stack_diff.py, test_mint_stack_diff.py Mint legacy-versus-gateway gate; retired with the legacy stack. Imports dual_stack.py