mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 16:28:15 +00:00
6.5 KiB
6.5 KiB
Architecture Migration Progress
Status values: [ ] not started, [~] in progress, [x] complete, [!] blocked.
Current Context
- Issue:
rustfs/backlog#660 - Branch:
overtrue/arch-security-governance-types - Baseline:
upstream/mainatc03c0ebc363209a4820e6d6f2267e0342c6a7782 - PR type for this branch:
contract - Runtime behavior changes: none
- Rust code changes: add the pure
rustfs-security-governancecontract crate with admin route matrix metadata types, typed validation errors, and unit tests. - CI/script changes: none
- Docs changes: record the Phase 1 security-governance contract handoff.
Phase 0 Tasks
G-001Refreshmainand record baseline.- Acceptance: baseline commit, title, and branch are recorded.
- Verification:
git fetch upstream main --prune;git rev-parse upstream/main.
G-002Create migration tracking checklist.- Acceptance: this file records task state, context, verification, and handoff.
G-003Classify PR types.- Acceptance:
crate-boundaries.mdlists exactly one allowed PR type per PR.
- Acceptance:
G-004Define re-export and wrapper policy.- Acceptance: temporary compatibility code must use
RUSTFS_COMPAT_TODO.
- Acceptance: temporary compatibility code must use
G-005Add dependency direction guard.- Acceptance:
./scripts/check_layer_dependencies.shpasses on currentupstream/mainwhile still rejecting new unaccepted layer dependencies.
- Acceptance:
- [~]
G-006Create migration loss-prevention checks.- Current branch: add a mechanical admin route matrix guard from
admin-route-action-snapshot.mdandrustfs/src/admin/route_registration_test.rs. - Remaining follow-up: add checks for public re-export and storage trait coverage before pure moves.
- Current branch: add a mechanical admin route matrix guard from
G-007Create startup timeline table.- Acceptance:
startup-timeline.mdrecords current binary startup order, side effects, fatal boundaries, and readiness stages.
- Acceptance:
G-008Capture admin route-action snapshot.- Acceptance:
admin-route-action-snapshot.mdrecords current route families, handler ownership, authorization actions, public exceptions, table-catalog routes, and/minio/admincompatibility alias behavior.
- Acceptance:
G-009Enforce pre-push three-expert review.- Acceptance:
crate-boundaries.mdrequires quality/architecture, migration-preservation, and testing/verification review before push.
- Acceptance:
G-010Inventoryecstore::config::{Config, KV, KVS}consumers.- Acceptance:
ecstore-config-consumer-inventory.mdrecords the current model definitions, global accessors, persistence helpers, consumer groups, migration risks, and do-not-change contract.
- Acceptance:
TEST-PRTYPE-001Check PR type enum consistency.- Acceptance:
./scripts/check_architecture_migration_rules.shparses the allowed PR types fromcrate-boundaries.mdand fails whenARCHITECTURE.mdor architecture docs reference an unknown PR type.
- Acceptance:
COMPAT-REG-001Check temporary compatibility cleanup consistency.- Acceptance:
./scripts/check_architecture_migration_rules.shfails when a sourceRUSTFS_COMPAT_TODO(<task-id>)marker lacks a cleanup-register entry, when a register entry lacks a source marker, or when a source marker omits a removal condition.
- Acceptance:
Phase 1 Security Governance Tasks
S-001Addcrates/security-governance.- Acceptance: the crate is a workspace member and has no dependency on
rustfs,ecstore, admin handlers, Axum, or runtime state. - Verification:
cargo check -p rustfs-security-governance.
- Acceptance: the crate is a workspace member and has no dependency on
S-002Add admin route matrix core types.- Acceptance:
AdminRouteSpec,AdminRouteAccess,AdminActionRef,PublicRouteKind,RouteRiskLevel, and validation errors model route governance metadata without registering routes or enforcing auth. - Verification:
cargo test -p rustfs-security-governance.
- Acceptance:
S-003Add redaction contract types.S-004Add serde policy marker types.S-005Add supply-chain policy contract types.S-006Addrustfs/src/admin/route_policy.rsbacked by these contract types, without changing route registration or auth behavior.
Next PRs
contract: add redaction, serde policy, or supply-chain governance contract modules inside rustfs-security-governance.contract: add an admin route policy table that consumes the new admin_matrix types while preserving route registration and auth behavior.
Pre-Push Review Log
| Expert | Status | Notes |
|---|---|---|
| Quality/architecture | pass | Confirmed this is a pure contract PR: the new crate has a narrow admin_matrix module, typed errors via thiserror, no dependency on implementation crates, and no route registration or auth integration |
| Migration preservation | pass | Confirmed no runtime code paths changed: no admin handler/router edits, no startup/global-state/storage hot-path movement, no compatibility wrappers, and no behavior drift |
| Testing/verification | pass | Confirmed focused unit tests cover valid admin/public specs, duplicate method/path rejection, empty path rejection, and empty action rejection; focused checks, migration guard scripts, dependency tree review, diff check, and full make pre-commit passed |
Verification Notes
Passed:
cargo check -p rustfs-security-governancecargo test -p rustfs-security-governancecargo fmt --all --checkcargo tree -p rustfs-security-governance --edges normal./scripts/check_architecture_migration_rules.sh./scripts/check_layer_dependencies.sh./scripts/check_metrics_migration_refs.shgit diff --checkmake pre-commit
Handoff Notes
- Keep this Phase 1 branch as a pure
contractPR. Do not addrustfs/src/adminintegration, route registration changes, auth enforcement, Config moves, Storage API moves, Runtime moves, or ECStore moves. - The new crate is allowed to depend on generic Rust libraries such as
thiserror, but must stay independent from implementation crates and runtime state. - Do not add temporary compatibility code without a matching
RUSTFS_COMPAT_TODO(<task-id>)marker and cleanup-register entry. - The next admin route policy PR may consume the contract types, but must preserve current route registration, alias canonicalization, public exceptions, and handler-level authorization behavior.