mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
d1db9a10cd
Agent-instruction and architecture docs had drifted from the code: - CLAUDE.md: slim to commands + pointers; fix wrong claim that `make pre-commit` is the full pre-PR gate (that is `make pre-pr`); drop stale pre-#3929 file paths and merged bug narratives - AGENTS.md: drop dead `rust-refactor-helper` skill rule and the hand-maintained (already stale) scoped-AGENTS index; link architecture docs from Sources of Truth - .github/AGENTS.md: replace the outdated copied CI command matrix with a pointer to ci.yml - crates/AGENTS.md: merge duplicated Testing sections - ARCHITECTURE.md: resolve the utils->config contradiction (edges are removed), mark volatile counts as snapshots, fix a bad path - docs/architecture: add README router; move one-shot plans/trackers (rebalance-decommission phases, migration-progress ledger, PR template) to docs/superpowers/plans with archive headers; fix stale source paths in kept inventories (core/sets.rs, core/pools.rs, store/mod.rs, startup_* split from #3671) - docs/operations/tier-ilm-debugging.md: extracted tier debugging playbook with corrected paths - scripts/check_doc_paths.sh: new guard failing pre-commit/pre-pr when instruction/architecture docs reference nonexistent file paths - .claude/skills: add tier-debug and arch-checks repo skills; .gitignore now keeps .claude/skills and docs/operations committable Verification: ./scripts/check_doc_paths.sh, ./scripts/check_architecture_migration_rules.sh (both pass) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2.2 KiB
2.2 KiB
RustFS — CLAUDE.md
S3-compatible object store in Rust, derived from MinIO. Erasure-coded, multi-pool, supports ILM tiering/lifecycle.
Agent rules (change style, verification, PR conventions, scoped per-crate guidance) live in AGENTS.md — follow it. This file only adds what Claude Code needs on top: commands and pointers.
Commands
cargo build --release --bin rustfs # production binary
cargo check -p <crate> # fast type-check one crate
cargo test -p <crate> # test one crate
cargo fmt --all # format (required before PR)
make pre-commit # fast gate: fmt + arch checks + quick-check (NO clippy/tests)
make pre-pr # full pre-PR gate: fmt + arch checks + clippy + tests
make build-docker BUILD_OS=ubuntu22.04
Docker build note:
buildx buildwithout--loadkeeps the image in the buildx cache only —docker runwill use a stale local image. The Makefile already includes--load; if you suspect a stale binary, add--no-cacheto thebuildx buildinvocation inside.config/make/build-docker.mak.
Where to look (do not duplicate here)
- Crate membership:
Cargo.toml[workspace].members - Architecture, layering, crate map: ARCHITECTURE.md
- Migration guardrails & readiness contracts: docs/architecture/
- CI gates:
.github/workflows/ci.yml(source of truth; never copy its steps into docs) - Tier/ILM transition debugging (xl.meta inspection, versionId tracing): docs/operations/tier-ilm-debugging.md
Domain conventions worth knowing up front
- Internal object metadata is written under both
x-rustfs-internal-<suffix>andx-minio-internal-<suffix>keys for MinIO interop (crates/utils/src/http/metadata_compat.rs;get_bytesprefers the RustFS key). Never write only one of the two. - Binary metadata values (UUIDs) must be read defensively:
.and_then(|v| Uuid::from_slice(&v).ok()).filter(|u| !u.is_nil())— absent/empty/nil all mean "no value", notUuid::nil(). - A remote-tier version of
None/""means the tier bucket is unversioned: send noversionIdon tier GET/DELETE.