Skip to content

chore(fuzz,fs,rdma,ci): close fuzz, fs cancellation, and toolchain gaps - #1659

Merged
overtrue merged 9 commits into
mainfrom
p9/1634-fuzz-fs-rdma-ci
Nov 27, 2026
Merged

overtrue merged 9 commits into
mainfrom
p9/1634-fuzz-fs-rdma-ci

Conversation

@overtrue

Copy link
Copy Markdown
Collaborator

Closes #1634

Summary

Closes the remaining fuzzing, filesystem cancellation/locking/recovery, RustFS profile registration guard, RDMA manifest compilation, fuzz lockfile audit, and workflow pinning gaps tracked in #1634 (the docs/rustfs-profile.md 28-switch registration, 6-crate clippy::print_* lints, and rdma/ MSRV alignment already landed in PR #1637 with zero overlapping files):

  1. Filesystem cancellation, upload-lock serialization, and crash-left staging recovery (crates/fs):
    • Added RAII drop guards (crates/fs/src/staging.rs) so dropped futures clean up temporary version and multipart staging artifacts.
    • Serialized version_lock access and added bounded Duration-accumulated upload-directory flock retry (crates/fs/src/uploads.rs, versioning.rs, buckets.rs, completion.rs, lifecycle.rs).
    • Added DeleteBucket crash-left (SIGKILL) recovery for both versions/.tmp-* and uploads/{.tmp-upload-,.complete-,.abort-}* directories while failing closed (400 InvalidRequest) on symlinks, non-directories, or unexpected entries (crates/fs/src/cancellation_tests.rs).
  2. Fuzzing and differential XML 1.0 blind spots (fuzz/, crates/difftest, crates/http, crates/core):
    • Added 6 fuzz targets (dialect_admin_routes, s3vectors_auth, sig_token_and_sts aligned with ADR-0056's public surface + alias/Authorization invariants, server_http_conn, http_metadata_query, sse_context_json) and support harnesses.
    • Added aws-chunked trailer fuzzing, 6 trailer seeds under fuzz/seeds/chunked_decode/, and replay coverage (crates/http/tests/chunked_decode_replay.rs, header_and_query.rs).
    • Added XML 1.0 Fifth Edition Char and character-reference validation (crates/difftest/src/xmltree.rs, endpoint_replay/, tests/endpoint_replay_xml.rs) across 200/4xx XML responses plus control-byte preservation.
  3. RustFS profile registration guard (scripts/check_rustfs_profile_registered.sh, crates/gateway/src/builder/rustfs_profile.rs):
    • Added deterministic CI guard verifying all 54 builder switches and 10 authenticator switches are registered in docs/rustfs-profile.md and synced with rustdoc.
  4. RDMA manifest verification, fuzz/Cargo.lock audit, and workflow pinning (.github/workflows/*.yml, scripts/, deny.toml):
    • Committed fuzz/Cargo.lock, scoped libfuzzer-sys's NCSA license allowance in deny.toml, and wired cargo deny --locked --manifest-path fuzz/Cargo.toml into ci.yml.
    • Added scripts/verify_rdma_manifest.sh (wired into ci.yml) to compile-check rdma/Cargo.toml --features rdma --lib against public external-payload ports.
    • Pinned Rust toolchains and GitHub Action SHAs across all workflows (check_rust_toolchain_msrv.sh, check_suites_pinned.sh, check_ci_test_split.sh, check_ci_time_gate.sh, test_guard_scripts.sh).

TDD and Mutation Verification

  • TDD red (crates/fs/src/uploads.rs crash-left upload staging recovery): n_crash_left_upload_staging_dirs_recover_while_symlink_and_unknown_fail_closed failed before implementation (BucketNotEmpty 409 != Ok(204)).
  • Mutation 1: Dropped .complete- prefix from is_interrupted_upload_staging_name -> test failed RED (BucketNotEmpty 409 != Ok(204)).
  • Mutation 2: Weakened interrupted_upload_staging_directory symlink/non-dir guard to if true -> test failed RED (InternalError 500 != InvalidRequest 400).
  • Restored cleanly: cancellation_tests 11/11 PASS, multipart_upload_ids 18/18 PASS.

Verification Outputs

  • cargo fmt --all --check: PASS
  • cargo clippy --workspace --all-targets -- -D warnings: PASS (0 warnings)
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps: PASS
  • cargo xtask spec verify: PASS
  • cargo test --workspace -- --test-threads=4: PASS
  • cargo test --package rustfs-gateway --package rustfs-gateway-fs --features rustfs-gateway/external-payload,rustfs-gateway-fs/external-payload external_payload: PASS (24/24 gateway, 9/9 fs)
  • bash scripts/verify_rdma_manifest.sh: PASS (OK: rdma/Cargo.toml compiles with --features rdma against public external-payload ports, 8.66s)
  • cargo check --manifest-path fuzz/Cargo.toml --bins: PASS (all 29 fuzz binaries compile clean)
  • cargo xtask verify --crate rustfs-gateway-fs: PASS (prebuild 29.58s outside budget; loop 29.34s <= 30s)
  • cargo xtask verify --crate rustfs-gateway-difftest: PASS (prebuild 44.10s outside budget; loop 5.04s <= 30s)
  • cargo xtask verify --crate rustfs-gateway-http: PASS (prebuild 32.39s outside budget; loop 9.18s <= 30s)
  • cargo xtask verify --crate rustfs-gateway-core: PASS (prebuild 20.98s outside budget; loop 7.86s <= 30s)
  • cargo xtask verify --crate rustfs-gateway: PASS (prebuild 45.35s outside budget; loop 1/2 23.94s <= 30s, loop 2/2 7.48s <= 30s)
  • cargo deny --locked (workspace + compat/aws-sdk-rust + fuzz/Cargo.toml): ALL 3 PASS (advisories ok, bans ok, licenses ok, sources ok)
  • actionlint .github/workflows/*.yml: PASS
  • Python suites (model/tools/verify.py, unittest discover -s scripts -p 'test_*.py'): ALL PASS
  • Static guards: 144/144 non-PR/non-BUILD guards PASS, 5/5 # REQUIRES-PR guards PASS, test_test_target_consolidation.sh (117/117), test_test_target_coverage.sh (32/32), full test_guard_scripts.sh (2057/2057, 0 failures)

Checklist

  • Four-command gate passed (fmt, clippy, test, xtask verify --crate)
  • Zero Protected Files modified (check_protected_files: no protected contract change)
  • English-only across code, comments, docs, scripts, commit messages, and PR metadata
  • Apache-2.0 license headers and 3-part //! module docs on all new Rust sources
  • No unsafe, no .unwrap()/.expect() on external input, all files <= 800 lines

Difftest-coupled change: #1634 closes fuzz, difftest XML 1.0, fs cancellation, RDMA manifest, and CI pinning gaps together.

Role Verdicts

  • concurrency-durability: attacked crates/fs/src/{staging,uploads,buckets,versioning,completion}.rs RAII staging cleanup, bounded upload-dir flock retry, and DeleteBucket crash-left staging recovery — no break found
  • perf-engineer: attacked the 6 new fuzz targets, endpoint_replay XML 1.0 validation, and .github/workflows/*.yml CI budget splits for regressions or wall-clock gate violations — no break found
  • security-adversary: attacked symlink/non-dir fail-closed recovery in crates/fs, ADR-0056 alignment in fuzz/fuzz_targets/sig_token_and_sts.rs, GitHub Action SHA pinning, and fuzz/Cargo.lock cargo-deny policy — no break found
  • simplicity-adversary: attacked staging.rs RAII guards, scripts/check_rustfs_profile_registered.sh, scripts/verify_rdma_manifest.sh, and workflow guard changes — no break found

@overtrue
overtrue merged commit 225fefc into main Nov 27, 2026
34 checks passed
@overtrue
overtrue deleted the p9/1634-fuzz-fs-rdma-ci branch November 27, 2026 02:47
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(fuzz,fs,rdma,ci): close fuzz, fs cancellation, and toolchain gaps

1 participant